aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 6d54326d1a0..2f56a55301d 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -248,10 +248,14 @@ st_bufferobj_data(struct gl_context *ctx,
/* Set usage. */
if (st_obj->Base.Immutable) {
/* BufferStorage */
- if (storageFlags & GL_CLIENT_STORAGE_BIT)
- pipe_usage = PIPE_USAGE_STAGING;
- else
+ if (storageFlags & GL_CLIENT_STORAGE_BIT) {
+ if (storageFlags & GL_MAP_READ_BIT)
+ pipe_usage = PIPE_USAGE_STAGING;
+ else
+ pipe_usage = PIPE_USAGE_STREAM;
+ } else {
pipe_usage = PIPE_USAGE_DEFAULT;
+ }
}
else {
/* BufferData */