spirv: Don't fail if multiple ordering semantics bits are set
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 29 Oct 2019 19:09:38 +0000 (12:09 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 29 Oct 2019 21:53:46 +0000 (14:53 -0700)
commit9c3c206e711030b17428a2ef506cc498ef7eedcc
tree1b336ea828d6e29e530937ca18cca502d4bff2bf
parentf0db4c5204f9cf83075bbaafc9be0a2a9560d18c
spirv: Don't fail if multiple ordering semantics bits are set

Vulkan requires that only one bit for the ordering is set, but old
versions of GLSLang just set all the bits.  This was fixed as part of
https://github.com/KhronosGroup/glslang/commit/c51287d744fb6e7e9ccc09f6f8451e6c64b1dad6
but we can still find older versions (or shaders compiled with it)
around.

So instead of failing, emit a warning and fallback to the effective
result of any combination of multiple bits: AcquireRelease.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2018
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/spirv_to_nir.c