OSDN Git Service

i965: extend query/counter structs for OA queries
authorRobert Bragg <robert@sixbynine.org>
Thu, 4 Jun 2015 22:26:40 +0000 (23:26 +0100)
committerRobert Bragg <robert@sixbynine.org>
Thu, 9 Mar 2017 12:53:07 +0000 (12:53 +0000)
commitf46e58e01805e92ddb6e7806a7ec39748bdbab9d
treea2c8c3d185b496513943f0f67de1724e5e312450
parenteaab41c9db1ddf320084b1af80c1da5e72160091
i965: extend query/counter structs for OA queries

In preparation for generating code from brw_oa_hsw.xml for describing OA
performance counter queries this adds some OA specific members to
brw_perf_query that our generated code will initialize:

- The oa_metric_set_id is the ID we will pass to
  DRM_IOCTL_I915_PERF_OPEN, and is an ID got via sysfs under:
  /sys/class/drm/<card>/metrics/<guid/id

- The oa_format is the OA report layout we will request from the kernel

- The accumulator offsets determine where the different groups of A, B
  and C counters are located within an intermediate 64bit 'accumulator'
  buffer.

Additionally brw_perf_query_counter now has 64bit or float _read()
callback members for OA counters.

Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_performance_query.h