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:
Marek Olšák
2016-08-05 23:33:52 +02:00
parent 33a9b4e8a1
commit c6043e7d54

View File

@@ -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 */