<div dir="ltr"><div>Hello,</div><div><br></div><div>Thanks for review)</div><div><br></div><div>Regards,</div><div>Andrii.<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 27, 2018 at 6:18 AM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 22/06/18 18:36, andrii.simiklit wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
It would be great If somebody could take a look this test)<br>
This test against following bug:<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=96354" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/s<wbr>how_bug.cgi?id=96354</a><br>
</blockquote>
<br>
I've clean up the description, removed some trailing spaces and pushed this test.<br>
<br>
Thanks!<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Andrii.<br>
<br>
On 05.06.18 16:33, Andrii Simiklit wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
All of our other tests for instanced geometry shaders don't actually<br>
transfer the vertices to the geometry shader<br>
from the vertex shader using gl_Position.<br>
This used to be broken with the i965 driver's in Mesa 12.1.0<br>
on revision d10ae20b9678f1a5b8a81716c68e61<wbr>2662665277.<br>
This test should give us ability to detect<br>
such kind of bugs like 96354 bug in future.<br>
<br>
Signed-off-by: Andrii Simiklit <<a href="mailto:andrii.simiklit@globallogic.com" target="_blank">andrii.simiklit@globallogic.c<wbr>om</a>><br>
---<br>
.../instanced-inputs-built-in-<wbr>variable.shader_test | 68 ++++++++++++++++++++++<br>
1 file changed, 68 insertions(+)<br>
create mode 100644 tests/spec/arb_gpu_shader5/exe<wbr>cution/instanced-inputs-built-<wbr>in-variable.shader_test <br>
<br>
diff --git a/tests/spec/arb_gpu_shader5/e<wbr>xecution/instanced-inputs-buil<wbr>t-in-variable.shader_test b/tests/spec/arb_gpu_shader5/e<wbr>xecution/instanced-inputs-buil<wbr>t-in-variable.shader_test <br>
new file mode 100644<br>
index 0000000..86b2bbd<br>
--- /dev/null<br>
+++ b/tests/spec/arb_gpu_shader5/e<wbr>xecution/instanced-inputs-buil<wbr>t-in-variable.shader_test <br>
@@ -0,0 +1,68 @@<br>
+#It seems as duplicate of the "instanced-inputs.shader_test" test but it could not detect the bug 96354.<br>
+#It could detect the 96354 bug if and only if vertices are transferred<br>
+#from vertex shader into geometry shader through built-in variable gl_Position.<br>
+#<br>
+#Specification permits us to do it "11.3.4.4 Geometry Shader Inputs:<br>
+# Structure member gl_Position holds the per-vertex position, as written<br>
+# by the vertex shader to its built-in output variable gl_Position.<br>
+# Note that writing to gl_Position from either the vertex or geometry shader is<br>
+# optional (also see section 7.1(“Built-In Variables”) of the OpenGL Shading Language Specification)"<br>
+<br>
+[require]<br>
+GL >= 2.0<br>
+GLSL >= 1.50<br>
+GL_ARB_gpu_shader5<br>
+<br>
+[vertex shader]<br>
+in vec4 vertex;<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = vertex;<br>
+}<br>
+<br>
+[geometry shader]<br>
+#extension GL_ARB_gpu_shader5 : require<br>
+layout(triangles) in;<br>
+layout(triangle_strip, max_vertices = 3) out;<br>
+layout(invocations = 4) in;<br>
+<br>
+void main()<br>
+{<br>
+ vec2 offset;<br>
+ if (gl_InvocationID == 0)<br>
+ offset.xy = vec2(-0.5, -0.5);<br>
+ else if (gl_InvocationID == 1)<br>
+ offset.xy = vec2( 0.5, -0.5);<br>
+ else if (gl_InvocationID == 2)<br>
+ offset.xy = vec2(-0.5, 0.5);<br>
+ else if (gl_InvocationID == 3)<br>
+ offset.xy = vec2( 0.5, 0.5);<br>
+<br>
+ for (int i = 0; i < 3; i++) {<br>
+ gl_Position = gl_in[i].gl_Position;<br>
+ gl_Position.xy += offset;<br>
+ EmitVertex();<br>
+ }<br>
+}<br>
+<br>
+[fragment shader]<br>
+void main()<br>
+{<br>
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);<br>
+}<br>
+<br>
+[vertex data]<br>
+vertex/float/2<br>
+-0.5 -0.5<br>
+ 0.5 -0.5<br>
+-0.5 0.0<br>
+ 0.5 0.0<br>
+-0.5 0.5<br>
+ 0.5 0.5<br>
+<br>
+[test]<br>
+clear color 0.0 0.0 0.0 0.0<br>
+clear<br>
+draw arrays GL_TRIANGLE_STRIP 0 6<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
\ No newline at end of file<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org" target="_blank">Piglit@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/piglit" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/piglit</a><br>
</blockquote>
</blockquote></div><br></div></div></div>