[Mesa-dev] [PATCH 20/37] i965/gen6/gs: Implement GS_OPCODE_SET_PRIMITIVE_ID.

Iago Toral Quiroga itoral at igalia.com
Tue Sep 16 23:54:52 PDT 2014


On mar, 2014-09-16 at 15:56 -0700, Jordan Justen wrote:
(...)
> >
> >  void
> > +vec4_generator::generate_gs_set_primitive_id(struct brw_reg dst)
> > +{
> > +   /* In gen6, PrimitiveID is delivered in R0.1 of the payload */
> > +   struct brw_reg src = brw_vec8_grf(0, 0);
> > +   brw_push_insn_state(p);
> > +   brw_set_default_mask_control(p, BRW_MASK_DISABLE);
> > +   brw_set_default_access_mode(p, BRW_ALIGN_1);
> > +   brw_MOV(p, get_element_ud(dst, 0), get_element_ud(src, 1));
> > +   brw_set_default_access_mode(p, BRW_ALIGN_16);
> 
> The pop below makes this unneeded, right?

Right, and now that I am looking at it I notice that we have done the
same in other generator opcodes we added, so I'll fix those as well.

Iago

> 18-20
> Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
> 
> > +   brw_pop_insn_state(p);
> > +}
> > +





More information about the mesa-dev mailing list