2020-02-12 09:55:51 +00:00
|
|
|
#ifndef __QF_Vulkan_renderpass_h
|
|
|
|
#define __QF_Vulkan_renderpass_h
|
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
#include "QF/darray.h"
|
|
|
|
|
|
|
|
typedef struct qfv_attachmentdescription_s
|
|
|
|
DARRAY_TYPE (VkAttachmentDescription) qfv_attachmentdescription_t;
|
2020-02-12 09:55:51 +00:00
|
|
|
|
|
|
|
#define QFV_AllocAttachmentDescription(num, allocator) \
|
2020-02-17 14:30:25 +00:00
|
|
|
DARRAY_ALLOCFIXED (qfv_attachmentdescription_t, num, allocator)
|
2020-02-12 09:55:51 +00:00
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
typedef struct qfv_attachmentreference_s
|
|
|
|
DARRAY_TYPE (VkAttachmentReference) qfv_attachmentreference_t;
|
2020-02-12 09:55:51 +00:00
|
|
|
|
|
|
|
#define QFV_AllocAttachmentReference(num, allocator) \
|
2020-02-17 14:30:25 +00:00
|
|
|
DARRAY_ALLOCFIXED (qfv_attachmentreference_t, num, allocator)
|
2020-02-12 09:55:51 +00:00
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
typedef struct qfv_subpassparametersset_s
|
2020-02-18 08:18:37 +00:00
|
|
|
DARRAY_TYPE (VkSubpassDescription) qfv_subpassparametersset_t;
|
2020-02-12 09:55:51 +00:00
|
|
|
|
|
|
|
#define QFV_AllocSubpassParametersSet(num, allocator) \
|
2020-02-17 14:30:25 +00:00
|
|
|
DARRAY_ALLOCFIXED (qfv_subpassparametersset_t, num, allocator)
|
2020-02-12 09:55:51 +00:00
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
typedef struct qfv_subpassdependency_s
|
|
|
|
DARRAY_TYPE (VkSubpassDependency) qfv_subpassdependency_t;
|
2020-02-12 09:55:51 +00:00
|
|
|
|
|
|
|
#define QFV_AllocSubpassDependencies(num, allocator) \
|
2020-02-17 14:30:25 +00:00
|
|
|
DARRAY_ALLOCFIXED (qfv_subpassdependency_t, num, allocator)
|
2020-02-12 09:55:51 +00:00
|
|
|
|
2021-02-14 02:35:06 +00:00
|
|
|
typedef struct qfv_framebufferset_s
|
|
|
|
DARRAY_TYPE (VkFramebuffer) qfv_framebufferset_t;
|
|
|
|
|
|
|
|
#define QFV_AllocFrameBuffers(num, allocator) \
|
|
|
|
DARRAY_ALLOCFIXED (qfv_framebufferset_t, num, allocator)
|
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
struct qfv_device_s;
|
2020-06-28 04:53:11 +00:00
|
|
|
struct qfv_imageviewset_s;
|
2020-02-17 14:30:25 +00:00
|
|
|
VkRenderPass
|
2020-02-12 09:55:51 +00:00
|
|
|
QFV_CreateRenderPass (struct qfv_device_s *device,
|
|
|
|
qfv_attachmentdescription_t *attachments,
|
|
|
|
qfv_subpassparametersset_t *subpasses,
|
|
|
|
qfv_subpassdependency_t *dependencies);
|
|
|
|
|
2020-02-17 14:30:25 +00:00
|
|
|
VkFramebuffer
|
|
|
|
QFV_CreateFramebuffer (struct qfv_device_s *device,
|
|
|
|
VkRenderPass renderPass,
|
2020-06-28 04:53:11 +00:00
|
|
|
struct qfv_imageviewset_s *attachments,
|
2020-02-18 08:18:37 +00:00
|
|
|
VkExtent2D, uint32_t layers);
|
2020-02-12 09:55:51 +00:00
|
|
|
|
2021-12-02 12:58:29 +00:00
|
|
|
typedef struct qfv_renderframe_s {
|
|
|
|
struct vulkan_ctx_s *vulkan_ctx;
|
|
|
|
struct qfv_renderpass_s *renderpass;
|
|
|
|
VkSubpassContents subpassContents;
|
|
|
|
int subpassCount;
|
|
|
|
struct qfv_cmdbufferset_s *subpassCmdSets;
|
|
|
|
} qfv_renderframe_t;
|
|
|
|
|
|
|
|
typedef struct qfv_renderframeset_s
|
|
|
|
DARRAY_TYPE (qfv_renderframe_t) qfv_renderframeset_t;
|
|
|
|
|
|
|
|
typedef struct clearvalueset_s
|
|
|
|
DARRAY_TYPE (VkClearValue) clearvalueset_t;
|
|
|
|
|
|
|
|
typedef struct qfv_renderpass_s {
|
|
|
|
struct plitem_s *renderpassDef;
|
|
|
|
VkRenderPass renderpass;
|
|
|
|
clearvalueset_t *clearValues;
|
|
|
|
struct qfv_imageset_s *attachment_images;
|
|
|
|
struct qfv_imageviewset_s *attachment_views;
|
|
|
|
VkDeviceMemory attachmentMemory;
|
|
|
|
|
|
|
|
qfv_framebufferset_t *framebuffers;
|
|
|
|
|
|
|
|
qfv_renderframeset_t frames;
|
|
|
|
|
|
|
|
void (*draw) (qfv_renderframe_t *rFrame);
|
|
|
|
} qfv_renderpass_t;
|
|
|
|
|
2020-02-12 09:55:51 +00:00
|
|
|
#endif//__QF_Vulkan_renderpass_h
|