---
 .../glsl-1.30/execution/fs-sign-int4.shader_test   |   24 +++++++++++++++++
 .../glsl-1.30/execution/vs-sign-int4.shader_test   |   27 ++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 tests/spec/glsl-1.30/execution/fs-sign-int4.shader_test
 create mode 100644 tests/spec/glsl-1.30/execution/vs-sign-int4.shader_test

diff --git a/tests/spec/glsl-1.30/execution/fs-sign-int4.shader_test 
b/tests/spec/glsl-1.30/execution/fs-sign-int4.shader_test
new file mode 100644
index 0000000..423d098
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/fs-sign-int4.shader_test
@@ -0,0 +1,24 @@
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+void main()
+{
+       gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+uniform ivec4 arg0;
+void main()
+{
+       ivec4 r = sign(arg0);
+       // convert -1, 0, 1 to 0.0, 0.5, 1.0
+       gl_FragColor = vec4(r) * 0.5 + 0.5;
+}
+
+[test]
+uniform ivec4 arg0 -5 5 0 3
+draw rect -1 -1 2 2
+probe rgb 1 1  0 1 0.5 0
diff --git a/tests/spec/glsl-1.30/execution/vs-sign-int4.shader_test 
b/tests/spec/glsl-1.30/execution/vs-sign-int4.shader_test
new file mode 100644
index 0000000..4fe7702
--- /dev/null
+++ b/tests/spec/glsl-1.30/execution/vs-sign-int4.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.30
+
+[vertex shader]
+#version 130
+uniform ivec4 arg0;
+out vec4 color;
+void main()
+{
+       ivec4 r = sign(arg0);
+       // convert -1, 0, 1 to 0.0, 0.5, 1.0
+       color = vec4(r) * 0.5 + 0.5;
+       gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 130
+in vec4 color;
+void main()
+{
+       gl_FragColor = color;
+}
+
+[test]
+uniform ivec4 arg0 0 55 -13 2
+draw rect -1 -1 2 2
+probe rgb 1 1  0.5 1.0 0.0 1.0
-- 
1.7.10.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to