summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_from_ssa.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-23 16:57:40 -0800
committerJason Ekstrand <[email protected]>2015-01-26 11:24:58 -0800
commit27c6e3e4ca665c528b94937b1b0a7c10de515d89 (patch)
tree8a0be107cd9b3cf5ff26bc3731bbbbd6b9231288 /src/glsl/nir/nir_from_ssa.c
parent9f5fee880470a7e317aad35d4521cd525714455f (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_from_ssa.c')
-rw-r--r--src/glsl/nir/nir_from_ssa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
index 840177bff7e..2e7add38d31 100644
--- a/src/glsl/nir/nir_from_ssa.c
+++ b/src/glsl/nir/nir_from_ssa.c
@@ -352,7 +352,7 @@ isolate_phi_nodes_block(nir_block *block, void *void_state)
nir_parallel_copy_entry);
exec_list_push_tail(&pcopy->entries, &entry->node);
- entry->src = nir_src_copy(src->src, state->dead_ctx);
+ nir_src_copy(&entry->src, &src->src, state->dead_ctx);
_mesa_set_add(src->src.ssa->uses, &pcopy->instr);
nir_ssa_dest_init(&pcopy->instr, &entry->dest,
@@ -622,7 +622,7 @@ emit_copy(nir_parallel_copy_instr *pcopy, nir_src src, nir_src dest_src,
assert(src.reg.reg->num_components >= dest_src.reg.reg->num_components);
nir_alu_instr *mov = nir_alu_instr_create(mem_ctx, nir_op_imov);
- mov->src[0].src = nir_src_copy(src, mem_ctx);
+ nir_src_copy(&mov->src[0].src, &src, mem_ctx);
mov->dest.dest = nir_dest_for_reg(dest_src.reg.reg);
mov->dest.write_mask = (1 << dest_src.reg.reg->num_components) - 1;