ac/shader: fix vertex input with components.
authorDave Airlie <airlied@redhat.com>
Tue, 27 Feb 2018 02:34:54 +0000 (12:34 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 27 Feb 2018 23:04:46 +0000 (09:04 +1000)
This fixes:
dEQP-VK.glsl.440.linkage.varying.component.*

Fixes: 1c57a6da5e3 (ac/shader: scan vertex inputs usage mask)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_shader_info.c

index 5ae8a7204627a5f2bb22673c0d82230d8c0a4d78..d76fecd2445210d64d8b513332e0a5ccad3598bc 100644 (file)
@@ -141,7 +141,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;
                        }
                }