[Piglit] [PATCH] arb_gpu_shader5: add a very basic gl_SampleMaskIn test

Ilia Mirkin imirkin at alum.mit.edu
Thu May 29 19:56:26 PDT 2014


Just ensures that without any MS set up, the coverage mask is 1.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

Silly test, but was enough for me to trace what the blob did with it. As there
are no other gl_SampleMaskIn tests, perhaps this is better than nothing?

 .../execution/samplemaskin-basic.shader_test       | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 tests/spec/arb_gpu_shader5/execution/samplemaskin-basic.shader_test

diff --git a/tests/spec/arb_gpu_shader5/execution/samplemaskin-basic.shader_test b/tests/spec/arb_gpu_shader5/execution/samplemaskin-basic.shader_test
new file mode 100644
index 0000000..a5fb2c5
--- /dev/null
+++ b/tests/spec/arb_gpu_shader5/execution/samplemaskin-basic.shader_test
@@ -0,0 +1,24 @@
+[require]
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader passthrough]
+
+[fragment shader]
+#extension GL_ARB_gpu_shader5 : enable
+
+out vec4 color;
+
+void main()
+{
+	color = vec4(1.0, 0.0, 0.0, 1.0);
+
+	/* No MS set up, should just be the current fragment. */
+	if (gl_SampleMaskIn[0] == 1) {
+		color.rg = vec2(0.0, 1.0);
+	}
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
1.8.5.5



More information about the Piglit mailing list