summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/loop_controls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/loop_controls.cpp')
-rw-r--r--src/compiler/glsl/loop_controls.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/loop_controls.cpp b/src/compiler/glsl/loop_controls.cpp
index fa739afa24e..895954fc2d1 100644
--- a/src/compiler/glsl/loop_controls.cpp
+++ b/src/compiler/glsl/loop_controls.cpp
@@ -96,7 +96,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
ir_expression *const div =
new(mem_ctx) ir_expression(ir_binop_div, sub->type, sub, increment);
- ir_constant *iter = div->constant_expression_value();
+ ir_constant *iter = div->constant_expression_value(mem_ctx);
if (iter == NULL) {
ralloc_free(mem_ctx);
return -1;
@@ -108,7 +108,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
ir_rvalue *cast =
new(mem_ctx) ir_expression(op, glsl_type::int_type, iter, NULL);
- iter = cast->constant_expression_value();
+ iter = cast->constant_expression_value(mem_ctx);
}
int iter_value = iter->get_int_component(0);
@@ -153,7 +153,7 @@ calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment,
ir_expression *const cmp =
new(mem_ctx) ir_expression(op, glsl_type::bool_type, add, to);
- ir_constant *const cmp_result = cmp->constant_expression_value();
+ ir_constant *const cmp_result = cmp->constant_expression_value(mem_ctx);
assert(cmp_result != NULL);
if (cmp_result->get_bool_component(0)) {