diff --git a/Test/baseResults/specExamples.vert.out b/Test/baseResults/specExamples.vert.out index 5f798a7e..7de02d3d 100644 --- a/Test/baseResults/specExamples.vert.out +++ b/Test/baseResults/specExamples.vert.out @@ -110,7 +110,7 @@ ERROR: node is still EOpNull! 0:161 'c' (in 4-component vector of float) 0:161 'd' (in 4-component vector of float) 0:162 move second child to first child (temp 3-component vector of float) -0:162 vector swizzle (temp 3-component vector of float) +0:162 vector swizzle (noContraction temp 3-component vector of float) 0:162 'v' (noContraction smooth out 4-component vector of float) 0:162 Sequence 0:162 Constant: @@ -123,7 +123,7 @@ ERROR: node is still EOpNull! 0:162 'r' (temp 3-component vector of float) 0:162 's' (temp 3-component vector of float) 0:163 move second child to first child (temp float) -0:163 direct index (temp float) +0:163 direct index (noContraction temp float) 0:163 'v' (noContraction smooth out 4-component vector of float) 0:163 Constant: 0:163 3 (const int) @@ -147,7 +147,7 @@ ERROR: node is still EOpNull! 0:163 Constant: 0:163 3 (const int) 0:164 move second child to first child (temp float) -0:164 direct index (temp float) +0:164 direct index (noContraction temp float) 0:164 'v' (noContraction smooth out 4-component vector of float) 0:164 Constant: 0:164 0 (const int) @@ -169,7 +169,7 @@ ERROR: node is still EOpNull! 0:164 Constant: 0:164 0 (const int) 0:166 move second child to first child (temp float) -0:166 direct index (temp float) +0:166 direct index (noContraction temp float) 0:166 'v' (noContraction smooth out 4-component vector of float) 0:166 Constant: 0:166 0 (const int) @@ -209,7 +209,7 @@ ERROR: node is still EOpNull! 0:167 'd' (in 4-component vector of float) 0:167 Constant: 0:167 0 (const int) -0:167 direct index (temp float) +0:167 direct index (noContraction temp float) 0:167 'v' (noContraction smooth out 4-component vector of float) 0:167 Constant: 0:167 0 (const int) @@ -394,7 +394,7 @@ ERROR: node is still EOpNull! 0:161 'c' (in 4-component vector of float) 0:161 'd' (in 4-component vector of float) 0:162 move second child to first child (temp 3-component vector of float) -0:162 vector swizzle (temp 3-component vector of float) +0:162 vector swizzle (noContraction temp 3-component vector of float) 0:162 'v' (noContraction smooth out 4-component vector of float) 0:162 Sequence 0:162 Constant: @@ -407,7 +407,7 @@ ERROR: node is still EOpNull! 0:162 'r' (temp 3-component vector of float) 0:162 's' (temp 3-component vector of float) 0:163 move second child to first child (temp float) -0:163 direct index (temp float) +0:163 direct index (noContraction temp float) 0:163 'v' (noContraction smooth out 4-component vector of float) 0:163 Constant: 0:163 3 (const int) @@ -431,7 +431,7 @@ ERROR: node is still EOpNull! 0:163 Constant: 0:163 3 (const int) 0:164 move second child to first child (temp float) -0:164 direct index (temp float) +0:164 direct index (noContraction temp float) 0:164 'v' (noContraction smooth out 4-component vector of float) 0:164 Constant: 0:164 0 (const int) @@ -453,7 +453,7 @@ ERROR: node is still EOpNull! 0:164 Constant: 0:164 0 (const int) 0:166 move second child to first child (temp float) -0:166 direct index (temp float) +0:166 direct index (noContraction temp float) 0:166 'v' (noContraction smooth out 4-component vector of float) 0:166 Constant: 0:166 0 (const int) @@ -493,7 +493,7 @@ ERROR: node is still EOpNull! 0:167 'd' (in 4-component vector of float) 0:167 Constant: 0:167 0 (const int) -0:167 direct index (temp float) +0:167 direct index (noContraction temp float) 0:167 'v' (noContraction smooth out 4-component vector of float) 0:167 Constant: 0:167 0 (const int) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 12b7fab7..3373d2f3 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -781,7 +781,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm // // .length() can't be resolved until we later see the function-calling syntax. - // Save away the name in the AST for now. Processing is compeleted in + // Save away the name in the AST for now. Processing is completed in // handleLengthMethod(). // if (field == "length") { @@ -879,6 +879,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm } else error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString().c_str()); + // Propagate noContraction up the dereference chain + if (base->getQualifier().noContraction) + result->getWritableType().getQualifier().noContraction = true; + return result; }