aco: disallow SGPRs on DPP instructions

They can't be encoded.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10841>
This commit is contained in:
Rhys Perry 2021-05-17 14:37:54 +01:00 committed by Marge Bot
parent 4191eb291b
commit 3013670dfd
2 changed files with 3 additions and 1 deletions

View File

@ -715,7 +715,7 @@ bool pseudo_propagate_temp(opt_ctx& ctx, aco_ptr<Instruction>& instr,
bool can_apply_sgprs(opt_ctx& ctx, aco_ptr<Instruction>& instr)
{
if (instr->isSDWA() && ctx.program->chip_class < GFX9)
if ((instr->isSDWA() && ctx.program->chip_class < GFX9) || instr->isDPP())
return false;
return instr->opcode != aco_opcode::v_readfirstlane_b32 &&
instr->opcode != aco_opcode::v_readlane_b32 &&

View File

@ -253,6 +253,8 @@ bool validate_ir(Program* program)
uint32_t scalar_mask = instr->isVOP3() || instr->isVOP3P() ? 0x7 : 0x5;
if (instr->isSDWA())
scalar_mask = program->chip_class >= GFX9 ? 0x7 : 0x4;
else if (instr->isDPP())
scalar_mask = 0x0;
if (instr->isVOPC() ||
instr->opcode == aco_opcode::v_readfirstlane_b32 ||