radeonsi/nir: always set input_usage_mask as using all components

Submitted by Timothy Arceri on Feb. 5, 2018, 11:21 p.m.

Details

Message ID 20180205232140.25845-1-tarceri@itsqueeze.com
State Superseded
Headers show
Series "radeonsi/nir: always set input_usage_mask as using all components" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Timothy Arceri Feb. 5, 2018, 11:21 p.m.
This fixes a regression for now, in the future we should gather
the used components properly.

Fixes: be973ed21f6e "radeonsi: load the right number of components for VS inputs and TBOs"

Cc: Marek Olšák <maraeo@gmail.com>
---
 src/gallium/drivers/radeonsi/si_shader_nir.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 8abffdb8fc..d2ea09706d 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -304,6 +304,11 @@  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;
+
+		/* TODO: gather the actual input useage and remove this. */
+		info->input_usage_mask[i] = TGSI_WRITEMASK_XYZW;
+
 		/* Vertex shader inputs don't have semantics. The state
 		 * tracker has already mapped them to attributes via
 		 * variable->data.driver_location.
@@ -327,8 +332,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))