summaryrefslogtreecommitdiffstats
path: root/src/glsl/.gitignore
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-07-18 12:18:19 -0700
committerIan Romanick <[email protected]>2011-07-23 01:24:18 -0700
commit1731ac308631138ca98d34e8b7070c6e3f981939 (patch)
treecdda0b6c6dea25a6f502d18bce289d3b82fcffe6 /src/glsl/.gitignore
parentd2296e784aa8fad81c4910dcbbf61e826ce9a06a (diff)
glsl: Rework lowering of non-constant array indexing
The previous implementation could easily get tricked if the LHS of an assignment included a non-constant index that was "inside" another dereference. For example: mat4 m[2]; m[0][i] = vec4(0.0); Due to the way it tracked whether the array was being assigned, it would think that the non-constant index was in an r-value. The new code fixes that by tracking l-values and r-values differently. The index is also replaced by cloning the IR and replacing the index variable instead of the odd way it was done before. v2: Apply some simplifications suggested by Eric Anholt. Making assignment_generator::rvalue be ir_dereference instead of ir_rvalue simplified the code a bit. Fixes i965 piglit fs-temp-array-mat[234]-index-wr and vs-varying-array-mat[234]-index-wr. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34691 Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/.gitignore')
0 files changed, 0 insertions, 0 deletions