Mesa (master): freedreno/batch: Move fd_batch_get_prologue()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 10 18:27:28 UTC 2020
Module: Mesa
Branch: master
Commit: 20a813b0eb5e3feb01158acb866ad1e6c6717830
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=20a813b0eb5e3feb01158acb866ad1e6c6717830
Author: Rob Clark <robdclark at chromium.org>
Date: Wed Oct 28 09:15:45 2020 -0700
freedreno/batch: Move fd_batch_get_prologue()
To keep fd_batch_flush() and it's internal helper batch_flush()
together. Also update an obsolete comment.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7342>
---
src/gallium/drivers/freedreno/freedreno_batch.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index b6435ea8f19..fadd4f32816 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -304,6 +304,16 @@ __fd_batch_describe(char* buf, const struct fd_batch *batch)
sprintf(buf, "fd_batch<%u>", batch->seqno);
}
+/* Get per-batch prologue */
+struct fd_ringbuffer *
+fd_batch_get_prologue(struct fd_batch *batch)
+{
+ if (!batch->prologue)
+ batch->prologue = alloc_ring(batch, 0x1000, 0);
+ return batch->prologue;
+}
+
+/* Only called from fd_batch_flush() */
static void
batch_flush(struct fd_batch *batch)
{
@@ -335,22 +345,7 @@ batch_flush(struct fd_batch *batch)
fd_screen_unlock(batch->ctx->screen);
}
-/* Get per-batch prologue */
-struct fd_ringbuffer *
-fd_batch_get_prologue(struct fd_batch *batch)
-{
- if (!batch->prologue)
- batch->prologue = alloc_ring(batch, 0x1000, 0);
- return batch->prologue;
-}
-
/* NOTE: could drop the last ref to batch
- *
- * @sync: synchronize with flush_queue, ensures batch is *actually* flushed
- * to kernel before this returns, as opposed to just being queued to be
- * flushed
- * @force: force a flush even if no rendering, mostly useful if you need
- * a fence to sync on
*/
void
fd_batch_flush(struct fd_batch *batch)
More information about the mesa-commit
mailing list