with tc, query results can be fetched async, and it's impossible to
sync tc in this scenario. to avoid needing to sync when a sync is not
possible, sync ahead of time in all cases
Fixes:
7c96e989755 ("zink: always start/stop/resume queries inside renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22827>
if (screen->device_lost)
return;
+ if (ctx->tc) {
+ set_foreach(&bs->active_queries, entry)
+ zink_query_sync(ctx, (void*)entry->key);
+ }
+
if (screen->threaded_submit) {
util_queue_add_job(&screen->flush_queue, bs, &bs->flush_completed,
submit_queue, post_submit, 0);
return result->b;
}
- if (query->needs_update)
+ if (query->needs_update) {
+ assert(!ctx->tc || !threaded_query(q)->flushed);
update_qbo(ctx, query);
+ }
if (zink_batch_usage_is_unflushed(query->batch_uses)) {
if (!threaded_query(q)->flushed)
}
void
+zink_query_sync(struct zink_context *ctx, struct zink_query *query)
+{
+ if (query->needs_update)
+ update_qbo(ctx, query);
+}
+
+void
zink_start_conditional_render(struct zink_context *ctx)
{
if (unlikely(!zink_screen(ctx->base.screen)->info.have_EXT_conditional_rendering) || ctx->render_condition.active)
void
zink_prune_query(struct zink_batch_state *bs, struct zink_query *query);
+void
+zink_query_sync(struct zink_context *ctx, struct zink_query *query);
void
zink_query_update_gs_states(struct zink_context *ctx);