i965/query: Use brw_bo_map to handle stall warnings.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 11 Dec 2014 09:57:39 +0000 (01:57 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 16 Dec 2014 23:39:54 +0000 (15:39 -0800)
This is less code and also measures the duration of the stall for us.

Our old code predates the existance of brw_bo_map().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/gen6_queryobj.c

index 9d2e5c44f8d803818484449f88c32eb7dd3e94e2..0d513908cdf9abe34b07e244cd6597d607f457c7 100644 (file)
@@ -121,13 +121,7 @@ gen6_queryobj_get_results(struct gl_context *ctx,
    if (query->bo == NULL)
       return;
 
-   if (unlikely(brw->perf_debug)) {
-      if (drm_intel_bo_busy(query->bo)) {
-         perf_debug("Stalling on the GPU waiting for a query object.\n");
-      }
-   }
-
-   drm_intel_bo_map(query->bo, false);
+   brw_bo_map(brw, query->bo, false, "query object");
    uint64_t *results = query->bo->virtual;
    switch (query->Base.Target) {
    case GL_TIME_ELAPSED: