mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
zink: handle 'blitting' flag better in msrtss replication
barriers are illegal while 'blitting' is set, so unset it temporarily
for the replication barriers and then also re-set the layouts after
(cherry picked from commit 1e7cb4642e)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22598>
This commit is contained in:
parent
9c24784b7c
commit
aac9dd69da
2 changed files with 9 additions and 2 deletions
|
|
@ -130,7 +130,7 @@
|
|||
"description": "zink: handle 'blitting' flag better in msrtss replication",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -770,6 +770,7 @@ zink_begin_render_pass(struct zink_context *ctx)
|
|||
uint32_t rp_state = ctx->gfx_pipeline_state.rp_state;
|
||||
struct zink_render_pass *rp = ctx->gfx_pipeline_state.render_pass;
|
||||
struct zink_framebuffer *fb = ctx->framebuffer;
|
||||
bool blitting = ctx->blitting;
|
||||
|
||||
u_foreach_bit(i, ctx->framebuffer->rp->state.msaa_expand_mask) {
|
||||
struct zink_ctx_surface *csurf = (struct zink_ctx_surface*)ctx->fb_state.cbufs[i];
|
||||
|
|
@ -788,13 +789,19 @@ zink_begin_render_pass(struct zink_context *ctx)
|
|||
src_view = ctx->base.create_sampler_view(&ctx->base, src, &src_templ);
|
||||
|
||||
zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS | ZINK_BLIT_SAVE_TEXTURES);
|
||||
zink_blit_barriers(ctx, zink_resource(src), zink_resource(dst_view->texture), false);
|
||||
ctx->blitting = false;
|
||||
zink_blit_barriers(ctx, zink_resource(src), zink_resource(dst_view->texture), true);
|
||||
ctx->blitting = true;
|
||||
util_blitter_blit_generic(ctx->blitter, dst_view, &dstbox,
|
||||
src_view, &dstbox, ctx->fb_state.width, ctx->fb_state.height,
|
||||
PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL,
|
||||
false, false, 0);
|
||||
ctx->blitting = false;
|
||||
if (blitting) {
|
||||
zink_blit_barriers(ctx, NULL, zink_resource(dst_view->texture), true);
|
||||
zink_blit_barriers(ctx, NULL, zink_resource(src), true);
|
||||
}
|
||||
ctx->blitting = blitting;
|
||||
pipe_sampler_view_reference(&src_view, NULL);
|
||||
csurf->transient_init = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue