diff options
author | Samuel Pitoiset <[email protected]> | 2020-07-09 19:03:21 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2020-07-10 08:28:33 +0200 |
commit | ca51f75f9d341a462b293c367a51584a7a43a1e8 (patch) | |
tree | b4f742d218f93dfdbda85709c6557aeb130b1e93 /src/amd | |
parent | 1af1eb9f7bd61287a74133860606fa146a0d43ac (diff) |
aco: fix more validation errors from vgpr spill/restore code
It looks like the attempt to fix this in 1e791e51a65 was incomplete.
This fixes crashes with Devil May Cry 5 with a debug build.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Daniel Schürmann <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5828>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/compiler/aco_spill.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 9b8833a64ba..62ab69a045b 100644 --- a/src/amd/compiler/aco_spill.cpp +++ b/src/amd/compiler/aco_spill.cpp @@ -1571,7 +1571,7 @@ void assign_spill_slots(spill_ctx& ctx, unsigned spills_to_vgpr) { split->definitions[i] = bld.def(v1); bld.insert(split); for (unsigned i = 0; i < temp.size(); i++) - bld.mubuf(opcode, scratch_rsrc, Operand(), scratch_offset, split->definitions[i].getTemp(), offset + i * 4, false); + bld.mubuf(opcode, scratch_rsrc, Operand(v1), scratch_offset, split->definitions[i].getTemp(), offset + i * 4, false); } else { bld.mubuf(opcode, scratch_rsrc, Operand(v1), scratch_offset, temp, offset, false); } @@ -1637,7 +1637,7 @@ void assign_spill_slots(spill_ctx& ctx, unsigned spills_to_vgpr) { for (unsigned i = 0; i < def.size(); i++) { Temp tmp = bld.tmp(v1); vec->operands[i] = Operand(tmp); - bld.mubuf(opcode, Definition(tmp), scratch_rsrc, Operand(), scratch_offset, offset + i * 4, false); + bld.mubuf(opcode, Definition(tmp), scratch_rsrc, Operand(v1), scratch_offset, offset + i * 4, false); } bld.insert(vec); } else { |