spirv,nir: add new lod parameter to image_{load,store} intrinsics
SPV_AMD_shader_image_load_store_lod allows to use a lod parameter with OpImageRead, OpImageWrite and OpImageSparseRead. According to the specification, this parameter should be a 32-bit integer. It is initialized to 0 when no lod parameter is found during SPIR-V->NIR translation. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -379,8 +379,8 @@ def image(name, src_comp=[], **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])
|
||||
image("load", src_comp=[4, 1, 1], dest_comp=0, flags=[CAN_ELIMINATE])
|
||||
image("store", src_comp=[4, 1, 0, 1])
|
||||
image("atomic_add", src_comp=[4, 1, 1], dest_comp=1)
|
||||
image("atomic_imin", src_comp=[4, 1, 1], dest_comp=1)
|
||||
image("atomic_umin", src_comp=[4, 1, 1], dest_comp=1)
|
||||
|
Reference in New Issue
Block a user