[Piglit] [PATCH] arb_tessellation_shader/arb_gpu_shader_fp64: test dmat4x3

Dave Airlie airlied at gmail.com
Mon Dec 7 15:51:49 PST 2015


From: Dave Airlie <airlied at redhat.com>

This test passes a dmat4x3 from vs->tcs->tes->fs.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 .../execution/dmat-vs-gs-tcs-tes.shader_test       | 80 ++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 tests/spec/arb_tessellation_shader/execution/dmat-vs-gs-tcs-tes.shader_test

diff --git a/tests/spec/arb_tessellation_shader/execution/dmat-vs-gs-tcs-tes.shader_test b/tests/spec/arb_tessellation_shader/execution/dmat-vs-gs-tcs-tes.shader_test
new file mode 100644
index 0000000..a18e979
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/execution/dmat-vs-gs-tcs-tes.shader_test
@@ -0,0 +1,80 @@
+# pass a dmat4x3 through vs->tcs->tes->fs.
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+GL_ARB_gpu_shader_fp64
+
+[vertex shader]
+#extension GL_ARB_gpu_shader_fp64: require
+in vec4 vertex;
+
+out dmat4x3 vs_var0;
+
+void main()
+{
+	gl_Position = vertex;
+	vs_var0 = dmat4x3(1.0LF, 2.0LF, 3.0LF, 4.0LF, 5.0LF, 6.0LF, 7.0LF, 8.0LF, 9.0LF, 10.0LF, 11.0LF, 12.0LF);
+}
+
+
+[tessellation control shader]
+#extension GL_ARB_tessellation_shader: require
+#extension GL_ARB_gpu_shader_fp64: require
+layout(vertices = 3) out;
+
+in dmat4x3 vs_var0[];
+out dmat4x3 tcs_var0[];
+
+void main() {
+	gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
+	gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
+	gl_TessLevelInner = float[2](0.0, 0.0);
+	tcs_var0[gl_InvocationID] = vs_var0[gl_InvocationID];
+}
+
+
+[tessellation evaluation shader]
+#extension GL_ARB_tessellation_shader: require
+#extension GL_ARB_gpu_shader_fp64: require
+layout(triangles) in;
+
+in dmat4x3 tcs_var0[];
+flat out dmat4x3 tes_var0;
+
+void main() {
+        dvec2 temp;
+	gl_Position = gl_in[0].gl_Position * gl_TessCoord[0]
+	            + gl_in[1].gl_Position * gl_TessCoord[1]
+	            + gl_in[2].gl_Position * gl_TessCoord[2];
+
+	tes_var0 = tcs_var0[0];
+}
+
+
+[fragment shader]
+#extension GL_ARB_gpu_shader_fp64: require
+flat in dmat4x3 tes_var0;
+
+void main()
+{
+	if (tes_var0 == dmat4x3(1.0LF, 2.0LF, 3.0LF, 4.0LF, 5.0LF, 6.0LF, 7.0LF, 8.0LF, 9.0LF, 10.0LF, 11.0LF, 12.0LF))
+		gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+	else
+		gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+-1.0  1.0
+-1.0  1.0
+ 1.0 -1.0
+ 1.0  1.0
+
+[test]
+clear color 0.1 0.1 0.1 0.1
+clear
+patch parameter vertices 3
+draw arrays GL_PATCHES 0 6
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.5.0



More information about the Piglit mailing list