Create structure definitions for structures in a return statement.

TRAC #18319 ANGLEBUG=185 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@766 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7fb81e83
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 765 #define BUILD_REVISION 766
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -2050,14 +2050,7 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI ...@@ -2050,14 +2050,7 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
typedef std::vector<TType> ParameterArray; typedef std::vector<TType> ParameterArray;
ParameterArray ctorParameters; ParameterArray ctorParameters;
if (parameters) if (type.getStruct())
{
for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
{
ctorParameters.push_back((*parameter)->getAsTyped()->getType());
}
}
else if (type.getStruct())
{ {
mStructNames.insert(decorate(name)); mStructNames.insert(decorate(name));
...@@ -2086,6 +2079,13 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI ...@@ -2086,6 +2079,13 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
ctorParameters.push_back(*fields[i].type); ctorParameters.push_back(*fields[i].type);
} }
} }
else if (parameters)
{
for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
{
ctorParameters.push_back((*parameter)->getAsTyped()->getType());
}
}
else UNREACHABLE(); else UNREACHABLE();
TString constructor; TString constructor;
......
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