[Mesa-dev] [PATCH] ac/shader: fix vertex input with components.

Dave Airlie airlied at gmail.com
Tue Feb 27 02:36:53 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This fixes:
dEQP-VK.glsl.440.linkage.varying.component.*

Fixes: 1c57a6da5e3 (ac/shader: scan vertex inputs usage mask)
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/common/ac_shader_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_shader_info.c b/src/amd/common/ac_shader_info.c
index 5f2b34e..a464063 100644
--- a/src/amd/common/ac_shader_info.c
+++ b/src/amd/common/ac_shader_info.c
@@ -158,7 +158,7 @@ gather_intrinsic_info(const nir_shader *nir, const nir_intrinsic_instr *instr,
 			if (var->data.mode == nir_var_shader_in) {
 				unsigned idx = var->data.location;
 				uint8_t mask =
-					nir_ssa_def_components_read(&instr->dest.ssa);
+					nir_ssa_def_components_read(&instr->dest.ssa) << var->data.location_frac;
 				info->vs.input_usage_mask[idx] |= mask;
 			}
 		}
-- 
2.9.5



More information about the mesa-dev mailing list