[Mesa-dev] [PATCH] nir: Fix assert in print_intrinsic_instr().

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Nov 26 15:23:07 UTC 2018


On 26/11/2018 15:04, Józef Kucia wrote:
> Signed-off-by: Józef Kucia <joseph.kucia at gmail.com>


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>


> ---
>   src/compiler/nir/nir_print.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
> index e20c28fec874..9ecb2a7c54e6 100644
> --- a/src/compiler/nir/nir_print.c
> +++ b/src/compiler/nir/nir_print.c
> @@ -721,7 +721,7 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
>               [GLSL_SAMPLER_DIM_SUBPASS_MS] = "Subpass-MSAA",
>            };
>            enum glsl_sampler_dim dim = nir_intrinsic_image_dim(instr);
> -         assert(dim < ARRAY_SIZE(dim_name) && dim_name[idx]);
> +         assert(dim < ARRAY_SIZE(dim_name) && dim_name[dim]);
>            fprintf(fp, " image_dim=%s", dim_name[dim]);
>         } else if (idx == NIR_INTRINSIC_IMAGE_ARRAY) {
>            bool array = nir_intrinsic_image_dim(instr);




More information about the mesa-dev mailing list