summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-05-23 04:11:12 (GMT)
committerTimothy Arceri <timothy.arceri@collabora.com>2016-05-25 00:16:57 (GMT)
commit6ac28ea8571825fb19a3e352d934fb8a2a141a62 (patch)
treeb8cb4832dd64f4574a44b5cd13ecf74d32c4e409
parent6cc46e61a58272e188eb0142ab32ea9a15ea20a9 (diff)
downloadpiglit-6ac28ea8571825fb19a3e352d934fb8a2a141a62.tar.gz
piglit-6ac28ea8571825fb19a3e352d934fb8a2a141a62.tar.xz
arb_gpu_shader_fp64: add simple explicit location execution test
This currently fail on the i965 Mesa driver. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
-rw-r--r--tests/spec/arb_gpu_shader_fp64/execution/vs-fs-explicit-locations.shader_test51
1 files changed, 51 insertions, 0 deletions
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