Lines Matching defs:image
358 vtn_fail("Invalid image access qualifier");
399 return nir_vec2(&b->nb, &si.image->dest.ssa, &si.sampler->dest.ssa);
420 /* Even though this is a sampled image, we can end up here with a storage
421 * image because OpenCL doesn't distinguish between the two.
423 const struct glsl_type *image_type = type->image->glsl_image;
428 si.image = nir_build_deref_cast(&b->nb, nir_channel(&b->nb, si_vec2, 0),
964 return glsl_texture_type_to_sampler(type->image->glsl_image,
1406 vtn_fail("Invalid image format: %s (%u)",
1731 vtn_fail("Invalid SPIR-V image dimensionality: %s (%u)",
1757 vtn_fail("Unsupported multisampled image type");
1774 vtn_fail("We need to know if the image will be sampled");
1781 val->type->image = vtn_get_type(b, w[2]);
1785 * is the image and the second is the sampler. An OpLoad on an
2654 * image read/sample operations and source type for write operations.
2681 .image = vtn_get_image(b, w[3], NULL),
2700 vtn_push_image(b, w[2], si.image, access & ACCESS_NON_UNIFORM);
2708 nir_deref_instr *image = NULL, *sampler = NULL;
2712 image = si.image;
2715 image = vtn_get_image(b, w[3], NULL);
2718 const enum glsl_sampler_dim sampler_dim = glsl_get_sampler_dim(image->type);
2719 const bool is_array = glsl_sampler_type_is_array(image->type);
2796 p->src = nir_src_for_ssa(&image->dest.ssa);
2808 "%s requires an image of type OpTypeSampledImage",
3009 "image operands can be used on a given instruction.");
3073 * atomics and image instructions) and the resource descriptor being
3075 * to that resource (e.g. the pointer or sampled image operand) must be
3092 if (image && (access & ACCESS_NON_UNIFORM))
3100 /* the return type should match the image type, unless the image type is
3101 * VOID (CL image), in which case the return type dictates the sampler
3104 glsl_get_sampler_result_type(image->type);
3107 "SPIR-V return type mismatches image type. This is only valid "
3228 val->image = ralloc(b, struct vtn_image_pointer);
3230 val->image->image = vtn_nir_deref(b, w[3]);
3231 val->image->coord = get_image_coord(b, w[4]);
3232 val->image->sample = vtn_get_nir_ssa(b, w[5]);
3233 val->image->lod = nir_imm_int(&b->nb, 0);
3237 struct vtn_image_pointer image;
3265 image = *res_val->image;
3273 image = *res_val->image;
3281 image.image = vtn_get_image(b, w[3], &access);
3282 image.coord = NULL;
3283 image.sample = NULL;
3284 image.lod = vtn_ssa_value(b, w[4])->def;
3290 image.image = vtn_get_image(b, w[3], &access);
3291 image.coord = NULL;
3292 image.sample = NULL;
3293 image.lod = NULL;
3299 image.image = vtn_get_image(b, w[3], &access);
3300 image.coord = NULL;
3301 image.sample = NULL;
3302 image.lod = NULL;
3308 image.image = vtn_get_image(b, w[3], &access);
3309 image.coord = get_image_coord(b, w[4]);
3316 image.sample = vtn_get_nir_ssa(b, w[arg]);
3318 image.sample = nir_ssa_undef(&b->nb, 1, 32);
3333 image.lod = vtn_get_nir_ssa(b, w[arg]);
3335 image.lod = nir_imm_int(&b->nb, 0);
3348 image.image = vtn_get_image(b, w[1], &access);
3349 image.coord = get_image_coord(b, w[2]);
3358 image.sample = vtn_get_nir_ssa(b, w[arg]);
3360 image.sample = nir_ssa_undef(&b->nb, 1, 32);
3375 image.lod = vtn_get_nir_ssa(b, w[arg]);
3377 image.lod = nir_imm_int(&b->nb, 0);
3389 vtn_fail_with_opcode("Invalid image opcode", opcode);
3427 vtn_fail_with_opcode("Invalid image opcode", opcode);
3432 intrin->src[0] = nir_src_for_ssa(&image.image->dest.ssa);
3433 nir_intrinsic_set_image_dim(intrin, glsl_get_sampler_dim(image.image->type));
3435 glsl_sampler_type_is_array(image.image->type));
3445 /* The image coordinate is always 4 components but we may not have that
3448 intrin->src[1] = nir_src_for_ssa(nir_pad_vec4(&b->nb, image.coord));
3449 intrin->src[2] = nir_src_for_ssa(image.sample);
3456 * atomics and image instructions) and the resource descriptor being
3458 * to that resource (e.g. the pointer or sampled image operand) must be
3479 intrin->src[1] = nir_src_for_ssa(image.lod);
3489 intrin->src[3] = nir_src_for_ssa(image.lod);
3504 intrin->src[4] = nir_src_for_ssa(image.lod);
3533 vtn_fail_with_opcode("Invalid image opcode", opcode);