[Mesa-dev] [PATCH 3/4] i965/state: Create separate dirty state bits for each pipeline

Jordan Justen jordan.l.justen at intel.com
Tue Mar 10 21:28:34 PDT 2015


On 2015-03-10 17:09:14, Kristian Høgsberg wrote:
> On Tue, Mar 10, 2015 at 4:32 PM, Jordan Justen
> <jordan.l.justen at intel.com> wrote:
> > On 2015-03-10 16:11:08, Kristian Høgsberg wrote:
> >> On Tue, Mar 10, 2015 at 10:49 AM, Jordan Justen
> >> <jordan.l.justen at intel.com> wrote:
> >> > +   const struct brw_tracked_state *atoms =
> >> > +      brw_pipeline_first_atom(brw, pipeline);
> >>
> >> Instead of looping over num_atoms[] to determine the start of the
> >> compute pipeline atoms, I think it'd be simpler to just have the
> >> compute atoms be a separate array in struct brw_context.
> >
> > I showed Ken an earlier version that had this done differently. In
> > that case, I stored the start/end positions in an array. Ken's
> > feedback was that it was a little overly complicated.
> >
> > Regarding cpu time, since this function, and brw_pipeline_first_atom
> > are inline functions, I think the compiler can figure out that the
> > atoms for the render pipeline start at brw->atoms[0] without accessing
> > brw->num_atoms. For the compute version, I think it will only need to
> > access brw->num_atoms[0], and it ought to do both of these without
> > looping.
> >
> > I should confirm in the generated code. :)
> 
> I wasn't concerned about CPU time all that much here, since it's just
> once per call.  It's more that it seems awkward to add it up every
> time when it never changes.

Good point. It does seem odd, even though with just 2 pipelines it
should not actually need to add anything.

Let me try a v2.

-Jordan


More information about the mesa-dev mailing list