spirv: implement SpvOpUntypedImageTexelPointerEXT

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40768>
This commit is contained in:
Samuel Pitoiset 2026-04-02 18:02:22 +02:00 committed by Marge Bot
parent 7088621874
commit fb96f85d19

View file

@ -4216,6 +4216,20 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
val->image->lod = nir_imm_int(&b->nb, 0);
val->image->format = type->image_format;
return;
} else if (opcode == SpvOpUntypedImageTexelPointerEXT) {
struct vtn_type *type = vtn_get_value_type(b, w[3]);
struct vtn_value *val =
vtn_push_value(b, w[2], vtn_value_type_image_pointer);
val->image = vtn_alloc(b, struct vtn_image_pointer);
val->image->image = nir_build_deref_cast(&b->nb, vtn_get_nir_ssa(b, w[4]),
nir_var_image,
type->glsl_image, 0);
val->image->coord = get_image_coord(b, w[5]);
val->image->sample = vtn_get_nir_ssa(b, w[6]);
val->image->lod = nir_imm_int(&b->nb, 0);
val->image->format = type->image_format;
return;
}
struct vtn_image_pointer image;
@ -6762,6 +6776,7 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvOpImageSparseRead:
case SpvOpImageWrite:
case SpvOpImageTexelPointer:
case SpvOpUntypedImageTexelPointerEXT:
case SpvOpImageQueryFormat:
case SpvOpImageQueryOrder:
vtn_handle_image(b, opcode, w, count);