mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
aco: lower p_spill with constants correctly
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196>
This commit is contained in:
parent
4a57787006
commit
13e4fed01f
1 changed files with 6 additions and 2 deletions
|
|
@ -1935,11 +1935,15 @@ void lower_to_hw_instr(Program* program)
|
|||
case aco_opcode::p_spill:
|
||||
{
|
||||
assert(instr->operands[0].regClass() == v1.as_linear());
|
||||
for (unsigned i = 0; i < instr->operands[2].size(); i++)
|
||||
for (unsigned i = 0; i < instr->operands[2].size(); i++) {
|
||||
Operand src = instr->operands[2].isConstant() ?
|
||||
Operand(uint32_t(instr->operands[2].constantValue64() >> (32 * i))) :
|
||||
Operand(PhysReg{instr->operands[2].physReg() + i}, s1);
|
||||
bld.writelane(bld.def(v1, instr->operands[0].physReg()),
|
||||
Operand(PhysReg{instr->operands[2].physReg() + i}, s1),
|
||||
src,
|
||||
Operand(instr->operands[1].constantValue() + i),
|
||||
instr->operands[0]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case aco_opcode::p_reload:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue