diff options
author | Mathias Fröhlich <[email protected]> | 2018-12-21 18:41:27 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2019-03-04 17:03:06 +0100 |
commit | e727f8c8b814b9c36d4a8b52829c2bf7281765be (patch) | |
tree | c5c77fdb8fff990c9c51525460b2c2cf6d836e68 /src/mesa/main/arrayobj.c | |
parent | 9e787904d0a5c0dfde509a03f31f7a0c6f2993c3 (diff) |
mesa: Track buffer object use also for VAO usage.
We already track the usage history for buffer objects
in a lot of aspects. Add GL_ARRAY_BUFFER and
GL_ELEMENT_ARRAY_BUFFER to gl_buffer_object::UsageHistory.
Reviewed-by: Brian Paul <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r-- | src/mesa/main/arrayobj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index bfd6fce6798..68d30aa9b1f 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -1213,8 +1213,10 @@ vertex_array_element_buffer(struct gl_context *ctx, GLuint vaobj, GLuint buffer, bufObj = ctx->Shared->NullBufferObj; } - if (bufObj) + if (bufObj) { + bufObj->UsageHistory |= USAGE_ELEMENT_ARRAY_BUFFER; _mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj); + } } |