summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2018-06-05 21:09:32 +0100
committerKarol Herbst <[email protected]>2018-06-29 16:07:59 +0200
commitd885303a384978eeefdb2a264ca747292eff0b86 (patch)
treee9dd466b45730b2f13b9db8c6394385d46a0e0dc /src/gallium/drivers/nouveau
parentd7c4ce1d1d800a4721122a20b5a289951e7f4fbc (diff)
nv50/ir: fix image stores with indirect handles
Having this if statement here prevented the next if statement from being reached in the case of image stores, which is needed for instructions with indirect bindless handles like "STORE TEMP[ADDR[2].x+1](1) ...". Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp9
1 files changed, 5 insertions, 4 deletions
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 d7844d73816..c92acc996c4 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1570,6 +1570,11 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
if (insn.dstCount()) {
Instruction::DstRegister dst = insn.getDst(0);
+ if (insn.getOpcode() == TGSI_OPCODE_STORE &&
+ dst.getFile() != TGSI_FILE_MEMORY) {
+ info->io.globalAccess |= 0x2;
+ }
+
if (dst.getFile() == TGSI_FILE_OUTPUT) {
if (dst.isIndirect(0))
for (unsigned i = 0; i < info->numOutputs; ++i)
@@ -1587,10 +1592,6 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
if (isEdgeFlagPassthrough(insn))
info->io.edgeFlagIn = insn.getSrc(0).getIndex(0);
} else
- if (dst.getFile() != TGSI_FILE_MEMORY &&
- insn.getOpcode() == TGSI_OPCODE_STORE) {
- info->io.globalAccess |= 0x2;
- } else
if (dst.getFile() == TGSI_FILE_TEMPORARY) {
if (dst.isIndirect(0))
indirectTempArrays.insert(dst.getArrayId());