nir: Drop most uses if nir_instr_rewrite_src()
Generated by the following semantic patch: @@ expression I, S, D; @@ -nir_instr_rewrite_src(I, S, nir_src_for_ssa(D)); +nir_src_rewrite(S, D); Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24729>
This commit is contained in:

committed by
Marge Bot

parent
71ddaca2e2
commit
b5d6b7c402
@@ -164,8 +164,7 @@ v3d_nir_lower_image_store(nir_builder *b, nir_intrinsic_instr *instr)
|
||||
pack_mask);
|
||||
}
|
||||
|
||||
nir_instr_rewrite_src(&instr->instr, &instr->src[3],
|
||||
nir_src_for_ssa(formatted));
|
||||
nir_src_rewrite(&instr->src[3], formatted);
|
||||
instr->num_components = formatted->num_components;
|
||||
|
||||
return true;
|
||||
|
@@ -49,9 +49,7 @@ lower_line_smooth_intrinsic(struct lower_line_smooth_state *state,
|
||||
nir_def *new_val = nir_fmul(b, nir_vec4(b, one, one, one, coverage),
|
||||
intr->src[0].ssa);
|
||||
|
||||
nir_instr_rewrite_src(&intr->instr,
|
||||
&intr->src[0],
|
||||
nir_src_for_ssa(new_val));
|
||||
nir_src_rewrite(&intr->src[0], new_val);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -339,8 +339,7 @@ v3d_nir_lower_logic_op_instr(struct v3d_compile *c,
|
||||
nir_def *result =
|
||||
v3d_nir_emit_logic_op(c, b, frag_color, rt, 0);
|
||||
|
||||
nir_instr_rewrite_src(&intr->instr, &intr->src[0],
|
||||
nir_src_for_ssa(result));
|
||||
nir_src_rewrite(&intr->src[0], result);
|
||||
intr->num_components = result->num_components;
|
||||
}
|
||||
}
|
||||
|
@@ -637,8 +637,7 @@ lower_tex_src(nir_builder *b,
|
||||
* instr if needed
|
||||
*/
|
||||
if (index) {
|
||||
nir_instr_rewrite_src(&instr->instr, &src->src,
|
||||
nir_src_for_ssa(index));
|
||||
nir_src_rewrite(&src->src, index);
|
||||
|
||||
src->src_type = is_sampler ?
|
||||
nir_tex_src_sampler_offset :
|
||||
|
Reference in New Issue
Block a user