diff options
author | Nicolai Hähnle <[email protected]> | 2016-01-07 14:48:27 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-02-03 14:03:45 +0100 |
commit | fd7229b4374d7bd8f296e1da4123e0d678d67699 (patch) | |
tree | 3d91b84b2c7e9c0dc329b290ad62dc31c9013b99 /src/mesa/main/bufferobj.c | |
parent | 54c4a9803bfd59e31bc092229779544b6e636bdf (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r-- | src/mesa/main/bufferobj.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 8ede1f06e4e..8dedc366ef2 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -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); } |