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:

committed by
Marge Bot

parent
b51e858d68
commit
89aa363593
@@ -3172,6 +3172,7 @@ static void
|
|||||||
flush_batch(struct zink_context *ctx, bool sync)
|
flush_batch(struct zink_context *ctx, bool sync)
|
||||||
{
|
{
|
||||||
struct zink_batch *batch = &ctx->batch;
|
struct zink_batch *batch = &ctx->batch;
|
||||||
|
assert(!ctx->unordered_blitting);
|
||||||
if (ctx->clears_enabled)
|
if (ctx->clears_enabled)
|
||||||
/* start rp to do all the clears */
|
/* start rp to do all the clears */
|
||||||
zink_batch_rp(ctx);
|
zink_batch_rp(ctx);
|
||||||
@@ -3502,7 +3503,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
|
|||||||
ctx->gfx_pipeline_state.rast_samples = rast_samples;
|
ctx->gfx_pipeline_state.rast_samples = rast_samples;
|
||||||
|
|
||||||
/* this is an ideal time to oom flush since it won't split a renderpass */
|
/* 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);
|
flush_batch(ctx, false);
|
||||||
else
|
else
|
||||||
update_layered_rendering_state(ctx);
|
update_layered_rendering_state(ctx);
|
||||||
|
@@ -906,7 +906,7 @@ zink_draw(struct pipe_context *pctx,
|
|||||||
batch->last_was_compute = false;
|
batch->last_was_compute = false;
|
||||||
ctx->batch.work_count = work_count;
|
ctx->batch.work_count = work_count;
|
||||||
/* flush if there's >100k draws */
|
/* 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);
|
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->has_work = true;
|
||||||
batch->last_was_compute = true;
|
batch->last_was_compute = true;
|
||||||
/* flush if there's >100k computes */
|
/* 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);
|
pctx->flush(pctx, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user