summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_to_ssa.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-11-19 16:06:32 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:19:02 -0800
commit6a52d2af2f7594fcd76fcf6158eca531e48af1e3 (patch)
tree89d015f2fa2288f98551f858c655688ae4e8e9bb /src/glsl/nir/nir_to_ssa.c
parent829aa98320fcd529407d16991b476b71af017479 (diff)
nir: Don't require a function in ssa_def_init
Instead, we give SSA definitions a temporary index of 0xFFFFFFFF if the instruction does not have a block and a proper index when it actually gets added to the list. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_to_ssa.c')
-rw-r--r--src/glsl/nir/nir_to_ssa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_to_ssa.c b/src/glsl/nir/nir_to_ssa.c
index fb36ff4f649..a76b7acc132 100644
--- a/src/glsl/nir/nir_to_ssa.c
+++ b/src/glsl/nir/nir_to_ssa.c
@@ -163,7 +163,7 @@ static nir_ssa_def *get_ssa_src(nir_register *reg, rewrite_state *state)
* to preserve the information that this source is undefined
*/
nir_ssa_undef_instr *instr = nir_ssa_undef_instr_create(state->mem_ctx);
- nir_ssa_def_init(state->impl, &instr->instr, &instr->def,
+ nir_ssa_def_init(&instr->instr, &instr->def,
reg->num_components, NULL);
/*
@@ -246,7 +246,7 @@ rewrite_def_forwards(nir_dest *dest, void *_state)
name = ralloc_asprintf(state->mem_ctx, "%s_%u", dest->reg.reg->name,
state->states[index].num_defs);
- nir_ssa_def_init(state->impl, state->parent_instr, &dest->ssa,
+ nir_ssa_def_init(state->parent_instr, &dest->ssa,
reg->num_components, name);
/* push our SSA destination on the stack */
@@ -312,7 +312,7 @@ rewrite_alu_instr_forward(nir_alu_instr *instr, rewrite_state *state)
instr->dest.write_mask = (1 << num_components) - 1;
instr->dest.dest.is_ssa = true;
- nir_ssa_def_init(state->impl, &instr->instr, &instr->dest.dest.ssa,
+ nir_ssa_def_init(&instr->instr, &instr->dest.dest.ssa,
num_components, name);
if (nir_op_infos[instr->op].output_size == 0) {