Mesa (master): aco: fix more validation errors from vgpr spill/restore code
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 10 06:50:07 UTC 2020
Module: Mesa
Branch: master
Commit: ca51f75f9d341a462b293c367a51584a7a43a1e8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca51f75f9d341a462b293c367a51584a7a43a1e8
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Jul 9 19:03:21 2020 +0200
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 <samuel.pitoiset at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5828>
---
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 {
More information about the mesa-commit
mailing list