Namespace atlas::vk
Namespace List > atlas > vk
Classes
Type | Name |
---|---|
struct | camera_ubo Going to remove this. |
struct | command_buffer_settings settings for specifying command buffers to construct |
struct | descriptor_binding_entry |
struct | descriptor_binding_point |
class | descriptor_set |
struct | descriptor_set_layout |
struct | global_ubo Just for testing purposes for sending this struct over to the shader. |
struct | hud_data |
struct | image_extent |
class | imgui_context |
struct | material_uniform material is going to define properties about how a scene object itself gets rendered |
class | mesh mesh class specifically defined with vulkan implementations for specific primitives TODO: Whenever we load in a texture that will be laucnhed asyncronously |
struct | renderpass_attachment |
struct | renderpass_options |
struct | shader_info |
struct | surface_properties |
class | texture |
struct | texture_extent |
struct | texture_properties |
struct | vertex_attribute |
struct | vertex_attribute_entry |
struct | vertex_input |
struct | vk_buffer vulkan buffer struct to define the handlers and memory specifications required for buffer handlers in vulkan |
struct | vk_buffer_info Specifications of the vulkan buffer handlers and the use and memory bits associated with the buffer handlers. |
class | vk_command_buffer Vulkan Command Buffers. |
class | vk_context |
class | vk_driver vulkan implementation of extracting a logical device |
struct | vk_filter_range Range between min and max for the VkFilter. |
class | vk_graphics_queue graphics queue mainly used for submitting to the graphics family specific queue |
struct | vk_image vulkan image handler with resources; used when handling textures |
struct | vk_image_handle |
class | vk_index_buffer |
class | vk_physical_driver |
class | vk_pipeline |
class | vk_present_queue Handles submissions to the specific queue for presentation. |
struct | vk_queue_options |
class | vk_renderer Something to consider for mesh loading. |
class | vk_renderpass defines a renderpass operation |
struct | vk_renderpass_options Renderpass specifictations for VkRenderpass. |
class | vk_shader_group |
struct | vk_shader_module |
class | vk_swapchain |
class | vk_uniform_buffer |
class | vk_vertex_buffer |
class | vk_window |
Public Types
Type | Name |
---|---|
enum uint8_t | attachment_load Equivalent to VkAttachmentLoadOp. |
enum uint8_t | attachment_store Equivalent to VkAttachmentStoreOp. |
enum uint8_t | buffer |
enum uint8_t | command_buffer_levels |
enum uint64_t | format |
enum uint8_t | image_layout |
enum uint8_t | input_rate Refers to the input rate. |
enum uint8_t | pipeline_bind_point Equivalent to VkPipelineBindPoint. |
enum uint8_t | renderpass_type this is the expectation of specifying the renderpass attachments |
enum uint8_t | sample_bit Equivalent to doing VkSampleCountFlagBits but simplified. |
enum | shader_stage |
Public Functions
Type | Name |
---|---|
void | begin_command_buffer (const VkCommandBuffer & p_command_buffer, VkCommandBufferUsageFlags p_usage_flags) |
int | bytes_per_texture_format (VkFormat p_format) |
void | copy (vk_command_buffer & p_command_buffer, VkImage & p_image, VkBuffer & p_buffer, uint32_t p_width, uint32_t p_height) |
void | copy (const vk_buffer & p_src, const vk_buffer & p_dst, size_t p_size_of_bytes) Copies from one buffer source into another buffer source with a specific size of bytes to be stored the buffer that is being copied to. |
vk_buffer | create_buffer (const vk_buffer_info & p_info) |
vk_image | create_image2d (uint32_t p_width, uint32_t p_height, VkFormat p_format, VkImageUsageFlags p_usage, VkMemoryPropertyFlagBits p_property) Returns vk_image which contains the VkImage and VkImage handlers with image 2D specifications. |
vk_image_handle | create_image2d (const VkDevice & p_driver, const image_extent & p_extent) |
VkImageView | create_image_view (const VkImage & p_image, VkFormat p_format, VkImageAspectFlags p_aspect_flags) |
VkImageView | create_image_view (const VkDevice & p_driver, VkImage p_image, VkSurfaceFormatKHR p_surface_format, VkImageAspectFlags p_aspect_flags, VkImageViewType p_view_t, uint32_t p_layer_count, uint32_t p_mip_level=1) |
VkSampler | create_sampler (const vk_filter_range & p_range, VkSamplerAddressMode p_address_mode) |
VkSemaphore | create_semaphore (const VkDevice & p_driver) |
VkCommandBuffer | create_single_command_buffer (const VkCommandPool & p_command_pool) |
VkCommandPool | create_single_command_pool () |
vk_buffer | create_uniform_buffer (uint32_t p_size) |
void | end_command_buffer (const VkCommandBuffer & p_command_buffer) |
void | free_buffer (const VkDevice & p_driver, vk_buffer & p_buffer) |
void | free_image (const VkDevice & p_driver, vk_image & p_image) |
bool | has_stencil_attachment (VkFormat p_format) Validate if the format specified is a stencil attachment. |
void | image_memory_barrier (VkCommandBuffer & p_command_buffer, VkImage & p_image, VkFormat p_format, VkImageLayout p_old, VkImageLayout p_new) |
void | queue_submit (const VkQueue & p_queue_handle, const std::span< VkCommandBuffer > & p_commands) |
VkPresentModeKHR | select_compatible_present_mode (const VkPresentModeKHR & p_request, const std::span< VkPresentModeKHR > & p_modes) |
uint32_t | select_images_size (const VkSurfaceCapabilitiesKHR & p_surface_capabilities) |
VkAttachmentLoadOp | to_vk_attachment_load (attachment_load p_attachment_type) |
VkAttachmentStoreOp | to_vk_attachment_store (const attachment_store & p_attachment_type) |
VkCommandBufferLevel | to_vk_command_buffer_level (const command_buffer_levels & p_levels) Conversion function that returns VkCommandBufferLevel. |
VkDescriptorType | to_vk_descriptor_type (const buffer & p_type) |
VkFormat | to_vk_format (const format & p_format) converts high-level specifications of format to VkFormat |
VkImageLayout | to_vk_image_layout (const image_layout & p_layout) |
VkVertexInputRate | to_vk_input_rate (const input_rate & p_input_rate) |
VkPipelineBindPoint | to_vk_pipeline_bind_point (const pipeline_bind_point & p_bind_point) |
VkSampleCountFlagBits | to_vk_sample_count_bits (const sample_bit & p_sample_count_bit) |
VkShaderStageFlags | to_vk_shader_stage (const shader_stage & p_stage) |
VkShaderStageFlagBits | to_vk_shader_stage_bits (const shader_stage & p_stage) |
void | transition_image_layout (VkImage & p_image, VkFormat p_format, VkImageLayout p_old, VkImageLayout p_new) |
void | transition_image_layout (VkCommandBuffer & p_command_buffer, VkImage & p_image, VkFormat p_format, VkImageLayout p_old, VkImageLayout p_new) |
void | vk_check (const VkResult & p_result, const std::string & p_name, const std::source_location & p_source=std::source_location::current()) |
void | vk_check_format (VkFormat p_format, const char * p_filepath, uint32_t p_line, const char * p_function_name) Checks for valid VkFormat specified. |
std::string | vk_format_to_string (VkFormat p_format) |
std::string | vk_present_mode_to_string (VkPresentModeKHR p_present_mode) |
void | write (const vk_buffer & p_buffer, const void * p_data, size_t p_size_in_bytes) maps the current buffer handler to some block of memory and the byte size for that chunk |
void | write (const vk_buffer & p_buffer, const std::span< uint32_t > & p_in_buffer) Maps buffer handler to chunk of data of type, that is std::span<uint32_t>. |
void | write (const vk_buffer & p_buffer, const std::span< vertex_input > & p_in_buffer) Maps buffer handler to data chunks that contain vertices. |
Public Types Documentation
enum attachment_load
Equivalent to VkAttachmentLoadOp.
enum atlas::vk::attachment_load {
load = 0,
clear,
dont_care,
none_khr,
none_ext,
max_enum
};
enum attachment_store
Equivalent to VkAttachmentStoreOp.
enum atlas::vk::attachment_store {
store = 0,
dont_care,
none_khr,
none_qcom,
none_ext,
max_enum
};
enum buffer
enum atlas::vk::buffer {
uniform = 0,
storage = 1,
combined_image_sampler = 2,
sampled_image = 3
};
enum command_buffer_levels
enum atlas::vk::command_buffer_levels {
primary = 0,
secondary = 1,
max_enum = 2
};
Parameters:
Primary
submission: immediately to vulkan queue for executing on device execution: vkQueueSubmit primarily submits primary command buffersSeconary
submission: Cannot be submitted directly to vulkan queue execution: Indirect execution by being called from primary command buffers usingvkCmdExecuteCommands
When executed within render-pass instance, they inherit renderpass/subpass state from primary command buffer
Can be allocated and recorded in parallel, which can leverage devices that support multi-core processing
Have independent lifetimes that can be managed independently of primary command buffers, allowing for more flexible resource management
enum format
enum atlas::vk::format {
rgb32_sfloat,
rg32_sfloat
};
enum image_layout
enum atlas::vk::image_layout {
undefined = 0,
general = 1,
color_optimal = 2,
depth_stencil_optimal =
3,
depth_stencil_read_only_optimal =
4
};
enum input_rate
Refers to the input rate.
enum atlas::vk::input_rate {
vertex,
instance,
max_enum
};
vertex - refers to most common rate. Indicates GPU to move next data entry (next vertex data) into a buffer for every single vertex that's processed. * Used for vertex attributes that change per vertex on the mesh * vertex attribute-only data * Per-object based specification in the next data entry
instance - refers to data entry per-instance. Specifying to the GPU that the data entry in the buffer is to be after the instance of the object itself. * Typically used for instanced rendering. Specfying next entry of data to be after instanced drawn, could be shared. Therefore instance is an option to choose from if vertex data is across as a per-instance basis.
instance-based specification next data entry
enum pipeline_bind_point
Equivalent to VkPipelineBindPoint.
enum atlas::vk::pipeline_bind_point {
graphics = 0,
compute = 1,
ray_tracing_khr,
subpass_shading_hauwei,
ray_tracing_nv,
max_enum
};
enum renderpass_type
this is the expectation of specifying the renderpass attachments
enum atlas::vk::renderpass_type {
color,
depth
};
enum sample_bit
Equivalent to doing VkSampleCountFlagBits but simplified.
enum atlas::vk::sample_bit {
count_1,
count_2,
count_4,
count_8,
count_16,
count_32,
count_64,
max_enum
};
enum shader_stage
enum atlas::vk::shader_stage {
undefined = -1,
vertex = 0,
fragment = 1
};
Public Functions Documentation
function begin_command_buffer
void atlas::vk::begin_command_buffer (
const VkCommandBuffer & p_command_buffer,
VkCommandBufferUsageFlags p_usage_flags
)
function bytes_per_texture_format
int atlas::vk::bytes_per_texture_format (
VkFormat p_format
)
Returns:
the bytes of the texture format specified by the parameter "VkFormat"
function copy
void atlas::vk::copy (
vk_command_buffer & p_command_buffer,
VkImage & p_image,
VkBuffer & p_buffer,
uint32_t p_width,
uint32_t p_height
)
function copy
Copies from one buffer source into another buffer source with a specific size of bytes to be stored the buffer that is being copied to.
void atlas::vk::copy (
const vk_buffer & p_src,
const vk_buffer & p_dst,
size_t p_size_of_bytes
)
function create_buffer
vk_buffer atlas::vk::create_buffer (
const vk_buffer_info & p_info
)
Returns:
new vk_buffer handler
function create_image2d
Returns vk_image which contains the VkImage and VkImage handlers with image 2D specifications.
vk_image atlas::vk::create_image2d (
uint32_t p_width,
uint32_t p_height,
VkFormat p_format,
VkImageUsageFlags p_usage,
VkMemoryPropertyFlagBits p_property
)
function create_image2d
vk_image_handle atlas::vk::create_image2d (
const VkDevice & p_driver,
const image_extent & p_extent
)
Parameters:
p_driver
current logical device to associate this image creation top_extent
image extent of properties required for creating the image
function create_image_view
VkImageView atlas::vk::create_image_view (
const VkImage & p_image,
VkFormat p_format,
VkImageAspectFlags p_aspect_flags
)
Parameters:
p_image
is the image handler to create a view handler fromp_format
specify format to create the VkImageView handler fromp_aspect_flag
to specify the data this VkImageView handler will contain
function create_image_view
VkImageView atlas::vk::create_image_view (
const VkDevice & p_driver,
VkImage p_image,
VkSurfaceFormatKHR p_surface_format,
VkImageAspectFlags p_aspect_flags,
VkImageViewType p_view_t,
uint32_t p_layer_count,
uint32_t p_mip_level=1
)
Returns:
new VkImageView handler object
Parameters:
p_driver
the driver to create the new handlerp_surface_format
specify a surface format to create the VkImageView handler withp_aspect_flag
to specify what kind of aspect of data this VkImageView will containp_mip_level
default to 1; used to set mip levels if required
function create_sampler
VkSampler atlas::vk::create_sampler (
const vk_filter_range & p_range,
VkSamplerAddressMode p_address_mode
)
function create_semaphore
VkSemaphore atlas::vk::create_semaphore (
const VkDevice & p_driver
)
Returns:
new semaphore handle
function create_single_command_buffer
VkCommandBuffer atlas::vk::create_single_command_buffer (
const VkCommandPool & p_command_pool
)
function create_single_command_pool
VkCommandPool atlas::vk::create_single_command_pool ()
function create_uniform_buffer
vk_buffer atlas::vk::create_uniform_buffer (
uint32_t p_size
)
Returns:
vulkan buffer handler that is initialized as a uniform buffer handler
function end_command_buffer
void atlas::vk::end_command_buffer (
const VkCommandBuffer & p_command_buffer
)
function free_buffer
void atlas::vk::free_buffer (
const VkDevice & p_driver,
vk_buffer & p_buffer
)
function free_image
void atlas::vk::free_image (
const VkDevice & p_driver,
vk_image & p_image
)
function has_stencil_attachment
Validate if the format specified is a stencil attachment.
bool atlas::vk::has_stencil_attachment (
VkFormat p_format
)
function image_memory_barrier
void atlas::vk::image_memory_barrier (
VkCommandBuffer & p_command_buffer,
VkImage & p_image,
VkFormat p_format,
VkImageLayout p_old,
VkImageLayout p_new
)
function queue_submit
void atlas::vk::queue_submit (
const VkQueue & p_queue_handle,
const std::span< VkCommandBuffer > & p_commands
)
function select_compatible_present_mode
VkPresentModeKHR atlas::vk::select_compatible_present_mode (
const VkPresentModeKHR & p_request,
const std::span< VkPresentModeKHR > & p_modes
)
Returns:
VkPresentModeKHR
by selecting the current compatiable presentation modes available
function select_images_size
uint32_t atlas::vk::select_images_size (
const VkSurfaceCapabilitiesKHR & p_surface_capabilities
)
Returns:
the image size based on the capabilities of the vulkan VkSurfaceKHR
that is supported
function to_vk_attachment_load
VkAttachmentLoadOp atlas::vk::to_vk_attachment_load (
attachment_load p_attachment_type
)
function to_vk_attachment_store
VkAttachmentStoreOp atlas::vk::to_vk_attachment_store (
const attachment_store & p_attachment_type
)
function to_vk_command_buffer_level
Conversion function that returns VkCommandBufferLevel.
VkCommandBufferLevel atlas::vk::to_vk_command_buffer_level (
const command_buffer_levels & p_levels
)
function to_vk_descriptor_type
VkDescriptorType atlas::vk::to_vk_descriptor_type (
const buffer & p_type
)
Returns:
Returns the VkDescriptorType that represents a "handle" the shader resource is acecssing
function to_vk_format
converts high-level specifications of format to VkFormat
VkFormat atlas::vk::to_vk_format (
const format & p_format
)
function to_vk_image_layout
VkImageLayout atlas::vk::to_vk_image_layout (
const image_layout & p_layout
)
function to_vk_input_rate
VkVertexInputRate atlas::vk::to_vk_input_rate (
const input_rate & p_input_rate
)
function to_vk_pipeline_bind_point
VkPipelineBindPoint atlas::vk::to_vk_pipeline_bind_point (
const pipeline_bind_point & p_bind_point
)
function to_vk_sample_count_bits
VkSampleCountFlagBits atlas::vk::to_vk_sample_count_bits (
const sample_bit & p_sample_count_bit
)
function to_vk_shader_stage
VkShaderStageFlags atlas::vk::to_vk_shader_stage (
const shader_stage & p_stage
)
function to_vk_shader_stage_bits
VkShaderStageFlagBits atlas::vk::to_vk_shader_stage_bits (
const shader_stage & p_stage
)
function transition_image_layout
void atlas::vk::transition_image_layout (
VkImage & p_image,
VkFormat p_format,
VkImageLayout p_old,
VkImageLayout p_new
)
function transition_image_layout
void atlas::vk::transition_image_layout (
VkCommandBuffer & p_command_buffer,
VkImage & p_image,
VkFormat p_format,
VkImageLayout p_old,
VkImageLayout p_new
)
function vk_check
void atlas::vk::vk_check (
const VkResult & p_result,
const std::string & p_name,
const std::source_location & p_source=std::source_location::current()
)
Parameters:
p_result
checks if the result of a vulkan handler was created correctlyp_name
used for debugging of which handler failedp_source
is the location of the call-site that invoked vk_check
function vk_check_format
Checks for valid VkFormat
specified.
void atlas::vk::vk_check_format (
VkFormat p_format,
const char * p_filepath,
uint32_t p_line,
const char * p_function_name
)
function vk_format_to_string
std::string atlas::vk::vk_format_to_string (
VkFormat p_format
)
Returns:
stringified version of the VkFormat
function vk_present_mode_to_string
std::string atlas::vk::vk_present_mode_to_string (
VkPresentModeKHR p_present_mode
)
Returns:
stringified version of the VkPresentModeKHR
function write
maps the current buffer handler to some block of memory and the byte size for that chunk
void atlas::vk::write (
const vk_buffer & p_buffer,
const void * p_data,
size_t p_size_in_bytes
)
function write
Maps buffer handler to chunk of data of type, that is std::span<uint32_t>.
void atlas::vk::write (
const vk_buffer & p_buffer,
const std::span< uint32_t > & p_in_buffer
)
function write
Maps buffer handler to data chunks that contain vertices.
void atlas::vk::write (
const vk_buffer & p_buffer,
const std::span< vertex_input > & p_in_buffer
)
The documentation for this class was generated from the following file TheAtlasEngine/atlas/drivers/vulkan-cpp/helper_functions.hpp