SPV: For AST interpolateAt* ops consuming a swizzle, invert the order.
Apply the interpolation first, then apply the swizzle to the result, the inverse of the order requested by the AST. This fixes issue #411.
This commit is contained in:
16
Test/spv.swizzleInversion.frag
Normal file
16
Test/spv.swizzleInversion.frag
Normal file
@@ -0,0 +1,16 @@
|
||||
#version 450
|
||||
|
||||
in vec4 in4;
|
||||
in vec3 in3;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 v43 = interpolateAtCentroid(in4.wzx);
|
||||
vec2 v42 = interpolateAtSample(in4.zx, 1);
|
||||
vec4 v44 = interpolateAtOffset(in4.zyxw, vec2(2.0));
|
||||
float v41 = interpolateAtOffset(in4.y, vec2(2.0));
|
||||
|
||||
vec3 v33 = interpolateAtCentroid(in3.yzx);
|
||||
vec2 v32 = interpolateAtSample(in3.zx, 1);
|
||||
float v31 = interpolateAtOffset(in4.y, vec2(2.0));
|
||||
}
|
||||
Reference in New Issue
Block a user