mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[vulkan] Provide access to swapchain image count
This necessitated hand-writing qfv_swapchain_t's descriptors as I don't feel like getting that complicated with vkgen at this stage and it's not really appropriate anyway? qfv_swapchain_t is meant to be read-only and not parsed from a plist.
This commit is contained in:
parent
16334158bd
commit
e281b608e1
2 changed files with 32 additions and 5 deletions
|
@ -469,6 +469,36 @@ parse_BasePipeline (const plitem_t *item, void **data,
|
||||||
|
|
||||||
#include "libs/video/renderer/vulkan/vkparse.cinc"
|
#include "libs/video/renderer/vulkan/vkparse.cinc"
|
||||||
|
|
||||||
|
static exprsym_t imageset_symbols[] = {
|
||||||
|
{"size", &cexpr_size_t, (void *)field_offset (qfv_imageset_t, size)},
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
static exprtab_t imageset_symtab = {
|
||||||
|
imageset_symbols,
|
||||||
|
};
|
||||||
|
exprtype_t imageset_type = {
|
||||||
|
"imageset",
|
||||||
|
sizeof (qfv_imageset_t *),
|
||||||
|
cexpr_struct_pointer_binops,
|
||||||
|
0,
|
||||||
|
&imageset_symtab,
|
||||||
|
};
|
||||||
|
static exprsym_t qfv_swapchain_t_symbols[] = {
|
||||||
|
{"format", &VkFormat_type, (void *)field_offset (qfv_swapchain_t, format)},
|
||||||
|
{"images", &imageset_type, (void *)field_offset (qfv_swapchain_t, images)},
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
static exprtab_t qfv_swapchain_t_symtab = {
|
||||||
|
qfv_swapchain_t_symbols,
|
||||||
|
};
|
||||||
|
exprtype_t qfv_swapchain_t_type = {
|
||||||
|
"qfv_swapchain_t",
|
||||||
|
sizeof (qfv_swapchain_t),
|
||||||
|
cexpr_struct_binops,
|
||||||
|
0,
|
||||||
|
&qfv_swapchain_t_symtab,
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct qfv_renderpass_s {
|
typedef struct qfv_renderpass_s {
|
||||||
qfv_attachmentdescription_t *attachments;
|
qfv_attachmentdescription_t *attachments;
|
||||||
qfv_subpassparametersset_t *subpasses;
|
qfv_subpassparametersset_t *subpasses;
|
||||||
|
@ -566,6 +596,8 @@ QFV_InitParse (vulkan_ctx_t *ctx)
|
||||||
&ctx->hashlinks);
|
&ctx->hashlinks);
|
||||||
context.hashlinks = &ctx->hashlinks;
|
context.hashlinks = &ctx->hashlinks;
|
||||||
vkgen_init_symtabs (&context);
|
vkgen_init_symtabs (&context);
|
||||||
|
cexpr_init_symtab (&qfv_swapchain_t_symtab, &context);
|
||||||
|
cexpr_init_symtab (&imageset_symtab, &context);
|
||||||
}
|
}
|
||||||
|
|
||||||
exprenum_t *
|
exprenum_t *
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
VkPushConstantRange,
|
VkPushConstantRange,
|
||||||
VkPipelineLayoutCreateInfo,
|
VkPipelineLayoutCreateInfo,
|
||||||
VkGraphicsPipelineCreateInfo,
|
VkGraphicsPipelineCreateInfo,
|
||||||
qfv_swapchain_t,
|
|
||||||
);
|
);
|
||||||
handles = {
|
handles = {
|
||||||
VkShaderModule = {
|
VkShaderModule = {
|
||||||
|
@ -61,10 +60,6 @@
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
parse = {
|
parse = {
|
||||||
qfv_swapchain_s = {
|
|
||||||
.name = qfv_swapchain_t;
|
|
||||||
format = auto;
|
|
||||||
};
|
|
||||||
VkSubpassDescription = {
|
VkSubpassDescription = {
|
||||||
flags = auto;
|
flags = auto;
|
||||||
pipelineBindPoint = auto;
|
pipelineBindPoint = auto;
|
||||||
|
|
Loading…
Reference in a new issue