aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-12-15 11:22:56 +1100
committerTimothy Arceri <[email protected]>2018-01-30 09:08:47 +1100
commit96cfd4bd7ed8c04b154ad7a855e3c1488cc5fedb (patch)
tree3628e3c8ee23647e7adc617bc4d5f4898ac5abd7 /src/gallium/drivers
parent09cd484d6113b76572fd16a2ad834d2660c62cf7 (diff)
radeonsi/nir: fix num_inputs for doubles in vs
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-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;