From dcc1d115f960c06f5c13b04f4bbfdb6b126fb712 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 29 Aug 2023 09:52:40 -0400 Subject: [PATCH] zink: use nir_io_semantics::num_slots for indirect var creation Part-of: --- src/gallium/drivers/zink/zink_compiler.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index f1ceb4c0cef..d1689af5e6e 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -5008,11 +5008,7 @@ rework_io_vars(nir_shader *nir, nir_variable_mode mode) old_var->data.mode = oldmode; if (is_indirect) { /* indirect array access requires the full array in a single variable */ - unsigned slot_count = 0; - if (is_arrayed) - slot_count = glsl_count_vec4_slots(glsl_get_array_element(old_var->type), false, false); - else - slot_count = glsl_count_vec4_slots(old_var->type, false, false); + unsigned slot_count = s.num_slots; if (bit_size == 64 && slot_count > 1) slot_count /= 2; if (slot_count > 1)