zink: track whether a primgen query is suspended and needing color write hacks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21628>
This commit is contained in:
committed by
Marge Bot
parent
9bc871199c
commit
5144c8a858
@@ -959,6 +959,8 @@ zink_begin_query(struct pipe_context *pctx,
|
||||
/* never directly start queries out of renderpass, always defer */
|
||||
list_addtail(&query->active_list, &ctx->suspended_queries);
|
||||
query->suspended = true;
|
||||
if (query->type == PIPE_QUERY_PRIMITIVES_GENERATED)
|
||||
ctx->primitives_generated_suspended = query->needs_rast_discard_workaround;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1125,6 +1127,8 @@ suspend_queries(struct zink_context *ctx, bool rp_only)
|
||||
*/
|
||||
list_addtail(&query->active_list, &ctx->suspended_queries);
|
||||
query->suspended = true;
|
||||
if (query->type == PIPE_QUERY_PRIMITIVES_GENERATED)
|
||||
ctx->primitives_generated_suspended = query->needs_rast_discard_workaround;
|
||||
}
|
||||
suspend_query(ctx, query);
|
||||
}
|
||||
@@ -1143,6 +1147,8 @@ zink_resume_queries(struct zink_context *ctx, struct zink_batch *batch)
|
||||
LIST_FOR_EACH_ENTRY_SAFE(query, next, &ctx->suspended_queries, active_list) {
|
||||
list_delinit(&query->active_list);
|
||||
query->suspended = false;
|
||||
if (query->type == PIPE_QUERY_PRIMITIVES_GENERATED)
|
||||
ctx->primitives_generated_suspended = false;
|
||||
if (query->needs_update && !ctx->batch.in_rp)
|
||||
update_qbo(ctx, query);
|
||||
begin_query(ctx, batch, query);
|
||||
|
||||
@@ -1739,6 +1739,7 @@ struct zink_context {
|
||||
bool disable_color_writes;
|
||||
bool was_line_loop;
|
||||
bool primitives_generated_active;
|
||||
bool primitives_generated_suspended;
|
||||
bool queries_disabled, render_condition_active;
|
||||
bool queries_in_rp;
|
||||
struct {
|
||||
|
||||
Reference in New Issue
Block a user