15 #include <vulkan/vulkan_core.h>
42 VkImageUsageFlags usage,
43 VkMemoryPropertyFlags memory_flags,
45 VkImageAspectFlags view_aspect_flags,
83 VkImageLayout old_layout,
84 VkImageLayout new_layout);
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned short u16
Unsigned 16-bit integer.
Definition: defines.h:22
int b32
32-bit boolean type, used for APIs which require it
Definition: defines.h:55
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
ktexture_type
Represents various types of textures.
Definition: kresource_types.h:10
Represents a Vulkan-specific command buffer, which holds a list of commands and is submitted to a que...
Definition: vulkan_types.h:246
The overall Vulkan context for the backend. Holds and maintains global renderer backend state,...
Definition: vulkan_types.h:681
A representation of a Vulkan image. This can be thought of as a texture. Also contains the view and m...
Definition: vulkan_types.h:158
void vulkan_image_transition_layout(vulkan_context *context, vulkan_command_buffer *command_buffer, vulkan_image *image, VkFormat format, VkImageLayout old_layout, VkImageLayout new_layout)
Transitions the provided image from old_layout to new_layout.
void vulkan_image_copy_from_buffer(vulkan_context *context, vulkan_image *image, VkBuffer buffer, u64 offset, vulkan_command_buffer *command_buffer)
Copies data in buffer to provided image.
void vulkan_image_copy_to_buffer(vulkan_context *context, vulkan_image *image, VkBuffer buffer, vulkan_command_buffer *command_buffer)
Copies data in the provided image to the given buffer.
void vulkan_image_destroy(vulkan_context *context, vulkan_image *image)
Destroys the given image.
void vulkan_image_recreate(vulkan_context *context, vulkan_image *image)
Destroys and recrates internal image and view resources based on current create infos which are cache...
b8 vulkan_image_mipmaps_generate(vulkan_context *context, vulkan_image *image, vulkan_command_buffer *command_buffer)
Generates mipmaps for the given image based on mip_levels set in the image. mip_levels must be > 1 fo...
void vulkan_image_create(vulkan_context *context, ktexture_type type, u32 width, u32 height, u16 layer_count, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags memory_flags, b32 create_view, VkImageAspectFlags view_aspect_flags, const char *name, u32 mip_levels, vulkan_image *out_image)
Creates a new Vulkan image.
void vulkan_image_copy_region_to_buffer(vulkan_context *context, vulkan_image *image, VkBuffer buffer, u32 x, u32 y, u32 width, u32 height, vulkan_command_buffer *command_buffer)
Copies a single pixel's data from the given image to the provided buffer.
This file contains a collection fo Vulkan-specific types used for the Vulkan backend.