From 96cfd4bd7ed8c04b154ad7a855e3c1488cc5fedb Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 15 Dec 2017 11:22:56 +1100 Subject: [PATCH] radeonsi/nir: fix num_inputs for doubles in vs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader_nir.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 8784117833e..34d28b7a728 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -209,8 +209,13 @@ void si_nir_scan_shader(const struct nir_shader *nir, * tracker has already mapped them to attributes via * variable->data.driver_location. */ - if (nir->info.stage == MESA_SHADER_VERTEX) + if (nir->info.stage == MESA_SHADER_VERTEX) { + if (glsl_type_is_dual_slot(variable->type)) + num_inputs += 2; + else + num_inputs++; continue; + } assert(nir->info.stage != MESA_SHADER_FRAGMENT || (attrib_count == 1 && "not implemented")); @@ -303,10 +308,8 @@ void si_nir_scan_shader(const struct nir_shader *nir, info->colors_read |= 0xf0; } - if (nir->info.stage != MESA_SHADER_VERTEX) - info->num_inputs = num_inputs; - else - info->num_inputs = nir->num_inputs; + info->num_inputs = num_inputs; + i = 0; uint64_t processed_outputs = 0; -- 2.30.2