summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c13
1 files 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;