From 404e9f11346279fb6c38fab45b024b0f924cbea7 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 15 Mar 2024 13:50:41 -0400 Subject: [PATCH] zink: always use shader sizes for clip/cull dist variables Part-of: --- src/gallium/drivers/zink/zink_compiler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index e307e634251..3b413d8a9d4 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -5217,11 +5217,13 @@ rework_io_vars(nir_shader *nir, nir_variable_mode mode) break; case VARYING_SLOT_CLIP_DIST0: case VARYING_SLOT_CLIP_DIST1: - max_components = s.num_slots; + max_components = nir->info.clip_distance_array_size; + assert(max_components); break; case VARYING_SLOT_CULL_DIST0: case VARYING_SLOT_CULL_DIST1: - max_components = s.num_slots; + max_components = nir->info.cull_distance_array_size; + assert(max_components); break; case VARYING_SLOT_TESS_LEVEL_OUTER: max_components = 4;