Also prototype the Lod0 function variant if needed.

TRAC #21842 Issue=374 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1307 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent fad16ed4
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 1306 #define BUILD_REVISION 1307
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -1340,7 +1340,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1340,7 +1340,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
case EOpPrototype: case EOpPrototype:
if (visit == PreVisit) if (visit == PreVisit)
{ {
out << typeString(node->getType()) << " " << decorate(node->getName()) << "("; out << typeString(node->getType()) << " " << decorate(node->getName()) << (mOutputLod0Function ? "Lod0(" : "(");
TIntermSequence &arguments = node->getSequence(); TIntermSequence &arguments = node->getSequence();
...@@ -1362,6 +1362,14 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1362,6 +1362,14 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
out << ");\n"; out << ");\n";
// Also prototype the Lod0 variant if needed
if (mContainsLoopDiscontinuity && !mOutputLod0Function)
{
mOutputLod0Function = true;
node->traverse(this);
mOutputLod0Function = false;
}
return false; return false;
} }
break; break;
......
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