spirv: Add error checking for Block and BufferBlock decorations
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 15 Dec 2018 14:31:51 +0000 (08:31 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:30 +0000 (00:38 +0000)
commit5c3cb9c3ce3f9fb05c22536c30a68a7b09300642
treebde031799ff13eeeb7020c0eea6f5f13db1b55cb
parente90b738f201e7281e2a4cf43eddd2d15eb942cce
spirv: Add error checking for Block and BufferBlock decorations

Variable pointers being well-defined across the block boundary requires
a couple of very specific SPIR-V validation rules.  Normally, we'd trust
the validator to catch these but since CTS tests have been found in the
wild which violate them, we'll carry our own checks.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/spirv_to_nir.c
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c