zink: unset primgen suspended flag when ending a primgen query

this otherwise could result in rast-discard being permanently enabled
in certain corner cases

Fixes: 7f956435a0 ("zink: rework xfb queries for drivers with poor primgen support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
This commit is contained in:
Mike Blumenkrantz 2023-08-14 14:25:35 -04:00 committed by Marge Bot
parent 5ea5318e60
commit 4f743df4f0

View file

@ -1066,6 +1066,10 @@ zink_end_query(struct pipe_context *pctx,
if (query->type == PIPE_QUERY_PIPELINE_STATISTICS_SINGLE && query->index == PIPE_STAT_QUERY_PS_INVOCATIONS)
ctx->fs_query_active = true;
bool unset_null_fs = query->type == PIPE_QUERY_PRIMITIVES_GENERATED && (ctx->primitives_generated_suspended || ctx->primitives_generated_active);
if (query->type == PIPE_QUERY_PRIMITIVES_GENERATED)
ctx->primitives_generated_suspended = false;
if (list_is_linked(&query->stats_list))
list_delinit(&query->stats_list);
if (query->suspended) {
@ -1090,6 +1094,9 @@ zink_end_query(struct pipe_context *pctx,
end_query(ctx, batch, query);
}
if (unset_null_fs)
zink_set_color_write_enables(ctx);
return true;
}