diff --git a/include/QF/Vulkan/render.h b/include/QF/Vulkan/render.h index bb45ed4ce..f71c868b9 100644 --- a/include/QF/Vulkan/render.h +++ b/include/QF/Vulkan/render.h @@ -8,6 +8,11 @@ #include "QF/simd/types.h" +typedef struct qfv_reference_s { + const char *name; + int line; +} qfv_reference_t; + typedef struct qfv_imageinfo_s { const char *name; VkImageCreateFlags flags; @@ -84,7 +89,7 @@ typedef struct qfv_attachmentsetinfo_s { typedef struct qfv_pipelineinfo_s { vec4f_t color; const char *name; - VkGraphicsPipelineCreateInfo *pipeline; + qfv_reference_t pipeline; uint32_t num_tasks; qfv_taskinfo_t *tasks; } qfv_pipelineinfo_t; @@ -100,11 +105,19 @@ typedef struct qfv_subpassinfo_s { qfv_pipelineinfo_t *pipelines; } qfv_subpassinfo_t; +typedef struct qfv_framebufferinfo_s { + qfv_reference_t *attachments; + uint32_t num_attachments; + uint32_t width; + uint32_t height; + uint32_t layers; +} qfv_framebufferinfo_t; + typedef struct qfv_renderpassinfo_s { const char *name; uint32_t num_attachments; qfv_attachmentinfo_t *attachments; - VkFramebufferCreateInfo framebuffer; + qfv_framebufferinfo_t framebuffer; uint32_t num_subpasses; qfv_subpassinfo_t *subpasses; } qfv_renderpassinfo_t; diff --git a/libs/video/renderer/vulkan/vkparse.plist b/libs/video/renderer/vulkan/vkparse.plist index 41fa107f4..d554e8f7c 100644 --- a/libs/video/renderer/vulkan/vkparse.plist +++ b/libs/video/renderer/vulkan/vkparse.plist @@ -43,6 +43,7 @@ qfv_taskinfo_t, qfv_pipelineinfo_t, qfv_subpassinfo_t, + qfv_framebufferinfo_t, qfv_renderpassinfo_t, qfv_renderinfo_t, ); @@ -476,10 +477,7 @@ type = string; string = name; }; - pipeline = { - type = (single, VkGraphicsPipelineCreateInfo); - value = pipeline; - }; + pipeline = auto; tasks = { type = (array, qfv_taskinfo_t); size = num_tasks; @@ -508,6 +506,25 @@ values = pipelines; }; }; + qfv_framebufferinfo_s = { + .name = qfv_framebufferinfo_t; + attachments = { + type = (array, qfv_reference_t); + size = num_attachments; + values = attachments; + }; + width = auto; + height = auto; + layers = auto; + }; + qfv_reference_s = { + .name = qfv_reference_t; + .type = QFString; + .string = { + name = $item.string; + line = $item.line; + }; + }; qfv_renderpassinfo_s = { .name = qfv_renderpassinfo_t; attachments = {