*/
uint32_t barycentric_interp_modes;
+ /**
+ * Map from gl_varying_slot to the position within the FS setup data
+ * payload where the varying's attribute vertex deltas should be delivered.
+ * For varying slots that are not used by the FS, the value is -1.
+ */
+ int urb_setup[VARYING_SLOT_MAX];
+
/* Pointers to tracked values (only valid once
* _mesa_load_state_parameters has been called at runtime).
*
int location = ir->location;
for (unsigned int i = 0; i < array_elements; i++) {
for (unsigned int j = 0; j < type->matrix_columns; j++) {
- if (urb_setup[location] == -1) {
+ if (c->prog_data.urb_setup[location] == -1) {
/* If there's no incoming setup data for this slot, don't
* emit interpolation for it.
*/
fs_visitor::calculate_urb_setup()
{
for (unsigned int i = 0; i < VARYING_SLOT_MAX; i++) {
- urb_setup[i] = -1;
+ c->prog_data.urb_setup[i] = -1;
}
int urb_next = 0;
if (brw->gen >= 6) {
for (unsigned int i = 0; i < VARYING_SLOT_MAX; i++) {
if (fp->Base.InputsRead & BITFIELD64_BIT(i)) {
- urb_setup[i] = urb_next++;
+ c->prog_data.urb_setup[i] = urb_next++;
}
}
} else {
* incremented, mapped or not.
*/
if (_mesa_varying_slot_in_fs((gl_varying_slot) i))
- urb_setup[i] = urb_next;
+ c->prog_data.urb_setup[i] = urb_next;
urb_next++;
}
}
* See compile_sf_prog() for more info.
*/
if (fp->Base.InputsRead & BITFIELD64_BIT(VARYING_SLOT_PNTC))
- urb_setup[VARYING_SLOT_PNTC] = urb_next++;
+ c->prog_data.urb_setup[VARYING_SLOT_PNTC] = urb_next++;
}
/* Each attribute is 4 setup channels, each of which is half a reg. */
struct brw_reg
fs_visitor::interp_reg(int location, int channel)
{
- int regnr = urb_setup[location] * 2 + channel / 2;
+ int regnr = c->prog_data.urb_setup[location] * 2 + channel / 2;
int stride = (channel & 1) * 4;
- assert(urb_setup[location] != -1);
+ assert(c->prog_data.urb_setup[location] != -1);
return brw_vec1_grf(regnr, stride);
}