Re: [Mesa-dev] [PATCH] glsl: store read vector in a temp in vec_index_to_cond

2012-11-08 Thread Kenneth Graunke
On 11/06/2012 07:12 AM, Vincent Lejeune wrote: 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] expressi

[Mesa-dev] [PATCH] glsl: store read vector in a temp in vec_index_to_cond

2012-11-06 Thread Vincent Lejeune
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 matri