aco/validate: fix scalar source validation for DPP and gfx11+ VINTERP

Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
This commit is contained in:
Georg Lehmann 2025-03-10 10:16:47 +01:00 committed by Marge Bot
parent 3b5e537b09
commit cac4287aab

View file

@ -480,19 +480,22 @@ validate_ir(Program* program)
const_bus_limit = 2;
uint32_t scalar_mask;
if (instr->isVOP3() || instr->isVOP3P() || instr->isVINTERP_INREG())
if (instr->isVOP3() || instr->isVOP3P())
scalar_mask = 0x7;
else if (instr->isSDWA())
scalar_mask = program->gfx_level >= GFX9 ? 0x7 : 0x4;
else if (instr->isDPP())
scalar_mask = 0x4;
else if (instr->opcode == aco_opcode::v_movrels_b32 ||
instr->opcode == aco_opcode::v_movrelsd_b32 ||
instr->opcode == aco_opcode::v_movrelsd_2_b32)
scalar_mask = 0x2;
else if (instr->isVINTERP_INREG())
scalar_mask = 0x0;
else
scalar_mask = 0x5;
if (instr->isDPP())
scalar_mask &= 0x4; /* TODO 0x6 for GFX11.5+ */
if (instr->isVOPC() || instr->opcode == aco_opcode::v_readfirstlane_b32 ||
instr->opcode == aco_opcode::v_readlane_b32 ||
instr->opcode == aco_opcode::v_readlane_b32_e64 ||