ERROR: 0:172: 'std430' : not supported for this version or the enabled extensions \r
ERROR: 0:172: 'std430 on a uniform block' : not supported with this profile: es\r
ERROR: 0:175: '' : array size required \r
-ERROR: 42 compilation errors. No code generated.\r
+ERROR: 0:185: 'assign' : cannot convert from 'temp 4-element array of highp float' to 'temp 3-element array of highp float'\r
+ERROR: 0:186: 'assign' : cannot convert from 'temp 3-element array of highp float' to 'temp 4-element array of highp float'\r
+ERROR: 44 compilation errors. No code generated.\r
\r
\r
Shader version: 300\r
0:158 Branch: Return with expression\r
0:158 Constant:\r
0:158 2 (const int)\r
+0:178 Function Definition: fooDeeparray( (global void)\r
+0:178 Function Parameters: \r
+0:181 Sequence\r
+0:181 Sequence\r
+0:180 move second child to first child (temp 3-element array of highp float)\r
+0:180 'x' (temp 3-element array of highp float)\r
+0:180 Constant:\r
+0:180 1.000000\r
+0:180 2.000000\r
+0:180 3.000000\r
+0:181 move second child to first child (temp 4-element array of highp float)\r
+0:181 'y' (temp 4-element array of highp float)\r
+0:181 Constant:\r
+0:181 1.000000\r
+0:181 2.000000\r
+0:181 3.000000\r
+0:181 4.000000\r
+0:183 move second child to first child (temp 3-element array of highp float)\r
+0:183 'xp' (temp 3-element array of highp float)\r
+0:183 'x' (temp 3-element array of highp float)\r
+0:184 move second child to first child (temp 4-element array of highp float)\r
+0:184 'yp' (temp 4-element array of highp float)\r
+0:184 'y' (temp 4-element array of highp float)\r
+0:185 'xp' (temp 3-element array of highp float)\r
+0:186 'yp' (temp 4-element array of highp float)\r
0:? Linker Objects\r
0:? 'm43' (uniform highp 4X3 matrix of float)\r
0:? 'm33' (uniform highp 3X3 matrix of float)\r
0:158 Branch: Return with expression\r
0:158 Constant:\r
0:158 2 (const int)\r
+0:178 Function Definition: fooDeeparray( (global void)\r
+0:178 Function Parameters: \r
+0:181 Sequence\r
+0:181 Sequence\r
+0:180 move second child to first child (temp 3-element array of highp float)\r
+0:180 'x' (temp 3-element array of highp float)\r
+0:180 Constant:\r
+0:180 1.000000\r
+0:180 2.000000\r
+0:180 3.000000\r
+0:181 move second child to first child (temp 4-element array of highp float)\r
+0:181 'y' (temp 4-element array of highp float)\r
+0:181 Constant:\r
+0:181 1.000000\r
+0:181 2.000000\r
+0:181 3.000000\r
+0:181 4.000000\r
+0:183 move second child to first child (temp 3-element array of highp float)\r
+0:183 'xp' (temp 3-element array of highp float)\r
+0:183 'x' (temp 3-element array of highp float)\r
+0:184 move second child to first child (temp 4-element array of highp float)\r
+0:184 'yp' (temp 4-element array of highp float)\r
+0:184 'y' (temp 4-element array of highp float)\r
+0:185 'xp' (temp 3-element array of highp float)\r
+0:186 'yp' (temp 4-element array of highp float)\r
0:? Linker Objects\r
0:? 'm43' (uniform highp 4X3 matrix of float)\r
0:? 'm33' (uniform highp 3X3 matrix of float)\r
qualifier.precision = p;
assert(p >= 0 && p <= EpqHigh);
}
- // for turning a TPublicType into a TType
+ // for turning a TPublicType into a TType, using a shallow copy
explicit TType(const TPublicType& p) :
basicType(p.basicType), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), arraySizes(p.arraySizes),
structure(nullptr), fieldName(nullptr), typeName(nullptr)
//
TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& identifier, const TPublicType& publicType, TArraySizes* arraySizes, TIntermTyped* initializer)
{
- TType type(publicType);
+ TType type(publicType); // shallow copy; 'type' shares the arrayness and structure definition with 'publicType'
+ if (type.isImplicitlySizedArray()) {
+ // Because "int[] a = int[2](...), b = int[3](...)" makes two arrays a and b
+ // of different sizes, for this case sharing the shallow copy of arrayness
+ // with the publicType oversubscribes it, so get a deep copy of the arrayness.
+ type.newArraySizes(*publicType.arraySizes);
+ }
if (voidErrorCheck(loc, identifier, type.getBasicType()))
return nullptr;