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_io.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_io.c')
-rw-r--r-- | src/glsl/nir/nir_lower_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c index 8712869a0f5..ddbc249371b 100644 --- a/src/glsl/nir/nir_lower_io.c +++ b/src/glsl/nir/nir_lower_io.c @@ -148,8 +148,8 @@ get_io_offset(nir_deref_var *deref, nir_instr *instr, nir_src *indirect, nir_op_imul); mul->src[0].src.is_ssa = true; mul->src[0].src.ssa = &load_const->def; - mul->src[1].src = nir_src_copy(deref_array->indirect, - state->mem_ctx); + nir_src_copy(&mul->src[1].src, &deref_array->indirect, + state->mem_ctx); mul->dest.write_mask = 1; nir_ssa_dest_init(&mul->instr, &mul->dest.dest, 1, NULL); nir_instr_insert_before(instr, &mul->instr); @@ -239,7 +239,7 @@ nir_lower_io_block(nir_block *block, void *void_state) nir_src_for_ssa(&load->dest.ssa), state->mem_ctx); } else { - load->dest = nir_dest_copy(intrin->dest, state->mem_ctx); + nir_dest_copy(&load->dest, &intrin->dest, state->mem_ctx); } nir_instr_insert_before(&intrin->instr, &load->instr); @@ -272,7 +272,7 @@ nir_lower_io_block(nir_block *block, void *void_state) store->const_index[0] = offset; store->const_index[1] = 1; - store->src[0] = nir_src_copy(intrin->src[0], state->mem_ctx); + nir_src_copy(&store->src[0], &intrin->src[0], state->mem_ctx); if (has_indirect) store->src[1] = indirect; |