mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
[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:
parent
aa8aaaaca9
commit
19c75f5e49
3 changed files with 6 additions and 7 deletions
|
@ -28,6 +28,7 @@ typedef struct qfv_subpassdependency_s
|
||||||
DARRAY_ALLOCFIXED (qfv_subpassdependency_t, num, allocator)
|
DARRAY_ALLOCFIXED (qfv_subpassdependency_t, num, allocator)
|
||||||
|
|
||||||
struct qfv_device_s;
|
struct qfv_device_s;
|
||||||
|
struct qfv_imageviewset_s;
|
||||||
VkRenderPass
|
VkRenderPass
|
||||||
QFV_CreateRenderPass (struct qfv_device_s *device,
|
QFV_CreateRenderPass (struct qfv_device_s *device,
|
||||||
qfv_attachmentdescription_t *attachments,
|
qfv_attachmentdescription_t *attachments,
|
||||||
|
@ -37,8 +38,7 @@ QFV_CreateRenderPass (struct qfv_device_s *device,
|
||||||
VkFramebuffer
|
VkFramebuffer
|
||||||
QFV_CreateFramebuffer (struct qfv_device_s *device,
|
QFV_CreateFramebuffer (struct qfv_device_s *device,
|
||||||
VkRenderPass renderPass,
|
VkRenderPass renderPass,
|
||||||
uint32_t numAttachments,
|
struct qfv_imageviewset_s *attachments,
|
||||||
VkImageView *attachments,
|
|
||||||
VkExtent2D, uint32_t layers);
|
VkExtent2D, uint32_t layers);
|
||||||
|
|
||||||
#endif//__QF_Vulkan_renderpass_h
|
#endif//__QF_Vulkan_renderpass_h
|
||||||
|
|
|
@ -85,7 +85,7 @@ QFV_CreateRenderPass (qfv_device_t *device,
|
||||||
|
|
||||||
VkFramebuffer
|
VkFramebuffer
|
||||||
QFV_CreateFramebuffer (qfv_device_t *device, VkRenderPass renderPass,
|
QFV_CreateFramebuffer (qfv_device_t *device, VkRenderPass renderPass,
|
||||||
uint32_t numAttachments, VkImageView *attachments,
|
qfv_imageviewset_t *attachments,
|
||||||
VkExtent2D extent, uint32_t layers)
|
VkExtent2D extent, uint32_t layers)
|
||||||
{
|
{
|
||||||
VkDevice dev = device->dev;
|
VkDevice dev = device->dev;
|
||||||
|
@ -93,7 +93,7 @@ QFV_CreateFramebuffer (qfv_device_t *device, VkRenderPass renderPass,
|
||||||
|
|
||||||
VkFramebufferCreateInfo createInfo = {
|
VkFramebufferCreateInfo createInfo = {
|
||||||
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, 0, 0,
|
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, 0, 0,
|
||||||
renderPass, numAttachments, attachments,
|
renderPass, attachments->size, attachments->a,
|
||||||
extent.width, extent.height, layers,
|
extent.width, extent.height, layers,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -445,9 +445,8 @@ Vulkan_CreateFramebuffers (vulkan_ctx_t *ctx)
|
||||||
attachments->a[2] = sc->imageViews->a[i];
|
attachments->a[2] = sc->imageViews->a[i];
|
||||||
__auto_type frame = &ctx->framebuffers.a[i];
|
__auto_type frame = &ctx->framebuffers.a[i];
|
||||||
frame->framebuffer = QFV_CreateFramebuffer (device, renderpass,
|
frame->framebuffer = QFV_CreateFramebuffer (device, renderpass,
|
||||||
attachments->size,
|
attachments,
|
||||||
attachments->a,
|
sc->extent, 1);
|
||||||
sc->extent, 1);
|
|
||||||
frame->fence = QFV_CreateFence (device, 1);
|
frame->fence = QFV_CreateFence (device, 1);
|
||||||
frame->imageAvailableSemaphore = QFV_CreateSemaphore (device);
|
frame->imageAvailableSemaphore = QFV_CreateSemaphore (device);
|
||||||
frame->renderDoneSemaphore = QFV_CreateSemaphore (device);
|
frame->renderDoneSemaphore = QFV_CreateSemaphore (device);
|
||||||
|
|
Loading…
Reference in a new issue