[Mesa-stable] [Mesa-dev] [PATCH] ac/nir: add missing round_slice for 1D arrays

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Apr 23 14:48:52 UTC 2018


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Mon, Apr 23, 2018 at 2:46 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> This fixes a bunch of CTS fails with 1D arrays:
>
> dEQP-VK.glsl.texture_functions.texture*.sampler1darray_*
>
> Fixes: 625dcbbc456 ("amd/common: pass address components individually to
> ac_build_image_intrinsic")
> Cc: 18.1 <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 72c773522f4..34efb2b9fe1 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3397,6 +3397,13 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
>         }
>
>         /* Texture coordinates fixups */
> +       if (instr->coord_components > 1 &&
> +           instr->sampler_dim == GLSL_SAMPLER_DIM_1D &&
> +           instr->is_array &&
> +           instr->op != nir_texop_txf) {
> +               args.coords[1] = apply_round_slice(&ctx->ac, args.coords[1]);
> +       }
> +
>         if (instr->coord_components > 2 &&
>             (instr->sampler_dim == GLSL_SAMPLER_DIM_2D ||
>              instr->sampler_dim == GLSL_SAMPLER_DIM_MS ||
> --
> 2.17.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list