[vulkan] Move render pass array init

Having it in Vulkan_Init_Common means the array can be used in more
places than just Vulkan_CreateRenderPass (which probably needs a
rename).
This commit is contained in:
Bill Currie 2021-12-19 09:14:11 +09:00
parent 2be19046b6
commit 81a5e076ac

View file

@ -203,6 +203,7 @@ Vulkan_Init_Common (vulkan_ctx_t *ctx)
Vulkan_Init_Cvars (); Vulkan_Init_Cvars ();
ctx->instance = QFV_CreateInstance (ctx, PACKAGE_STRING, 0x000702ff, 0, ctx->instance = QFV_CreateInstance (ctx, PACKAGE_STRING, 0x000702ff, 0,
instance_extensions);//FIXME version instance_extensions);//FIXME version
DARRAY_INIT (&ctx->renderPasses, 4);
} }
static void static void
@ -445,9 +446,6 @@ Vulkan_CreateRenderPass (vulkan_ctx_t *ctx)
rp->draw = renderpass_draw; rp->draw = renderpass_draw;
if (!ctx->renderPasses.grow) {
DARRAY_INIT (&ctx->renderPasses, 4);
}
DARRAY_APPEND (&ctx->renderPasses, rp); DARRAY_APPEND (&ctx->renderPasses, rp);
qfv_device_t *device = ctx->device; qfv_device_t *device = ctx->device;