Module: Mesa Branch: main Commit: 33c2b64aa33ed8ca5da31288d741cf89b38ab69a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33c2b64aa33ed8ca5da31288d741cf89b38ab69a
Author: Timothy Arceri <[email protected]> Date: Wed Oct 18 14:22:57 2023 +1100 glsl: switch to NIR distance lowering pass Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25860> --- src/compiler/glsl/gl_nir_linker.c | 4 ++++ src/compiler/glsl/linker.cpp | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index e6a1e882d70..33e3258d433 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -1125,6 +1125,10 @@ prelink_lowering(const struct gl_constants *consts, opt_access_options.is_vulkan = false; NIR_PASS_V(nir, nir_opt_access, &opt_access_options); + if (consts->ShaderCompilerOptions[i].LowerCombinedClipCullDistance) { + NIR_PASS_V(nir, nir_lower_clip_cull_distance_to_vec4s); + } + /* Combine clip and cull outputs into one array and set: * - shader_info::clip_distance_array_size * - shader_info::cull_distance_array_size diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 148aab0be40..262a53ea181 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -3155,10 +3155,6 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) detect_recursion_linked(prog, prog->_LinkedShaders[i]->ir); if (!prog->data->LinkStatus) goto done; - - if (consts->ShaderCompilerOptions[i].LowerCombinedClipCullDistance) { - lower_clip_cull_distance(prog, prog->_LinkedShaders[i]); - } } /* Check and validate stream emissions in geometry shaders */
