zink: add some debug asserts to validate imageless framebuffer correctness
not sure if these matter enough to assert on but they're annoying to track down Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12843>
This commit is contained in:
committed by
Marge Bot
parent
0734484058
commit
be35fdae5f
@@ -1757,8 +1757,17 @@ begin_render_pass(struct zink_context *ctx)
|
||||
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++)
|
||||
att[i] = prep_fb_attachment(ctx, ctx->fb_state.cbufs[i], i);
|
||||
att[ctx->fb_state.nr_cbufs] = prep_fb_attachment(ctx, ctx->fb_state.zsbuf, ctx->fb_state.nr_cbufs);
|
||||
if (zink_screen(ctx->base.screen)->info.have_KHR_imageless_framebuffer)
|
||||
if (zink_screen(ctx->base.screen)->info.have_KHR_imageless_framebuffer) {
|
||||
#ifndef NDEBUG
|
||||
for (int i = 0; i < ctx->fb_state.nr_cbufs; i++) {
|
||||
assert(!ctx->fb_state.cbufs[i] || zink_resource(ctx->fb_state.cbufs[i]->texture)->obj->vkusage == ctx->framebuffer->state.infos[i].usage);
|
||||
assert(!ctx->fb_state.cbufs[i] || zink_resource(ctx->fb_state.cbufs[i]->texture)->obj->vkflags == ctx->framebuffer->state.infos[i].flags);
|
||||
}
|
||||
assert(!ctx->fb_state.zsbuf || zink_resource(ctx->fb_state.zsbuf->texture)->obj->vkusage == ctx->framebuffer->state.infos[ctx->fb_state.nr_cbufs].usage);
|
||||
assert(!ctx->fb_state.zsbuf || zink_resource(ctx->fb_state.zsbuf->texture)->obj->vkflags == ctx->framebuffer->state.infos[ctx->fb_state.nr_cbufs].flags);
|
||||
#endif
|
||||
rpbi.pNext = &infos;
|
||||
}
|
||||
|
||||
VKCTX(CmdBeginRenderPass)(batch->state->cmdbuf, &rpbi, VK_SUBPASS_CONTENTS_INLINE);
|
||||
batch->in_rp = true;
|
||||
|
||||
Reference in New Issue
Block a user