Commit graph

12 commits

Author SHA1 Message Date
spencer-lunarg
551221d913 formats: Handle SRGB correction 2025-03-31 18:20:22 -04:00
Charles Giessen
0d5b49b80f formats: vkuGetFormatInfo to use array
Puts the contents of a switch in a big array, then rewrites
vkuGetFormatInfo() to index into it based on the formats enum value.

This was done because the switch statement was large enough that
compilers wouldn't inline the function, leading to performance bubbles.

The logic for generating the logic of vkuGetFormatInfo is complex but
boils down to finding the groups of consecutive VkFormats, where the
end of a group has a value that is more than 1 away from the next format
value.

To follow C const initializer rules, VKU_FORMAT_COMPRESSED_COMPONENT
had to be turned into a macro.
2025-03-26 08:00:39 -06:00
spencer-lunarg
50563f4836 format: Fix DepthStencil to Color compatible check 2025-03-05 23:36:42 -05:00
spencer-lunarg
42b34ac73e scripts: Use new VulkanObject from headers 2025-02-21 15:01:59 -05:00
spencer-lunarg
f07e27717a formats: Add vkuFormatTexelsPerBlock 2025-01-21 13:24:57 -05:00
spencer-lunarg
9cf0d32399 formats: Add vkuFormatTexelBlockSize 2025-01-21 12:56:19 -05:00
spencer-lunarg
4923254936 formats: Add vkuFormatIsDepthStencilWithColorSizeCompatible 2025-01-21 12:52:31 -05:00
spencer-lunarg
249718532d formats: Remove vkuFormatElementIsTexel 2025-01-20 15:00:04 -05:00
spencer-lunarg
2fe3a7791d format: Add note for Multi-planar 2025-01-15 12:29:45 -05:00
Juan Ramos
678ce607a0 ci: Add clang-format to CI
This also removes the extra .clang-format in the include directory

closes #78
2023-11-10 14:36:43 -07:00
Juan Ramos
2169a0849e Fix doc for vkuFormatIsXChromaSubsampled
Now the documentation matches the implementation.
2023-10-01 14:49:40 -06:00
unknown
c903525915 src: Add vk_format_utils.h to UtilityHeaders
The library originates from Vulkan-ValidationLayers, but is being moved
into this repo to make it easier for others to use it.

The library has also been modified to be header only and C compatible,
which allows more developers to be able to use it. This does require some
changes, but only affects the vkuFormatElementSize and vkuFormatTexelSize
functions which used default parameters. Two new functions,
vkuFormatElementSizeWithAspect and vkuFormatTexelSizeWithAspect have been
added to handle the non-default image aspect case (the default was COLOR_BIT).

Renaming was done using the following convention:
* public header files begin with `vk_`
* enums begin with VKU_FORMAT_
* functions begin with vku
2023-09-11 12:48:03 -06:00