KhronosGroup / Vulkan-Hpp

Open-Source Vulkan C++ API
Apache License 2.0
3.08k stars 304 forks source link

Confusing deprecation of extensions #1935

Closed n0F4x closed 1 month ago

n0F4x commented 1 month ago

The vulkan.hpp defines its own version of instance/device extension names. However, many of these are (I think wrongly) marked as deprecated due to being promoted to core.

A simple example is the following code snippet:

VULKAN_HPP_DEPRECATED( "The VK_EXT_descriptor_indexing extension has been promoted to core in version 1.2." )
VULKAN_HPP_CONSTEXPR_INLINE auto EXTDescriptorIndexingExtensionName = VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME;

The compiler gives a warning in case someone wants to use these. This is counter-productive when somebody wants to target lower Vulkan versions but finds out that an extension has been promoted in a newer version of Vulkan.

asuessenbach commented 1 month ago

You're right, extension that are promoted to a vulkan version are not meant to be deprecated. You might still use them, as you said, when you target a lower vulkan version. Those deprecation attributes will be removed.