+ } else if (idx == NIR_INTRINSIC_REDUCTION_OP) {
+ nir_op reduction_op = nir_intrinsic_reduction_op(instr);
+ fprintf(fp, " reduction_op=%s", nir_op_infos[reduction_op].name);
+ } else if (idx == NIR_INTRINSIC_IMAGE_DIM) {
+ static const char *dim_name[] = {
+ [GLSL_SAMPLER_DIM_1D] = "1D",
+ [GLSL_SAMPLER_DIM_2D] = "2D",
+ [GLSL_SAMPLER_DIM_3D] = "3D",
+ [GLSL_SAMPLER_DIM_CUBE] = "Cube",
+ [GLSL_SAMPLER_DIM_RECT] = "Rect",
+ [GLSL_SAMPLER_DIM_BUF] = "Buf",
+ [GLSL_SAMPLER_DIM_MS] = "2D-MSAA",
+ [GLSL_SAMPLER_DIM_SUBPASS] = "Subpass",
+ [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[dim]);
+ fprintf(fp, " image_dim=%s", dim_name[dim]);
+ } else if (idx == NIR_INTRINSIC_IMAGE_ARRAY) {
+ bool array = nir_intrinsic_image_array(instr);
+ fprintf(fp, " image_array=%s", array ? "true" : "false");
+ } else if (idx == NIR_INTRINSIC_DESC_TYPE) {
+ VkDescriptorType desc_type = nir_intrinsic_desc_type(instr);
+ fprintf(fp, " desc_type=%s", vulkan_descriptor_type_name(desc_type));