Fix implicit vector truncation warnings.

TRAC #22218 Signed-off-by: Daniel Koch Signed-off-by: Geoff Lang Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1557 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 714d9e1f
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1556
#define BUILD_REVISION 1557
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1608,7 +1608,14 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, std::string& pixelHLSL, std::
pixelHLSL += "[" + str(j) + "]";
}
pixelHLSL += " = input.v" + n + ";\n";
switch (VariableColumnCount(varying->type))
{
case 1: pixelHLSL += " = input.v" + n + ".x;\n"; break;
case 2: pixelHLSL += " = input.v" + n + ".xy;\n"; break;
case 3: pixelHLSL += " = input.v" + n + ".xyz;\n"; break;
case 4: pixelHLSL += " = input.v" + n + ";\n"; break;
default: UNREACHABLE();
}
}
}
}
......
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