<div dir="ltr">On 1 April 2013 11:43, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</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"><div>On 04/01/2013 11:30 AM, Ian Romanick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 03/29/2013 02:13 PM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mesa constant-folds built-in functions by using a miniature GLSL<br>
interpreter (see<br>
ir_function_signature::<u></u>constant_expression_evaluate_<u></u>expression_list()).<br>
This interpreter had a bug in its handling of array indexing, which<br>
caused expressions like "m[i][j]" (where m is a matrix) to be handled<br>
incorrectly. Specifically, it incorrectly treated j as indexing into<br>
the whole matrix (rather than indexing just into the vector m[i]); as<br>
a result the offset computed for m[i] was lost and m[i][j] was treated<br>
as m[j][0].<br>
<br>
Fixes piglit tests inverse-mat[234].{vert,frag}.<br>
<br>
NOTE: This is a candidate for the 9.1 branch.<br>
</blockquote>
<br>
Good catch. The test case fails only in 9.1 and later because it<br>
requires OpenGL 3.1, but I think the bug exists in earlier versions.<br></blockquote></div></blockquote><div><br></div><div>I'm glad you mentioned this because it prompted me to investigate further. It turns out that the test case *does* fail in 9.0, because 9.0 supports OpenGL 3.1. The bug doesn't exist in earlier versions, since the "miniature GLSL interpreter" technique was implemented in the 9.0 timeframe.<br>
<br>I'll update the note to mark this patch as a candidate for 9.1 and 9.0. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Reviewed-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com" target="_blank">ian.d.romanick@intel.com</a>><br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=57436" target="_blank">https://bugs.freedesktop.org/<u></u>show_bug.cgi?id=57436</a><br>
<br>
I already pushed my work-around to master (but not to 9.1). You can<br>
revert it when you push this change if you like.<br>
</blockquote>
<br></div>
I would like to keep the change to use dot(), as that seems like an actual improvement. For the other changes, I guess I don't have a strong preference.<br>
<br>
--Ken<br>
</blockquote></div><br></div><div class="gmail_extra">Sounds reasonable to me. Will do.<br></div></div>