Module: Mesa Branch: main Commit: f2228902ed8d1d5d352798d3561323e8684aa93b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2228902ed8d1d5d352798d3561323e8684aa93b
Author: Emma Anholt <[email protected]> Date: Thu Mar 23 09:47:47 2023 -0700 ir3: Move turnip's nir_lower_frexp to the shared compiler. We had NIR lowering for Vulkan, and rely on GLSL's lowering in the frontend, but this will let us drop the GLSL lowering. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083> --- src/freedreno/ir3/ir3_nir.c | 1 + src/freedreno/vulkan/tu_shader.cc | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index f9f25a0fecf..c92dc4d84fd 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -349,6 +349,7 @@ ir3_finalize_nir(struct ir3_compiler *compiler, nir_shader *s) if (s->info.stage == MESA_SHADER_GEOMETRY) NIR_PASS_V(s, ir3_nir_lower_gs); + NIR_PASS_V(s, nir_lower_frexp); NIR_PASS_V(s, nir_lower_amul, ir3_glsl_type_size); OPT_V(s, nir_lower_regs_to_ssa); diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index 9df803dd349..18e0a6ff115 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -124,8 +124,6 @@ tu_spirv_to_nir(struct tu_device *dev, NIR_PASS_V(nir, nir_lower_system_values); NIR_PASS_V(nir, nir_lower_is_helper_invocation); - NIR_PASS_V(nir, nir_lower_frexp); - ir3_optimize_loop(dev->compiler, nir); NIR_PASS_V(nir, nir_opt_conditional_discard);
