Make position the first vertex output varying on DX9 again to work around an NVIDIA driver issue.

TRAC #22688 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2055 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent ce4d25fc
...@@ -1265,6 +1265,11 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1265,6 +1265,11 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
"struct VS_OUTPUT\n" "struct VS_OUTPUT\n"
"{\n"; "{\n";
if (shaderModel < 4)
{
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n";
}
for (int r = 0; r < registers; r++) for (int r = 0; r < registers; r++)
{ {
int registerSize = packing[r][3] ? 4 : (packing[r][2] ? 3 : (packing[r][1] ? 2 : 1)); int registerSize = packing[r][3] ? 4 : (packing[r][2] ? 3 : (packing[r][1] ? 2 : 1));
...@@ -1282,8 +1287,12 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying ...@@ -1282,8 +1287,12 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
vertexHLSL += " float gl_PointSize : PSIZE;\n"; vertexHLSL += " float gl_PointSize : PSIZE;\n";
} }
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n" if (shaderModel >= 4)
"};\n" {
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n";
}
vertexHLSL += "};\n"
"\n" "\n"
"VS_OUTPUT main(VS_INPUT input)\n" "VS_OUTPUT main(VS_INPUT input)\n"
"{\n"; "{\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment