[Mesa-stable] [Mesa-dev] [PATCH] nvc0/ir: fix images indirect access on Fermi

Ilia Mirkin imirkin at alum.mit.edu
Sun Jul 10 14:23:10 UTC 2016


Do you also need to zero out su->tex.r ?

On Jul 10, 2016 10:19 AM, "Samuel Pitoiset" <samuel.pitoiset at gmail.com>
wrote:

> This fixes the following piglits:
>
> arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index
> arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index2
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Cc: 12.0 <mesa-stable at lists.freedesktop.org>
> ---
>
> Expect minor conflicts because I did refactor that logic but the patch has
> not
> been backported.
>
>  src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 7 +++++++
>  1 file changed, 7 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 9735773..18955eb 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> @@ -2008,6 +2008,13 @@
> NVC0LoweringPass::processSurfaceCoordsNVC0(TexInstruction *su)
>
>     adjustCoordinatesMS(su);
>
> +   if (ind) {
> +      Value *ptr;
> +      ptr = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getSSA(), ind,
> bld.mkImm(su->tex.r));
> +      ptr = bld.mkOp2v(OP_AND, TYPE_U32, bld.getSSA(), ptr, bld.mkImm(7));
> +      su->setIndirectR(ptr);
> +   }
> +
>     // get surface coordinates
>     for (c = 0; c < arg; ++c)
>        src[c] = su->getSrc(c);
> --
> 2.9.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20160710/1524629f/attachment.html>


More information about the mesa-stable mailing list