nir: Use pointers for nir_src_copy and nir_dest_copy
This avoids the overhead of copying structures and better matches the newly added nir_alu_src_copy and nir_alu_dest_copy. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
@@ -233,8 +233,8 @@ construct_value(const nir_search_value *value, nir_alu_type type,
|
||||
const nir_search_variable *var = nir_search_value_as_variable(value);
|
||||
assert(state->variables_seen & (1 << var->variable));
|
||||
|
||||
nir_alu_src val = state->variables[var->variable];
|
||||
val.src = nir_src_copy(val.src, mem_ctx);
|
||||
nir_alu_src val;
|
||||
nir_alu_src_copy(&val, &state->variables[var->variable], mem_ctx);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user