Kohi Game Engine
|
This file contains a collection fo Vulkan-specific types used for the Vulkan backend. More...
#include <vulkan/vulkan.h>
#include "containers/freelist.h"
#include "containers/hashtable.h"
#include "core/asserts.h"
#include "defines.h"
#include "renderer/renderer_types.h"
Go to the source code of this file.
Data Structures | |
struct | vulkan_buffer |
Represents a Vulkan-specific buffer. Used to load data onto the GPU. More... | |
struct | vulkan_swapchain_support_info |
Contains swapchain support information and capabilities. More... | |
struct | vulkan_device |
A representation of both the physical and logical Vulkan devices. Also contains handles to queues, command pools, and various properties of the devices. More... | |
struct | vulkan_image |
A representation of a Vulkan image. This can be thought of as a texture. Also contains the view and memory used by the internal image. More... | |
struct | vulkan_renderpass |
A representation of the Vulkan renderpass. More... | |
struct | vulkan_swapchain |
Representation of the Vulkan swapchain. More... | |
struct | vulkan_command_buffer |
Represents a Vulkan-specific command buffer, which holds a list of commands and is submitted to a queue for execution. More... | |
struct | vulkan_shader_stage |
Represents a single shader stage. More... | |
struct | vulkan_pipeline_config |
A configuration structure for Vulkan pipelines. More... | |
struct | vulkan_pipeline |
Holds a Vulkan pipeline and its layout. More... | |
struct | vulkan_geometry_data |
Internal buffer data for geometry. This data gets loaded directly into a buffer. More... | |
struct | vulkan_shader_stage_config |
Configuration for a shader stage, such as vertex or fragment. More... | |
struct | vulkan_descriptor_set_config |
The configuration for a descriptor set. More... | |
struct | vulkan_shader_config |
Internal shader configuration generated by vulkan_shader_create(). More... | |
struct | vulkan_descriptor_state |
Represents a state for a given descriptor. This is used to determine when a descriptor needs updating. There is a state per frame (with a max of 3). More... | |
struct | vulkan_shader_descriptor_set_state |
Represents the state for a descriptor set. This is used to track generations and updates, potentially for optimization via skipping sets which do not need updating. More... | |
struct | vulkan_shader_instance_state |
The instance-level state for a shader. More... | |
struct | vulkan_shader |
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... | |
struct | vulkan_context |
The overall Vulkan context for the backend. Holds and maintains global renderer backend state, Vulkan instance, etc. More... | |
Macros | |
#define | VK_CHECK(expr) |
Checks the given expression's return value against VK_SUCCESS. More... | |
#define | VULKAN_MAX_MATERIAL_COUNT 1024 |
Max number of material instances. More... | |
#define | VULKAN_MAX_GEOMETRY_COUNT 4096 |
Max number of simultaneously uploaded geometries. More... | |
#define | VULKAN_MAX_UI_COUNT 1024 |
Max number of UI control instances. More... | |
#define | VULKAN_SHADER_MAX_STAGES 8 |
Put some hard limits in place for the count of supported textures, attributes, uniforms, etc. This is to maintain memory locality and avoid dynamic allocations. More... | |
#define | VULKAN_SHADER_MAX_GLOBAL_TEXTURES 31 |
The maximum number of textures allowed at the global level. More... | |
#define | VULKAN_SHADER_MAX_INSTANCE_TEXTURES 31 |
The maximum number of textures allowed at the instance level. More... | |
#define | VULKAN_SHADER_MAX_ATTRIBUTES 16 |
The maximum number of vertex input attributes allowed. More... | |
#define | VULKAN_SHADER_MAX_UNIFORMS 128 |
The maximum number of uniforms and samplers allowed at the global, instance and local levels combined. It's probably more than will ever be needed. More... | |
#define | VULKAN_SHADER_MAX_BINDINGS 2 |
The maximum number of bindings per descriptor set. More... | |
#define | VULKAN_SHADER_MAX_PUSH_CONST_RANGES 32 |
The maximum number of push constant ranges for a shader. More... | |
Typedefs | |
typedef struct vulkan_buffer | vulkan_buffer |
Represents a Vulkan-specific buffer. Used to load data onto the GPU. More... | |
typedef struct vulkan_swapchain_support_info | vulkan_swapchain_support_info |
Contains swapchain support information and capabilities. More... | |
typedef enum vulkan_device_support_flag_bits | vulkan_device_support_flag_bits |
typedef u32 | vulkan_device_support_flags |
Bitwise flags for device support. More... | |
typedef struct vulkan_device | vulkan_device |
A representation of both the physical and logical Vulkan devices. Also contains handles to queues, command pools, and various properties of the devices. More... | |
typedef struct vulkan_image | vulkan_image |
A representation of a Vulkan image. This can be thought of as a texture. Also contains the view and memory used by the internal image. More... | |
typedef enum vulkan_render_pass_state | vulkan_render_pass_state |
Represents the possible states of a renderpass. More... | |
typedef struct vulkan_renderpass | vulkan_renderpass |
A representation of the Vulkan renderpass. More... | |
typedef struct vulkan_swapchain | vulkan_swapchain |
Representation of the Vulkan swapchain. More... | |
typedef enum vulkan_command_buffer_state | vulkan_command_buffer_state |
Represents all of the available states that a command buffer can be in. More... | |
typedef struct vulkan_command_buffer | vulkan_command_buffer |
Represents a Vulkan-specific command buffer, which holds a list of commands and is submitted to a queue for execution. More... | |
typedef struct vulkan_shader_stage | vulkan_shader_stage |
Represents a single shader stage. More... | |
typedef enum vulkan_topology_class | vulkan_topology_class |
typedef struct vulkan_pipeline_config | vulkan_pipeline_config |
A configuration structure for Vulkan pipelines. More... | |
typedef struct vulkan_pipeline | vulkan_pipeline |
Holds a Vulkan pipeline and its layout. More... | |
typedef struct vulkan_geometry_data | vulkan_geometry_data |
Internal buffer data for geometry. This data gets loaded directly into a buffer. More... | |
typedef struct vulkan_shader_stage_config | vulkan_shader_stage_config |
Configuration for a shader stage, such as vertex or fragment. More... | |
typedef struct vulkan_descriptor_set_config | vulkan_descriptor_set_config |
The configuration for a descriptor set. More... | |
typedef struct vulkan_shader_config | vulkan_shader_config |
Internal shader configuration generated by vulkan_shader_create(). More... | |
typedef struct vulkan_descriptor_state | vulkan_descriptor_state |
Represents a state for a given descriptor. This is used to determine when a descriptor needs updating. There is a state per frame (with a max of 3). More... | |
typedef struct vulkan_shader_descriptor_set_state | vulkan_shader_descriptor_set_state |
Represents the state for a descriptor set. This is used to track generations and updates, potentially for optimization via skipping sets which do not need updating. More... | |
typedef struct vulkan_shader_instance_state | vulkan_shader_instance_state |
The instance-level state for a shader. More... | |
typedef struct vulkan_shader | vulkan_shader |
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... | |
typedef struct vulkan_context | vulkan_context |
The overall Vulkan context for the backend. Holds and maintains global renderer backend state, Vulkan instance, etc. More... | |
This file contains a collection fo Vulkan-specific types used for the Vulkan backend.
#define VK_CHECK | ( | expr | ) |
Checks the given expression's return value against VK_SUCCESS.
expr | The expression whose result should be checked. |
#define VULKAN_MAX_GEOMETRY_COUNT 4096 |
Max number of simultaneously uploaded geometries.
#define VULKAN_MAX_MATERIAL_COUNT 1024 |
Max number of material instances.
#define VULKAN_MAX_UI_COUNT 1024 |
Max number of UI control instances.
#define VULKAN_SHADER_MAX_ATTRIBUTES 16 |
The maximum number of vertex input attributes allowed.
#define VULKAN_SHADER_MAX_BINDINGS 2 |
The maximum number of bindings per descriptor set.
#define VULKAN_SHADER_MAX_GLOBAL_TEXTURES 31 |
The maximum number of textures allowed at the global level.
#define VULKAN_SHADER_MAX_INSTANCE_TEXTURES 31 |
The maximum number of textures allowed at the instance level.
#define VULKAN_SHADER_MAX_PUSH_CONST_RANGES 32 |
The maximum number of push constant ranges for a shader.
#define VULKAN_SHADER_MAX_STAGES 8 |
Put some hard limits in place for the count of supported textures, attributes, uniforms, etc. This is to maintain memory locality and avoid dynamic allocations.
The maximum number of stages (such as vertex, fragment, compute, etc.) allowed.
#define VULKAN_SHADER_MAX_UNIFORMS 128 |
The maximum number of uniforms and samplers allowed at the global, instance and local levels combined. It's probably more than will ever be needed.
typedef struct vulkan_buffer vulkan_buffer |
Represents a Vulkan-specific buffer. Used to load data onto the GPU.
typedef struct vulkan_command_buffer vulkan_command_buffer |
Represents a Vulkan-specific command buffer, which holds a list of commands and is submitted to a queue for execution.
typedef enum vulkan_command_buffer_state vulkan_command_buffer_state |
Represents all of the available states that a command buffer can be in.
typedef struct vulkan_context vulkan_context |
The overall Vulkan context for the backend. Holds and maintains global renderer backend state, Vulkan instance, etc.
typedef struct vulkan_descriptor_set_config vulkan_descriptor_set_config |
The configuration for a descriptor set.
typedef struct vulkan_descriptor_state vulkan_descriptor_state |
Represents a state for a given descriptor. This is used to determine when a descriptor needs updating. There is a state per frame (with a max of 3).
typedef struct vulkan_device vulkan_device |
A representation of both the physical and logical Vulkan devices. Also contains handles to queues, command pools, and various properties of the devices.
typedef u32 vulkan_device_support_flags |
Bitwise flags for device support.
typedef struct vulkan_geometry_data vulkan_geometry_data |
Internal buffer data for geometry. This data gets loaded directly into a buffer.
typedef struct vulkan_image vulkan_image |
A representation of a Vulkan image. This can be thought of as a texture. Also contains the view and memory used by the internal image.
typedef struct vulkan_pipeline vulkan_pipeline |
Holds a Vulkan pipeline and its layout.
typedef struct vulkan_pipeline_config vulkan_pipeline_config |
A configuration structure for Vulkan pipelines.
typedef enum vulkan_render_pass_state vulkan_render_pass_state |
Represents the possible states of a renderpass.
typedef struct vulkan_renderpass vulkan_renderpass |
A representation of the Vulkan renderpass.
typedef struct vulkan_shader vulkan_shader |
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.
typedef struct vulkan_shader_config vulkan_shader_config |
Internal shader configuration generated by vulkan_shader_create().
Represents the state for a descriptor set. This is used to track generations and updates, potentially for optimization via skipping sets which do not need updating.
typedef struct vulkan_shader_instance_state vulkan_shader_instance_state |
The instance-level state for a shader.
typedef struct vulkan_shader_stage vulkan_shader_stage |
Represents a single shader stage.
typedef struct vulkan_shader_stage_config vulkan_shader_stage_config |
Configuration for a shader stage, such as vertex or fragment.
typedef struct vulkan_swapchain vulkan_swapchain |
Representation of the Vulkan swapchain.
typedef struct vulkan_swapchain_support_info vulkan_swapchain_support_info |
Contains swapchain support information and capabilities.
typedef enum vulkan_topology_class vulkan_topology_class |
Represents all of the available states that a command buffer can be in.
Represents the possible states of a renderpass.