summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-01-29 09:27:09 -0800
committerKenneth Graunke <[email protected]>2014-02-03 16:16:38 -0800
commitadaa5a6ca66179a839742c4729a4fc76aa02991f (patch)
tree402841af6cb6499781edd92b9c04902e8d2b1659
parente396674d5fb06ef467c7b66cf14ff89df64f2101 (diff)
i965: Use brw_bo_map[_gtt]() in intel_miptree_map_raw().
This moves the intel_batchbuffer_flush before the drm_intel_bo_busy call, which is a change in behavior. However, the old behavior was broken. In the future, we may want to only flush in the batchbuffer references the BO being mapped. That's certainly more typical. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 5a606375198..24985dc2b45 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1706,18 +1706,12 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
drm_intel_bo *bo = mt->region->bo;
- if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
- if (drm_intel_bo_busy(bo)) {
- perf_debug("Mapping a busy miptree, causing a stall on the GPU.\n");
- }
- }
-
intel_batchbuffer_flush(brw);
if (mt->region->tiling != I915_TILING_NONE)
- drm_intel_gem_bo_map_gtt(bo);
+ brw_bo_map_gtt(brw, bo, "miptree");
else
- drm_intel_bo_map(bo, true);
+ brw_bo_map(brw, bo, true, "miptree");
return bo->virtual;
}