This is a further step to bug#32069. That bug has been fixed by Eric. But changing the matrix variable to a matrix _array_ variable still fails. This fails on Piketon (i965) with mesa master: mat2 a[2]; a[0][0][0] = 0; a[int(a[0][0][0])][0][1] = 1; Changing a[int(a[0][0][0])] into a[int(0)] passes. It passes with swrast.
Created attachment 43776 [details] new piglit test case
Created attachment 48869 [details] IR dump of the test case Here's the output of MESA_GLSL=dump of a similar test. The initial IR in the dump looks correct. However, in the linked IR, the assignment to a[i][0][1] just disappears. It seems that one of the optimizations passes is eating it.
The problem appears to be in lower_variable_index_to_cond_assign. I don't see how that code could possibly work with arrays of arrays or arrays of matrices.
Ian, can you commit my piglit test case, so I could watch when this would turn to pass in nightly testing?
It doesn't look like this piglit test was commited to piglit. But it does seem to pass now in current Mesa.
Ian, could you please commit my piglit test case?
You should probably send this to the piglit mailing list with a good commit message, such as what its testing, a link to this bug and the results of this test on various drivers. That way anyone with commit access can easily commit it once reviewed.
(In reply to Gordon Jin from comment #4) > Ian, can you commit my piglit test case, so I could watch when this would > turn to pass in nightly testing? Done. commit ce4488332b228117c173796e914e8d1f0059fcac Author: Gordon Jin <gordon.jin@intel.com> Date: Thu Feb 24 19:51:00 2011 +0000 glsl-1.20: Access component of array-of-matrix Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34691
Verified. # bin/shader_runner /GFX/Test/Piglit/piglit/tests/spec/glsl-1.20/execution/fs-deref-array-of-matrix-element.shader_test -auto PIGLIT: {"result": "pass" }
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.