i965: perf: use gen_device_info rather then brw_context
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 24 Apr 2017 02:12:00 +0000 (19:12 -0700)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 27 Jun 2017 11:10:30 +0000 (14:10 +0300)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_performance_query.c

index 519c3ec..90a3d58 100644 (file)
@@ -825,6 +825,7 @@ static void
 accumulate_oa_reports(struct brw_context *brw,
                       struct brw_perf_query_object *obj)
 {
+   const struct gen_device_info *devinfo = &brw->screen->devinfo;
    struct gl_perf_query_object *o = &obj->base;
    uint32_t *start;
    uint32_t *last;
@@ -903,8 +904,7 @@ accumulate_oa_reports(struct brw_context *brw,
              * For Haswell we can rely on the HW to stop the progress
              * of OA counters while any other context is acctive.
              */
-            if (brw->gen >= 8) {
-
+            if (devinfo->gen >= 8) {
                if (in_ctx && report[2] != ctx_id) {
                   DBG("i915 perf: Switch AWAY (observed by ID change)\n");
                   in_ctx = false;