Mesa (master): radeonsi/nir: always set input_usage_mask as using all components
Timothy Arceri
tarceri at kemper.freedesktop.org
Tue Feb 6 21:46:48 UTC 2018
Module: Mesa
Branch: master
Commit: 1142b1d3e10815311e82cca417a62bd0b9bd21ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1142b1d3e10815311e82cca417a62bd0b9bd21ac
Author: Timothy Arceri <tarceri at itsqueeze.com>
Date: Tue Feb 6 09:52:47 2018 +1100
radeonsi/nir: always set input_usage_mask as using all components
This fixes a regression for now, in the future we should gather
the used components properly.
V2: just set for VS and correctly handle doubles
Fixes: be973ed21f6e "radeonsi: load the right number of components for VS inputs and TBOs"
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader_nir.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 128be585cd..c41caf5e54 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -276,14 +276,22 @@ void si_nir_scan_shader(const struct nir_shader *nir,
unsigned attrib_count = glsl_count_attribute_slots(type,
nir->info.stage == MESA_SHADER_VERTEX);
+ i = variable->data.driver_location;
+
/* Vertex shader inputs don't have semantics. The state
* tracker has already mapped them to attributes via
* variable->data.driver_location.
*/
if (nir->info.stage == MESA_SHADER_VERTEX) {
- if (glsl_type_is_dual_slot(variable->type))
+ /* TODO: gather the actual input useage and remove this. */
+ info->input_usage_mask[i] = TGSI_WRITEMASK_XYZW;
+
+ if (glsl_type_is_dual_slot(variable->type)) {
num_inputs += 2;
- else
+
+ /* TODO: gather the actual input useage and remove this. */
+ info->input_usage_mask[i+1] = TGSI_WRITEMASK_XYZW;
+ } else
num_inputs++;
continue;
}
@@ -299,8 +307,6 @@ void si_nir_scan_shader(const struct nir_shader *nir,
continue;
}
- i = variable->data.driver_location;
-
for (unsigned j = 0; j < attrib_count; j++, i++) {
if (processed_inputs & ((uint64_t)1 << i))
More information about the mesa-commit
mailing list