[vlc-commits] d3d11: rename pVertexShaderConstants to viewpointShaderConstant

Steve Lhomme git at videolan.org
Fri Oct 23 13:02:32 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 22 16:36:49 2020 +0200| [7439d50278b9fdb50f88c5f3671b634ea693f12e] | committer: Steve Lhomme

d3d11: rename pVertexShaderConstants to viewpointShaderConstant

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

 modules/video_output/win32/d3d11_quad.c    | 16 ++++++++--------
 modules/video_output/win32/d3d11_shaders.h |  2 +-
 modules/video_output/win32/direct3d11.c    |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index 1e2b23be1a..1333f66f16 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -55,8 +55,8 @@ void D3D11_RenderQuad(d3d11_device_t *d3d_dev, d3d_quad_t *quad, d3d_vshader_t *
     ID3D11DeviceContext_IASetInputLayout(d3d_dev->d3dcontext, vsshader->layout);
     ID3D11DeviceContext_IASetVertexBuffers(d3d_dev->d3dcontext, 0, 1, &quad->pVertexBuffer, &quad->vertexStride, &offset);
     ID3D11DeviceContext_IASetIndexBuffer(d3d_dev->d3dcontext, quad->pIndexBuffer, DXGI_FORMAT_R16_UINT, 0);
-    if ( quad->pVertexShaderConstants )
-        ID3D11DeviceContext_VSSetConstantBuffers(d3d_dev->d3dcontext, 0, 1, &quad->pVertexShaderConstants);
+    if ( quad->viewpointShaderConstant )
+        ID3D11DeviceContext_VSSetConstantBuffers(d3d_dev->d3dcontext, 0, 1, &quad->viewpointShaderConstant);
 
     ID3D11DeviceContext_VSSetShader(d3d_dev->d3dcontext, vsshader->shader, NULL, 0);
 
@@ -179,10 +179,10 @@ void D3D11_ReleaseQuad(d3d_quad_t *quad)
         ID3D11Buffer_Release(quad->pIndexBuffer);
         quad->pIndexBuffer = NULL;
     }
-    if (quad->pVertexShaderConstants)
+    if (quad->viewpointShaderConstant)
     {
-        ID3D11Buffer_Release(quad->pVertexShaderConstants);
-        quad->pVertexShaderConstants = NULL;
+        ID3D11Buffer_Release(quad->viewpointShaderConstant);
+        quad->viewpointShaderConstant = NULL;
     }
     D3D11_ReleasePixelShader(quad);
     for (size_t i=0; i<2; i++)
@@ -611,7 +611,7 @@ static bool ShaderUpdateConstants(vlc_object_t *o, d3d11_device_t *d3d_dev, d3d_
             res = (ID3D11Resource *)quad->pPixelShaderConstants[PS_CONST_COLORSPACE];
             break;
         case VS_CONST_VIEWPOINT:
-            res = (ID3D11Resource *)quad->pVertexShaderConstants;
+            res = (ID3D11Resource *)quad->viewpointShaderConstant;
             break;
     }
 
@@ -728,7 +728,7 @@ static float UpdateZ(float f_fovx, float f_fovy)
 void (D3D11_UpdateViewpoint)(vlc_object_t *o, d3d11_device_t *d3d_dev, d3d_quad_t *quad,
                              const vlc_viewpoint_t *viewpoint, float f_sar)
 {
-    if (!quad->pVertexShaderConstants)
+    if (!quad->viewpointShaderConstant)
         return;
 
     // Convert degree into radian
@@ -779,7 +779,7 @@ int D3D11_AllocateQuad(vlc_object_t *o, d3d11_device_t *d3d_dev,
     {
         static_assert((sizeof(VS_PROJECTION_CONST)%16)==0,"Constant buffers require 16-byte alignment");
         constantDesc.ByteWidth = sizeof(VS_PROJECTION_CONST);
-        hr = ID3D11Device_CreateBuffer(d3d_dev->d3ddevice, &constantDesc, NULL, &quad->pVertexShaderConstants);
+        hr = ID3D11Device_CreateBuffer(d3d_dev->d3ddevice, &constantDesc, NULL, &quad->viewpointShaderConstant);
         if(FAILED(hr)) {
             msg_Err(o, "Could not create the vertex shader constant buffer. (hr=0x%lX)", hr);
             goto error;
diff --git a/modules/video_output/win32/d3d11_shaders.h b/modules/video_output/win32/d3d11_shaders.h
index 1ceac7cc5e..fa906858da 100644
--- a/modules/video_output/win32/d3d11_shaders.h
+++ b/modules/video_output/win32/d3d11_shaders.h
@@ -88,7 +88,7 @@ typedef struct
     UINT                      vertexStride;
     ID3D11Buffer              *pIndexBuffer;
     UINT                      indexCount;
-    ID3D11Buffer              *pVertexShaderConstants;
+    ID3D11Buffer              *viewpointShaderConstant;
     ID3D11Buffer              *pPixelShaderConstants[2];
     UINT                       PSConstantsCount;
     ID3D11PixelShader         *d3dpixelShader[D3D11_MAX_SHADER_VIEW];
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 972a1fcf3c..9587a54870 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -294,7 +294,7 @@ static void UpdateSize(vout_display_t *vd)
 static int SetViewpoint(vout_display_t *vd, const vlc_viewpoint_t *viewpoint)
 {
     vout_display_sys_t *sys = vd->sys;
-    if ( sys->picQuad.pVertexShaderConstants )
+    if ( sys->picQuad.viewpointShaderConstant )
     {
         d3d11_device_lock( sys->d3d_dev );
         D3D11_UpdateViewpoint( vd, sys->d3d_dev, &sys->picQuad, viewpoint,



More information about the vlc-commits mailing list