summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/glsl_to_nir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index 58721913f74..6b90da5481c 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1767,9 +1767,10 @@ nir_visitor::visit(ir_dereference_array *ir)
ir_constant *const_index = ir->array_index->as_constant();
if (const_index != NULL) {
+ deref->deref_array_type = nir_deref_array_type_direct;
deref->base_offset = const_index->value.u[0];
} else {
- deref->has_indirect = true;
+ deref->deref_array_type = nir_deref_array_type_indirect;
deref->indirect = evaluate_rvalue(ir->array_index);
}