2021-01-23 22:23:25 +01:00
|
|
|
#include "vk_core.h"
|
|
|
|
|
2021-03-13 21:29:17 +01:00
|
|
|
typedef struct {
|
|
|
|
const char *filename;
|
|
|
|
VkShaderStageFlagBits stage;
|
|
|
|
VkSpecializationInfo *specialization_info;
|
|
|
|
} vk_shader_stage_t;
|
|
|
|
|
2021-01-23 22:23:25 +01:00
|
|
|
typedef struct {
|
|
|
|
VkPipelineLayout layout;
|
2021-03-21 00:21:26 +01:00
|
|
|
const VkVertexInputAttributeDescription *attribs;
|
2021-01-23 22:23:25 +01:00
|
|
|
uint32_t num_attribs;
|
|
|
|
|
2021-03-20 19:15:57 +01:00
|
|
|
const vk_shader_stage_t *stages;
|
2021-01-23 22:23:25 +01:00
|
|
|
uint32_t num_stages;
|
|
|
|
|
|
|
|
uint32_t vertex_stride;
|
|
|
|
|
|
|
|
VkBool32 depthTestEnable;
|
|
|
|
VkBool32 depthWriteEnable;
|
|
|
|
VkCompareOp depthCompareOp;
|
|
|
|
|
|
|
|
VkBool32 blendEnable;
|
|
|
|
VkBlendFactor srcColorBlendFactor;
|
2021-02-06 20:07:00 +01:00
|
|
|
VkBlendFactor dstColorBlendFactor;
|
2021-03-20 19:15:57 +01:00
|
|
|
VkBlendOp colorBlendOp;
|
2021-01-23 22:23:25 +01:00
|
|
|
VkBlendFactor srcAlphaBlendFactor;
|
|
|
|
VkBlendFactor dstAlphaBlendFactor;
|
|
|
|
VkBlendOp alphaBlendOp;
|
2021-02-06 20:07:00 +01:00
|
|
|
|
|
|
|
VkCullModeFlags cullMode;
|
2021-03-13 21:29:17 +01:00
|
|
|
} vk_pipeline_graphics_create_info_t;
|
|
|
|
|
|
|
|
VkPipeline VK_PipelineGraphicsCreate(const vk_pipeline_graphics_create_info_t *ci);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
VkPipelineLayout layout;
|
|
|
|
const char *shader_filename;
|
|
|
|
VkSpecializationInfo *specialization_info;
|
|
|
|
} vk_pipeline_compute_create_info_t;
|
2021-01-23 22:23:25 +01:00
|
|
|
|
2021-03-13 21:29:17 +01:00
|
|
|
VkPipeline VK_PipelineComputeCreate(const vk_pipeline_compute_create_info_t *ci);
|
2021-02-06 20:38:21 +01:00
|
|
|
|
|
|
|
qboolean VK_PipelineInit( void );
|
|
|
|
void VK_PipelineShutdown( void );
|
2021-07-05 22:24:57 +02:00
|
|
|
|
|
|
|
extern VkPipelineCache g_pipeline_cache;
|