nir: Set src_components = -1 for image intrinsic deref sources
Semantically, -1 means "Unknown; don't validate" but it's really only used for derefs because they often need to be flexible. We don't really need that flexibility for image intrinsics but this makes it more consistent. More immediately useful is that this gives us the ability to tell _deref forms of these intrinsics apart from the lowered ones. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849>
This commit is contained in:
parent
c0afb60258
commit
0b57272af8
|
@ -561,7 +561,7 @@ atomic3("atomic_counter_comp_swap")
|
|||
# either one or two additional scalar arguments with the same meaning as in
|
||||
# the ARB_shader_image_load_store specification.
|
||||
def image(name, src_comp=[], extra_indices=[], **kwargs):
|
||||
intrinsic("image_deref_" + name, src_comp=[1] + src_comp,
|
||||
intrinsic("image_deref_" + name, src_comp=[-1] + src_comp,
|
||||
indices=[IMAGE_DIM, IMAGE_ARRAY, ACCESS] + extra_indices, **kwargs)
|
||||
intrinsic("image_" + name, src_comp=[1] + src_comp,
|
||||
indices=[IMAGE_DIM, IMAGE_ARRAY, FORMAT, ACCESS] + extra_indices, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue