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

Eric Anholt eric at anholt.net
Wed May 9 20:07:11 PDT 2012


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?

Other than that,

Reviewed-by: Eric Anholt

feel free to just squash the configure.ac bump into this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120509/194da0a0/attachment.pgp>


More information about the mesa-dev mailing list