diff options
Diffstat (limited to 'src/glsl/nir/nir_lower_io.c')
-rw-r--r-- | src/glsl/nir/nir_lower_io.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c index c35058c14dc..8712869a0f5 100644 --- a/src/glsl/nir/nir_lower_io.c +++ b/src/glsl/nir/nir_lower_io.c @@ -151,8 +151,7 @@ get_io_offset(nir_deref_var *deref, nir_instr *instr, nir_src *indirect, mul->src[1].src = nir_src_copy(deref_array->indirect, state->mem_ctx); mul->dest.write_mask = 1; - mul->dest.dest.is_ssa = true; - nir_ssa_def_init(&mul->instr, &mul->dest.dest.ssa, 1, NULL); + nir_ssa_dest_init(&mul->instr, &mul->dest.dest, 1, NULL); nir_instr_insert_before(instr, &mul->instr); if (found_indirect) { @@ -162,8 +161,7 @@ get_io_offset(nir_deref_var *deref, nir_instr *instr, nir_src *indirect, add->src[1].src.is_ssa = true; add->src[1].src.ssa = &mul->dest.dest.ssa; add->dest.write_mask = 1; - add->dest.dest.is_ssa = true; - nir_ssa_def_init(&add->instr, &add->dest.dest.ssa, 1, NULL); + nir_ssa_dest_init(&add->instr, &add->dest.dest, 1, NULL); nir_instr_insert_before(instr, &add->instr); indirect->is_ssa = true; @@ -235,9 +233,8 @@ nir_lower_io_block(nir_block *block, void *void_state) load->src[0] = indirect; if (intrin->dest.is_ssa) { - load->dest.is_ssa = true; - nir_ssa_def_init(&load->instr, &load->dest.ssa, - intrin->num_components, NULL); + nir_ssa_dest_init(&load->instr, &load->dest, + intrin->num_components, NULL); nir_ssa_def_rewrite_uses(&intrin->dest.ssa, nir_src_for_ssa(&load->dest.ssa), state->mem_ctx); |