[Piglit] [PATCH] arb_gpu_shader_fp64: add simple explicit location execution test
Timothy Arceri
timothy.arceri at collabora.com
Mon May 23 04:11:12 UTC 2016
This currently fail on the i965 Mesa driver and likely on the gallium
drivers too.
---
.../execution/vs-fs-explicit-locations.shader_test | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
diff --git a/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
new file mode 100644
index 0000000..d951552
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test
@@ -0,0 +1,51 @@
+# basic test passing varyings with explicit locations through vs->fs.
+
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64 : require
+#extension GL_ARB_separate_shader_objects : require
+
+layout(location = 0) flat out dvec4 d1;
+layout(location = 2) flat out dvec4 d2;
+
+in vec4 piglit_vertex;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+
+ d1 = dvec4(1.0, 0.0, 1.0, 1.0);
+ d2 = dvec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64 : require
+#extension GL_ARB_separate_shader_objects : require
+
+layout(location = 0) flat in dvec4 d1;
+layout(location = 2) flat in dvec4 d2;
+
+out vec4 color;
+
+void main()
+{
+ if ((dvec4(1.0, 0.0, 1.0, 1.0) == d1) &&
+ (dvec4(0.0, 1.0, 0.0, 1.0) == d2)) {
+ color = vec4(1.0, 0.0, 1.0, 1.0);
+ return;
+ }
+
+ color = vec4(0.0, 0.0, 1.0, 1.0);
+}
+
+[test]
+clear color 0.1 0.1 0.1 0.1
+clear
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.0 1.0 1.0
--
2.5.5
More information about the Piglit
mailing list