Mesa (staging/19.2): nv50/ir: mark STORE destination inputs as used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 4 16:07:29 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 43234ba02ad80bc83593eb14c1abbf242cc87bb7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=43234ba02ad80bc83593eb14c1abbf242cc87bb7

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Mon Oct 14 02:40:11 2019 -0400

nv50/ir: mark STORE destination inputs as used

Observed an issue when looking at the code generatedy by the
image-vertex-attrib-input-output piglit test. Even though the test
itself worked fine (due to TIC 0 being used for the image), this needs
to be fixed.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit 1b9d1e13d8e14c348f6d6c8fab5f31e8768a1371)

---

 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index c3e3cf2dff5..5ffc376f84e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1587,6 +1587,12 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
       if (insn.getOpcode() == TGSI_OPCODE_STORE &&
           dst.getFile() != TGSI_FILE_MEMORY) {
          info->io.globalAccess |= 0x2;
+
+         if (dst.getFile() == TGSI_FILE_INPUT) {
+            // TODO: Handle indirect somehow?
+            const int i = dst.getIndex(0);
+            info->in[i].mask |= 1;
+         }
       }
 
       if (dst.getFile() == TGSI_FILE_OUTPUT) {




More information about the mesa-commit mailing list