summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_system_values.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/nir_lower_system_values.c')
-rw-r--r--src/glsl/nir/nir_lower_system_values.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/glsl/nir/nir_lower_system_values.c b/src/glsl/nir/nir_lower_system_values.c
index d1b4d26e2ae..f681a6ce934 100644
--- a/src/glsl/nir/nir_lower_system_values.c
+++ b/src/glsl/nir/nir_lower_system_values.c
@@ -74,11 +74,9 @@ convert_instr(nir_intrinsic_instr *instr)
new_instr->dest.is_ssa = true;
nir_ssa_def_init(&new_instr->instr, &new_instr->dest.ssa,
instr->dest.ssa.num_components, NULL);
- nir_src new_dest_src = {
- .is_ssa = true,
- .ssa = &new_instr->dest.ssa,
- };
- nir_ssa_def_rewrite_uses(&instr->dest.ssa, new_dest_src, mem_ctx);
+ nir_ssa_def_rewrite_uses(&instr->dest.ssa,
+ nir_src_for_ssa(&new_instr->dest.ssa),
+ mem_ctx);
} else {
new_instr->dest = nir_dest_copy(instr->dest, mem_ctx);
}