[Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

Eric Anholt eric at anholt.net
Fri Apr 12 13:16:25 PDT 2013


Kenneth Graunke <kenneth at whitecape.org> writes:

> Ironlake's counters are always enabled; userspace can simply send a
> MI_REPROT_PERF_COUNT packet to take a snapshot of them.  This makes it
> easy to implement.
>
> The counters are documented in the source code for the intel-gpu-tools
> intel_perf_counters utility.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

> +/**
> + * Is a performance monitor result available?
> + */
> +static GLboolean
> +brw_is_perf_monitor_result_available(struct gl_perf_monitor_object *m)
> +{
> +   struct brw_perf_monitor_object *monitor = brw_perf_monitor(m);
> +   return !m->Active && monitor->gpu_facing_bo &&
> +          !drm_intel_bo_busy(monitor->gpu_facing_bo);
> +}

This also needs to check for !drm_intel_bo_references by the batch --
otherwise if the batch hasn't flushed, we'll report result_available
when it isn't ready.
-------------- 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/20130412/53b5268f/attachment.pgp>


More information about the mesa-dev mailing list