aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_vector_insert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/lower_vector_insert.cpp')
-rw-r--r--src/compiler/glsl/lower_vector_insert.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/lower_vector_insert.cpp b/src/compiler/glsl/lower_vector_insert.cpp
index 26d31b03c12..ceaa5887c8a 100644
--- a/src/compiler/glsl/lower_vector_insert.cpp
+++ b/src/compiler/glsl/lower_vector_insert.cpp
@@ -65,7 +65,8 @@ vector_insert_visitor::handle_rvalue(ir_rvalue **rv)
factory.mem_ctx = ralloc_parent(expr);
- ir_constant *const idx = expr->operands[2]->constant_expression_value();
+ ir_constant *const idx =
+ expr->operands[2]->constant_expression_value(factory.mem_ctx);
if (idx != NULL) {
/* Replace (vector_insert (vec) (scalar) (index)) with a dereference of
* a new temporary. The new temporary gets assigned as