[Piglit] [PATCH] arb_gpu_shader_fp64: 420pack uniform initializer tests for double

Tapani Pälli tapani.palli at intel.com
Mon Sep 8 04:29:05 PDT 2014


Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 .../glsl-uniform-initializer-5.shader_test         | 24 +++++++++++++++++
 .../glsl-uniform-initializer-6.shader_test         | 30 ++++++++++++++++++++++
 .../glsl-uniform-initializer-7.shader_test         | 27 +++++++++++++++++++
 .../glsl-uniform-initializer-8.shader_test         | 29 +++++++++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-5.shader_test
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-6.shader_test
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-7.shader_test
 create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-8.shader_test

diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-5.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-5.shader_test
new file mode 100644
index 0000000..8f57805
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-5.shader_test
@@ -0,0 +1,24 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack : require
+#extension GL_ARB_gpu_shader_fp64 : require
+uniform dvec4 color = { 0, 1, 0, 1 };
+void main()
+{
+	gl_FragColor = vec4(color);
+}
+
+[test]
+# green rectangle on left side
+draw rect -1 -1 1 2
+relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
+# blue rectangle on right side
+uniform dvec4 color 0.0 0.0 1.0 1.0
+draw rect 0 -1 1 2
+relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-6.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-6.shader_test
new file mode 100644
index 0000000..f16159f
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-6.shader_test
@@ -0,0 +1,30 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack : require
+#extension GL_ARB_gpu_shader_fp64 : require
+
+uniform dvec4 a[] = dvec4 [] (dvec4(1.0), dvec4(0.0), dvec4(0.0), dvec4(0.0),
+                      dvec4(0.0), dvec4(0.0), dvec4(0.0), dvec4(0.0),
+                      dvec4(0.0), dvec4(0.0), dvec4(0.0), dvec4(1.0),
+                      dvec4(0.0), dvec4(0.0), dvec4(0.0), dvec4(0.0));
+
+void main()
+{
+	gl_FragColor = vec4(a[1].r, a[11].r, a[2].r, 1.0);
+}
+
+[test]
+# green rectangle on left side
+draw rect -1 -1 1 2
+relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
+# blue rectangle on right side
+uniform dvec4 a[11] 0.0 0.0 0.0 0.0
+uniform dvec4 a[2] 1.0 0.0 0.0 0.0
+draw rect 0 -1 1 2
+relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-7.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-7.shader_test
new file mode 100644
index 0000000..ca77b00
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-7.shader_test
@@ -0,0 +1,27 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack : require
+#extension GL_ARB_gpu_shader_fp64 : require
+
+uniform double foo[] = double [] (0.0lf, 1.0lf, 0.0lf, 1.0lf);
+
+void main()
+{
+	gl_FragColor = vec4(foo[0], foo[1], foo[2], foo[3]);
+}
+
+[test]
+# green rectangle on left side
+draw rect -1 -1 1 2
+relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
+# blue rectangle on right side
+uniform double foo[1] 0.0
+uniform double foo[2] 1.0
+draw rect 0 -1 1 2
+relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-8.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-8.shader_test
new file mode 100644
index 0000000..47bb630
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/glsl-uniform-initializer-8.shader_test
@@ -0,0 +1,29 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shading_language_420pack : require
+#extension GL_ARB_gpu_shader_fp64 : require
+
+uniform dmat4 color = dmat4(0, 1, 0, 1,
+                            0, 0, 0, 0,
+                            0, 0, 0, 0,
+                            0, 0, 0, 0);
+
+void main()
+{
+	gl_FragColor = vec4(color[0]);
+}
+
+[test]
+# green rectangle on left side
+draw rect -1 -1 1 2
+relative probe rgb (0.25, 0.5) (0.0, 1.0, 0.0)
+# blue rectangle on right side
+uniform dmat4 color 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
+draw rect 0 -1 1 2
+relative probe rgb (0.75, 0.5) (0.0, 0.0, 1.0)
-- 
1.9.3



More information about the Piglit mailing list