We were printing only when the channel was exactly the start channel, so
scalarized loads/stores would be missing the name on the rest.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
nir_foreach_variable(var, var_list) {
if ((var->data.driver_location == nir_intrinsic_base(instr)) &&
(instr->intrinsic == nir_intrinsic_load_uniform ||
- var->data.location_frac == nir_intrinsic_component(instr)) &&
- var->name) {
+ (nir_intrinsic_component(instr) >= var->data.location_frac &&
+ nir_intrinsic_component(instr) <
+ (var->data.location_frac + glsl_get_components(var->type)))) &&
+ var->name) {
fprintf(fp, "\t/* %s */", var->name);
break;
}