[Nouveau] [PATCH] nouveau/codegen: allow tex offsets on non-TXF instructions (e.g. TXL)
Ilia Mirkin
imirkin at alum.mit.edu
Tue Feb 4 21:46:37 PST 2014
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
>
More information about the Nouveau
mailing list