spirv: Add generic pointer support
Most of this is fairly straightforward; we just set all the modes on any derefs which are generic. The one tricky bit is OpGenericCastToPtrExplicit. Instead of adding NIR intrinsics to do the cast, we add NIR intrinsics to do a storage class check and then bcsel based on that. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>
This commit is contained in:

committed by
Marge Bot

parent
d6415b5d2b
commit
a8e53a772f
@@ -212,6 +212,11 @@ intrinsic("get_ssbo_size", src_comp=[-1], dest_comp=1,
|
||||
intrinsic("get_ubo_size", src_comp=[-1], dest_comp=1,
|
||||
flags=[CAN_ELIMINATE, CAN_REORDER])
|
||||
|
||||
# Intrinsics which provide a run-time mode-check. Unlike the compile-time
|
||||
# mode checks, a pointer can only have exactly one mode at runtime.
|
||||
intrinsic("deref_mode_is", src_comp=[-1], dest_comp=1,
|
||||
indices=[MEMORY_MODES], flags=[CAN_ELIMINATE, CAN_REORDER])
|
||||
|
||||
# a barrier is an intrinsic with no inputs/outputs but which can't be moved
|
||||
# around/optimized in general
|
||||
def barrier(name):
|
||||
|
Reference in New Issue
Block a user