zink: block oom flushes during unordered blits

this is broken beyond space and time

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22412>
This commit is contained in:
Mike Blumenkrantz
2023-03-29 16:41:44 -04:00
committed by Marge Bot
parent b51e858d68
commit 89aa363593
2 changed files with 4 additions and 3 deletions

View File

@@ -3172,6 +3172,7 @@ static void
flush_batch(struct zink_context *ctx, bool sync)
{
struct zink_batch *batch = &ctx->batch;
assert(!ctx->unordered_blitting);
if (ctx->clears_enabled)
/* start rp to do all the clears */
zink_batch_rp(ctx);
@@ -3502,7 +3503,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
ctx->gfx_pipeline_state.rast_samples = rast_samples;
/* this is an ideal time to oom flush since it won't split a renderpass */
if (ctx->oom_flush)
if (ctx->oom_flush && !ctx->unordered_blitting)
flush_batch(ctx, false);
else
update_layered_rendering_state(ctx);

View File

@@ -906,7 +906,7 @@ zink_draw(struct pipe_context *pctx,
batch->last_was_compute = false;
ctx->batch.work_count = work_count;
/* flush if there's >100k draws */
if (unlikely(work_count >= 30000) || ctx->oom_flush)
if (!ctx->unordered_blitting && (unlikely(work_count >= 30000) || ctx->oom_flush))
pctx->flush(pctx, NULL, 0);
}
@@ -1079,7 +1079,7 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
batch->has_work = true;
batch->last_was_compute = true;
/* flush if there's >100k computes */
if (unlikely(ctx->batch.work_count >= 30000) || ctx->oom_flush)
if (!ctx->unordered_blitting && (unlikely(ctx->batch.work_count >= 30000) || ctx->oom_flush))
pctx->flush(pctx, NULL, 0);
}