summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-06 17:53:32 -0700
committerEric Anholt <[email protected]>2010-07-06 18:49:24 -0700
commita36334be02cb0a2b834667116bfeb680bf365857 (patch)
treee1acebea80accff975b7b09c443cb909d341554b /src/mesa/shader
parent2d1789e667c4180777829f96856daf91326721b9 (diff)
glsl2: Add pass for supporting variable vector indexing in rvalues.
The Mesa IR needs this to support vector indexing correctly, and hardware backends such as 915 would want this behavior as well. Fixes glsl-vs-vec4-indexing-2.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 021e270f18a..daf09e9e652 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -1821,7 +1821,13 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
progress = do_dead_code_unlinked(state, shader->ir) || progress;
progress = do_constant_variable_unlinked(shader->ir) || progress;
progress = do_constant_folding(shader->ir) || progress;
+
progress = do_vec_index_to_swizzle(shader->ir) || progress;
+ /* Do this one after the previous to let the easier pass handle
+ * constant vector indexing.
+ */
+ progress = do_vec_index_to_cond_assign(shader->ir) || progress;
+
progress = do_swizzle_swizzle(shader->ir) || progress;
} while (progress);
}