mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
aco/gfx12: disallow SCC and most constants for BUF SOFFSET
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29330>
This commit is contained in:
parent
12b4bdc134
commit
de07fd384d
2 changed files with 5 additions and 0 deletions
|
|
@ -2089,6 +2089,8 @@ operand_can_use_reg(amd_gfx_level gfx_level, aco_ptr<Instruction>& instr, unsign
|
|||
(reg != m0 || idx == 1 || idx == 3) && /* offset can be m0 */
|
||||
(reg != vcc || (instr->definitions.empty() && idx == 2) ||
|
||||
gfx_level >= GFX10); /* sdata can be vcc */
|
||||
case Format::MUBUF:
|
||||
case Format::MTBUF: return idx != 2 || gfx_level < GFX12 || reg != scc;
|
||||
default:
|
||||
// TODO: there are more instructions with restrictions on registers
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -722,6 +722,9 @@ validate_ir(Program* program)
|
|||
instr.get());
|
||||
check(instr->operands.size() < 4 || instr->operands[3].isOfType(RegType::vgpr),
|
||||
"VMEM write data must be vgpr", instr.get());
|
||||
if (instr->operands.size() >= 3 && instr->operands[2].isConstant())
|
||||
check(program->gfx_level < GFX12 || instr->operands[2].constantValue() == 0,
|
||||
"VMEM SOFFSET must not be non-zero constant on GFX12+", instr.get());
|
||||
|
||||
const bool d16 =
|
||||
instr->opcode ==
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue