Mesa (master): mesa: Mark buffer objects which are bound as UBOs
Chris Forbes
chrisf at kemper.freedesktop.org
Thu Oct 16 09:33:50 UTC 2014
Module: Mesa
Branch: master
Commit: fe3133fe78a2cfe8a36d1b6a9eb4a9e89f3f59ed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe3133fe78a2cfe8a36d1b6a9eb4a9e89f3f59ed
Author: Chris Forbes <chrisf at ijw.co.nz>
Date: Wed Oct 1 19:27:11 2014 +1300
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 <chrisf at ijw.co.nz>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/mesa/main/bufferobj.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index b6879ce..c92056a 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;
}
/**
More information about the mesa-commit
mailing list