[vulkan] Support parsing pipeline layout info
This is for the new system.
This commit is contained in:
parent
acf828baa3
commit
918237507e
|
@ -2336,3 +2336,39 @@ QFV_ParseRenderInfo (vulkan_ctx_t *ctx, plitem_t *item, qfv_renderctx_t *rctx)
|
|||
|
||||
return ri;
|
||||
}
|
||||
|
||||
int
|
||||
QFV_ParseLayoutInfo (vulkan_ctx_t *ctx, memsuper_t *memsuper,
|
||||
exprtab_t *symtab, const char *ref,
|
||||
qfv_layoutinfo_t *layout)
|
||||
{
|
||||
*layout = (qfv_layoutinfo_t) {};
|
||||
|
||||
scriptctx_t *sctx = ctx->script_context;
|
||||
plitem_t *messages = PL_NewArray ();
|
||||
|
||||
exprctx_t exprctx = {
|
||||
.symtab = &root_symtab,
|
||||
.messages = messages,
|
||||
.hashctx = &sctx->hashctx,
|
||||
.memsuper = memsuper,
|
||||
.external_variables = symtab,
|
||||
};
|
||||
parsectx_t parsectx = {
|
||||
.ectx = &exprctx,
|
||||
.vctx = ctx,
|
||||
};
|
||||
|
||||
plitem_t *item = PL_NewString (ref);
|
||||
int ret;
|
||||
if (!(ret = parse_qfv_layoutinfo_t (0, item, layout, messages,
|
||||
&parsectx))) {
|
||||
for (int i = 0; i < PL_A_NumObjects (messages); i++) {
|
||||
Sys_Printf ("%s\n", PL_String (PL_ObjectAtIndex (messages, i)));
|
||||
}
|
||||
}
|
||||
PL_Free (messages);
|
||||
PL_Free (item);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -86,4 +86,8 @@ struct qfv_renderctx_s;
|
|||
struct qfv_renderinfo_s *QFV_ParseRenderInfo (vulkan_ctx_t *ctx,
|
||||
plitem_t *item,
|
||||
struct qfv_renderctx_s *rctx);
|
||||
struct memsuper_s;
|
||||
int QFV_ParseLayoutInfo (vulkan_ctx_t *ctx, struct memsuper_s *memsuper,
|
||||
exprtab_t *symtab, const char *ref,
|
||||
qfv_layoutinfo_t *layout);
|
||||
#endif//__vkparse_h
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
qfv_attachmentrefinfo_t,
|
||||
qfv_attachmentsetinfo_t,
|
||||
qfv_taskinfo_t,
|
||||
qfv_layoutinfo_t,
|
||||
qfv_pipelineinfo_t,
|
||||
qfv_subpassinfo_t,
|
||||
qfv_framebufferinfo_t,
|
||||
|
@ -480,6 +481,19 @@
|
|||
values = preserve;
|
||||
};
|
||||
};
|
||||
qfv_layoutinfo_s = {
|
||||
.name = qfv_layoutinfo_t;
|
||||
descriptorSets = {
|
||||
type = (array, qfv_reference_t);
|
||||
size = num_sets;
|
||||
values = sets;
|
||||
};
|
||||
pushConstantRanges = {
|
||||
type = (array, VkPushConstantRange);
|
||||
size = num_ranges;
|
||||
values = ranges;
|
||||
};
|
||||
};
|
||||
qfv_pipelineinfo_s = {
|
||||
.name = qfv_pipelineinfo_t;
|
||||
color = auto;
|
||||
|
@ -535,10 +549,7 @@
|
|||
type = (single, VkPipelineDynamicStateCreateInfo);
|
||||
value = dynamic;
|
||||
};
|
||||
layout = {
|
||||
type = (single, qfv_reference_t);
|
||||
value = layout;
|
||||
};
|
||||
layout = auto;
|
||||
};
|
||||
qfv_subpassinfo_s = {
|
||||
.name = qfv_subpassinfo_t;
|
||||
|
|
Loading…
Reference in New Issue