From 9bd38f3c674b91a89d9b572c5722faa00fb86654 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 24 Feb 2012 15:54:32 -0800 Subject: [PATCH] intel: Make use of the new GPU-unsynchronized map functionality in libdrm. Improves Unigine Tropics performance at 1024x768 by 2.06236% +/- 0.50272% (n=11). Reviewed-by: Chris Wilson Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index 26f23fd0cb0..d2a07097688 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -367,7 +367,9 @@ intel_bufferobj_map_range(struct gl_context * ctx, return obj->Pointer; } - if (!(access & GL_MAP_READ_BIT)) { + if (access & GL_MAP_UNSYNCHRONIZED_BIT) + drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer); + else if (!(access & GL_MAP_READ_BIT)) { drm_intel_gem_bo_map_gtt(intel_obj->buffer); } else { drm_intel_bo_map(intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0); -- 2.30.2