zink: lower b2b to b2i

Graphics / Mesa 3D Graphics Library / Mesa - Erik Faye-Lund [collabora.com] - 6 May 2020 09:20 UTC

Zink requires 1-bit booleans, but this requirement was missed before b2b1s started getting automatically inserted. Let's lower these away, to avoid piglit regressions.

Fixes the following piglits:- shaders@glsl-vs-if-bool- spec@!opengl 2.0@vertex-program-two-side

Fixes: c217ee8d35f ("nir: Insert b2b1s around booleans in nir_lower_to") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2902

7f6a491eec0 zink: lower b2b to b2i
src/gallium/drivers/zink/meson.build | 14 ++++++-
.../drivers/zink/nir_to_spirv/nir_to_spirv.h | 5 +++
.../zink/nir_to_spirv/zink_nir_algebraic.py | 48 ++++++++++++++++++++++
src/gallium/drivers/zink/zink_compiler.c | 1 +
4 files changed, 67 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share