From b5818e2e4f7d21ddd257fa00499520684fc0f87e Mon Sep 17 00:00:00 2001 From: antonino Date: Fri, 5 May 2023 18:13:32 +0200 Subject: [PATCH] nir: make var arrays large enough in `nir_create_passthrough_gs` Because each location has 4 possible different values for location_frac the arrays need to br 4x the size. Fixes: d0342e28 ("nir: Add helper to create passthrough GS shader") Part-of: --- src/compiler/nir/nir_passthrough_gs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_passthrough_gs.c b/src/compiler/nir/nir_passthrough_gs.c index 4f3b27eb32a..f24ac7124fb 100644 --- a/src/compiler/nir/nir_passthrough_gs.c +++ b/src/compiler/nir/nir_passthrough_gs.c @@ -178,8 +178,8 @@ nir_create_passthrough_gs(const nir_shader_compiler_options *options, bool handle_flat = nir->info.gs.output_primitive == SHADER_PRIM_LINE_STRIP && nir->info.gs.output_primitive != original_our_prim; - nir_variable *in_vars[VARYING_SLOT_MAX]; - nir_variable *out_vars[VARYING_SLOT_MAX]; + nir_variable *in_vars[VARYING_SLOT_MAX * 4]; + nir_variable *out_vars[VARYING_SLOT_MAX * 4]; unsigned num_inputs = 0, num_outputs = 0; /* Create input/output variables. */