On 27 October 2011 10:37, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 10/26/2011 06:38 PM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
These tests exercise a bug found in Mesa: if function inlining caused<br>
an execution of notEqual() to be constant-folded, an assertion failure<br>
would occur.<br>
</blockquote>
<br></div>
Is there a bugzilla entry associated with this problem in Mesa? If there is, it is worth calling it out in this commit message.<br></blockquote><div><br>No bugzilla entry that I'm aware of. I only stumbled on it because my implementation of isnan() triggered it.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Otherwise,<br>
<br>
Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com" target="_blank">ian.d.romanick@intel.com</a>><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
.../execution/fs-inline-<u></u>notequal.shader_test | 25 +++++++++++++++++++<br>
.../execution/vs-inline-<u></u>notequal.shader_test | 26 ++++++++++++++++++++<br>
2 files changed, 51 insertions(+), 0 deletions(-)<br>
create mode 100644 tests/spec/glsl-1.10/<u></u>execution/fs-inline-notequal.<u></u>shader_test<br>
create mode 100644 tests/spec/glsl-1.10/<u></u>execution/vs-inline-notequal.<u></u>shader_test<br>
<br>
diff --git a/tests/spec/glsl-1.10/<u></u>execution/fs-inline-notequal.<u></u>shader_test b/tests/spec/glsl-1.10/<u></u>execution/fs-inline-notequal.<u></u>shader_test<br>
new file mode 100644<br>
index 0000000..6def318<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.10/<u></u>execution/fs-inline-notequal.<u></u>shader_test<br>
@@ -0,0 +1,25 @@<br>
+# This test exercises a bug found in Mesa: if function inlining caused<br>
+# an execution of notEqual() to be constant-folded, an assertion<br>
+# failure would occur.<br>
+<br>
+[vertex shader]<br>
+void main()<br>
+{<br>
+ gl_Position = gl_Vertex;<br>
+}<br>
+<br>
+[fragment shader]<br>
+bvec4 foo(vec4 x, vec4 y)<br>
+{<br>
+ return notEqual(x, y);<br>
+}<br>
+<br>
+void main()<br>
+{<br>
+ gl_FragColor = vec4(foo(vec4(0.0, 0.0, 1.0, 1.0),<br>
+ vec4(0.0, 1.0, 1.0, 0.0)));<br>
+}<br>
+<br>
+[test]<br>
+draw rect -1 -1 2 2<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
diff --git a/tests/spec/glsl-1.10/<u></u>execution/vs-inline-notequal.<u></u>shader_test b/tests/spec/glsl-1.10/<u></u>execution/vs-inline-notequal.<u></u>shader_test<br>
new file mode 100644<br>
index 0000000..a2a0923<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.10/<u></u>execution/vs-inline-notequal.<u></u>shader_test<br>
@@ -0,0 +1,26 @@<br>
+# This test exercises a bug found in Mesa: if function inlining caused<br>
+# an execution of notEqual() to be constant-folded, an assertion<br>
+# failure would occur.<br>
+<br>
+[vertex shader]<br>
+bvec4 foo(vec4 x, vec4 y)<br>
+{<br>
+ return notEqual(x, y);<br>
+}<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = gl_Vertex;<br>
+ gl_FrontColor = vec4(foo(vec4(0.0, 0.0, 1.0, 1.0),<br>
+ vec4(0.0, 1.0, 1.0, 0.0)));<br>
+}<br>
+<br>
+[fragment shader]<br>
+void main()<br>
+{<br>
+ gl_FragColor = gl_Color;<br>
+}<br>
+<br>
+[test]<br>
+draw rect -1 -1 2 2<br>
+probe all rgba 0.0 1.0 0.0 1.0<br>
</blockquote>
<br>
</div></div></blockquote></div><br>