i965: Use brw_bo_map() in intel_texsubimage_tiled_memcpy().
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 29 Jan 2014 17:24:32 +0000 (09:24 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 4 Feb 2014 00:16:35 +0000 (16:16 -0800)
This additionally measures the time stalled, while also simplifying the
code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index ce8bbe1..6942039 100644 (file)
@@ -610,13 +610,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
       intel_batchbuffer_flush(brw);
    }
 
-   if (unlikely(brw->perf_debug)) {
-      if (drm_intel_bo_busy(bo)) {
-         perf_debug("Mapping a busy BO, causing a stall on the GPU.\n");
-      }
-   }
-
-   error = drm_intel_bo_map(bo, true /*write_enable*/);
+   error = brw_bo_map(brw, bo, true /* write enable */, "miptree");
    if (error || bo->virtual == NULL) {
       DBG("%s: failed to map bo\n", __FUNCTION__);
       return false;