Mesa (master): aco: fix partial copies on GFX6/7
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 26 19:33:25 UTC 2020
Module: Mesa
Branch: master
Commit: 5c0f82b0d72927b98157300f5c9017f99299fbd4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c0f82b0d72927b98157300f5c9017f99299fbd4
Author: Daniel Schürmann <daniel at schuermann.dev>
Date: Fri Jun 26 12:13:20 2020 +0100
aco: fix partial copies on GFX6/7
While we don't allow partial subdword copies,
we still need to be able to split 64bit registers
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5663>
---
src/amd/compiler/aco_lower_to_hw_instr.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/amd/compiler/aco_lower_to_hw_instr.cpp b/src/amd/compiler/aco_lower_to_hw_instr.cpp
index 1973cca027e..f052f7ed792 100644
--- a/src/amd/compiler/aco_lower_to_hw_instr.cpp
+++ b/src/amd/compiler/aco_lower_to_hw_instr.cpp
@@ -1323,7 +1323,7 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
return;
}
if (it == copy_map.end()) {
- if (!skip_partial_copies || ctx->program->chip_class < GFX8)
+ if (!skip_partial_copies)
break;
skip_partial_copies = false;
it = copy_map.begin();
@@ -1423,7 +1423,8 @@ void handle_operands(std::map<PhysReg, copy_operation>& copy_map, lower_context*
* a partial copy allows further copies, it should be done instead. */
bool partial_copy = (has_zero_use_bytes == 0xf) || (has_zero_use_bytes == 0xf0);
for (std::pair<const PhysReg, copy_operation>& copy : copy_map) {
- if (partial_copy)
+ /* on GFX6/7, we can only do copies with full registers */
+ if (partial_copy || ctx->program->chip_class <= GFX7)
break;
for (uint16_t i = 0; i < copy.second.bytes; i++) {
/* distance might underflow */
More information about the mesa-commit
mailing list