nouveau: Enable frexp lowering in the backend.
authorEmma Anholt <emma@anholt.net>
Wed, 22 Mar 2023 20:53:35 +0000 (13:53 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 02:32:01 +0000 (02:32 +0000)
This would be desired for NVK using this backend, but also for getting
lowering out of the GLSL frontend.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083>

src/nouveau/codegen/nv50_ir_from_nir.cpp

index 6299038..e12e6c8 100644 (file)
@@ -3347,6 +3347,8 @@ Converter::run()
    NIR_PASS_V(nir, nir_lower_alu_to_scalar, NULL, NULL);
    NIR_PASS_V(nir, nir_lower_phis_to_scalar, false);
 
+   NIR_PASS_V(nir, nir_lower_frexp);
+
    /*TODO: improve this lowering/optimisation loop so that we can use
     *      nir_opt_idiv_const effectively before this.
     */