aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
diff options
context:
space:
mode:
authorVincent Lejeune <[email protected]>2012-11-04 23:04:30 +0100
committerVincent Lejeune <[email protected]>2012-11-11 22:20:15 +0100
commit557d4918adf4cb99c4410af3bdf51c5eb3fc1d17 (patch)
treee77f911c214c9af7cb97900209ed1761ccb92172 /src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
parent05a2f66cde8a9b332ea4266df70d2407d5ec899b (diff)
glsl: store read vector in a temp in vec_index_to_cond
Vector indexing on matrixes generates several copy of the constant matrix, for instance vec=mat4[i][j] generates : vec=mat4[i].x; vec=(j==1)?mat4[i].y; vec=(j==2)?mat4[i].z; vec=(j==3)?mat4[i].w; In the case of constant matrixes, the mat4[i] expression generates copy of the 16 elements of the matrix 4 times ; indirect addressing also prevents some conservative CSE algorithms (like the one in LLVM) from factoring the mat4[i] expression. This patch will make the vec_index_to_cond pass generates : temp = mat4[i]; vec=temp.x; vec=(j==1)?temp.y; vec=(j==2)?temp.z; vec=(j==3)?temp.w; Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/tests/lower_jumps/lower_breaks_4.opt_test')
0 files changed, 0 insertions, 0 deletions