Ilia Mirkin
2019-Oct-14 06:46 UTC
[Nouveau] [PATCH] 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> --- 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 d62d36008e6..8c429026452 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -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
Karol Herbst
2019-Oct-14 12:48 UTC
[Nouveau] [PATCH] nv50/ir: mark STORE destination inputs as used
Reviewed-by: Karol Herbst <kherbst at redhat.com> On Mon, Oct 14, 2019 at 8:47 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:> > 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> > --- > 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 d62d36008e6..8c429026452 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > @@ -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 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Maybe Matching Threads
- [PATCH mesa 2/6] nouveau: codegen: Slightly refactor Source::scanInstruction() dst handling
- [PATCH mesa 1/6] tgsi_build: Fix return of uninitialized memory in tgsi_*_instruction_memory
- [PATCH] nv50/ir: only use FILE_LOCAL_MEMORY for temp arrays that use indirection
- [PATCH 00/12] Tessellation support for nvc0
- [PATCH mesa 5/6] nouveau: codegen: Add support for OpenCL global memory buffers