diff options
author | Eric Anholt <[email protected]> | 2009-06-19 17:14:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-06-19 17:25:20 -0700 |
commit | 3b08a43f32d04a0522596d3d37b1c1874e04d5c3 (patch) | |
tree | 1f0aaa0ec79a9163340dc805c78eb5935a8f86b6 /src | |
parent | 405300bb190f516e16b704050abe3389b366ed27 (diff) |
intel: Don't map regions with drm_intel_gem_bo_map_gtt() unless they're tiled.
This fixes a regression in region read performance that came in with the
texture tiling changes. Ideally we'd have an access flag coming in so we
could also use bo_map_gtt for writing, like we do for buffer objects.
Bug #22190
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_regions.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index e142020d169..65567e5b631 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -116,7 +116,8 @@ intel_region_map(struct intel_context *intel, struct intel_region *region) if (region->pbo) intel_region_cow(intel, region); - if (intel->intelScreen->kernel_exec_fencing) + if (region->tiling != I915_TILING_NONE && + intel->intelScreen->kernel_exec_fencing) drm_intel_gem_bo_map_gtt(region->buffer); else dri_bo_map(region->buffer, GL_TRUE); @@ -131,7 +132,8 @@ intel_region_unmap(struct intel_context *intel, struct intel_region *region) { _DBG("%s %p\n", __FUNCTION__, region); if (!--region->map_refcount) { - if (intel->intelScreen->kernel_exec_fencing) + if (region->tiling != I915_TILING_NONE && + intel->intelScreen->kernel_exec_fencing) drm_intel_gem_bo_unmap_gtt(region->buffer); else dri_bo_unmap(region->buffer); |