2020-07-16 06:42:49 +00:00
|
|
|
#ifndef __vkparse_h
|
|
|
|
#define __vkparse_h
|
|
|
|
|
2021-01-05 14:42:30 +00:00
|
|
|
typedef struct parsectx_s {
|
|
|
|
struct exprctx_s *ectx;
|
|
|
|
struct vulkan_ctx_s *vctx;
|
2021-02-14 02:35:06 +00:00
|
|
|
struct plitem_s *properties;
|
|
|
|
void *data;
|
2021-01-05 14:42:30 +00:00
|
|
|
} parsectx_t;
|
|
|
|
|
2022-11-24 14:44:07 +00:00
|
|
|
typedef struct scriptctx_s {
|
|
|
|
struct vulkan_ctx_s *vctx;
|
|
|
|
struct hashctx_s *hashctx;
|
|
|
|
|
|
|
|
struct plitem_s *pipelineDef;
|
|
|
|
struct hashtab_s *shaderModules;
|
|
|
|
struct hashtab_s *setLayouts;
|
|
|
|
struct hashtab_s *pipelineLayouts;
|
|
|
|
struct hashtab_s *descriptorPools;
|
|
|
|
struct hashtab_s *samplers;
|
|
|
|
struct hashtab_s *images;
|
|
|
|
struct hashtab_s *imageViews;
|
|
|
|
struct hashtab_s *renderpasses;
|
|
|
|
|
|
|
|
qfv_output_t output;
|
|
|
|
} scriptctx_t;
|
|
|
|
|
|
|
|
void Vulkan_Init_Cvars (void);
|
|
|
|
void Vulkan_Script_Init (struct vulkan_ctx_s *ctx);
|
|
|
|
void Vulkan_Script_Shutdown (struct vulkan_ctx_s *ctx);
|
|
|
|
void Vulkan_Script_SetOutput (struct vulkan_ctx_s *ctx, qfv_output_t *output);
|
|
|
|
|
2020-12-23 16:36:17 +00:00
|
|
|
#include "QF/cexpr.h"
|
2021-03-21 07:13:03 +00:00
|
|
|
#include "QF/plist.h"
|
2020-07-16 06:42:49 +00:00
|
|
|
|
2021-02-04 11:40:28 +00:00
|
|
|
#define QFV_PROPERTIES "properties"
|
|
|
|
|
2021-01-04 08:26:39 +00:00
|
|
|
exprenum_t *QFV_GetEnum (const char *name);
|
2020-07-16 06:42:49 +00:00
|
|
|
|
2021-02-04 11:40:28 +00:00
|
|
|
uint64_t QFV_GetHandle (struct hashtab_s *tab, const char *name);
|
|
|
|
void QFV_AddHandle (struct hashtab_s *tab, const char *name, uint64_t handle);
|
|
|
|
|
2021-02-14 02:35:06 +00:00
|
|
|
VkRenderPass QFV_ParseRenderPass (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2021-12-16 14:00:17 +00:00
|
|
|
VkPipeline QFV_ParseComputePipeline (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkPipeline QFV_ParseGraphicsPipeline (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2021-02-14 02:35:06 +00:00
|
|
|
VkDescriptorPool QFV_ParseDescriptorPool (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2021-02-04 08:03:49 +00:00
|
|
|
VkDescriptorSetLayout QFV_ParseDescriptorSetLayout (vulkan_ctx_t *ctx,
|
2021-02-14 02:35:06 +00:00
|
|
|
plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkPipelineLayout QFV_ParsePipelineLayout (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkSampler QFV_ParseSampler (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkImage QFV_ParseImage (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkImageView QFV_ParseImageView (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
struct qfv_imageset_s *QFV_ParseImageSet (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
struct qfv_imageviewset_s *QFV_ParseImageViewSet (vulkan_ctx_t *ctx,
|
|
|
|
plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
VkFramebuffer QFV_ParseFramebuffer (vulkan_ctx_t *ctx, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2021-12-02 12:58:29 +00:00
|
|
|
struct clearvalueset_s *QFV_ParseClearValues (vulkan_ctx_t *ctx,
|
|
|
|
plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2021-02-23 05:37:48 +00:00
|
|
|
|
2022-05-30 06:58:22 +00:00
|
|
|
struct qfv_subpassset_s *QFV_ParseSubpasses (vulkan_ctx_t *ctx,
|
|
|
|
plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
|
|
|
int QFV_ParseRGBA (vulkan_ctx_t *ctx, float *rgba, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2022-11-26 13:22:22 +00:00
|
|
|
int QFV_ParseOutput (vulkan_ctx_t *ctx, qfv_output_t *output, plitem_t *plist,
|
|
|
|
plitem_t *properties);
|
2023-02-26 04:51:24 +00:00
|
|
|
exprtab_t *QFV_CreateSymtab (plitem_t *dict, const char *properties,
|
|
|
|
const char **extra_items, exprsym_t *extra_syms,
|
|
|
|
exprctx_t *ectx);
|
|
|
|
void QFV_DestroySymtab (exprtab_t *tab);
|
|
|
|
|
2023-02-12 16:43:17 +00:00
|
|
|
struct qfv_renderctx_s;
|
2023-02-26 17:54:51 +00:00
|
|
|
struct memsuper_s;
|
|
|
|
int QFV_ParseLayoutInfo (vulkan_ctx_t *ctx, struct memsuper_s *memsuper,
|
|
|
|
exprtab_t *symtab, const char *ref,
|
|
|
|
qfv_layoutinfo_t *layout);
|
[vulkan] Start work on a render job system
The jobs will become the core of the renderer, with each job step being
one of a render pass, compute pass, or processor (CPU-only) task. The
steps support dependencies, which will allow for threading the system in
the future.
Currently, just the structures, parse support, and prototype job
specification (render.plist) have been implemented. No conversion to
working data is done yet, and many things, in particular resources, will
need to be reworked, but this gets the basic design in.
2023-03-10 10:47:40 +00:00
|
|
|
struct qfv_jobinfo_s *QFV_ParseJobInfo (vulkan_ctx_t *ctx, plitem_t *item,
|
|
|
|
struct qfv_renderctx_s *rctx);
|
2020-07-16 06:42:49 +00:00
|
|
|
#endif//__vkparse_h
|