From df934873e14e897fa0ba45904ce40be285d4261d Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 21 Nov 2021 03:04:32 -0500 Subject: [PATCH] nir: always keep the clip distance array size updated Drivers expect to know the number of clip distances irrespective of whether compact arrays are used or not. Signed-off-by: Ilia Mirkin Reviewed-by: Connor Abbott Part-of: --- src/compiler/nir/nir_lower_clip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c index 91945f42c4a..5a9438bf386 100644 --- a/src/compiler/nir/nir_lower_clip.c +++ b/src/compiler/nir/nir_lower_clip.c @@ -74,8 +74,8 @@ create_clipdist_vars(nir_shader *shader, nir_variable **io_vars, unsigned ucp_enables, bool output, bool use_clipdist_array) { + shader->info.clip_distance_array_size = util_last_bit(ucp_enables); if (use_clipdist_array) { - shader->info.clip_distance_array_size = util_last_bit(ucp_enables); io_vars[0] = create_clipdist_var(shader, output, VARYING_SLOT_CLIP_DIST0,