summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 9275803d6f5..279e6e77b6a 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -461,8 +461,7 @@ nir_lower_io_block(nir_block *block,
nir_deref_instr *deref = nir_src_as_deref(intrin->src[0]);
- nir_variable *var = nir_deref_instr_get_variable(deref);
- nir_variable_mode mode = var->data.mode;
+ nir_variable_mode mode = deref->mode;
if ((state->modes & mode) == 0)
continue;
@@ -473,6 +472,8 @@ nir_lower_io_block(nir_block *block,
mode != nir_var_uniform)
continue;
+ nir_variable *var = nir_deref_instr_get_variable(deref);
+
b->cursor = nir_before_instr(instr);
const bool per_vertex = nir_is_per_vertex_io(var, b->shader->info.stage);