Re: [Mesa-dev] [PATCH] spirv: Relax the validation conditions of OpSelect

2017-12-18 Thread Lionel Landwerlin
Thanks for point me to the code actually doing this (nir_build_alu). Reviewed-by: Lionel Landwerlin On 15/12/17 03:56, Jason Ekstrand wrote: The Talos Principle contains shaders with an OpSelect between two vectors where the condition is a scalar boolean. This

Re: [Mesa-dev] [PATCH] spirv: Relax the validation conditions of OpSelect

2017-12-14 Thread Jason Ekstrand
It turns out there's already a glslang bug for this and it was closed in March: https://github.com/KhronosGroup/glslang/issues/809 Unfortunately, there are applications shipping with these shaders so failure isn't really an option. --Jason On Thu, Dec 14, 2017 at 7:56 PM, Jason Ekstrand

[Mesa-dev] [PATCH] spirv: Relax the validation conditions of OpSelect

2017-12-14 Thread Jason Ekstrand
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