[Mesa-dev] [PATCH 3/3] i965: Completely annotate the batch bo when aub dumping.

Paul Berry stereotype441 at gmail.com
Thu May 10 06:56:49 PDT 2012


On 9 May 2012 20:07, Eric Anholt <eric at anholt.net> wrote:

> On Mon,  7 May 2012 14:32:18 -0700, Paul Berry <stereotype441 at gmail.com>
> wrote:
> > +/**
> > + * Generate a set of aub file annotations for the current batch buffer,
> and
> > + * deliver them to DRM.
> > + *
> > + * The "used" section of the batch buffer (the portion containing batch
> > + * commands) is annotated with AUB_TRACE_TYPE_BATCH.  The remainder of
> the
> > + * batch buffer (which contains data structures pointed to by batch
> commands)
> > + * is annotated according to the type of each data structure.
> > + */
> > +void
> > +brw_annotate_aub(struct intel_context *intel)
> > +{
> > +   struct brw_context *brw = brw_context(&intel->ctx);
> > +
> > +   unsigned annotation_count = 2 * brw->state_batch_count + 1;
> > +   drm_intel_aub_annotation annotations[annotation_count];
> > +   int a = 0;
> > +   make_annotation(&annotations[a++], AUB_TRACE_TYPE_BATCH, 0,
> > +                   4*intel->batch.used);
> > +   for (int i = brw->state_batch_count; i-- > 0; ) {
> > +      uint32_t type = brw->state_batch_list[i].type;
>
> Isn't the for loop start here off by one?
>

I don't think so.  Note the postdecrement in the loop condition, so the
first time through the loop i == brw->state_batch_count - 1.


>
> Other than that,
>
> Reviewed-by: Eric Anholt
>
> feel free to just squash the configure.ac bump into this.
>

Ok, will do.  I'll hold off on pushing this patch until after drm is
released so that nobody's build gets broken.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120510/ab6bdc07/attachment.htm>


More information about the mesa-dev mailing list