mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02: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 != m0 || idx == 1 || idx == 3) && /* offset can be m0 */
|
||||||
(reg != vcc || (instr->definitions.empty() && idx == 2) ||
|
(reg != vcc || (instr->definitions.empty() && idx == 2) ||
|
||||||
gfx_level >= GFX10); /* sdata can be vcc */
|
gfx_level >= GFX10); /* sdata can be vcc */
|
||||||
|
case Format::MUBUF:
|
||||||
|
case Format::MTBUF: return idx != 2 || gfx_level < GFX12 || reg != scc;
|
||||||
default:
|
default:
|
||||||
// TODO: there are more instructions with restrictions on registers
|
// TODO: there are more instructions with restrictions on registers
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -722,6 +722,9 @@ validate_ir(Program* program)
|
||||||
instr.get());
|
instr.get());
|
||||||
check(instr->operands.size() < 4 || instr->operands[3].isOfType(RegType::vgpr),
|
check(instr->operands.size() < 4 || instr->operands[3].isOfType(RegType::vgpr),
|
||||||
"VMEM write data must be vgpr", instr.get());
|
"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 =
|
const bool d16 =
|
||||||
instr->opcode ==
|
instr->opcode ==
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue