[vlc-commits] d3d11: rename d3dsampState to SamplerStates

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 22 16:43:10 2020 +0200| [f6e1289e4ec38ac3be409b411e2b587af3e8e8d3] | committer: Steve Lhomme

d3d11: rename d3dsampState to SamplerStates

So it matches the variable name in the shader.

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

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

diff --git a/modules/video_output/win32/d3d11_quad.c b/modules/video_output/win32/d3d11_quad.c
index 1333f66f16..b4fa5a010d 100644
--- a/modules/video_output/win32/d3d11_quad.c
+++ b/modules/video_output/win32/d3d11_quad.c
@@ -60,8 +60,8 @@ void D3D11_RenderQuad(d3d11_device_t *d3d_dev, d3d_quad_t *quad, d3d_vshader_t *
 
     ID3D11DeviceContext_VSSetShader(d3d_dev->d3dcontext, vsshader->shader, NULL, 0);
 
-    if (quad->d3dsampState[0])
-        ID3D11DeviceContext_PSSetSamplers(d3d_dev->d3dcontext, 0, 2, quad->d3dsampState);
+    if (quad->SamplerStates[0])
+        ID3D11DeviceContext_PSSetSamplers(d3d_dev->d3dcontext, 0, 2, quad->SamplerStates);
 
     /* pixel shader */
     ID3D11DeviceContext_PSSetConstantBuffers(d3d_dev->d3dcontext, 0, ARRAY_SIZE(quad->pPixelShaderConstants), quad->pPixelShaderConstants);
@@ -187,10 +187,10 @@ void D3D11_ReleaseQuad(d3d_quad_t *quad)
     D3D11_ReleasePixelShader(quad);
     for (size_t i=0; i<2; i++)
     {
-        if (quad->d3dsampState[i])
+        if (quad->SamplerStates[i])
         {
-            ID3D11SamplerState_Release(quad->d3dsampState[i]);
-            quad->d3dsampState[i] = NULL;
+            ID3D11SamplerState_Release(quad->SamplerStates[i]);
+            quad->SamplerStates[i] = NULL;
         }
     }
     ReleaseD3D11PictureSys(&quad->picSys);
diff --git a/modules/video_output/win32/d3d11_shaders.c b/modules/video_output/win32/d3d11_shaders.c
index 597e572f4f..06e366f299 100644
--- a/modules/video_output/win32/d3d11_shaders.c
+++ b/modules/video_output/win32/d3d11_shaders.c
@@ -280,17 +280,17 @@ HRESULT (D3D11_CompilePixelShader)(vlc_object_t *o, const d3d11_shader_compiler_
     sampDesc.MaxLOD = D3D11_FLOAT32_MAX;
 
     HRESULT hr;
-    hr = ID3D11Device_CreateSamplerState(d3d_dev->d3ddevice, &sampDesc, &quad->d3dsampState[0]);
+    hr = ID3D11Device_CreateSamplerState(d3d_dev->d3ddevice, &sampDesc, &quad->SamplerStates[0]);
     if (FAILED(hr)) {
         msg_Err(o, "Could not Create the D3d11 Sampler State. (hr=0x%lX)", hr);
         return hr;
     }
 
     sampDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
-    hr = ID3D11Device_CreateSamplerState(d3d_dev->d3ddevice, &sampDesc, &quad->d3dsampState[1]);
+    hr = ID3D11Device_CreateSamplerState(d3d_dev->d3ddevice, &sampDesc, &quad->SamplerStates[1]);
     if (FAILED(hr)) {
         msg_Err(o, "Could not Create the D3d11 Sampler State. (hr=0x%lX)", hr);
-        ID3D11SamplerState_Release(quad->d3dsampState[0]);
+        ID3D11SamplerState_Release(quad->SamplerStates[0]);
         return hr;
     }
 
diff --git a/modules/video_output/win32/d3d11_shaders.h b/modules/video_output/win32/d3d11_shaders.h
index fa906858da..7820c8bcee 100644
--- a/modules/video_output/win32/d3d11_shaders.h
+++ b/modules/video_output/win32/d3d11_shaders.h
@@ -92,7 +92,7 @@ typedef struct
     ID3D11Buffer              *pPixelShaderConstants[2];
     UINT                       PSConstantsCount;
     ID3D11PixelShader         *d3dpixelShader[D3D11_MAX_SHADER_VIEW];
-    ID3D11SamplerState        *d3dsampState[2];
+    ID3D11SamplerState        *SamplerStates[2];
     D3D11_VIEWPORT            cropViewport[D3D11_MAX_SHADER_VIEW];
     unsigned int              i_width;
     unsigned int              i_height;



More information about the vlc-commits mailing list