zink: check all has_work flags for flushes

not sure this actually changes anything right now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29108>
This commit is contained in:
Mike Blumenkrantz
2024-05-08 13:09:36 -04:00
committed by Marge Bot
parent 06abe4399d
commit b9ec12d439

View File

@@ -3902,7 +3902,8 @@ zink_flush(struct pipe_context *pctx,
}
}
if (!ctx->bs->has_work) {
bool has_work = ctx->bs->has_work | ctx->bs->has_reordered_work | ctx->bs->has_unsync;
if (!has_work) {
if (pfence) {
/* reuse last fence */
bs = ctx->last_batch_state;
@@ -3973,7 +3974,7 @@ zink_fence_wait(struct pipe_context *pctx)
{
struct zink_context *ctx = zink_context(pctx);
if (ctx->bs->has_work)
if (ctx->bs->has_work || ctx->bs->has_reordered_work || ctx->bs->has_unsync)
pctx->flush(pctx, NULL, PIPE_FLUSH_HINT_FINISH);
if (ctx->last_batch_state)
stall(ctx);