From ca51f75f9d341a462b293c367a51584a7a43a1e8 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 9 Jul 2020 19:03:21 +0200 Subject: [PATCH] aco: fix more validation errors from vgpr spill/restore code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel Schürmann Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_spill.cpp | 4 ++-- 1 file 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 { -- 2.30.2