summaryrefslogtreecommitdiff
path: root/src/compiler/glsl/test_optpass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/test_optpass.cpp')
-rw-r--r--src/compiler/glsl/test_optpass.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/compiler/glsl/test_optpass.cpp b/src/compiler/glsl/test_optpass.cpp
index c6e97888f6..3d9eafac84 100644
--- a/src/compiler/glsl/test_optpass.cpp
+++ b/src/compiler/glsl/test_optpass.cpp
@@ -124,9 +124,16 @@ do_optimization(struct exec_list *ir, const char *optimization,
} else if (sscanf(optimization, "lower_variable_index_to_cond_assign "
"( %d , %d , %d , %d ) ", &int_0, &int_1, &int_2,
&int_3) == 4) {
- return lower_variable_index_to_cond_assign(MESA_SHADER_VERTEX, ir,
- int_0 != 0, int_1 != 0,
- int_2 != 0, int_3 != 0);
+ unsigned bits = 0;
+ if (int_0)
+ bits |= lower_variable_index_input;
+ if (int_1)
+ bits |= lower_variable_index_output;
+ if (int_2)
+ bits |= lower_variable_index_temp;
+ if (int_3)
+ bits |= lower_variable_index_uniform;
+ return lower_variable_index_to_cond_assign(MESA_SHADER_VERTEX, ir, bits);
} else if (sscanf(optimization, "lower_quadop_vector ( %d ) ",
&int_0) == 1) {
return lower_quadop_vector(ir, int_0 != 0);