Output all fragment data to gl_Color.

TRAC #22715 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2124 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 2226e04f
......@@ -1131,41 +1131,11 @@ void OutputHLSL::visitSymbol(TIntermSymbol *node)
TString name = node->getSymbol();
if (name == "gl_FragColor")
{
out << "gl_Color[0]";
mUsesFragColor = true;
}
else if (name == "gl_FragData")
{
out << "gl_Color";
mUsesFragData = true;
}
else if (name == "gl_DepthRange")
if (name == "gl_DepthRange")
{
mUsesDepthRange = true;
out << name;
}
else if (name == "gl_FragCoord")
{
mUsesFragCoord = true;
out << name;
}
else if (name == "gl_PointCoord")
{
mUsesPointCoord = true;
out << name;
}
else if (name == "gl_FrontFacing")
{
mUsesFrontFacing = true;
out << name;
}
else if (name == "gl_PointSize")
{
mUsesPointSize = true;
out << name;
}
else
{
TQualifier qualifier = node->getQualifier();
......@@ -1185,6 +1155,36 @@ void OutputHLSL::visitSymbol(TIntermSymbol *node)
mReferencedVaryings[name] = node;
out << decorate(name);
}
else if (qualifier == EvqFragColor)
{
out << "gl_Color[0]";
mUsesFragColor = true;
}
else if (qualifier == EvqFragData)
{
out << "gl_Color";
mUsesFragData = true;
}
else if (qualifier == EvqFragCoord)
{
mUsesFragCoord = true;
out << name;
}
else if (qualifier == EvqPointCoord)
{
mUsesPointCoord = true;
out << name;
}
else if (qualifier == EvqFrontFacing)
{
mUsesFrontFacing = true;
out << name;
}
else if (qualifier == EvqPointSize)
{
mUsesPointSize = true;
out << name;
}
else
{
out << decorate(name);
......
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