[Piglit] [PATCH] Add meaner swizzle-swizzle-lhs tests.
Kenneth Graunke
kenneth at whitecape.org
Wed Jul 22 21:39:30 PDT 2015
Mesa's compiler happened to handle .xzy.z correctly, while .xy.x and
other combinations were broken. Try that and a triply-nested one.
Cc: idr at freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
.../glsl-vs-swizzle-swizzle-lhs-2.shader_test | 21 +++++++++++++++++++++
.../glsl-vs-swizzle-swizzle-lhs-3.shader_test | 21 +++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 tests/shaders/glsl-vs-swizzle-swizzle-lhs-2.shader_test
create mode 100644 tests/shaders/glsl-vs-swizzle-swizzle-lhs-3.shader_test
diff --git a/tests/shaders/glsl-vs-swizzle-swizzle-lhs-2.shader_test b/tests/shaders/glsl-vs-swizzle-swizzle-lhs-2.shader_test
new file mode 100644
index 0000000..98b682b
--- /dev/null
+++ b/tests/shaders/glsl-vs-swizzle-swizzle-lhs-2.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+ vec4 color = vec4(0.1, 0.2, 0.3, 0.4);
+ color.xy.x = 1.0;
+ gl_FrontColor = color;
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+void main()
+{
+ gl_FragColor = gl_Color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe rgba 1 1 1.0 0.2 0.3 0.4
diff --git a/tests/shaders/glsl-vs-swizzle-swizzle-lhs-3.shader_test b/tests/shaders/glsl-vs-swizzle-swizzle-lhs-3.shader_test
new file mode 100644
index 0000000..3213c25
--- /dev/null
+++ b/tests/shaders/glsl-vs-swizzle-swizzle-lhs-3.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+ vec4 color = vec4(0.1, 0.2, 0.3, 0.4);
+ color.wxz.yx.y = 1.0;
+ gl_FrontColor = color;
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+void main()
+{
+ gl_FragColor = gl_Color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe rgba 1 1 0.1 0.2 0.3 1.0
--
2.4.6
More information about the Piglit
mailing list