Mesa (master): aco: properly combine additions into ds_write2_b64/ds_read2_b64

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 22 19:56:11 UTC 2019


Module: Mesa
Branch: master
Commit: bdf47a12736e89e1befaa77567668a5128dc2486
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bdf47a12736e89e1befaa77567668a5128dc2486

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Oct 14 17:17:00 2019 +0100

aco: properly combine additions into ds_write2_b64/ds_read2_b64

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>

---

 src/amd/compiler/aco_optimizer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 4a287336d0d..d9596ea8b59 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -657,7 +657,8 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
          Temp base;
          uint32_t offset;
          if (i == 0 && parse_base_offset(ctx, instr.get(), i, &base, &offset) && base.regClass() == instr->operands[i].regClass()) {
-            if (instr->opcode == aco_opcode::ds_write2_b32 || instr->opcode == aco_opcode::ds_read2_b32) {
+            if (instr->opcode == aco_opcode::ds_write2_b32 || instr->opcode == aco_opcode::ds_read2_b32 ||
+                instr->opcode == aco_opcode::ds_write2_b64 || instr->opcode == aco_opcode::ds_read2_b64) {
                if (offset % 4 == 0 &&
                    ds->offset0 + (offset >> 2) <= 255 &&
                    ds->offset1 + (offset >> 2) <= 255) {




More information about the mesa-commit mailing list