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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user