[v2] arb_provoking_vertex/clipped-strip-first: New test.

Submitted by Zebediah Figura on Nov. 2, 2019, 8:32 p.m.

Details

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

Not browsing as part of any series.

Commit Message

Zebediah Figura Nov. 2, 2019, 8:32 p.m.
This test demonstrates https://bugs.freedesktop.org/show_bug.cgi?id=110451.
It fails when using llvmpipe or softpipe.
---
This is my first patch to piglit, and I do not have commit access. 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

Comments

Ping?

On 11/2/19 3:32 PM, Zebediah Figura wrote:
> This test demonstrates https://bugs.freedesktop.org/show_bug.cgi?id=110451.
> It fails when using llvmpipe or softpipe.
> ---
> This is my first patch to piglit, and I do not have commit access. 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
> 
> 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
>