From 114679388122b2f6ebdcdaffc98d533f4b8fa50c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 21 Sep 2022 10:49:33 -0400 Subject: [PATCH] glsl: fix gl_CullDistance xfb linking this matches the behavior for gl_ClipDistance ref #7152 Fixes: 0c8492cd3b2 ("glsl: fix location for array subscript") Reviewed-by: Adam Jackson Part-of: --- src/compiler/glsl/gl_nir_link_varyings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/gl_nir_link_varyings.c b/src/compiler/glsl/gl_nir_link_varyings.c index 015b419bfe7..e91a24212fd 100644 --- a/src/compiler/glsl/gl_nir_link_varyings.c +++ b/src/compiler/glsl/gl_nir_link_varyings.c @@ -366,7 +366,8 @@ xfb_decl_assign_location(struct xfb_decl *xfb_decl, nir_var_shader_out, disable_varying_packing, xfb_enabled) || - strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_ClipDistance") == 0; + strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_ClipDistance") == 0 || + strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_CullDistance") == 0; unsigned array_elem_size = xfb_decl->lowered_builtin_array_variable ? 1 : (array_will_be_lowered ? vector_elements : 4) * matrix_cols * dmul;