From: Józef Kucia Date: Mon, 26 Nov 2018 15:04:30 +0000 (+0100) Subject: nir: Fix assert in print_intrinsic_instr(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94bfb8bf386b560e8e6095727ed1cf08522a027d;p=mesa.git nir: Fix assert in print_intrinsic_instr(). Signed-off-by: Józef Kucia Reviewed-by: Lionel Landwerlin --- diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 8077a29b184..7124ff09e82 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);