spirv: Allow block-decorated struct types for constants
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 10 Jul 2020 20:58:39 +0000 (15:58 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sun, 12 Jul 2020 00:02:45 +0000 (00:02 +0000)
commit351b5137d71b8dc944bad6dcb83cd93e6d38c44e
treefe3e44eff5dc626f181007b7f9bcb7ece15a6552
parent81773b4b441fbd8ec284de78e4dfdcecdca112dc
spirv: Allow block-decorated struct types for constants

Whenever a struct type is decorated Block or BufferBlock we turn that
into a GLSL_TYPE_INTERFACE.  Since these decorations can end up random
places, we should allow them for constants.

Closes: #3252
Fixes: 9d0ae777dd6 "spirv: Use interface type for block and buffer..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
src/compiler/nir/nir_print.c
src/compiler/spirv/spirv_to_nir.c