brw_init_compile(brw, &c.func, mem_ctx);
c.key = *key;
- 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;
brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip,
c.key.do_twoside_color, c.key.attrs);
c.urb_entry_read_offset = brw_sf_compute_urb_entry_read_offset(intel);
+ c.nr_attr_regs = (c.vue_map.num_slots + 1)/2 - c.urb_entry_read_offset;
+ c.nr_setup_regs = c.nr_attr_regs;
c.prog_data.urb_read_length = c.nr_attr_regs;
c.prog_data.urb_entry_size = c.nr_setup_regs * 2;