mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
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:
parent
7088621874
commit
fb96f85d19
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue