Generate std::hash specializations into the new file vulkan_hash.hpp, requiring C++14 for std::hash specializations of the vulkan structures.

This commit is contained in:
asuessenbach
2021-12-09 10:54:26 +01:00
parent 80dada6a7b
commit cdb64cdefd
9 changed files with 13095 additions and 17156 deletions

View File

@@ -531,9 +531,13 @@ vulkan.hpp provides a couple of trait functions on `vk::Format`. With C++14 and
Gets a single-plane format compatible with this plane.
- `uint8_t planeHeightDivisor( vk::Format format, uint8_t plane );`
Gets the relative height of this plane. A value of k means that this plane is 1/k the height of the overall format.
- `uint8_t planeWidthDivisor( vk::Format format, uint8_t plane );`
- Cuint8_t planeWidthDivisor( vk::Format format, uint8_t plane );`
Gets the relative width of this plane. A value of k means that this plane is 1/k the width of the overall format.
### Hashing Vulkan types
With the additional header `vulkan_hash.hpp`, you get specializations of `std::hash` for the handle wrapper classes and, with C++14, for the structure wrappers. With `VULKAN_HPP_HASH_COMBINE`, you can define your own hash combining algorithm for the structure elements.
### Samples and Tests
When you configure your project using CMake, you can enable SAMPLES_BUILD to add some sample projects to your solution. Most of them are ports from the LunarG samples, but there are some more, like CreateDebugUtilsMessenger, InstanceVersion, PhysicalDeviceDisplayProperties, PhysicalDeviceExtensions, PhysicalDeviceFeatures, PhysicalDeviceGroups, PhysicalDeviceMemoryProperties, PhysicalDeviceProperties, PhysicalDeviceQueueFamilyProperties, and RayTracing. All those samples should just compile and run.