Преглед изворни кода

Fixing a shader linkage crash in D3D11 for 10level9 targets

Lower feature level targets in D3D11 also require SV_Position as an input param to the pixel shader, otherwise there are linkage mismatches between the vertex and pixel shaders.
Mike Popoloski пре 10 година
родитељ
комит
121cc748c2
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      tools/shaderc/shaderc.cpp

+ 1 - 1
tools/shaderc/shaderc.cpp

@@ -1390,7 +1390,7 @@ int main(int _argc, const char* _argv[])
 							strins(const_cast<char*>(brace+1), "\nvec4 bgfx_VoidFrag;\n");
 							strins(const_cast<char*>(brace+1), "\nvec4 bgfx_VoidFrag;\n");
 						}
 						}
 
 
-						const bool hasFragCoord   = NULL != strstr(input, "gl_FragCoord") || hlsl > 3;
+						const bool hasFragCoord   = NULL != strstr(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2;
 						const bool hasFragDepth   = NULL != strstr(input, "gl_FragDepth");
 						const bool hasFragDepth   = NULL != strstr(input, "gl_FragDepth");
 						const bool hasFrontFacing = NULL != strstr(input, "gl_FrontFacing");
 						const bool hasFrontFacing = NULL != strstr(input, "gl_FrontFacing");
 						const bool hasPrimitiveId = NULL != strstr(input, "gl_PrimitiveID");
 						const bool hasPrimitiveId = NULL != strstr(input, "gl_PrimitiveID");