nir: Add a conversion and rounding intrinsic

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [jlekstrand.net] - 1 October 2020 18:36 UTC

This new intrinsic is capable of handling the full range of conversions from OpenCL including rounding modes and possible saturation. The intention is that we'll emit this intrinsic directly from spirv_to_nir and then lower it to ALU ops later.

588bb6686b3 nir: Add a conversion and rounding intrinsic
src/compiler/nir/nir.h | 16 ++++++++++++++--
src/compiler/nir/nir_builder.h | 24 ++++++++++++++++++++++++
src/compiler/nir/nir_intrinsics.py | 12 ++++++++++--
src/compiler/nir/nir_print.c | 15 +++++++++++++++
src/compiler/nir/nir_validate.c | 10 ++++++++++
5 files changed, 73 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share