On 9 May 2012 20:07, Eric Anholt <e...@anholt.net> wrote: > On Mon, 7 May 2012 14:32:18 -0700, Paul Berry <stereotype...@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.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev