mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
zink: only update the value of VkAttachmentFeedbackLoopInfoEXT, not the pNext
messing with pNexts breaks other mechanics which expect those pointers to remain constant Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39739>
This commit is contained in:
parent
b453331e7c
commit
7e217112a0
1 changed files with 14 additions and 11 deletions
|
|
@ -3065,7 +3065,6 @@ begin_rendering(struct zink_context *ctx, bool check_attachment_shadow)
|
|||
uint32_t attachment_shadow_mask = 0;
|
||||
/* j/k this is super nonconformant */
|
||||
bool very_legal_and_conformant_msaa_opt = ctx->dynamic_fb.tc_info.has_resolve && ctx->dynamic_fb.tc_info.ended && (zink_debug & ZINK_DEBUG_MSAAOPT);
|
||||
ctx->dynamic_fb.attachments[0].pNext = NULL;
|
||||
if (ctx->rp_changed || ctx->rp_layout_changed || (!ctx->in_rp && ctx->rp_loadop_changed)) {
|
||||
/* init imageviews, base loadOp, formats */
|
||||
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
|
||||
|
|
@ -3282,6 +3281,11 @@ begin_rendering(struct zink_context *ctx, bool check_attachment_shadow)
|
|||
ctx->dynamic_fb.attachments[i].resolveMode = VK_RESOLVE_MODE_NONE;
|
||||
}
|
||||
ctx->dynamic_fb.attachments[i].imageView = iv;
|
||||
|
||||
if (ctx->feedback_loops & BITFIELD_BIT(i))
|
||||
ctx->dynamic_fb.fbfetch_att[i].feedbackLoopEnable = VK_TRUE;
|
||||
else
|
||||
ctx->dynamic_fb.fbfetch_att[i].feedbackLoopEnable = VK_FALSE;
|
||||
}
|
||||
if (ctx->has_swapchain) {
|
||||
ASSERTED struct zink_resource *res = zink_resource(ctx->fb_state.cbufs[0].texture);
|
||||
|
|
@ -3330,6 +3334,14 @@ begin_rendering(struct zink_context *ctx, bool check_attachment_shadow)
|
|||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS].resolveMode = 0;
|
||||
ctx->dynamic_fb.attachments[PIPE_MAX_COLOR_BUFS + 1].resolveMode = 0;
|
||||
}
|
||||
|
||||
if (ctx->feedback_loops & BITFIELD_BIT(PIPE_MAX_COLOR_BUFS)) {
|
||||
ctx->dynamic_fb.fbfetch_att[PIPE_MAX_COLOR_BUFS].feedbackLoopEnable = VK_TRUE;
|
||||
ctx->dynamic_fb.fbfetch_att[PIPE_MAX_COLOR_BUFS+1].feedbackLoopEnable = VK_TRUE;
|
||||
} else {
|
||||
ctx->dynamic_fb.fbfetch_att[PIPE_MAX_COLOR_BUFS].feedbackLoopEnable = VK_FALSE;
|
||||
ctx->dynamic_fb.fbfetch_att[PIPE_MAX_COLOR_BUFS+1].feedbackLoopEnable = VK_FALSE;
|
||||
}
|
||||
}
|
||||
if (use_tc_info && ctx->dynamic_fb.tc_info.has_resolve) {
|
||||
struct zink_resource *resolves[] = {
|
||||
|
|
@ -3954,11 +3966,6 @@ unbind_fb_surface(struct zink_context *ctx, const struct pipe_surface *surf, uns
|
|||
ctx->gfx_pipeline_state.dirty = ctx->gfx_pipeline_state.mesh_dirty = true;
|
||||
ctx->gfx_pipeline_state.feedback_loop = false;
|
||||
}
|
||||
if (zink_screen(ctx->base.screen)->info.have_KHR_unified_image_layouts && zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout) {
|
||||
ctx->dynamic_fb.fbfetch_att[idx].feedbackLoopEnable = VK_FALSE;
|
||||
if (idx == PIPE_MAX_COLOR_BUFS)
|
||||
ctx->dynamic_fb.fbfetch_att[idx + 1].feedbackLoopEnable = VK_FALSE;
|
||||
}
|
||||
}
|
||||
res->fb_binds &= ~BITFIELD_BIT(idx);
|
||||
batch_ref_fb_surface(ctx, surf);
|
||||
|
|
@ -6082,11 +6089,7 @@ add_implicit_feedback_loop(struct zink_context *ctx, struct zink_resource *res)
|
|||
}
|
||||
ctx->rp_layout_changed = true;
|
||||
ctx->feedback_loops |= is_feedback;
|
||||
if (zink_screen(ctx->base.screen)->info.have_KHR_unified_image_layouts && zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout) {
|
||||
u_foreach_bit(idx, is_feedback) {
|
||||
ctx->dynamic_fb.fbfetch_att[idx].feedbackLoopEnable = VK_TRUE;
|
||||
}
|
||||
} else {
|
||||
if (!zink_screen(ctx->base.screen)->info.have_KHR_unified_image_layouts || !zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout) {
|
||||
u_foreach_bit(idx, is_feedback) {
|
||||
if (zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout)
|
||||
ctx->dynamic_fb.attachments[idx].imageLayout = VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue