Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
On 6/10/18 10:58 am, Ilia Mirkin wrote:
Current mesa fails both of these (in different ways!). Inspired by WebGL conformance test conformance2/glsl3/vector-dynamic-indexing-swizzled-lvalue.html Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> --- .../swizzled-writemask-indexing-nonconst.shader_test | 17 +++++++++++++++++ .../execution/swizzled-writemask-indexing.shader_test | 15 +++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/spec/glsl-1.10/execution/swizzled-writemask-indexing-nonconst.shader_test create mode 100644 tests/spec/glsl-1.10/execution/swizzled-writemask-indexing.shader_test diff --git a/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing-nonconst.shader_test b/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing-nonconst.shader_test new file mode 100644 index 000000000..fa1f7df58 --- /dev/null +++ b/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing-nonconst.shader_test @@ -0,0 +1,17 @@ +[require] +GLSL >= 1.10 + +[vertex shader passthrough] + +[fragment shader] +uniform int zero; +void main() { + gl_FragColor = vec4(1, 0, 0, 1); + gl_FragColor.wzyx[zero + 2] = 1.0; + gl_FragColor.wzyx[zero + 3] = 0.0; +} + +[test] +uniform int zero 0 +draw rect -1 -1 2 2 +probe all rgba 0 1 0 1 diff --git a/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing.shader_test b/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing.shader_test new file mode 100644 index 000000000..f61ebabb8 --- /dev/null +++ b/tests/spec/glsl-1.10/execution/swizzled-writemask-indexing.shader_test @@ -0,0 +1,15 @@ +[require] +GLSL >= 1.10 + +[vertex shader passthrough] + +[fragment shader] +void main() { + gl_FragColor = vec4(1, 0, 0, 1); + gl_FragColor.wzyx[2] = 1.0; + gl_FragColor.wzyx[3] = 0.0; +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0 1 0 1
_______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit