mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 16:00:08 +01:00
zink: disable msrtss handling when blitting
this avoids weirdness when e.g., flushing clears cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37767>
This commit is contained in:
parent
0ab8878a6e
commit
5080f2b6f5
1 changed files with 5 additions and 5 deletions
|
|
@ -3072,7 +3072,7 @@ begin_rendering(struct zink_context *ctx, bool check_msaa_expand)
|
||||||
else
|
else
|
||||||
ctx->dynamic_fb.attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
ctx->dynamic_fb.attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
||||||
}
|
}
|
||||||
if (ctx->dynamic_fb.attachments[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD)
|
if (!ctx->blitting && ctx->dynamic_fb.attachments[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD)
|
||||||
msaa_expand_mask |= BITFIELD_BIT(i);
|
msaa_expand_mask |= BITFIELD_BIT(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3234,7 +3234,7 @@ begin_rendering(struct zink_context *ctx, bool check_msaa_expand)
|
||||||
if (prep_fb_attachment(ctx, res, i))
|
if (prep_fb_attachment(ctx, res, i))
|
||||||
/* swapchain acquire can change this surface */
|
/* swapchain acquire can change this surface */
|
||||||
iv = zink_create_fb_surface(&ctx->base, &ctx->fb_state.cbufs[i])->image_view;
|
iv = zink_create_fb_surface(&ctx->base, &ctx->fb_state.cbufs[i])->image_view;
|
||||||
if (ctx->fb_state.cbufs[i].nr_samples && !has_msrtss) {
|
if (ctx->fb_state.cbufs[i].nr_samples && !has_msrtss && !ctx->blitting) {
|
||||||
ctx->dynamic_fb.attachments[i].resolveMode = VK_RESOLVE_MODE_AVERAGE_BIT;
|
ctx->dynamic_fb.attachments[i].resolveMode = VK_RESOLVE_MODE_AVERAGE_BIT;
|
||||||
ctx->dynamic_fb.attachments[i].resolveImageView = iv;
|
ctx->dynamic_fb.attachments[i].resolveImageView = iv;
|
||||||
ctx->dynamic_fb.attachments[i].resolveImageLayout = res->layout;
|
ctx->dynamic_fb.attachments[i].resolveImageLayout = res->layout;
|
||||||
|
|
@ -3279,7 +3279,7 @@ begin_rendering(struct zink_context *ctx, bool check_msaa_expand)
|
||||||
struct zink_resource *res = zink_resource(ctx->fb_state.zsbuf.texture);
|
struct zink_resource *res = zink_resource(ctx->fb_state.zsbuf.texture);
|
||||||
prep_fb_attachment(ctx, res, ctx->fb_state.nr_cbufs);
|
prep_fb_attachment(ctx, res, ctx->fb_state.nr_cbufs);
|
||||||
VkImageView iv = zink_create_fb_surface(&ctx->base, &ctx->fb_state.zsbuf)->image_view;
|
VkImageView iv = zink_create_fb_surface(&ctx->base, &ctx->fb_state.zsbuf)->image_view;
|
||||||
if (ctx->fb_state.zsbuf.nr_samples && !has_msrtss) {
|
if (ctx->fb_state.zsbuf.nr_samples && !has_msrtss && !ctx->blitting) {
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveImageView = iv;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveImageView = iv;
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveImageLayout = res->layout;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveImageLayout = res->layout;
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].resolveImageView = iv;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].resolveImageView = iv;
|
||||||
|
|
@ -3298,7 +3298,7 @@ begin_rendering(struct zink_context *ctx, bool check_msaa_expand)
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageView = iv;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageView = iv;
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout = res->layout;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout = res->layout;
|
||||||
assert(ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout != VK_IMAGE_LAYOUT_UNDEFINED);
|
assert(ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS+1].imageLayout != VK_IMAGE_LAYOUT_UNDEFINED);
|
||||||
if (ctx->transient_attachments & BITFIELD_BIT(PIPE_MAX_COLOR_BUFS)) {
|
if (ctx->transient_attachments & BITFIELD_BIT(PIPE_MAX_COLOR_BUFS) && !ctx->blitting) {
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT;
|
||||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS + 1].resolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT;
|
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS + 1].resolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3369,7 +3369,7 @@ begin_rendering(struct zink_context *ctx, bool check_msaa_expand)
|
||||||
ctx->gfx_pipeline_state.rast_samples + 1,
|
ctx->gfx_pipeline_state.rast_samples + 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (has_msrtss)
|
if (has_msrtss && !ctx->blitting)
|
||||||
ctx->dynamic_fb.info.pNext = ctx->transient_attachments ? &msrtss : NULL;
|
ctx->dynamic_fb.info.pNext = ctx->transient_attachments ? &msrtss : NULL;
|
||||||
VKCTX(CmdBeginRendering)(ctx->bs->cmdbuf, &ctx->dynamic_fb.info);
|
VKCTX(CmdBeginRendering)(ctx->bs->cmdbuf, &ctx->dynamic_fb.info);
|
||||||
ctx->in_rp = true;
|
ctx->in_rp = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue