[Mesa-dev] [PATCH] ac: fix get_image_coords() for radeonsi

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Jul 27 09:10:04 UTC 2018


On Fri, Jul 27, 2018 at 7:32 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> Because this was setting image to true we would end up calling
> si_load_image_desc() when we sould be calling
> si_load_sampler_desc().

Since the descriptor is part of an image, not a sampler,
get_image_descriptor looks like the right thing to me?

What assertion are you getting?

>
> This fixes an assert() in Deus Ex: MD
> ---
>  src/amd/common/ac_nir_to_llvm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index cffc980e51f..fa934e6702e 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2250,7 +2250,8 @@ static void get_image_coords(struct ac_nir_context *ctx,
>                                                                fmask_load_address[1],
>                                                                fmask_load_address[2],
>                                                                sample_index,
> -                                                              get_image_descriptor(ctx, instr, AC_DESC_FMASK, false));
> +                                                              get_sampler_desc(ctx, nir_instr_as_deref(instr->src[0].ssa->parent_instr),
> +                                                                               AC_DESC_FMASK, NULL, false, false));
>         }
>         if (count == 1 && !gfx9_1d) {
>                 if (instr->src[1].ssa->num_components)
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list