summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2015-07-08 15:00:51 -0400
committerRob Clark <robclark@freedesktop.org>2015-07-10 11:57:30 -0400
commitf60354ee72fdee988fd604994e8b8c8d75fe78be (patch)
treef68563bd6e1cb167c82e1cf2b49d3dee1567a642
parent0a8af6361eecaba0f34a668328746924b61caa6a (diff)
gallium: clarify reference counting for fence
Nowhere was it spelled out that the state tracker may expect the pipe driver to unref the old fence. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r--src/gallium/include/pipe/p_context.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index c2eedf8e7c..d2c2e4c8d1 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -361,8 +361,14 @@ struct pipe_context {
const void *clear_value,
int clear_value_size);
- /** Flush draw commands
+ /**
+ * Flush draw commands
+ *
+ * NOTE: use screen->fence_reference() (or equivalent) to transfer
+ * new fence ref to **fence, to ensure that previous fence is unref'd
*
+ * \param fence if not NULL, an old fence to unref and transfer a
+ * new fence reference to
* \param flags bitfield of enum pipe_flush_flags values.
*/
void (*flush)(struct pipe_context *pipe,