diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/bufferobj.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index b6879ceb581..c92056aa352 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -2652,6 +2652,12 @@ set_ubo_binding(struct gl_context *ctx, binding->Offset = offset; binding->Size = size; binding->AutomaticSize = autoSize; + + /* If this is a real buffer object, mark it has having been used + * at some point as a UBO. + */ + if (size >= 0) + bufObj->UsageHistory |= USAGE_UNIFORM_BUFFER; } /** |