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

Author: Mathias Fröhlich <[email protected]>
Date:   Sat Oct 30 15:38:39 2010 +0200

st/mesa: Set PIPE_TRANSFER_DISCARD for GL_MAP_INVALIDATE_RANGE/BUFFFER_BIT

Signed-off-by: Brian Paul <[email protected]>

Note: this is a candidate for the 7.9 branch.

---

 src/mesa/state_tracker/st_cb_bufferobjects.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c 
b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 73c9c2d..8b60f90 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -279,6 +279,12 @@ st_bufferobj_map_range(struct gl_context *ctx, GLenum 
target,
 
    if (access & GL_MAP_FLUSH_EXPLICIT_BIT)
       flags |= PIPE_TRANSFER_FLUSH_EXPLICIT;
+
+   if (access & GL_MAP_INVALIDATE_RANGE_BIT)
+      flags |= PIPE_TRANSFER_DISCARD;
+
+   if (access & GL_MAP_INVALIDATE_BUFFER_BIT)
+      flags |= PIPE_TRANSFER_DISCARD;
    
    if (access & GL_MAP_UNSYNCHRONIZED_BIT)
       flags |= PIPE_TRANSFER_UNSYNCHRONIZED;

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

Reply via email to