Storage texel buffers, like uniform texel buffers, are a way to provide large amount of image-like data to shaders. But they also allow us to store data in them and perform atomic operations on them. For this purpose, we need to create a buffer with a VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT.
Creating a storage texel buffer
How to do it...
- Take the handle of a physical device. Store it in a variable of type VkPhysicalDevice named physical_device.
- Select a format for the texel buffer's data and use it to initialize a variable of type VkFormat named format.
- Create a variable of type VkFormatProperties named format_properties.
- Call vkGetPhysicalDeviceFormatProperties( physical_device, format, &format_properties ) and provide the handle of the selected physical...