mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
st/mesa: use PIPE_USAGE_STREAM for GL_CLIENT_STORAGE_BIT without READ_BIT (v2)
v2: keep STAGING for GL_MAP_READ_BIT Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
33a9b4e8a1
commit
c6043e7d54
1 changed files with 7 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue