nir_tex_src_sampler_deref, /* < deref pointing to the sampler */
nir_tex_src_texture_offset, /* < dynamically uniform indirect offset */
nir_tex_src_sampler_offset, /* < dynamically uniform indirect offset */
+ nir_tex_src_texture_handle, /* < bindless texture handle */
+ nir_tex_src_sampler_handle, /* < bindless sampler handle */
nir_tex_src_plane, /* < selects plane for planar textures */
nir_num_tex_src_types
} nir_tex_src_type;
# Image load, store and atomic intrinsics.
#
-# All image intrinsics come in two versions. One which take an image target
-# passed as a deref chain as the first source and one which takes an index or
-# handle as the first source. In the first version, the image variable
-# contains the memory and layout qualifiers that influence the semantics of
-# the intrinsic. In the second, the image format and access qualifiers are
-# provided as constant indices.
+# All image intrinsics come in three versions. One which take an image target
+# passed as a deref chain as the first source, one which takes an index as the
+# first source, and one which takes a bindless handle as the first source.
+# In the first version, the image variable contains the memory and layout
+# qualifiers that influence the semantics of the intrinsic. In the second and
+# third, the image format and access qualifiers are provided as constant
+# indices.
#
# All image intrinsics take a four-coordinate vector and a sample index as
# 2nd and 3rd sources, determining the location within the image that will be
intrinsic("image_deref_" + name, src_comp=[1] + src_comp, **kwargs)
intrinsic("image_" + name, src_comp=[1] + src_comp,
indices=[IMAGE_DIM, IMAGE_ARRAY, FORMAT, ACCESS], **kwargs)
+ intrinsic("bindless_image_" + name, src_comp=[1] + src_comp,
+ indices=[IMAGE_DIM, IMAGE_ARRAY, FORMAT, ACCESS], **kwargs)
image("load", src_comp=[4, 1], dest_comp=0, flags=[CAN_ELIMINATE])
image("store", src_comp=[4, 1, 0])
if (tex->src[i].src_type == nir_tex_src_texture_deref ||
tex->src[i].src_type == nir_tex_src_sampler_deref ||
tex->src[i].src_type == nir_tex_src_texture_offset ||
- tex->src[i].src_type == nir_tex_src_sampler_offset)
+ tex->src[i].src_type == nir_tex_src_sampler_offset ||
+ tex->src[i].src_type == nir_tex_src_texture_handle ||
+ tex->src[i].src_type == nir_tex_src_sampler_handle)
num_srcs++;
}
if (tex->src[i].src_type == nir_tex_src_texture_deref ||
tex->src[i].src_type == nir_tex_src_sampler_deref ||
tex->src[i].src_type == nir_tex_src_texture_offset ||
- tex->src[i].src_type == nir_tex_src_sampler_offset) {
+ tex->src[i].src_type == nir_tex_src_sampler_offset ||
+ tex->src[i].src_type == nir_tex_src_texture_handle ||
+ tex->src[i].src_type == nir_tex_src_sampler_handle) {
nir_src_copy(&txs->src[idx].src, &tex->src[i].src, txs);
txs->src[idx].src_type = tex->src[i].src_type;
idx++;
tex->src[i].src_type == nir_tex_src_texture_deref ||
tex->src[i].src_type == nir_tex_src_sampler_deref ||
tex->src[i].src_type == nir_tex_src_texture_offset ||
- tex->src[i].src_type == nir_tex_src_sampler_offset)
+ tex->src[i].src_type == nir_tex_src_sampler_offset ||
+ tex->src[i].src_type == nir_tex_src_texture_handle ||
+ tex->src[i].src_type == nir_tex_src_sampler_handle)
num_srcs++;
}
tex->src[i].src_type == nir_tex_src_texture_deref ||
tex->src[i].src_type == nir_tex_src_sampler_deref ||
tex->src[i].src_type == nir_tex_src_texture_offset ||
- tex->src[i].src_type == nir_tex_src_sampler_offset) {
+ tex->src[i].src_type == nir_tex_src_sampler_offset ||
+ tex->src[i].src_type == nir_tex_src_texture_handle ||
+ tex->src[i].src_type == nir_tex_src_sampler_handle) {
nir_src_copy(&tql->src[idx].src, &tex->src[i].src, tql);
tql->src[idx].src_type = tex->src[i].src_type;
idx++;
case nir_tex_src_sampler_offset:
fprintf(fp, "(sampler_offset)");
break;
+ case nir_tex_src_texture_handle:
+ fprintf(fp, "(texture_handle)");
+ break;
+ case nir_tex_src_sampler_handle:
+ fprintf(fp, "(sampler_handle)");
+ break;
case nir_tex_src_plane:
fprintf(fp, "(plane)");
break;