[Mesa-dev] [PATCH] st/mesa: use PIPE_USAGE_STREAM for GL_CLIENT_STORAGE_BIT
Marek Olšák
maraeo at gmail.com
Sat Aug 6 18:05:34 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
STAGING is mainly for fast CPU reads and random access. I don't think
glBufferStorage(GL_CLIENT_STORAGE_BIT) is used for those two purposes.
I'd say GL_CLIENT_STORAGE_BIT is more of a streaming-upload kind of thing.
---
src/mesa/state_tracker/st_cb_bufferobjects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 6d54326..232288e 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -242,21 +242,21 @@ st_bufferobj_data(struct gl_context *ctx,
bind = PIPE_BIND_QUERY_BUFFER;
break;
default:
bind = 0;
}
/* Set usage. */
if (st_obj->Base.Immutable) {
/* BufferStorage */
if (storageFlags & GL_CLIENT_STORAGE_BIT)
- pipe_usage = PIPE_USAGE_STAGING;
+ pipe_usage = PIPE_USAGE_STREAM;
else
pipe_usage = PIPE_USAGE_DEFAULT;
}
else {
/* BufferData */
switch (usage) {
case GL_STATIC_DRAW:
case GL_STATIC_COPY:
default:
pipe_usage = PIPE_USAGE_DEFAULT;
--
2.7.4
More information about the mesa-dev
mailing list