zink: trigger oom flushes more aggressively from copy ops

this cuts down on needing to flush from set_fb or draw

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800>
This commit is contained in:
Mike Blumenkrantz
2023-03-15 19:16:17 -04:00
committed by Marge Bot
parent 11b1ad9f3f
commit 4c359f785f

View File

@@ -4835,6 +4835,9 @@ zink_copy_image_buffer(struct zink_context *ctx, struct zink_resource *dst, stru
}
if (needs_present_readback)
zink_kopper_present_readback(ctx, img);
if (ctx->oom_flush && !ctx->batch.in_rp)
flush_batch(ctx, false);
}
static void
@@ -4945,6 +4948,8 @@ zink_resource_copy_region(struct pipe_context *pctx,
zink_copy_buffer(ctx, dst, src, dstx, src_box->x, src_box->width);
} else
zink_copy_image_buffer(ctx, dst, src, dst_level, dstx, dsty, dstz, src_level, src_box, 0);
if (ctx->oom_flush && !ctx->batch.in_rp)
flush_batch(ctx, false);
}
static bool