[Mesa-dev] [PATCH 3/4] i965: Always use CPU mappings for BOs on LLC platforms.
Eric Anholt
eric at anholt.net
Thu Feb 27 14:53:02 PST 2014
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.
---
src/mesa/drivers/dri/i965/intel_buffer_objects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index e496836..260308a 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 {
--
1.9.rc1
More information about the mesa-dev
mailing list