From: Samuel Pitoiset Date: Thu, 9 Jul 2020 17:03:21 +0000 (+0200) Subject: aco: fix more validation errors from vgpr spill/restore code X-Git-Tag: upstream/21.0.0~7760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca51f75f9d341a462b293c367a51584a7a43a1e8;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Daniel Schürmann Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_spill.cpp b/src/amd/compiler/aco_spill.cpp index 9b8833a..62ab69a 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 {