Kenneth Graunke <kenn...@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 <kenn...@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.
pgpaUaWM7xUJ5.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev