40 VkImageUsageFlags usage,
41 VkMemoryPropertyFlags memory_flags,
43 VkImageAspectFlags view_aspect_flags,
62 VkImageAspectFlags aspect_flags);
81 VkImageLayout old_layout,
82 VkImageLayout new_layout);
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
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
texture_type
Represents various types of textures.
Definition: resource_types.h:155
Represents a Vulkan-specific command buffer, which holds a list of commands and is submitted to a que...
Definition: vulkan_types.h:261
The overall Vulkan context for the backend. Holds and maintains global renderer backend state,...
Definition: vulkan_types.h:564
A representation of a Vulkan image. This can be thought of as a texture. Also contains the view and m...
Definition: vulkan_types.h:149
void vulkan_image_create(vulkan_context *context, texture_type type, u32 width, u32 height, 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_transition_layout(vulkan_context *context, texture_type type, 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_view_create(vulkan_context *context, texture_type type, VkFormat format, vulkan_image *image, VkImageAspectFlags aspect_flags)
Creates a view for the given image.
void vulkan_image_copy_pixel_to_buffer(vulkan_context *context, texture_type type, vulkan_image *image, VkBuffer buffer, u32 x, u32 y, vulkan_command_buffer *command_buffer)
Copies a single pixel's data from the given image to the provided buffer.
void vulkan_image_destroy(vulkan_context *context, vulkan_image *image)
Destroys the given image.
void vulkan_image_copy_to_buffer(vulkan_context *context, texture_type type, vulkan_image *image, VkBuffer buffer, vulkan_command_buffer *command_buffer)
Copies data in the provided image to the given buffer.
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_copy_from_buffer(vulkan_context *context, texture_type type, vulkan_image *image, VkBuffer buffer, u64 offset, vulkan_command_buffer *command_buffer)
Copies data in buffer to provided image.
This file contains a collection fo Vulkan-specific types used for the Vulkan backend.