summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/glsl_to_nir.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-11-19 12:53:08 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:19:02 -0800
commitb5143edaeeb6f57558f5bb6fbd7f7cc39ad7489d (patch)
tree8362d1cbab931746f1cbe2095bceae6d74f0da5a /src/glsl/nir/glsl_to_nir.cpp
parent8219ff1796ab18d19fe9cf3cf93f463a984e2c80 (diff)
nir: Make array deref direct vs. indirect an enum
Reviewed-by: Connor Abbott <[email protected]>
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);
}