mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 14:28:18 +02:00
asahi: add flush_query_writers helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
parent
c0582fcd8e
commit
7bc904cb4a
1 changed files with 12 additions and 2 deletions
|
|
@ -174,13 +174,23 @@ agx_create_query(struct pipe_context *ctx, unsigned query_type, unsigned index)
|
|||
}
|
||||
|
||||
static void
|
||||
sync_query_writers(struct agx_context *ctx, struct agx_query *query,
|
||||
const char *reason)
|
||||
flush_query_writers(struct agx_context *ctx, struct agx_query *query,
|
||||
const char *reason)
|
||||
{
|
||||
STATIC_ASSERT(ARRAY_SIZE(ctx->batches.generation) == AGX_MAX_BATCHES);
|
||||
STATIC_ASSERT(ARRAY_SIZE(ctx->batches.slots) == AGX_MAX_BATCHES);
|
||||
STATIC_ASSERT(ARRAY_SIZE(query->writer_generation) == AGX_MAX_BATCHES);
|
||||
|
||||
for (unsigned i = 0; i < AGX_MAX_BATCHES; ++i) {
|
||||
if (query->writer_generation[i] == ctx->batches.generation[i])
|
||||
agx_flush_batch_for_reason(ctx, &ctx->batches.slots[i], reason);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sync_query_writers(struct agx_context *ctx, struct agx_query *query,
|
||||
const char *reason)
|
||||
{
|
||||
for (unsigned i = 0; i < AGX_MAX_BATCHES; ++i) {
|
||||
if (query->writer_generation[i] == ctx->batches.generation[i])
|
||||
agx_sync_batch_for_reason(ctx, &ctx->batches.slots[i], reason);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue