<p dir="ltr">Reviewed-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>></p>
<div class="gmail_quote">On Jan 3, 2015 8:53 AM, "Brian Paul" <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, this test causes the GLSL compiler to abort in ir_validate.cpp<br>
with the message:<br>
"ir_dereference_variable @ 0x182ee80 specifies undeclared variable<br>
`unused_array' @ 0x182ed80"<br>
---<br>
.../compiler/unused-const-array.shader_test | 26 ++++++++++++++++++++++<br>
1 file changed, 26 insertions(+)<br>
create mode 100644 tests/spec/glsl-1.20/compiler/unused-const-array.shader_test<br>
<br>
diff --git a/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test b/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test<br>
new file mode 100644<br>
index 0000000..c3459a1<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.20/compiler/unused-const-array.shader_test<br>
@@ -0,0 +1,26 @@<br>
+# Test declaring an unused const array to exercise a Mesa GLSL compiler bug.<br>
+[require]<br>
+GLSL >= 1.20<br>
+<br>
+[vertex shader]<br>
+void<br>
+main()<br>
+{<br>
+ gl_Position = gl_Vertex;<br>
+}<br>
+<br>
+<br>
+[fragment shader]<br>
+<br>
+const int unused_array[1] = int[1](1);<br>
+<br>
+void<br>
+main()<br>
+{<br>
+ gl_FragColor = vec4(0, 1, 0, 1);<br>
+}<br>
+<br>
+<br>
+[test]<br>
+draw rect -1 -1 2 2<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
--<br>
1.9.1<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>
</blockquote></div>