Commit d6c37b19 by John Kessenich

GL_OES_shader_multisample_interpolation: Include scalar swizzles as valid for interpolateAt*.

parent 0fc4338f
......@@ -126,7 +126,7 @@ void interp()
interpolateAtSample(sampInArray, 1); // ERROR
interpolateAtSample(sampInArray[i], 0);
interpolateAtSample(s1.x, 2); // ERROR
interpolateAtSample(s1.x, 2);
interpolateAtSample(scalarIn, 1);
interpolateAtOffset(sampInArray, vec2(0.2)); // ERROR
......
......@@ -144,4 +144,5 @@ sample in vec3 sampInArray[4];
void interp()
{
interpolateAtCentroid(sampInArray[2].xy);
interpolateAtSample(sampInArray[2].x.x, 2);
}
......@@ -67,6 +67,16 @@ ERROR: node is still EOpNull!
0:146 0 (const int)
0:146 Constant:
0:146 1 (const int)
0:147 interpolateAtSample (global float)
0:147 direct index (temp float)
0:147 direct index (smooth sample temp 3-component vector of float)
0:147 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
0:147 Constant:
0:147 2 (const int)
0:147 Constant:
0:147 0 (const int)
0:147 Constant:
0:147 2 (const int)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)
......@@ -125,6 +135,16 @@ ERROR: node is still EOpNull!
0:146 0 (const int)
0:146 Constant:
0:146 1 (const int)
0:147 interpolateAtSample (global float)
0:147 direct index (temp float)
0:147 direct index (smooth sample temp 3-component vector of float)
0:147 'sampInArray' (smooth sample in 4-element array of 3-component vector of float)
0:147 Constant:
0:147 2 (const int)
0:147 Constant:
0:147 0 (const int)
0:147 Constant:
0:147 2 (const int)
0:? Linker Objects
0:? 'a' (layout(location=4 component=2 ) smooth in 2-component vector of float)
0:? 'b' (layout(location=4 component=1 ) smooth in float)
......
......@@ -882,7 +882,9 @@ const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool
if (! swizzleOkay) {
if (op == EOpVectorSwizzle)
return nullptr;
if ((op == EOpIndexDirect || op == EOpIndexIndirect) && binary->getLeft()->getType().isVector() && ! binary->getLeft()->getType().isArray())
if ((op == EOpIndexDirect || op == EOpIndexIndirect) &&
(binary->getLeft()->getType().isVector() || binary->getLeft()->getType().isScalar()) &&
! binary->getLeft()->getType().isArray())
return nullptr;
}
node = node->getAsBinaryNode()->getLeft();
......
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