diff options
author | Vincent Lejeune <vljn@ovi.com> | 2012-11-04 23:04:30 +0100 |
---|---|---|
committer | Vincent Lejeune <vljn@ovi.com> | 2012-11-06 16:03:55 +0100 |
commit | 55723d6f26a0926701009fe6524e84477dfcb959 (patch) | |
tree | 177b8265018ae197839eb504a753c4cbdfc9fe52 /src/gallium/drivers/.gitignore | |
parent | 42f07cf2ad442c6a2804c00e3e25f30a11e91cd7 (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;
Diffstat (limited to 'src/gallium/drivers/.gitignore')
0 files changed, 0 insertions, 0 deletions