From: Eric Anholt Date: Fri, 24 Feb 2012 23:54:32 +0000 (-0800) Subject: intel: Make use of the new GPU-unsynchronized map functionality in libdrm. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bd38f3c674b91a89d9b572c5722faa00fb86654;p=mesa.git 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 --- 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);