This just tracks the attribute interpolation location into the
interp code.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
/* Position */
bld->mask[0] = TGSI_WRITEMASK_XYZW;
bld->interp[0] = LP_INTERP_LINEAR;
+ bld->interp_loc[0] = 0;
/* Inputs */
for (attrib = 0; attrib < num_inputs; ++attrib) {
bld->mask[1 + attrib] = inputs[attrib].usage_mask;
bld->interp[1 + attrib] = inputs[attrib].interp;
+ bld->interp_loc[1 + attrib] = inputs[attrib].location;
}
bld->num_attribs = 1 + num_inputs;
uint usage_mask:4; /* bitmask of TGSI_WRITEMASK_x flags */
uint src_index:8; /* where to find values in incoming vertices */
uint cyl_wrap:4; /* TGSI_CYLINDRICAL_WRAP_x flags */
- uint padding:12;
+ uint location:2; /* TGSI_INTERPOLOATE_LOC_* */
+ uint padding:10;
};
unsigned num_attribs;
unsigned mask[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_WRITE_MASK_x */
enum lp_interp interp[1 + PIPE_MAX_SHADER_INPUTS];
+ unsigned interp_loc[1 + PIPE_MAX_SHADER_INPUTS];
boolean simple_interp;
boolean depth_clamp;
for (i = 0; i < shader->info.base.num_inputs; i++) {
shader->inputs[i].usage_mask = shader->info.base.input_usage_mask[i];
shader->inputs[i].cyl_wrap = shader->info.base.input_cylindrical_wrap[i];
+ shader->inputs[i].location = shader->info.base.input_interpolate_loc[i];
switch (shader->info.base.input_interpolate[i]) {
case TGSI_INTERPOLATE_CONSTANT: