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:
Jason Ekstrand
2020-08-14 23:41:14 -05:00
committed by Marge Bot
parent d6415b5d2b
commit a8e53a772f
8 changed files with 124 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ struct spirv_supported_capabilities {
bool float64_atomic_add;
bool fragment_shader_sample_interlock;
bool fragment_shader_pixel_interlock;
bool generic_pointers;
bool geometry_streams;
bool image_ms_array;
bool image_read_without_format;