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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user