[vlc-devel] [PATCH 1/5] direct3d11: use main() as the entry point for all types of shaders

Steve Lhomme robux4 at videolabs.io
Thu Mar 2 17:28:34 CET 2017


---
 modules/video_output/win32/direct3d11.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 83d2236b21..224b1a8d86 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -232,7 +232,7 @@ static const char* globVertexShaderFlat = "\
     float4 Texture    : TEXCOORD0;\
   };\
   \
-  VS_OUTPUT VS( VS_INPUT In )\
+  VS_OUTPUT main( VS_INPUT In )\
   {\
     return In;\
   }\
@@ -262,7 +262,7 @@ static const char* globVertexShaderProjection = "\
     float4 Texture    : TEXCOORD0;\
   };\
   \
-  VS_OUTPUT VS( VS_INPUT In )\
+  VS_OUTPUT main( VS_INPUT In )\
   {\
     VS_OUTPUT Output;\
     float4 pos = In.Position;\
@@ -300,7 +300,7 @@ static const char* globPixelShaderDefault = "\
     float4 Texture    : TEXCOORD0;\
   };\
   \
-  float4 PS( PS_INPUT In ) : SV_TARGET\
+  float4 main( PS_INPUT In ) : SV_TARGET\
   {\
     float4 rgba; \
     \
@@ -337,7 +337,7 @@ static const char *globPixelShaderBiplanarYUV_2RGB = "\
     float4 Texture    : TEXCOORD0;\
   };\
   \
-  float4 PS( PS_INPUT In ) : SV_TARGET\
+  float4 main( PS_INPUT In ) : SV_TARGET\
   {\
     float4 yuv;\
     float4 rgba;\
@@ -375,7 +375,7 @@ static const char *globPixelShaderBiplanarYUYV_2RGB = "\
     float4 Texture    : TEXCOORD0;\
   };\
   \
-  float4 PS( PS_INPUT In ) : SV_TARGET\
+  float4 main( PS_INPUT In ) : SV_TARGET\
   {\
     float4 yuv;\
     float4 rgba;\
@@ -1640,7 +1640,7 @@ static ID3DBlob* CompileShader(vout_display_t *vd, const char *psz_shader, bool
 
     /* TODO : Match the version to the D3D_FEATURE_LEVEL */
     HRESULT hr = D3DCompile(shader, strlen(shader),
-                            NULL, NULL, NULL, pixel ? "PS" : "VS",
+                            NULL, NULL, NULL, "main",
                             pixel ? (sys->legacy_shader ? "ps_4_0_level_9_1" : "ps_4_0") :
                                     (sys->legacy_shader ? "vs_4_0_level_9_1" : "vs_4_0"),
                             0, 0, &pShaderBlob, &pErrBlob);
-- 
2.11.1



More information about the vlc-devel mailing list