[vlc-commits] hw:d3d11: rename AllocateShaderView() to D3D11_AllocateShaderView()

Steve Lhomme git at videolan.org
Mon May 28 13:25:04 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Dec  4 17:20:45 2017 +0100| [1378baeb5cc4b1ed34c36f66bf92823fc3dbd16d] | committer: Steve Lhomme

hw:d3d11: rename AllocateShaderView() to D3D11_AllocateShaderView()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1378baeb5cc4b1ed34c36f66bf92823fc3dbd16d
---

 modules/codec/avcodec/d3d11va.c         |  4 ++--
 modules/video_chroma/d3d11_fmt.c        |  3 ++-
 modules/video_chroma/d3d11_fmt.h        |  9 +++++----
 modules/video_output/win32/direct3d11.c | 16 ++++++++--------
 4 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index feea28ab0b..76fecbfd51 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -796,7 +796,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
                 break;
             }
 
-            AllocateShaderView(VLC_OBJECT(va), sys->d3d_dev.d3ddevice, textureFmt, pic->p_sys->texture, pic->p_sys->slice_index, pic->p_sys->resourceView);
+            D3D11_AllocateShaderView(va, sys->d3d_dev.d3ddevice, textureFmt, pic->p_sys->texture, pic->p_sys->slice_index, pic->p_sys->resourceView);
 
             dx_sys->hw_surface[surface_idx] = pic->p_sys->decoder;
         }
@@ -866,7 +866,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
             if (texDesc.BindFlags & D3D11_BIND_SHADER_RESOURCE)
             {
                 ID3D11Texture2D *textures[D3D11_MAX_SHADER_VIEW] = {p_texture, p_texture, p_texture};
-                AllocateShaderView(VLC_OBJECT(va), sys->d3d_dev.d3ddevice, textureFmt, textures, surface_idx,
+                D3D11_AllocateShaderView(va, sys->d3d_dev.d3ddevice, textureFmt, textures, surface_idx,
                                    &sys->resourceView[surface_idx * D3D11_MAX_SHADER_VIEW]);
             }
         }
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 5d6ccc6469..5ea6971111 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -82,7 +82,8 @@ void ReleasePictureSys(picture_sys_t *p_sys)
 }
 
 /* map texture planes to resource views */
-int AllocateShaderView(vlc_object_t *obj, ID3D11Device *d3ddevice,
+#undef D3D11_AllocateShaderView
+int D3D11_AllocateShaderView(vlc_object_t *obj, ID3D11Device *d3ddevice,
                               const d3d_format_t *format,
                               ID3D11Texture2D *p_texture[D3D11_MAX_SHADER_VIEW], UINT slice_index,
                               ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW])
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 49465ae5a3..75df339105 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -92,10 +92,11 @@ void AcquirePictureSys(picture_sys_t *p_sys);
 void ReleasePictureSys(picture_sys_t *p_sys);
 
 /* map texture planes to resource views */
-int AllocateShaderView(vlc_object_t *obj, ID3D11Device *d3ddevice,
-                              const d3d_format_t *format,
-                              ID3D11Texture2D *p_texture[D3D11_MAX_SHADER_VIEW], UINT slice_index,
-                              ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW]);
+int D3D11_AllocateShaderView(vlc_object_t *obj, ID3D11Device *d3ddevice,
+                             const d3d_format_t *format,
+                             ID3D11Texture2D *p_texture[D3D11_MAX_SHADER_VIEW], UINT slice_index,
+                             ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW]);
+#define D3D11_AllocateShaderView(a,b,c,d,e,f)  D3D11_AllocateShaderView(VLC_OBJECT(a),b,c,d,e,f)
 
 HRESULT D3D11_CreateDevice(vlc_object_t *obj, d3d11_handle_t *,
                            bool hw_decoding, d3d11_device_t *out);
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 3319f703f9..63e3ce364f 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -659,9 +659,9 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
                 picture_sys_t *p_sys = pictures[picture_count]->p_sys;
                 if (!p_sys->texture[0])
                     continue;
-                if (AllocateShaderView(VLC_OBJECT(vd), sys->d3d_dev.d3ddevice, sys->picQuadConfig,
-                                       p_sys->texture, picture_count,
-                                       p_sys->resourceView))
+                if (D3D11_AllocateShaderView(vd, sys->d3d_dev.d3ddevice, sys->picQuadConfig,
+                                             p_sys->texture, picture_count,
+                                             p_sys->resourceView))
                     goto error;
             }
         }
@@ -2110,8 +2110,8 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
         }
 
         sys->picQuad.resourceCount = DxgiResourceCount(sys->picQuadConfig);
-        if (AllocateShaderView(VLC_OBJECT(vd), sys->d3d_dev.d3ddevice, sys->picQuadConfig,
-                               textures, 0, sys->stagingSys.resourceView))
+        if (D3D11_AllocateShaderView(vd, sys->d3d_dev.d3ddevice, sys->picQuadConfig,
+                                     textures, 0, sys->stagingSys.resourceView))
         {
             msg_Err(vd, "Failed to allocate the staging shader view");
             return VLC_EGENERIC;
@@ -3119,9 +3119,9 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
             }
 
             d3dquad->resourceCount = DxgiResourceCount(sys->d3dregion_format);
-            if (AllocateShaderView(VLC_OBJECT(vd), sys->d3d_dev.d3ddevice, sys->d3dregion_format,
-                                   d3dquad->picSys.texture, 0,
-                                   d3dquad->picSys.resourceView)) {
+            if (D3D11_AllocateShaderView(vd, sys->d3d_dev.d3ddevice, sys->d3dregion_format,
+                                         d3dquad->picSys.texture, 0,
+                                         d3dquad->picSys.resourceView)) {
                 msg_Err(vd, "Failed to create %dx%d shader view for OSD",
                         r->fmt.i_visible_width, r->fmt.i_visible_height);
                 free(d3dquad);



More information about the vlc-commits mailing list