From: Timothy Arceri Date: Fri, 15 Dec 2017 00:22:56 +0000 (+1100) Subject: radeonsi/nir: fix num_inputs for doubles in vs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96cfd4bd7ed8c04b154ad7a855e3c1488cc5fedb;p=mesa.git radeonsi/nir: fix num_inputs for doubles in vs Reviewed-by: Marek Olšák --- 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;