nir: Fix assert in print_intrinsic_instr().

Signed-off-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Józef Kucia 2018-11-26 16:04:30 +01:00 committed by Lionel Landwerlin
parent 776b911365
commit 94bfb8bf38
1 changed files with 1 additions and 1 deletions

View File

@ -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);