Avoid adding duplicate struct constructors.

TRAC #20057 ISSUE=285 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1006 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5dd6d09f
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1005
#define BUILD_REVISION 1006
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -2106,6 +2106,11 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
return; // Nameless structures don't have constructors
}
if (type.getStruct() && mStructNames.find(decorate(name)) != mStructNames.end())
{
return; // Already added
}
TType ctorType = type;
ctorType.clearArrayness();
ctorType.setPrecision(EbpHigh);
......
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