Mesa (master): iris: Make an iris_batch_get_signal_syncpt() helper.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 26 16:49:11 UTC 2019
Module: Mesa
Branch: master
Commit: db878a728c9f3cc932ec9af77dbabcb28ff5a5ba
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db878a728c9f3cc932ec9af77dbabcb28ff5a5ba
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Jun 25 21:11:52 2019 -0700
iris: Make an iris_batch_get_signal_syncpt() helper.
This returns a pointer to the signalling syncpt, without incrementing
the reference count. This can be useful for comparisons.
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
---
src/gallium/drivers/iris/iris_batch.h | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_batch.h b/src/gallium/drivers/iris/iris_batch.h
index 00386418e7b..64a047d1b37 100644
--- a/src/gallium/drivers/iris/iris_batch.h
+++ b/src/gallium/drivers/iris/iris_batch.h
@@ -203,6 +203,19 @@ iris_batch_emit(struct iris_batch *batch, const void *data, unsigned size)
}
/**
+ * Get a pointer to the batch's signalling syncpt. Does not refcount.
+ */
+static inline struct iris_syncpt *
+iris_batch_get_signal_syncpt(struct iris_batch *batch)
+{
+ /* The signalling syncpt is the first one in the list. */
+ struct iris_syncpt *syncpt =
+ ((struct iris_syncpt **) util_dynarray_begin(&batch->syncpts))[0];
+ return syncpt;
+}
+
+
+/**
* Take a reference to the batch's signalling syncpt.
*
* Callers can use this to wait for the the current batch under construction
@@ -212,9 +225,7 @@ static inline void
iris_batch_reference_signal_syncpt(struct iris_batch *batch,
struct iris_syncpt **out_syncpt)
{
- /* The signalling syncpt is the first one in the list. */
- struct iris_syncpt *syncpt =
- ((struct iris_syncpt **) util_dynarray_begin(&batch->syncpts))[0];
+ struct iris_syncpt *syncpt = iris_batch_get_signal_syncpt(batch);
iris_syncpt_reference(batch->screen, out_syncpt, syncpt);
}
More information about the mesa-commit
mailing list