[vulkan] Ensure render passes have at least one subpass

Non-graphics render passes don't normally specify render pass info, but
still want frames and command buffers.
This commit is contained in:
Bill Currie 2022-12-01 02:50:07 +09:00
parent b81a77c3f7
commit ecd5e1de9f

View file

@ -348,6 +348,9 @@ QFV_RenderPass_New (vulkan_ctx_t *ctx, const char *name, qfv_draw_t function)
QFV_ParseRGBA (ctx, (float *)&rp->color, color, rp->renderpassDef);
}
}
if (!rp->subpassCount) {
rp->subpassCount = 1;
}
DARRAY_INIT (&rp->frames, 4);
DARRAY_RESIZE (&rp->frames, ctx->frames.size);