projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33a9b4e
)
st/mesa: use PIPE_USAGE_STREAM for GL_CLIENT_STORAGE_BIT without READ_BIT (v2)
author
Marek Olšák
<marek.olsak@amd.com>
Fri, 5 Aug 2016 21:33:52 +0000
(23:33 +0200)
committer
Marek Olšák
<marek.olsak@amd.com>
Tue, 9 Aug 2016 23:11:10 +0000
(
01:11
+0200)
v2: keep STAGING for GL_MAP_READ_BIT
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/mesa/state_tracker/st_cb_bufferobjects.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_bufferobjects.c
b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 6d54326d1a04fd4e027711181c5fdeb97fee77ce..2f56a55301dde0528fd79e5d47e0b1903ca66c7e 100644
(file)
--- 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 */