diff options
author | Jason Ekstrand <[email protected]> | 2015-01-23 16:57:40 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-26 11:24:58 -0800 |
commit | 27c6e3e4ca665c528b94937b1b0a7c10de515d89 (patch) | |
tree | 8a0be107cd9b3cf5ff26bc3731bbbbd6b9231288 /src/glsl/nir/nir_lower_atomics.c | |
parent | 9f5fee880470a7e317aad35d4521cd525714455f (diff) |
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 <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_lower_atomics.c')
-rw-r--r-- | src/glsl/nir/nir_lower_atomics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_lower_atomics.c b/src/glsl/nir/nir_lower_atomics.c index ec582f306c3..6ed53778e18 100644 --- a/src/glsl/nir/nir_lower_atomics.c +++ b/src/glsl/nir/nir_lower_atomics.c @@ -88,7 +88,7 @@ lower_instr(nir_intrinsic_instr *instr, nir_function_impl *impl) nir_alu_instr *mul = nir_alu_instr_create(mem_ctx, nir_op_imul); nir_ssa_dest_init(&mul->instr, &mul->dest.dest, 1, NULL); mul->dest.write_mask = 0x1; - mul->src[0].src = nir_src_copy(deref_array->indirect, mem_ctx); + nir_src_copy(&mul->src[0].src, &deref_array->indirect, mem_ctx); mul->src[1].src.is_ssa = true; mul->src[1].src.ssa = &atomic_counter_size->def; nir_instr_insert_before(&instr->instr, &mul->instr); @@ -116,7 +116,7 @@ lower_instr(nir_intrinsic_instr *instr, nir_function_impl *impl) nir_src_for_ssa(&new_instr->dest.ssa), mem_ctx); } else { - new_instr->dest = nir_dest_copy(instr->dest, mem_ctx); + nir_dest_copy(&new_instr->dest, &instr->dest, mem_ctx); } nir_instr_insert_before(&instr->instr, &new_instr->instr); |