spirv: Relax the validation conditions of OpSelect
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Dec 2017 03:53:05 +0000 (19:53 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Dec 2017 17:48:58 +0000 (09:48 -0800)
commit3be382cd7cb637f463a4618dc19d87d66a644b0e
treed108e1d1aa2521dd021ed9294a41b95dc76737ea
parent8d00e63ca8e8f357624549c97d9cb705afd522cb
spirv: Relax the validation conditions of OpSelect

The Talos Principle contains shaders with an OpSelect between two
vectors where the condition is a scalar boolean.  This is technically
against the spec bout nir_builder gracefully handles it by splatting
out the condition to all the channels.  So long as the condition is a
boolean, just emit a warning instead of failing.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104246
src/compiler/spirv/spirv_to_nir.c