[Mesa-dev] [PATCH 2/5] nvc0/ir: use levelZero flag when the lod is set to 0
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Oct 21 09:12:03 UTC 2016
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 10/21/2016 08:30 AM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> index 68f2b15..4181422 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> @@ -662,6 +662,15 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
> }
> }
>
> + ImmediateValue lod;
> + if (!i->tex.target.isMS() && (i->op == OP_TXL || i->op == OP_TXF) &&
> + i->src(arg).getImmediate(lod) && lod.isInteger(0)) {
> + if (i->op == OP_TXL)
> + i->op = OP_TEX;
> + i->tex.levelZero = true;
> + i->moveSources(arg, -1);
> + }
> +
> // Arguments to the TEX instruction are a little insane. Even though the
> // encoding is identical between SM20 and SM30, the arguments mean
> // different things between Fermi and Kepler+. A lot of arguments are
>
--
-Samuel
More information about the mesa-dev
mailing list