Module: Mesa
Branch: master
Commit: 61187c1689bcd0498644705a8deaf6d0244866f3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=61187c1689bcd0498644705a8deaf6d0244866f3

Author: Marek Olšák <[email protected]>
Date:   Fri Aug 25 15:39:52 2017 +0200

gallium/u_threaded: rename IGNORE_VALID_RANGE -> NO_INFER_UNSYNCHRONIZED

Reviewed-by: Nicolai Hähnle <[email protected]>

---

 src/gallium/auxiliary/util/u_threaded_context.c | 4 ++--
 src/gallium/auxiliary/util/u_threaded_context.h | 4 ++--
 src/gallium/drivers/radeon/r600_buffer_common.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_threaded_context.c 
b/src/gallium/auxiliary/util/u_threaded_context.c
index 8e3cc34f10..043d4e67df 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -1300,7 +1300,7 @@ tc_improve_map_buffer_flags(struct threaded_context *tc,
       /* Drivers aren't allowed to do buffer invalidations. */
       return (usage & ~PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) |
              TC_TRANSFER_MAP_NO_INVALIDATE |
-             TC_TRANSFER_MAP_IGNORE_VALID_RANGE;
+             TC_TRANSFER_MAP_NO_INFER_UNSYNCHRONIZED;
    }
 
    /* See if the buffer range being mapped has never been initialized,
@@ -1345,7 +1345,7 @@ tc_improve_map_buffer_flags(struct threaded_context *tc,
    /* Never invalidate inside the driver and never infer "unsynchronized". */
    return usage |
           TC_TRANSFER_MAP_NO_INVALIDATE |
-          TC_TRANSFER_MAP_IGNORE_VALID_RANGE;
+          TC_TRANSFER_MAP_NO_INFER_UNSYNCHRONIZED;
 }
 
 static void *
diff --git a/src/gallium/auxiliary/util/u_threaded_context.h 
b/src/gallium/auxiliary/util/u_threaded_context.h
index 0742faebfb..8977b03cd2 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.h
+++ b/src/gallium/auxiliary/util/u_threaded_context.h
@@ -94,7 +94,7 @@
  *
  * 2) The driver isn't allowed to infer unsychronized mappings by tracking
  *    the valid buffer range. The threaded context always sends TC_TRANSFER_-
- *    MAP_IGNORE_VALID_RANGE to indicate this. Ignoring the flag will lead
+ *    MAP_NO_INFER_UNSYNCHRONIZED to indicate this. Ignoring the flag will lead
  *    to failures.
  *    The threaded context does its own detection of unsynchronized mappings.
  *
@@ -166,7 +166,7 @@
 
 /* These are transfer flags sent to drivers. */
 /* Never infer whether it's safe to use unsychronized mappings: */
-#define TC_TRANSFER_MAP_IGNORE_VALID_RANGE   (1u << 29)
+#define TC_TRANSFER_MAP_NO_INFER_UNSYNCHRONIZED (1u << 29)
 /* Don't invalidate buffers: */
 #define TC_TRANSFER_MAP_NO_INVALIDATE        (1u << 30)
 /* transfer_map is called from a non-driver thread: */
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c 
b/src/gallium/drivers/radeon/r600_buffer_common.c
index dd1c2090fd..076faa9330 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -383,7 +383,7 @@ static void *r600_buffer_transfer_map(struct pipe_context 
*ctx,
        /* See if the buffer range being mapped has never been initialized,
         * in which case it can be mapped unsynchronized. */
        if (!(usage & (PIPE_TRANSFER_UNSYNCHRONIZED |
-                      TC_TRANSFER_MAP_IGNORE_VALID_RANGE)) &&
+                      TC_TRANSFER_MAP_NO_INFER_UNSYNCHRONIZED)) &&
            usage & PIPE_TRANSFER_WRITE &&
            !rbuffer->b.is_shared &&
            !util_ranges_intersect(&rbuffer->valid_buffer_range, box->x, box->x 
+ box->width)) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to