mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
nir/opt_reassociate_bfi: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
This commit is contained in:
parent
2643b3cfbf
commit
16cadc04f3
1 changed files with 3 additions and 11 deletions
|
|
@ -63,13 +63,9 @@
|
|||
|
||||
static bool
|
||||
nir_opt_reassociate_bfi_instr(nir_builder *b,
|
||||
nir_instr *instr,
|
||||
nir_alu_instr *bfiCD0,
|
||||
UNUSED void *cb_data)
|
||||
{
|
||||
if (instr->type != nir_instr_type_alu)
|
||||
return false;
|
||||
|
||||
nir_alu_instr *bfiCD0 = nir_instr_as_alu(instr);
|
||||
if (bfiCD0->op != nir_op_bfi || bfiCD0->def.num_components != 1)
|
||||
return false;
|
||||
|
||||
|
|
@ -134,10 +130,6 @@ nir_opt_reassociate_bfi_instr(nir_builder *b,
|
|||
bool
|
||||
nir_opt_reassociate_bfi(nir_shader *shader)
|
||||
{
|
||||
bool progress = nir_shader_instructions_pass(shader,
|
||||
nir_opt_reassociate_bfi_instr,
|
||||
nir_metadata_control_flow,
|
||||
NULL);
|
||||
|
||||
return progress;
|
||||
return nir_shader_alu_pass(shader, nir_opt_reassociate_bfi_instr,
|
||||
nir_metadata_control_flow, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue