[vlc-commits] d3d11_shaders: put the D3DCompile define next to the code

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 23 07:15:48 2020 +0200| [7ec97b481f09449b05f6bee22c3da211d5f13720] | committer: Steve Lhomme

d3d11_shaders: put the D3DCompile define next to the code

So it's more obvious when the variable is used.

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

 modules/video_output/win32/d3d11_shaders.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/win32/d3d11_shaders.c b/modules/video_output/win32/d3d11_shaders.c
index 2e98bddd9c..a6b4bb370f 100644
--- a/modules/video_output/win32/d3d11_shaders.c
+++ b/modules/video_output/win32/d3d11_shaders.c
@@ -38,10 +38,6 @@
 
 #include "d3d11_shaders.h"
 
-#if !VLC_WINSTORE_APP
-# define D3DCompile(args...)                    shaders->OurD3DCompile(args)
-#endif
-
 #define ST2084_PQ_CONSTANTS  "const float ST2084_m1 = 2610.0 / (4096.0 * 4);\n\
 const float ST2084_m2 = (2523.0 / 4096.0) * 128.0;\n\
 const float ST2084_c1 = 3424.0 / 4096.0;\n\
@@ -684,6 +680,11 @@ static ID3DBlob* D3D11_CompileShader(vlc_object_t *obj, const d3d11_shaders_t *s
             target = "vs_4_0_level_9_1";
     }
 
+#if VLC_WINSTORE_APP
+    VLC_UNUSED(shaders);
+#else
+# define D3DCompile(args...)    shaders->OurD3DCompile(args)
+#endif
     HRESULT hr = D3DCompile(psz_shader, strlen(psz_shader),
                             NULL, NULL, NULL, "main", target,
                             0, 0, &pShaderBlob, &pErrBlob);



More information about the vlc-commits mailing list