charles-lunarg / vk-bootstrap

Vulkan Bootstrapping Iibrary
MIT License
818 stars 82 forks source link

Make `GenericFeatureChain::add` compatible with Vulkan-Hpp #290

Closed n0F4x closed 4 months ago

n0F4x commented 5 months ago
error: invalid operands to binary expression ('const vk::StructureType' and 'VkStructureType')
  188 |             if (features.sType == node.sType) {

Using the library with the Vulkan C++ binding worked fine for me until this commit.

A quick fix is to insert a static_cast like so:

if (static_cast<VkStructureType>(features.sType) == node.sType) {

I don't know what the proper solution should be.

charles-lunarg commented 5 months ago

That is a fine solution as far as I'm concerned. The code is templated so it is good for it to accept either vulkan.h or vulkan-hpp types (especially considering they are binary compatible). Happy to accept this as a PR.