diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.h b/src/panfrost/compiler/bifrost/bifrost_compile.h index d541c70bcda..e5085742dd5 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.h +++ b/src/panfrost/compiler/bifrost/bifrost_compile.h @@ -63,7 +63,6 @@ bifrost_precompiled_kernel_prepare_push_uniforms( } void bifrost_preprocess_nir(nir_shader *nir, uint64_t gpu_id); -void bifrost_optimize_nir(nir_shader *nir, uint64_t gpu_id); void bifrost_postprocess_nir(nir_shader *nir, const struct pan_compile_inputs *inputs, struct pan_shader_info *info); diff --git a/src/panfrost/compiler/bifrost/bifrost_nir.c b/src/panfrost/compiler/bifrost/bifrost_nir.c index 4ab321fc66c..a7855916c92 100644 --- a/src/panfrost/compiler/bifrost/bifrost_nir.c +++ b/src/panfrost/compiler/bifrost/bifrost_nir.c @@ -259,12 +259,6 @@ bi_optimize_loop_nir(nir_shader *nir, uint64_t gpu_id, bool allow_copies) NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_function_temp, NULL); } -void -bifrost_optimize_nir(nir_shader *nir, uint64_t gpu_id) -{ - bi_optimize_loop_nir(nir, gpu_id, true); -} - static void bi_optimize_nir(nir_shader *nir, uint64_t gpu_id, nir_variable_mode robust_modes) diff --git a/src/panfrost/compiler/pan_compiler.c b/src/panfrost/compiler/pan_compiler.c index 66542e8cf31..7325c16f8b6 100644 --- a/src/panfrost/compiler/pan_compiler.c +++ b/src/panfrost/compiler/pan_compiler.c @@ -83,13 +83,6 @@ pan_preprocess_nir(nir_shader *nir, uint64_t gpu_id) NIR_PASS(_, nir, nir_lower_tex, &lower_tex_options); } -void -pan_optimize_nir(nir_shader *nir, uint64_t gpu_id) -{ - assert(pan_arch(gpu_id) >= 6); - bifrost_optimize_nir(nir, gpu_id); -} - void pan_postprocess_nir(nir_shader *nir, const struct pan_compile_inputs *inputs, struct pan_shader_info *info) diff --git a/src/panfrost/compiler/pan_compiler.h b/src/panfrost/compiler/pan_compiler.h index 5cb9ae177dc..f2d3b56b1a6 100644 --- a/src/panfrost/compiler/pan_compiler.h +++ b/src/panfrost/compiler/pan_compiler.h @@ -58,19 +58,18 @@ struct pan_compile_inputs { }; /* Every panfrost compilation pipeline should adhere to: - * 1. Driver-specific early lowering + pan_optimize_nir() (optional) + * 1. Driver-specific early lowering * 2. pan_preprocess_nir() * 3. Descriptor lowering * 4. pan_postprocess_nir() * 5. Inline sysvals - * 5. pan_shader_compile() + * 6. pan_shader_compile() * ONLY SYSVAL LOWERING is allowed between postprocess and shader_compile. * Driver-specific lowerings should be either BEFORE preprocess or BETWEEN * preprocess and postprocess. Any code except sysval inlining put after * postprocess WILL BE NAKed. */ void pan_preprocess_nir(nir_shader *nir, uint64_t gpu_id); -void pan_optimize_nir(nir_shader *nir, uint64_t gpu_id); void pan_postprocess_nir(nir_shader *nir, const struct pan_compile_inputs *inputs, struct pan_shader_info *info); diff --git a/src/panfrost/vulkan/panvk_vX_shader.c b/src/panfrost/vulkan/panvk_vX_shader.c index 6d8507bb7c7..03da805a49c 100644 --- a/src/panfrost/vulkan/panvk_vX_shader.c +++ b/src/panfrost/vulkan/panvk_vX_shader.c @@ -497,11 +497,6 @@ panvk_preprocess_nir(struct vk_physical_device *vk_pdev, if (nir->info.stage == MESA_SHADER_FRAGMENT) NIR_PASS(_, nir, nir_lower_wpos_center); - pan_optimize_nir(nir, pdev->kmod.dev->props.gpu_id); - - NIR_PASS(_, nir, nir_split_var_copies); - NIR_PASS(_, nir, nir_lower_var_copies); - assert(pdev->kmod.dev->props.shader_present != 0); uint64_t core_max_id = util_last_bit(pdev->kmod.dev->props.shader_present) - 1;