mesa/main: add USAGE_PIXEL_PACK_BUFFER flag to buffer UsageHistory

We will want to disable minmax index caching for buffers that are used in this
way.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2016-01-07 14:48:27 -05:00
parent 54c4a9803b
commit fd7229b437
2 changed files with 10 additions and 0 deletions

View File

@ -1014,6 +1014,15 @@ bind_buffer_object(struct gl_context *ctx, GLenum target, GLuint buffer)
return;
}
/* record usage history */
switch (target) {
case GL_PIXEL_PACK_BUFFER:
newBufObj->UsageHistory |= USAGE_PIXEL_PACK_BUFFER;
break;
default:
break;
}
/* bind new buffer */
_mesa_reference_buffer_object(ctx, bindTarget, newBufObj);
}

View File

@ -1254,6 +1254,7 @@ typedef enum {
USAGE_ATOMIC_COUNTER_BUFFER = 0x4,
USAGE_SHADER_STORAGE_BUFFER = 0x8,
USAGE_TRANSFORM_FEEDBACK_BUFFER = 0x10,
USAGE_PIXEL_PACK_BUFFER = 0x20,
} gl_buffer_usage;