summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-02-27 10:05:39 -0800
committerEric Anholt <[email protected]>2014-03-14 12:56:22 -0700
commit1990da2568a0da79c6011bd83e7f7fb8bb099827 (patch)
treeb8449528cbc4ae5b0cd3ada62adb19ac1d1c2542 /src/mesa/drivers/dri
parentbb63df0c2d6e1236ea1efeb5b9500da4e1f8fa0d (diff)
i965: Always use CPU mappings for BOs on LLC platforms.
It looks like there's no big difference for write-only workloads, but using a CPU map means that if they happen to read without having set the MAP_READ_BIT, they get 100x the performance for those reads. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index e496836905a..260308a80a2 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -429,7 +429,7 @@ intel_bufferobj_map_range(struct gl_context * ctx,
if (access & GL_MAP_UNSYNCHRONIZED_BIT)
drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer);
- else if (!(access & GL_MAP_READ_BIT)) {
+ else if (!brw->has_llc && !(access & GL_MAP_READ_BIT)) {
drm_intel_gem_bo_map_gtt(intel_obj->buffer);
intel_bufferobj_mark_inactive(intel_obj);
} else {