Kohi Game Engine
vulkan_shader Struct Reference

Represents a generic Vulkan shader. This uses a set of inputs and parameters, as well as the shader programs contained in SPIR-V files to construct a shader for use in rendering. More...

#include <vulkan_types.h>

Data Fields

kname name
 
u32 id
 The shader identifier. More...
 
u8 descriptor_set_count
 The total number of descriptor sets configured for this shader. Count matches binding set count. More...
 
vulkan_descriptor_set_configdescriptor_set_configs
 Array of descriptor sets, matches binding set count. More...
 
VkDescriptorSetLayout * descriptor_set_layouts
 Descriptor set layouts, matches binding set count. More...
 
vulkan_shader_binding_set_statebinding_set_states
 Binding set states, matches binding set count. More...
 
primitive_topology_type topology_types
 The topology types for the shader pipeline. See primitive_topology_type. Defaults to "triangle list" if unspecified. More...
 
u8 immediate_size
 
u32 pool_size_count
 
VkDescriptorPoolSize pool_sizes [SHADER_BINDING_TYPE_COUNT]
 An array of descriptor pool sizes. More...
 
VkDescriptorPool descriptor_pool
 The descriptor pool used for this shader. More...
 
krenderbuffer uniform_buffer
 The uniform buffer used by this shader. Triple-buffered by default. More...
 
u8 colour_attachment_count
 
VkFormat * colour_attachments
 
VkFormat depth_attachment
 
VkFormat stencil_attachment
 
u8 vertex_layout_pipeline_count
 
vulkan_vertex_layout_pipelinevertex_layout_pipelines
 
u8 vertex_layout_index
 
u16 renderer_frame_number
 
VkPrimitiveTopology default_topology
 The currently-selected topology. More...
 
shader_flags flags
 

Detailed Description

Represents a generic Vulkan shader. This uses a set of inputs and parameters, as well as the shader programs contained in SPIR-V files to construct a shader for use in rendering.

Field Documentation

◆ binding_set_states

vulkan_shader_binding_set_state* binding_set_states

Binding set states, matches binding set count.

◆ colour_attachment_count

u8 colour_attachment_count

◆ colour_attachments

VkFormat* colour_attachments

◆ default_topology

VkPrimitiveTopology default_topology

The currently-selected topology.

◆ depth_attachment

VkFormat depth_attachment

◆ descriptor_pool

VkDescriptorPool descriptor_pool

The descriptor pool used for this shader.

◆ descriptor_set_configs

vulkan_descriptor_set_config* descriptor_set_configs

Array of descriptor sets, matches binding set count.

◆ descriptor_set_count

u8 descriptor_set_count

The total number of descriptor sets configured for this shader. Count matches binding set count.

◆ descriptor_set_layouts

VkDescriptorSetLayout* descriptor_set_layouts

Descriptor set layouts, matches binding set count.

◆ flags

shader_flags flags

◆ id

u32 id

The shader identifier.

◆ immediate_size

u8 immediate_size

◆ name

kname name

◆ pool_size_count

u32 pool_size_count

◆ pool_sizes

VkDescriptorPoolSize pool_sizes[SHADER_BINDING_TYPE_COUNT]

An array of descriptor pool sizes.

◆ renderer_frame_number

u16 renderer_frame_number

◆ stencil_attachment

VkFormat stencil_attachment

◆ topology_types

primitive_topology_type topology_types

The topology types for the shader pipeline. See primitive_topology_type. Defaults to "triangle list" if unspecified.

◆ uniform_buffer

krenderbuffer uniform_buffer

The uniform buffer used by this shader. Triple-buffered by default.

◆ vertex_layout_index

u8 vertex_layout_index

◆ vertex_layout_pipeline_count

u8 vertex_layout_pipeline_count

◆ vertex_layout_pipelines

vulkan_vertex_layout_pipeline* vertex_layout_pipelines

The documentation for this struct was generated from the following file: