arb_provoking_vertex/clipped-strip-first: New test.

Submitted by Zebediah Figura on June 23, 2019, 4:57 a.m.

Details

Message ID 20190623045714.1794-1-z.figura12@gmail.com
State New
Headers show
Series "arb_provoking_vertex/clipped-strip-first: New test." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Zebediah Figura June 23, 2019, 4:57 a.m.
This test demonstrates https://bugs.freedesktop.org/show_bug.cgi?id=110451.
It fails when using llvmpipe or softpipe.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
This is my first patch to piglit. I have likely made all manner of stylistic
or procedural errors, patience is appreciated :-)

 .../clipped-strip-first.shader_test           | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test b/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test
new file mode 100644
index 0000000..553bf5b
--- /dev/null
+++ b/tests/spec/arb_provoking_vertex/clipped-strip-first.shader_test
@@ -0,0 +1,45 @@ 
+# Check that the correct provoking vertex is used when part of the geometry
+# is clipped and the flat interpolation qualifier is used.
+
+[require]
+GLSL >= 1.30
+GL_EXT_provoking_vertex
+
+[vertex shader]
+#version 130
+
+in vec4 piglit_vertex;
+in vec3 piglit_color;
+flat out vec4 fscolor;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+  fscolor = vec4(piglit_color, 1.0);
+}
+
+[fragment shader]
+#version 130
+
+flat in vec4 fscolor;
+
+void main()
+{
+  gl_FragColor = fscolor;
+}
+
+[vertex data]
+piglit_vertex/float/2 	piglit_color/float/3
+-2.0 -1.0		0.0 1.0 0.0
+ 2.0 -1.0		0.0 1.0 0.0
+-2.0  0.0		0.0 1.0 0.0
+ 2.0  0.0		0.0 1.0 0.0
+-2.0  1.0		1.0 0.0 0.0
+ 2.0  1.0		1.0 0.0 0.0
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+provoking vertex first
+draw arrays GL_TRIANGLE_STRIP 0 6
+probe all rgba 0.0 1.0 0.0 1.0