Its only user now returns a nir_ssa_def *, and we'll need this since the
builder returns a nir_ssa_def *.
Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
nir_shader *shader;
nir_function_impl *impl;
exec_list *cf_node_list;
- nir_instr *result; /* result of the expression tree last visited */
+ nir_ssa_def *result; /* result of the expression tree last visited */
nir_deref_var *evaluate_deref(nir_instr *mem_ctx, ir_instruction *ir);
nir_ssa_dest_init(instr, dest, num_components, NULL);
nir_instr_insert_after_cf_list(this->cf_node_list, instr);
- this->result = instr;
+
+ if (dest) {
+ assert(dest->is_ssa);
+ this->result = &dest->ssa;
+ }
}
nir_ssa_def *
add_instr(&load_instr->instr, ir->type->vector_elements);
}
- nir_dest *dest = get_instr_dest(this->result);
- assert(dest->is_ssa);
-
- return &dest->ssa;
+ return this->result;
}
nir_alu_instr *