summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-01-28 08:56:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-01-28 08:56:54 +0000
commitd305570c9b1fd87c4acdec589761cfa39fd04a3b (patch)
treee340315dd9d6966ccc3a48aa7a845e2213e40e62 /lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h
parent1c5c7896c1d54abd25c0f33ca996165b359eecb3 (diff)
Merge Mesa 22.3.4
Diffstat (limited to 'lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h')
-rw-r--r--lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h
index 7c8b9e719..5f789ce9c 100644
--- a/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h
+++ b/lib/mesa/src/gallium/drivers/freedreno/freedreno_batch.h
@@ -161,6 +161,9 @@ struct fd_batch {
/* Track the maximal bounds of the scissor of all the draws within a
* batch. Used at the tile rendering step (fd_gmem_render_tiles(),
* mem2gmem/gmem2mem) to avoid needlessly moving data in/out of gmem.
+ *
+ * Note that unlike gallium state, maxx/maxy are inclusive (for
+ * fully covered 512x512 the scissor would be 0,0+511,511)
*/
struct pipe_scissor_state max_scissor;
@@ -207,6 +210,9 @@ struct fd_batch {
struct fd_ringbuffer *prologue;
/** epilogue cmdstream (executed after each tile): */
+ struct fd_ringbuffer *tile_epilogue;
+
+ /** epilogue cmdstream (executed after all tiles): */
struct fd_ringbuffer *epilogue;
struct fd_ringbuffer *tile_setup;
@@ -261,6 +267,7 @@ struct fd_batch *fd_batch_create(struct fd_context *ctx, bool nondraw);
void fd_batch_reset(struct fd_batch *batch) assert_dt;
void fd_batch_flush(struct fd_batch *batch) assert_dt;
+bool fd_batch_has_dep(struct fd_batch *batch, struct fd_batch *dep) assert_dt;
void fd_batch_add_dep(struct fd_batch *batch, struct fd_batch *dep) assert_dt;
void fd_batch_resource_write(struct fd_batch *batch,
struct fd_resource *rsc) assert_dt;
@@ -398,6 +405,18 @@ fd_event_write(struct fd_batch *batch, struct fd_ringbuffer *ring,
/* Get per-tile epilogue */
static inline struct fd_ringbuffer *
+fd_batch_get_tile_epilogue(struct fd_batch *batch)
+{
+ if (batch->tile_epilogue == NULL) {
+ batch->tile_epilogue = fd_submit_new_ringbuffer(batch->submit, 0x1000,
+ FD_RINGBUFFER_GROWABLE);
+ }
+
+ return batch->tile_epilogue;
+}
+
+/* Get epilogue run after all tiles*/
+static inline struct fd_ringbuffer *
fd_batch_get_epilogue(struct fd_batch *batch)
{
if (batch->epilogue == NULL) {