mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
[vulkan] Add list of views to qfv_output_t
I'm not sure I like it, but it was an easy solution to dealing with per-frame views when setting up a renderpass that has a framebuffer spec.
This commit is contained in:
parent
e1c4428c8e
commit
3b72c9847a
3 changed files with 6 additions and 8 deletions
|
@ -14,6 +14,7 @@ typedef struct qfv_output_s {
|
|||
VkExtent2D extent;
|
||||
VkImageView view;
|
||||
VkFormat format;
|
||||
VkImageView *view_list; // per frame
|
||||
} qfv_output_t;
|
||||
|
||||
typedef struct vulkan_frame_s {
|
||||
|
|
|
@ -119,11 +119,7 @@ create_attachements (vulkan_ctx_t *ctx, qfv_renderpass_t *rp)
|
|||
rp->framebuffers = QFV_AllocFrameBuffers (ctx->swapchain->numImages,
|
||||
malloc);
|
||||
for (size_t i = 0; i < rp->framebuffers->size; i++) {
|
||||
ctx->output = (qfv_output_t) {
|
||||
.extent = ctx->swapchain->extent,
|
||||
.view = ctx->swapchain->imageViews->a[i],
|
||||
.format = ctx->swapchain->format,
|
||||
};
|
||||
ctx->output.view = ctx->output.view_list[i];
|
||||
rp->framebuffers->a[i] = QFV_ParseFramebuffer (ctx, item,
|
||||
rp->renderpassDef);
|
||||
}
|
||||
|
|
|
@ -382,6 +382,7 @@ Vulkan_CreateRenderPasses (vulkan_ctx_t *ctx)
|
|||
.extent = ctx->swapchain->extent,
|
||||
.view = ctx->swapchain->imageViews->a[0],
|
||||
.format = ctx->swapchain->format,
|
||||
.view_list = ctx->swapchain->imageViews->a,
|
||||
};
|
||||
__auto_type rp = Vulkan_CreateRenderPass (ctx, "deferred",
|
||||
&output, renderpass_draw);
|
||||
|
|
Loading…
Reference in a new issue