Implemented support for user-defined structures

TRAC #11730 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@116 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f52561c2
...@@ -774,7 +774,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink) ...@@ -774,7 +774,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
// Base assumption: just make the type the same as the left // Base assumption: just make the type the same as the left
// operand. Then only deviations from this need be coded. // operand. Then only deviations from this need be coded.
// //
setType(TType(type, EvqTemporary, left->getNominalSize(), left->isMatrix())); setType(left->getType());
// //
// Array operations. // Array operations.
...@@ -1394,4 +1394,3 @@ void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) ...@@ -1394,4 +1394,3 @@ void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable)
pragmaTable = new TPragmaTable(); pragmaTable = new TPragmaTable();
*pragmaTable = pTable; *pragmaTable = pTable;
} }
...@@ -1331,7 +1331,7 @@ init_declarator_list ...@@ -1331,7 +1331,7 @@ init_declarator_list
single_declaration single_declaration
: fully_specified_type { : fully_specified_type {
$$.type = $1; $$.type = $1;
$$.intermAggregate = 0; $$.intermAggregate = parseContext->intermediate.makeAggregate(parseContext->intermediate.addSymbol(0, "", TType($1), $1.line), $1.line);;
} }
| fully_specified_type IDENTIFIER { | fully_specified_type IDENTIFIER {
$$.intermAggregate = parseContext->intermediate.makeAggregate(parseContext->intermediate.addSymbol(0, *$2.string, TType($1), $2.line), $2.line); $$.intermAggregate = parseContext->intermediate.makeAggregate(parseContext->intermediate.addSymbol(0, *$2.string, TType($1), $2.line), $2.line);
......
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