From ecd5e1de9f41b5ecf1116319bf1523ffe0ff3558 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 1 Dec 2022 02:50:07 +0900 Subject: [PATCH] [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. --- libs/video/renderer/vulkan/vulkan_renderpass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/video/renderer/vulkan/vulkan_renderpass.c b/libs/video/renderer/vulkan/vulkan_renderpass.c index e7bc13fca..98a388a78 100644 --- a/libs/video/renderer/vulkan/vulkan_renderpass.c +++ b/libs/video/renderer/vulkan/vulkan_renderpass.c @@ -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);