chan_var = nir_variable_clone(var, b->shader);
chan_var->data.location_frac = var->data.location_frac + i;
chan_var->type = glsl_channel_type(chan_var->type);
+ if (var->data.explicit_offset) {
+ unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
+ chan_var->data.offset = var->data.offset + i * comp_size;
+ }
chan_vars[var->data.location_frac + i] = chan_var;
chan_var = nir_variable_clone(var, b->shader);
chan_var->data.location_frac = var->data.location_frac + i;
chan_var->type = glsl_channel_type(chan_var->type);
+ if (var->data.explicit_offset) {
+ unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
+ chan_var->data.offset = var->data.offset + i * comp_size;
+ }
chan_vars[var->data.location_frac + i] = chan_var;