nir: Add a bool to float32 lowering pass

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [intel.com] - 14 January 2019 19:27 EST

From @jekstrand's nir-1-bit-bool branch, with improved ior/inot lowering.

ior: fmax instead of fadd allows removing the fsat.

inot: seq(x, 0) can be better than fsub(1, x). On a2xx, it works better with the scalar instruction set.

2d2737dcfe nir: Add a bool to float32 lowering pass
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 1 +
src/compiler/nir/nir_lower_bool_to_float.c | 178 +++++++++++++++++++++++++++++
4 files changed, 181 insertions(+)

Upstream: cgit.freedesktop.org


  • Share