diff options
author | Mathias Fröhlich <[email protected]> | 2010-10-30 15:38:39 +0200 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-11-26 14:03:42 -0700 |
commit | c3602ff5ed3f423e44c2e09b44334263e12a07ab (patch) | |
tree | 08afa25a151d0de22f2bb916783afc9cd2da76bf /src/mesa/state_tracker | |
parent | 97ae4dad1cc24c5e969e6b99f07ece68e239964b (diff) |
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.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | 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 73c9c2de7a1..8b60f9040d0 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; |