https://github.com/past-due/vulkan-helpers
Small helper classes for Vulkan
https://github.com/past-due/vulkan-helpers
c-plus-plus vulkan vulkan-api vulkan-library
Last synced: about 1 year ago
JSON representation
Small helper classes for Vulkan
- Host: GitHub
- URL: https://github.com/past-due/vulkan-helpers
- Owner: past-due
- License: mit
- Created: 2019-06-13T14:16:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T14:38:49.000Z (over 6 years ago)
- Last Synced: 2025-01-16T17:30:36.267Z (about 1 year ago)
- Topics: c-plus-plus, vulkan, vulkan-api, vulkan-library
- Language: C++
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vulkan-helpers
Small helper classes for Vulkan C++ apps
- [Requirements](#requirements)
- [VkhInfo](#vkhinfo)
- [VkhRenderPassCompat](#vkhrenderpasscompat)
## Requirements
- C++11 compiler
- Vulkan SDK / headers, with `vulkan.hpp`
## VkhInfo
Output information (inspired by the output of `vulkaninfo`) about Vulkan:
- Instance Extensions
- Surfaces
- Physical Devices
to a specified `outputHandler`.
The `outputHandler` receives a multiline, `\n`-separated string.
## VkhRenderPassCompat
A rough attempt at implementing the rules for determining [Vulkan Render Pass Compatibility](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#renderpass-compatibility).
> Framebuffers and graphics pipelines are created based on a specific render pass object. They **must** only be used with that render pass object, or one compatible with it.
Construct a `VkhRenderpassCompat` by passing in the `vk::RenderPassCreateInfo` used to create
a render pass. `VkhRenderpassCompat` will make a deep copy of the `vk::RenderPassCreateInfo`
information.
A `VkhRenderpassCompat` instance can be compared for compatibility with another via:
`bool isCompatibleWith(const VkhRenderpassCompat& other) const;`
### TODOs:
- Implement proper handling of the `pNext` member of `VkRenderPassCreateInfo`
- Currently, if `pNext != nullptr`, `VkhRenderPassCompat::isCompatibleWith` will always evaluate to `false`.
- Handle `singleSubpassSpecialCase` _(optimization)_
> As an additional special case, if two render passes have a single subpass, they are compatible even if they have different resolve attachment references or depth/stencil resolve modes but satisfy the other compatibility conditions.
## License
All helper classes in this repo are distributed under the MIT License.