aco: do not apply OMOD/CLAMP for pseudo scalar trans instrs

This optimization seems broken because eg. v_s_log_f32 uses SGPRs
for both the source and destination but applying OMOD seems to require
VGPRs.

This fixes a GPU hang when launching Enshrouded on GFX1201.

No fossils db changes on GFX1201.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34027>
This commit is contained in:
Samuel Pitoiset
2025-03-12 14:15:17 +01:00
committed by Marge Bot
parent ce71f2badd
commit f46830912e
2 changed files with 18 additions and 0 deletions
+3
View File
@@ -3096,6 +3096,9 @@ apply_omod_clamp(opt_ctx& ctx, aco_ptr<Instruction>& instr)
if (needs_vop3 && !can_vop3)
return false;
if (instr_info.classes[(int)instr->opcode] == instr_class::valu_pseudo_scalar_trans)
return false;
/* SDWA omod is GFX9+. */
bool can_use_omod = (can_vop3 || ctx.program->gfx_level >= GFX9) && !instr->isVOP3P() &&
(!instr->isVINTERP_INREG() || interp_can_become_fma(ctx, instr));