i965/vs: Enable variable array indexing in the VS.
authorEric Anholt <eric@anholt.net>
Sun, 7 Aug 2011 20:38:50 +0000 (13:38 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Aug 2011 20:04:42 +0000 (13:04 -0700)
src/mesa/drivers/dri/i965/brw_shader.cpp

index 2eeeec25cac9a977fc127165feed4e71f0ac45c8..2dc32c956108b8aa003f45a933e8be721df455b8 100644 (file)
@@ -111,12 +111,14 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
       brw_do_cubemap_normalize(shader->ir);
       lower_noise(shader->ir);
       lower_quadop_vector(shader->ir, false);
+
+      bool input = true;
+      bool output = stage == MESA_SHADER_FRAGMENT;
+      bool temp = stage == MESA_SHADER_FRAGMENT;
+      bool uniform = true;
+
       lower_variable_index_to_cond_assign(shader->ir,
-                                         GL_TRUE, /* input */
-                                         GL_TRUE, /* output */
-                                         GL_TRUE, /* temp */
-                                         GL_TRUE /* uniform */
-                                         );
+                                         input, output, temp, uniform);
 
       do {
         progress = false;