[Piglit] [PATCH] arb_gpu_shader_fp64: test linking of dmat2 varying with explicit location

Timothy Arceri timothy.arceri at collabora.com
Fri Jul 22 06:51:18 UTC 2016


This causes a crash in the i965 backend.
---
 .../linker/gs-dmat2-max-location.shader_test       | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader_fp64/linker/gs-dmat2-max-location.shader_test

diff --git a/tests/spec/arb_gpu_shader_fp64/linker/gs-dmat2-max-location.shader_test b/tests/spec/arb_gpu_shader_fp64/linker/gs-dmat2-max-location.shader_test
new file mode 100644
index 0000000..84992fc
--- /dev/null
+++ b/tests/spec/arb_gpu_shader_fp64/linker/gs-dmat2-max-location.shader_test
@@ -0,0 +1,53 @@
+# Test linking of dmat2 varying with an explicit location at the max varying
+# location this caused a crash in the i965 backend.
+
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader_fp64
+GL_ARB_separate_shader_objects
+
+[vertex shader passthrough]
+
+[geometry shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64: require
+#extension GL_ARB_separate_shader_objects: require
+
+layout(points)                           in;
+layout(triangle_strip, max_vertices = 4) out;
+
+out gl_PerVertex {
+  vec4 gl_Position;
+};
+
+layout(location = 30) flat out dmat2 gs_out;
+
+void main()
+{
+  gs_out = dmat2(dvec2(-0.375, -0.25), dvec2(-0.125, 0));
+  gl_Position  = vec4(-1, -1, 0, 1);
+  EmitVertex();
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader_fp64: require
+#extension GL_ARB_separate_shader_objects: require
+
+out uint fs_out;
+
+layout(location = 30) flat in dmat2 gs_out;
+
+void main()
+{
+  uint result = 1u;
+
+  if ((dmat2(dvec2(0.125, 0.25), dvec2(0.375, 0.5)) != gs_out)) {
+    result = 0u;
+  }
+
+  fs_out = result;
+}
+
+[test]
+link success
-- 
2.7.4



More information about the Piglit mailing list