aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-14 18:18:03 -0800
committerJason Ekstrand <[email protected]>2015-12-15 14:12:31 -0800
commitca5be008bc55a5190171d91994c3251fddb4d8d9 (patch)
tree0bfab678a838ca186ab9b7d1c022d686189a12a0 /src/glsl/nir
parent276837cbe43f9b25c9e35966ab4d7d1ee0d67757 (diff)
nir/lower_system_values: Stop supporting non-SSA
The one user of this (i965) only ever calls it while in SSA form. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/nir_lower_system_values.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/glsl/nir/nir_lower_system_values.c b/src/glsl/nir/nir_lower_system_values.c
index 21904f81b97..03a98147ba9 100644
--- a/src/glsl/nir/nir_lower_system_values.c
+++ b/src/glsl/nir/nir_lower_system_values.c
@@ -40,17 +40,15 @@ convert_instr(nir_intrinsic_instr *instr)
void *mem_ctx = ralloc_parent(instr);
+ assert(instr->dest.is_ssa);
+
nir_intrinsic_op op = nir_intrinsic_from_system_value(var->data.location);
nir_intrinsic_instr *new_instr = nir_intrinsic_instr_create(mem_ctx, op);
- if (instr->dest.is_ssa) {
- nir_ssa_dest_init(&new_instr->instr, &new_instr->dest,
- instr->dest.ssa.num_components, NULL);
- nir_ssa_def_rewrite_uses(&instr->dest.ssa,
- nir_src_for_ssa(&new_instr->dest.ssa));
- } else {
- nir_dest_copy(&new_instr->dest, &instr->dest, mem_ctx);
- }
+ nir_ssa_dest_init(&new_instr->instr, &new_instr->dest,
+ instr->dest.ssa.num_components, NULL);
+ nir_ssa_def_rewrite_uses(&instr->dest.ssa,
+ nir_src_for_ssa(&new_instr->dest.ssa));
nir_instr_insert_before(&instr->instr, &new_instr->instr);
nir_instr_remove(&instr->instr);