dim, is_array, base_type, access, format);
nir_deref_instr *image_deref = nir_build_deref_var(b, image);
const struct glsl_type *type = image_deref->type;
dim, is_array, base_type, access, format);
nir_deref_instr *image_deref = nir_build_deref_var(b, image);
const struct glsl_type *type = image_deref->type;
nir_intrinsic_set_access(instr, image_deref->var->data.image.access);
instr->src[0] = nir_src_for_ssa(&image_deref->dest.ssa);
nir_intrinsic_set_access(instr, image_deref->var->data.image.access);
instr->src[0] = nir_src_for_ssa(&image_deref->dest.ssa);
/* Set the sample argument, which is undefined for single-sample images. */
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) {
/* Set the sample argument, which is undefined for single-sample images. */
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) {