spi_baryc_cntl |= spi_baryc_enable_bit[k];
have_perspective |= k < 3;
have_linear |= !(k < 3);
+ if (rshader->input[i].uses_interpolate_at_centroid) {
+ k = eg_get_interpolator_index(
+ rshader->input[i].interpolate,
+ TGSI_INTERPOLATE_LOC_CENTROID);
+ spi_baryc_cntl |= spi_baryc_enable_bit[k];
+ }
}
}
}
else {
location = TGSI_INTERPOLATE_LOC_CENTROID;
+ ctx->shader->input[input].uses_interpolate_at_centroid = 1;
}
k = eg_get_interpolator_index(ctx->shader->input[input].interpolate, location);
unsigned back_color_input;
unsigned write_mask;
int ring_offset;
+ unsigned uses_interpolate_at_centroid;
};
struct r600_shader_atomic {
sh->add_input(in.gpr, preloaded, /*in.write_mask*/ 0x0F);
if (ps_interp && in.spi_sid) {
int k = eg_get_interpolator_index(in.interpolate, in.interpolate_location);
- if (k >= 0)
+ if (k >= 0) {
ij_interpolators[k] |= true;
+ if (in.uses_interpolate_at_centroid) {
+ k = eg_get_interpolator_index(in.interpolate, TGSI_INTERPOLATE_LOC_CENTROID);
+ ij_interpolators[k] |= true;
+ }
+ }
}
}