i965: Do lowering of array indexing of a vector in the FS.
authorEric Anholt <eric@anholt.net>
Wed, 29 Dec 2010 01:19:10 +0000 (17:19 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 29 Dec 2010 01:32:20 +0000 (17:32 -0800)
Fixes a regression in ember since switching to the native FS backend,
and the new piglit tests glsl-fs-vec4-indexing-{2,3} for catching this.

src/mesa/drivers/dri/i965/brw_fs.cpp

index 30b28690ffa008d4bdcb17669d47373b13882008..22e6e2e736896db535c67a9a8a9b2d51dc264dd4 100644 (file)
@@ -118,6 +118,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
         lower_if_to_cond_assign(shader->ir, 16);
 
       do_lower_texture_projection(shader->ir);
+      do_vec_index_to_cond_assign(shader->ir);
       brw_do_cubemap_normalize(shader->ir);
 
       do {