<div dir="ltr">On 25 May 2013 22:44, Fabian Bieler <span dir="ltr"><<a href="mailto:fabianbieler@fastmail.fm" target="_blank">fabianbieler@fastmail.fm</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
.../execution/generate-zero-primitives.shader_test | 55 ++++++++++++++++++++++<br>
1 file changed, 55 insertions(+)<br>
create mode 100644 tests/spec/arb_geometry_shader4/execution/generate-zero-primitives.shader_test<br>
<br>
diff --git a/tests/spec/arb_geometry_shader4/execution/generate-zero-primitives.shader_test b/tests/spec/arb_geometry_shader4/execution/generate-zero-primitives.shader_test<br>
new file mode 100644<br>
index 0000000..d6d5b5b<br>
--- /dev/null<br>
+++ b/tests/spec/arb_geometry_shader4/execution/generate-zero-primitives.shader_test<br>
@@ -0,0 +1,55 @@<br>
+[require]<br>
+GL >= 2.0<br>
+GLSL >= 1.10<br>
+GL_ARB_geometry_shader4<br>
+<br>
+[vertex shader]<br>
+#version 110<br>
+<br>
+attribute vec4 vertex;<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = vertex;<br>
+}<br>
+<br>
+[geometry shader]<br>
+#version 110<br>
+#extension GL_ARB_geometry_shader4: enable<br>
+<br>
+void main()<br>
+{<br>
+ int minus_one = -1;<br>
+ for (int i = 0; i < 3; i++) {<br>
+ minus_one += int(gl_PositionIn[i].x + gl_PositionIn[i].y);<br>
+ }<br>
+ /* minus_one should still be -1. */<br>
+ for (int i = 0; i < minus_one; i++) {<br>
+ gl_Position = gl_PositionIn[i];<br>
+ EmitVertex();<br>
+ }<br>
+}<br></blockquote><div><br></div><div>This seems like a lot of effort to go to, when you could get the same effect from:<br><br></div><div>void main()<br>{<br>}<br><br></div><div>What's the goal in doing the extra work?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+[geometry layout]<br>
+input type GL_TRIANGLES<br>
+output type GL_TRIANGLE_STRIP<br>
+vertices out 3<br>
+<br>
+[fragment shader]<br>
+#version 110<br>
+<br>
+void main()<br>
+{<br>
+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);<br>
+}<br>
+<br>
+[vertex data]<br>
+vertex/float/2<br>
+-1.0 -1.0<br>
+ 1.0 -1.0<br>
+ 1.0 1.0<br>
+-1.0 1.0<br>
+<br>
+[test]<br></blockquote><div><br></div><div>The contents of the back buffer are undefined at the start of the test. To make the test deterministic, you'll need to add this:<br><br></div><div>clear color 0.0 0.0 0.0 0.0<br>
clear<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+draw arrays GL_TRIANGLE_FAN 0 4<br>
+probe all rgb 0.0 0.0 0.0 <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.2<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>