[Mesa-dev] [PATCH] ac/nir_to_llvm: fix clamp shadow reference for more hardware

Marek Olšák maraeo at gmail.com
Sat Jan 26 00:58:13 UTC 2019


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Jan 22, 2019 at 10:59 PM Timothy Arceri <tarceri at itsqueeze.com>
wrote:

> Fixes the following piglit test on my VEGA and matches the behaviour in the
> tgsi backend.
>
>
> tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test
>
> Fixes: 625dcbbc4566 ("amd/common: pass address components individually to
> ac_build_image_intrinsic")
> ---
>  src/amd/common/ac_nir_to_llvm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c
> b/src/amd/common/ac_nir_to_llvm.c
> index f509fc31df..b60ef86986 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3586,7 +3586,7 @@ static void visit_tex(struct ac_nir_context *ctx,
> nir_tex_instr *instr)
>          * It's unnecessary if the original texture format was
>          * Z32_FLOAT, but we don't know that here.
>          */
> -       if (args.compare && ctx->ac.chip_class == VI &&
> ctx->abi->clamp_shadow_reference)
> +       if (args.compare && ctx->ac.chip_class >= VI &&
> ctx->abi->clamp_shadow_reference)
>                 args.compare = ac_build_clamp(&ctx->ac,
> ac_to_float(&ctx->ac, args.compare));
>
>         /* pack derivatives */
> --
> 2.20.1
>
> _______________________________________________
> 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-dev/attachments/20190125/75aabf2e/attachment.html>


More information about the mesa-dev mailing list