- c.nr_attrs = brw_count_bits(c.key.attrs);
- c.nr_attr_regs = (c.nr_attrs+1)/2;
- c.nr_setup_attrs = brw_count_bits(c.key.attrs);
- c.nr_setup_regs = (c.nr_setup_attrs+1)/2;
+ c.vue_map = brw->vue_map_geom_out;
+ if (c.key.do_point_coord) {
+ /*
+ * gl_PointCoord is a FS instead of VS builtin variable, thus it's
+ * not included in c.vue_map generated in VS stage. Here we add
+ * it manually to let SF shader generate the needed interpolation
+ * coefficient for FS shader.
+ */
+ c.vue_map.varying_to_slot[BRW_VARYING_SLOT_PNTC] = c.vue_map.num_slots;
+ c.vue_map.slot_to_varying[c.vue_map.num_slots++] = BRW_VARYING_SLOT_PNTC;
+ }
+ c.urb_entry_read_offset = BRW_SF_URB_ENTRY_READ_OFFSET;
+ c.nr_attr_regs = (c.vue_map.num_slots + 1)/2 - c.urb_entry_read_offset;
+ c.nr_setup_regs = c.nr_attr_regs;