[Mesa-dev] [PATCH 1/5] nv50/ir: use levelZero for non-frag tex/txp ops
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Oct 21 09:09:59 UTC 2016
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 10/21/2016 08:30 AM, Ilia Mirkin wrote:
> radeonsi also does the same thing. I suspect that this is likely to be a
> no-op in reality, but it brings nouveau code closer to what the blob
> produces. Plus it makes sense to not try to do auto-derivatives on this.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 +++++
> 1 file changed, 5 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 96bdd4e..80fbaed 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> @@ -2237,6 +2237,11 @@ 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;
> + if (prog->getType() != Program::TYPE_FRAGMENT &&
> + (tgsi.getOpcode() == TGSI_OPCODE_TEX ||
> + tgsi.getOpcode() == TGSI_OPCODE_TEX2 ||
> + tgsi.getOpcode() == TGSI_OPCODE_TXP))
> + texi->tex.levelZero = true;
> if (tgsi.getOpcode() == TGSI_OPCODE_TG4 && !tgt.isShadow())
> texi->tex.gatherComp = tgsi.getSrc(1).getValueU32(0, info);
>
>
--
-Samuel
More information about the mesa-dev
mailing list