summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_to_nir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index e5166855e81..bb2ba17b220 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -2205,7 +2205,7 @@ nir_visitor::visit(ir_dereference_record *ir)
{
ir->record->accept(this);
- int field_index = this->deref_tail->type->field_index(ir->field);
+ int field_index = ir->field_idx;
assert(field_index >= 0);
nir_deref_struct *deref = nir_deref_struct_create(this->deref_tail, field_index);