diff options
author | Eric Anholt <[email protected]> | 2014-04-23 13:45:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-04-25 18:19:55 -0700 |
commit | 07730e9463637a62e41a9783374102b4181ba960 (patch) | |
tree | f8e7e840ed3ac4b7f00bc619f14ab0d7a94b6218 | |
parent | 17860309f17de78e729f77e86101004f61f6bcf3 (diff) |
i965: Don't bother flushing the batch if it doesn't ref our mt to map.
-1.1372% +/- 0.858033% effect on cairo runtime on glamor (n=175).
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 59700ed8b17..c24cfcea4bc 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1614,7 +1614,8 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt) drm_intel_bo *bo = mt->region->bo; - intel_batchbuffer_flush(brw); + if (drm_intel_bo_references(brw->batch.bo, bo)) + intel_batchbuffer_flush(brw); if (mt->region->tiling != I915_TILING_NONE) brw_bo_map_gtt(brw, bo, "miptree"); |