summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-10-01 19:27:11 +1300
committerChris Forbes <[email protected]>2014-10-16 22:31:43 +1300
commitfe3133fe78a2cfe8a36d1b6a9eb4a9e89f3f59ed (patch)
tree3a75a11c08041d8a6e2380c4d1ddb41dcc02cad3 /src
parent3d989467f1700219b053317e8aafd2965f051273 (diff)
mesa: Mark buffer objects which are bound as UBOs
When a buffer object is bound to one of the indexed uniform buffer binding points, assume that from that point on it may be used as a uniform buffer. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/bufferobj.c6
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;
}
/**