Skip to contentSkip to conversation

nv50/ir: mark STORE destination inputs as used

PATCH In review Ilia Mirkin 2 participants 2 messages Oct 14, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +6 -0
index d62d36008e6..8c429026452 100644
@@ -1591,6 +1591,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) {
Signature · 6 lines
2.21.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 20191014064658.2325-1-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]

Reviewed-by
#2 lore raw
Quoted 31 lines · Ilia Mirkin

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.

---
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +6 -1
index d62d36008e6..8c429026452 100644
@@ -1591,6 +1591,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) {
--

2.21.0

Quoted 4 lines

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau