Lines Matching refs:src
239 nir_src *nsrc, const nir_src *src)
241 nsrc->is_ssa = src->is_ssa;
242 if (src->is_ssa) {
243 nsrc->ssa = remap_local(state, src->ssa);
245 nsrc->reg.reg = remap_reg(state, src->reg.reg);
246 if (src->reg.indirect) {
248 __clone_src(state, ninstr_or_if, nsrc->reg.indirect, src->reg.indirect);
250 nsrc->reg.base_offset = src->reg.base_offset;
287 __clone_src(state, &nalu->instr, &nalu->src[i].src, &alu->src[i].src);
288 nalu->src[i].negate = alu->src[i].negate;
289 nalu->src[i].abs = alu->src[i].abs;
290 memcpy(nalu->src[i].swizzle, alu->src[i].swizzle,
291 sizeof(nalu->src[i].swizzle));
369 __clone_src(state, &nitr->instr, &nitr->src[i], &itr->src[i]);
410 ntex->src[i].src_type = tex->src[i].src_type;
411 __clone_src(state, &ntex->instr, &ntex->src[i].src, &tex->src[i].src);
452 nir_foreach_phi_src(src, phi) {
453 nir_phi_src *nsrc = nir_phi_instr_add_src(nphi, src->pred, src->src);
458 list_add(&nsrc->src.use_link, &state->phi_srcs);
635 list_for_each_entry_safe(nir_phi_src, src, &state->phi_srcs, src.use_link) {
636 src->pred = remap_local(state, src->pred);
639 list_del(&src->src.use_link);
641 if (src->src.is_ssa) {
642 src->src.ssa = remap_local(state, src->src.ssa);
643 list_addtail(&src->src.use_link, &src->src.ssa->uses);
645 src->src.reg.reg = remap_reg(state, src->src.reg.reg);
646 list_addtail(&src->src.use_link, &src->src.reg.reg->uses);
653 nir_cf_list_clone(nir_cf_list *dst, nir_cf_list *src, nir_cf_node *parent,
657 dst->impl = src->impl;
659 if (exec_list_is_empty(&src->list))
666 state.ns = src->impl->function->shader;
675 clone_cf_list(&state, &dst->list, &src->list);
801 /** Overwrites dst and replaces its contents with src
803 * Everything ralloc parented to dst and src itself (but not its children)
810 nir_shader_replace(nir_shader *dst, nir_shader *src)
821 /* Re-parent all of src's ralloc children to dst */
822 ralloc_adopt(dst, src);
824 memcpy(dst, src, sizeof(*dst));
827 * pointers in the list elements to point to the lists in dst and not src.
829 list_replace(&src->gc_list, &dst->gc_list);
830 list_inithead(&src->gc_list);
831 exec_list_move_nodes_to(&src->variables, &dst->variables);
834 exec_list_move_nodes_to(&src->functions, &dst->functions);
838 ralloc_free(src);