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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux