xash3d-fwgs/ref_vk/vk_pipeline.h

47 lines
1.2 KiB
C
Raw Normal View History

2021-01-23 22:23:25 +01:00
#include "vk_core.h"
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;
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;
VkBlendFactor dstColorBlendFactor;
VkBlendOp colorBlendOp;
2021-01-23 22:23:25 +01:00
VkBlendFactor srcAlphaBlendFactor;
VkBlendFactor dstAlphaBlendFactor;
VkBlendOp alphaBlendOp;
VkCullModeFlags cullMode;
} 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
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 );
extern VkPipelineCache g_pipeline_cache;