Ilia Mirkin
2014-Feb-04 07:58 UTC
[Nouveau] [PATCH] nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- This fixes the bin/fs-textureOffset-2D piglit test on nv50. Have yet to re-run the full piglit suite with this change in place, but it seems pretty obvious. src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 8 ++++++++ 1 file changed, 8 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 51d3d08..b078f2e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -1729,6 +1729,14 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy) if (tgsi.getOpcode() == TGSI_OPCODE_SAMPLE_C_LZ) texi->tex.levelZero = true; + for (s = 0; s < tgsi.getNumTexOffsets(); ++s) { + for (c = 0; c < 3; ++c) { + texi->tex.offset[s][c] = tgsi.getTexOffset(s).getValueU32(c, info); + if (texi->tex.offset[s][c]) + texi->tex.useOffsets = s + 1; + } + } + bb->insertTail(texi); } -- 1.8.3.2
Ilia Mirkin
2014-Feb-05 05:46 UTC
[Nouveau] [PATCH] nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)
On Tue, Feb 4, 2014 at 2:58 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> > --- > > This fixes the bin/fs-textureOffset-2D piglit test on nv50. Have yet to re-run > the full piglit suite with this change in place, but it seems pretty obvious.BTW, I re-ran the gpu piglits and no regressions with this change.> > src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 8 ++++++++ > 1 file changed, 8 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 51d3d08..b078f2e 100644 > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp > @@ -1729,6 +1729,14 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy) > if (tgsi.getOpcode() == TGSI_OPCODE_SAMPLE_C_LZ) > texi->tex.levelZero = true; > > + for (s = 0; s < tgsi.getNumTexOffsets(); ++s) { > + for (c = 0; c < 3; ++c) { > + texi->tex.offset[s][c] = tgsi.getTexOffset(s).getValueU32(c, info); > + if (texi->tex.offset[s][c]) > + texi->tex.useOffsets = s + 1; > + } > + } > + > bb->insertTail(texi); > } > > -- > 1.8.3.2 >
Maybe Matching Threads
- [PATCH] nv50: TXF already has integer arguments, don't try to convert from f32
- [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize
- [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize
- [PATCH] nouveau/codegen: add missing values for OP_TXLQ into the target arrays
- [LLVMdev] Inconsistent label syntax in LLVM assembly