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/dx11proto@1982 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 25b5f1d1
#define MAJOR_VERSION 1
#define MINOR_VERSION 1
#define BUILD_VERSION 0
#define BUILD_REVISION 1977
#define BUILD_REVISION 1982
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1265,6 +1265,11 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, int registers, const Varying
"struct VS_OUTPUT\n"
"{\n";
if (shaderModel < 4)
{
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n";
}
for (int r = 0; r < registers; r++)
{
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
vertexHLSL += " float gl_PointSize : PSIZE;\n";
}
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n"
"};\n"
if (shaderModel >= 4)
{
vertexHLSL += " float4 gl_Position : " + positionSemantic + ";\n";
}
vertexHLSL += "};\n"
"\n"
"VS_OUTPUT main(VS_INPUT input)\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