- /* Need to locate the two positions present in vertex + header.
- * These are currently hardcoded:
- */
- c.header_position_offset = ATTR_SIZE;
-
- if (intel->gen == 5)
- header_regs = 3;
- else
- header_regs = 1;
-
- delta = header_regs * REG_SIZE;
-
- for (i = 0; i < VERT_RESULT_MAX; i++) {
- if (c.key.attrs & BITFIELD64_BIT(i)) {
- c.offset[i] = delta;
- delta += ATTR_SIZE;
-
- c.idx_to_attr[c.nr_attrs] = i;
- c.nr_attrs++;
- }
- }
+ c.has_flat_shading =
+ brw_any_flat_varyings(&key->interpolation_mode);
+ c.has_noperspective_shading =
+ brw_any_noperspective_varyings(&key->interpolation_mode);