spirv: Add a warning for ArrayStride on arrays of blocks
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 10 Jul 2019 22:55:44 +0000 (17:55 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 16 Jul 2019 22:02:08 +0000 (17:02 -0500)
commit6394680f6b54595d1f2dfac7159d2772090b234e
treea46a0885c198a1be9ec8874266994604177bdb71
parentf07f516c5625671d7c31beb40f6dbdbb20ffffc4
spirv: Add a warning for ArrayStride on arrays of blocks

It's disallowed according to the SPIR-V spec or at least I think that's
what the spec says.  It's in a section explicitly about explicit layout
of things in the StorageBuffer, Uniform, and PushConstant storage
classes so it's not 100% clear that it applies with other storage
classes.  However, it seems like it should apply in general and
violating it can trigger (fairly harmless) asserts in NIR.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/spirv_to_nir.c