[vulkan] Clean up QFV_CreateFramebuffer's prototype

It now takes qfv_imageviewset_t instead of separate count and
VkImageView array.
This commit is contained in:
Bill Currie 2020-06-28 13:53:11 +09:00
parent aa8aaaaca9
commit 19c75f5e49
3 changed files with 6 additions and 7 deletions

View file

@ -28,6 +28,7 @@ typedef struct qfv_subpassdependency_s
DARRAY_ALLOCFIXED (qfv_subpassdependency_t, num, allocator)
struct qfv_device_s;
struct qfv_imageviewset_s;
VkRenderPass
QFV_CreateRenderPass (struct qfv_device_s *device,
qfv_attachmentdescription_t *attachments,
@ -37,8 +38,7 @@ QFV_CreateRenderPass (struct qfv_device_s *device,
VkFramebuffer
QFV_CreateFramebuffer (struct qfv_device_s *device,
VkRenderPass renderPass,
uint32_t numAttachments,
VkImageView *attachments,
struct qfv_imageviewset_s *attachments,
VkExtent2D, uint32_t layers);
#endif//__QF_Vulkan_renderpass_h

View file

@ -85,7 +85,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
VkFramebuffer
QFV_CreateFramebuffer (qfv_device_t *device, VkRenderPass renderPass,
uint32_t numAttachments, VkImageView *attachments,
qfv_imageviewset_t *attachments,
VkExtent2D extent, uint32_t layers)
{
VkDevice dev = device->dev;
@ -93,7 +93,7 @@ QFV_CreateFramebuffer (qfv_device_t *device, VkRenderPass renderPass,
VkFramebufferCreateInfo createInfo = {
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, 0, 0,
renderPass, numAttachments, attachments,
renderPass, attachments->size, attachments->a,
extent.width, extent.height, layers,
};

View file

@ -445,9 +445,8 @@ Vulkan_CreateFramebuffers (vulkan_ctx_t *ctx)
attachments->a[2] = sc->imageViews->a[i];
__auto_type frame = &ctx->framebuffers.a[i];
frame->framebuffer = QFV_CreateFramebuffer (device, renderpass,
attachments->size,
attachments->a,
sc->extent, 1);
attachments,
sc->extent, 1);
frame->fence = QFV_CreateFence (device, 1);
frame->imageAvailableSemaphore = QFV_CreateSemaphore (device);
frame->renderDoneSemaphore = QFV_CreateSemaphore (device);