[Piglit] [PATCH] arb_gpu_shader_fp64: test for varying location overlap
Timothy Arceri
timothy.arceri at collabora.com
Tue Dec 15 20:10:54 PST 2015
Test results:
Nvidia GeForce 840M - NVIDIA 352.41: pass
Mesa 11.2 (dev): crash
---
.../vs-to-fs-explicit-location-overlap.shader_test | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 tests/spec/arb_gpu_shader_fp64/linker/vs-to-fs-explicit-location-overlap.shader_test
diff --git a/tests/spec/arb_gpu_shader_fp64/linker/vs-to-fs-explicit-location-overlap.shader_test b/tests/spec/arb_gpu_shader_fp64/linker/vs-to-fs-explicit-location-overlap.shader_test
new file mode 100644
index 0000000..d5f04a0
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/linker/vs-to-fs-explicit-location-overlap.shader_test
@@ -0,0 +1,52 @@
+// From section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
+//
+// "If a non-vertex shader input is a scalar or vector type other than
+// dvec3 or dvec4, it will consume a single location, while types dvec3 or
+// dvec4 will consume two consecutive locations."
+
+[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
+
+in vec4 piglit_vertex;
+
+layout(location = 0) flat out dvec4 dout1;
+layout(location = 1) flat out dvec4 dout2;
+
+void main()
+{
+ gl_Position = piglit_vertex;
+ dout1 = dvec4(1.0);
+ dout2 = dvec4(0.0);
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64 : require
+#extension GL_ARB_separate_shader_objects : require
+
+uniform dvec4 expected;
+
+layout(location = 0) flat in dvec4 dout1;
+layout(location = 1) flat in dvec4 dout2;
+
+out vec4 color;
+
+void main()
+{
+ if (expected == dout1)
+ color = vec4(1.0, 0.0, 0.0, 1.0);
+ else if (expected == dout2)
+ color = vec4(1.0, 1.0, 0.0, 1.0);
+ else
+ color = vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+[test]
+link error
--
2.4.3
More information about the Piglit
mailing list