Mesa (master): gallium/util: add some comments in u_debug_flush.c
Brian Paul
brianp at kemper.freedesktop.org
Wed Apr 26 17:40:28 UTC 2017
Module: Mesa
Branch: master
Commit: 495840658e437117bbae298e6e72e057b333e426
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=495840658e437117bbae298e6e72e057b333e426
Author: Brian Paul <brianp at vmware.com>
Date: Mon Apr 24 12:57:14 2017 -0600
gallium/util: add some comments in u_debug_flush.c
Trivial.
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
---
src/gallium/auxiliary/util/u_debug_flush.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index 06d0cfafa8..fe96e09aad 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -266,6 +266,12 @@ debug_flush_unmap(struct debug_flush_buf *fbuf)
mtx_unlock(&fbuf->mutex);
}
+
+/**
+ * Add the given buffer to the list of active buffers. Active buffers
+ * are those which are referenced by the command buffer currently being
+ * constructed.
+ */
void
debug_flush_cb_reference(struct debug_flush_ctx *fctx,
struct debug_flush_buf *fbuf)
@@ -333,6 +339,10 @@ debug_flush_might_flush_cb(void *key, void *value, void *data)
return PIPE_OK;
}
+/**
+ * Called when we're about to possibly flush a command buffer.
+ * We check if any active buffers are in a mapped state. If so, print an alert.
+ */
void
debug_flush_might_flush(struct debug_flush_ctx *fctx)
{
@@ -356,6 +366,11 @@ debug_flush_flush_cb(void *key, void *value, void *data)
}
+/**
+ * Called when we flush a command buffer. Two things are done:
+ * 1. Check if any of the active buffers are currently mapped (alert if so).
+ * 2. Discard/unreference all the active buffers.
+ */
void
debug_flush_flush(struct debug_flush_ctx *fctx)
{
More information about the mesa-commit
mailing list