mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
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
This commit is contained in:
parent
405300bb19
commit
3b08a43f32
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue