nir: Add a passes for nir_intrinsic_convert_alu_types
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 30 Sep 2020 21:15:02 +0000 (16:15 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 1 Oct 2020 18:36:53 +0000 (18:36 +0000)
commit383ecfbc70966a91382272c249b9750f3cff9031
treec0239d509c76385ca212925d5a1865807eecda18
parentd5cb51e2b917a012f8220017e07e6d00d957dd0c
nir: Add a passes for nir_intrinsic_convert_alu_types

This adds primarily two passes:  One is a lowering pass which turns
these conversion intrinsics into a series of ALU ops.  The other is an
optimization pass which attempt to simplify the conversion whenever
possible in the hopes that we can turn it into a "normal" conversion op
which doesn't need special treatment.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6945>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_convert_alu_types.c [new file with mode: 0644]