Kohi Game Engine
|
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 | |
void * | mapped_uniform_buffer_block |
The block of memory mapped to the uniform buffer. More... | |
u32 | id |
The shader identifier. More... | |
vulkan_shader_config | config |
The configuration of the shader generated by vulkan_create_shader(). More... | |
vulkan_renderpass * | renderpass |
A pointer to the renderpass to be used with this shader. More... | |
vulkan_shader_stage | stages [VULKAN_SHADER_MAX_STAGES] |
An array of stages (such as vertex and fragment) for this shader. Count is located in config. More... | |
VkDescriptorPool | descriptor_pool |
The descriptor pool used for this shader. More... | |
VkDescriptorSetLayout | descriptor_set_layouts [2] |
Descriptor set layouts, max of 2. Index 0=global, 1=instance. More... | |
VkDescriptorSet | global_descriptor_sets [3] |
Global descriptor sets, one per frame. More... | |
renderbuffer | uniform_buffer |
The uniform buffer used by this shader. More... | |
vulkan_pipeline ** | pipelines |
An array of pointers to pipelines associated with this shader. More... | |
vulkan_pipeline ** | clockwise_pipelines |
An array of pointers to pipelines associated with this shader. Clockwise winding. Only used if native/extension support doesn't exitst. More... | |
u8 | bound_pipeline_index |
The currently bound pipeline index. More... | |
VkPrimitiveTopology | current_topology |
The currently-selected topology. More... | |
u32 | instance_count |
The instance states for all instances. More... | |
vulkan_shader_instance_state | instance_states [VULKAN_MAX_MATERIAL_COUNT] |
u8 | global_uniform_count |
The number of global non-sampler uniforms. More... | |
u8 | global_uniform_sampler_count |
The number of global sampler uniforms. More... | |
u8 | instance_uniform_count |
The number of instance non-sampler uniforms. More... | |
u8 | instance_uniform_sampler_count |
The number of instance sampler uniforms. More... | |
u8 | local_uniform_count |
The number of local non-sampler uniforms. More... | |
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.
u8 bound_pipeline_index |
The currently bound pipeline index.
vulkan_pipeline** clockwise_pipelines |
An array of pointers to pipelines associated with this shader. Clockwise winding. Only used if native/extension support doesn't exitst.
vulkan_shader_config config |
The configuration of the shader generated by vulkan_create_shader().
VkPrimitiveTopology current_topology |
The currently-selected topology.
VkDescriptorPool descriptor_pool |
The descriptor pool used for this shader.
VkDescriptorSetLayout descriptor_set_layouts[2] |
Descriptor set layouts, max of 2. Index 0=global, 1=instance.
VkDescriptorSet global_descriptor_sets[3] |
Global descriptor sets, one per frame.
u8 global_uniform_count |
The number of global non-sampler uniforms.
u8 global_uniform_sampler_count |
The number of global sampler uniforms.
u32 id |
The shader identifier.
vulkan_shader_instance_state instance_states[VULKAN_MAX_MATERIAL_COUNT] |
u8 instance_uniform_count |
The number of instance non-sampler uniforms.
u8 instance_uniform_sampler_count |
The number of instance sampler uniforms.
u8 local_uniform_count |
The number of local non-sampler uniforms.
void* mapped_uniform_buffer_block |
The block of memory mapped to the uniform buffer.
vulkan_pipeline** pipelines |
An array of pointers to pipelines associated with this shader.
A pointer to the renderpass to be used with this shader.
An array of stages (such as vertex and fragment) for this shader. Count is located in config.
renderbuffer uniform_buffer |
The uniform buffer used by this shader.