mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-30 21:54:16 +08:00
zink: reset tc fb info upon splitting a renderpass
not sure if this actually affects anything, but if a renderpass has to be split for some reason, ensure subsequent renderpasses don't lose data also ensure that rp data isn't lost when triggering primgen clears and delete a now-invalid assert Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800>
This commit is contained in:
parent
73528dd3b7
commit
64b9cf5760
@ -2795,6 +2795,13 @@ zink_batch_no_rp(struct zink_context *ctx)
|
||||
{
|
||||
if (!ctx->batch.in_rp)
|
||||
return;
|
||||
if (zink_screen(ctx->base.screen)->driver_workarounds.track_renderpasses && !ctx->blitting) {
|
||||
ctx->dynamic_fb.tc_info.data32[0] = 0;
|
||||
ctx->dynamic_fb.tc_info.cbuf_load = BITFIELD_MASK(8);
|
||||
ctx->dynamic_fb.tc_info.zsbuf_clear_partial = true;
|
||||
ctx->dynamic_fb.tc_info.has_draw = true;
|
||||
ctx->dynamic_fb.tc_info.has_query_ends = true;
|
||||
}
|
||||
if (ctx->render_condition.query)
|
||||
zink_stop_conditional_render(ctx);
|
||||
/* suspend all queries that were started in a renderpass
|
||||
@ -2849,7 +2856,6 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
|
||||
}
|
||||
VkImageLayout layout;
|
||||
if (ctx->tc && zink_screen(ctx->base.screen)->driver_workarounds.track_renderpasses && !ctx->blitting) {
|
||||
assert(threaded_context_get_renderpass_info(ctx->tc, false)->data == ctx->dynamic_fb.tc_info.data);
|
||||
layout = zink_tc_renderpass_info_parse(ctx, &ctx->dynamic_fb.tc_info, i < ctx->fb_state.nr_cbufs ? i : PIPE_MAX_COLOR_BUFS, &pipeline, &access);
|
||||
assert(i < ctx->fb_state.nr_cbufs || layout != VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL || !zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS));
|
||||
if (i == ctx->fb_state.nr_cbufs && zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS))
|
||||
|
Loading…
Reference in New Issue
Block a user