mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 12:48:30 +02:00
aco: use v_bfe_u32 for unsigned reductions sign-extension on GFX6-GFX7
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>
This commit is contained in:
parent
a874132cc4
commit
ee4bc13de2
1 changed files with 8 additions and 1 deletions
|
|
@ -591,7 +591,14 @@ void emit_reduction(lower_context *ctx, aco_opcode op, ReduceOp reduce_op, unsig
|
|||
sdwa->dst_sel = sdwa_udword;
|
||||
bld.insert(std::move(sdwa));
|
||||
} else if (ctx->program->chip_class == GFX6 || ctx->program->chip_class == GFX7) {
|
||||
bld.vop3(aco_opcode::v_bfe_i32, Definition(PhysReg{tmp}, v1),
|
||||
aco_opcode opcode;
|
||||
|
||||
if (reduce_op == imin16 || reduce_op == imax16 || reduce_op == iadd16)
|
||||
opcode = aco_opcode::v_bfe_i32;
|
||||
else
|
||||
opcode = aco_opcode::v_bfe_u32;
|
||||
|
||||
bld.vop3(opcode, Definition(PhysReg{tmp}, v1),
|
||||
Operand(PhysReg{tmp}, v1), Operand(0u), Operand(16u));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue