[Intel-gfx] [PATCH] intel: Make use of the new GPU-unsynchronized map functionality in libdrm.

Eric Anholt eric at anholt.net
Sat Feb 25 04:53:23 CET 2012


Improves Unigine Tropics performance at 1024x768 by 2.06236% +/-
0.50272% (n=11).

DO NOT PUSH: need to depend on a new libdrm release first.
---
 src/mesa/drivers/dri/intel/intel_buffer_objects.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 26f23fd0..d2a0709 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);
-- 
1.7.9.1




More information about the Intel-gfx mailing list