[Piglit] [PATCH 3/3] arb_gpu_shader_fp64: test vector insert and extract operations
Tapani Pälli
tapani.palli at intel.com
Wed Aug 20 05:36:20 PDT 2014
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
...lsl-double-const-expr-vector-extract.shader_test | 21 +++++++++++++++++++++
...glsl-double-const-expr-vector-insert.shader_test | 19 +++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-extract.shader_test
create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-insert.shader_test
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-extract.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-extract.shader_test
new file mode 100644
index 0000000..fee131b
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-extract.shader_test
@@ -0,0 +1,21 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64 : enable
+void main()
+{
+ const dvec4 a = dvec4(0.1, 0.0, 0.0, 1.0);
+ const dvec4 b = dvec4(0.0, 0.0, 0.2, 1.0);
+ const dvec4 c = dvec4(0.9, 1.0, 0.0, 1.0);
+ const dmat4 dm = dmat4(a, b, c, c);
+ gl_FragColor = vec4(dm[0][0], dm[1][2], dm[2][0], 1.0);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 0.1 0.2 0.9
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-insert.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-insert.shader_test
new file mode 100644
index 0000000..344da61
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/glsl-double-const-expr-vector-insert.shader_test
@@ -0,0 +1,19 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64 : enable
+void main()
+{
+ dvec4 red = dvec4(0.1, 0.0, 0.0, 1.0);
+ red[0] = 1.0;
+ gl_FragColor = vec4(red);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 1.0 0.0 0.0
--
1.9.3
More information about the Piglit
mailing list