Module: Mesa Branch: main Commit: f1ea6c1b40a798324326105579c0b394936cd536 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1ea6c1b40a798324326105579c0b394936cd536
Author: Emma Anholt <[email protected]> Date: Wed Mar 22 13:43:55 2023 -0700 intel: Always call nir_lower_frexp. We have 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/intel/compiler/brw_kernel.c | 1 - src/intel/compiler/brw_nir.c | 2 ++ src/intel/vulkan/anv_pipeline.c | 2 -- src/intel/vulkan_hasvk/anv_pipeline.c | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/intel/compiler/brw_kernel.c b/src/intel/compiler/brw_kernel.c index 84a6771ca4f..ff914809652 100644 --- a/src/intel/compiler/brw_kernel.c +++ b/src/intel/compiler/brw_kernel.c @@ -439,7 +439,6 @@ brw_kernel_from_spirv(struct brw_compiler *compiler, nir_var_mem_shared | nir_var_mem_global, nir_address_format_62bit_generic); - NIR_PASS_V(nir, nir_lower_frexp); NIR_PASS_V(nir, nir_lower_convert_alu_types, NULL); NIR_PASS_V(nir, brw_nir_lower_cs_intrinsics); diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 749b046a3e6..faa9662fca4 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -930,6 +930,8 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, nir_validate_ssa_dominance(nir, "before brw_preprocess_nir"); + OPT(nir_lower_frexp); + if (is_scalar) { OPT(nir_lower_alu_to_scalar, NULL, NULL); } diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index c216d7e9ce4..ca9b15008ba 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -252,8 +252,6 @@ anv_shader_stage_to_nir(struct anv_device *device, }; NIR_PASS(_, nir, nir_opt_access, &opt_access_options); - NIR_PASS(_, nir, nir_lower_frexp); - /* Vulkan uses the separate-shader linking model */ nir->info.separate_shader = true; diff --git a/src/intel/vulkan_hasvk/anv_pipeline.c b/src/intel/vulkan_hasvk/anv_pipeline.c index f88884faa14..306fcd9d82e 100644 --- a/src/intel/vulkan_hasvk/anv_pipeline.c +++ b/src/intel/vulkan_hasvk/anv_pipeline.c @@ -158,8 +158,6 @@ anv_shader_stage_to_nir(struct anv_device *device, }; NIR_PASS(_, nir, nir_opt_access, &opt_access_options); - NIR_PASS(_, nir, nir_lower_frexp); - /* Vulkan uses the separate-shader linking model */ nir->info.separate_shader = true;
