Introduce using CppType type-trait for raii-classes, add two helper functions to filter the cpp-types out of a vector of raii-types. (#1672)

This commit is contained in:
Andreas Süßenbach 2023-10-05 15:19:16 +02:00 committed by GitHub
parent f97633a220
commit f76ce52df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 242 additions and 81 deletions

View File

@ -617,6 +617,33 @@ namespace VULKAN_HPP_NAMESPACE
${RAIIDispatchers}
${RAIIHandles}
${RAIICommandDefinitions}
//====================
//=== RAII Helpers ===
//====================
template <typename RAIIType>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes )
{
std::vector<typename RAIIType::CppType> cppTypes( raiiTypes.size() );
std::transform( raiiTypes.begin(), raiiTypes.end(), cppTypes.begin(), []( RAIIType const & d ) { return *d; } );
return cppTypes;
}
template <typename RAIIType, class UnaryPredicate>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes, UnaryPredicate p)
{
std::vector<typename RAIIType::CppType> cppTypes;
for (auto const& t : raiiTypes)
{
if (p(t))
{
cppTypes.push_back( *t );
}
}
return cppTypes;
}
} // namespace VULKAN_HPP_RAII_NAMESPACE
} // namespace VULKAN_HPP_NAMESPACE
#endif
@ -8133,6 +8160,7 @@ ${enter} class ${handleType}
{
public:
using CType = Vk${handleType};
using CppType = vk::${handleType};
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::${objTypeEnum};
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType = VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT::${debugReportObjectType};

View File

@ -2710,6 +2710,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkInstance;
using CppType = vk::Instance;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2972,6 +2973,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPhysicalDevice;
using CppType = vk::PhysicalDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3434,6 +3436,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDevice;
using CppType = vk::Device;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4397,6 +4400,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkAccelerationStructureKHR;
using CppType = vk::AccelerationStructureKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4520,6 +4524,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkAccelerationStructureNV;
using CppType = vk::AccelerationStructureNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4651,6 +4656,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBuffer;
using CppType = vk::Buffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4780,6 +4786,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBufferCollectionFUCHSIA;
using CppType = vk::BufferCollectionFUCHSIA;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferCollectionFUCHSIA;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4912,6 +4919,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBufferView;
using CppType = vk::BufferView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5034,6 +5042,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandPool;
using CppType = vk::CommandPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5168,6 +5177,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandBuffer;
using CppType = vk::CommandBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6208,6 +6218,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCuFunctionNVX;
using CppType = vk::CuFunctionNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6330,6 +6341,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCuModuleNVX;
using CppType = vk::CuModuleNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6452,6 +6464,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDebugReportCallbackEXT;
using CppType = vk::DebugReportCallbackEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6575,6 +6588,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDebugUtilsMessengerEXT;
using CppType = vk::DebugUtilsMessengerEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6698,6 +6712,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDeferredOperationKHR;
using CppType = vk::DeferredOperationKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6827,6 +6842,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorPool;
using CppType = vk::DescriptorPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6954,6 +6970,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSet;
using CppType = vk::DescriptorSet;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7102,6 +7119,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSetLayout;
using CppType = vk::DescriptorSetLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7231,6 +7249,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorUpdateTemplate;
using CppType = vk::DescriptorUpdateTemplate;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7354,6 +7373,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDeviceMemory;
using CppType = vk::DeviceMemory;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7496,6 +7516,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayKHR;
using CppType = vk::DisplayKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7687,6 +7708,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayModeKHR;
using CppType = vk::DisplayModeKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7797,6 +7819,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkEvent;
using CppType = vk::Event;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -7927,6 +7950,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFence;
using CppType = vk::Fence;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8091,6 +8115,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFramebuffer;
using CppType = vk::Framebuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8217,6 +8242,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImage;
using CppType = vk::Image;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8372,6 +8398,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImageView;
using CppType = vk::ImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8498,6 +8525,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkIndirectCommandsLayoutNV;
using CppType = vk::IndirectCommandsLayoutNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8621,6 +8649,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkMicromapEXT;
using CppType = vk::MicromapEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eMicromapEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8743,6 +8772,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkOpticalFlowSessionNV;
using CppType = vk::OpticalFlowSessionNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eOpticalFlowSessionNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8872,6 +8902,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPerformanceConfigurationINTEL;
using CppType = vk::PerformanceConfigurationINTEL;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -8979,6 +9010,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineCache;
using CppType = vk::PipelineCache;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -9108,6 +9140,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipeline;
using CppType = vk::Pipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -9539,6 +9572,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineLayout;
using CppType = vk::PipelineLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -9662,6 +9696,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPrivateDataSlot;
using CppType = vk::PrivateDataSlot;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -9785,6 +9820,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueryPool;
using CppType = vk::QueryPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -9932,6 +9968,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueue;
using CppType = vk::Queue;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10073,6 +10110,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkRenderPass;
using CppType = vk::RenderPass;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10221,6 +10259,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSampler;
using CppType = vk::Sampler;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10343,6 +10382,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSamplerYcbcrConversion;
using CppType = vk::SamplerYcbcrConversion;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10466,6 +10506,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSemaphore;
using CppType = vk::Semaphore;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10596,6 +10637,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkShaderEXT;
using CppType = vk::ShaderEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10761,6 +10803,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkShaderModule;
using CppType = vk::ShaderModule;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10887,6 +10930,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSurfaceKHR;
using CppType = vk::SurfaceKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -11287,6 +11331,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSwapchainKHR;
using CppType = vk::SwapchainKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -11496,6 +11541,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkValidationCacheEXT;
using CppType = vk::ValidationCacheEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -11625,6 +11671,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkVideoSessionKHR;
using CppType = vk::VideoSessionKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -11754,6 +11801,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkVideoSessionParametersKHR;
using CppType = vk::VideoSessionParametersKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -20963,6 +21011,32 @@ namespace VULKAN_HPP_NAMESPACE
}
# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
//====================
//=== RAII Helpers ===
//====================
template <typename RAIIType>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes )
{
std::vector<typename RAIIType::CppType> cppTypes( raiiTypes.size() );
std::transform( raiiTypes.begin(), raiiTypes.end(), cppTypes.begin(), []( RAIIType const & d ) { return *d; } );
return cppTypes;
}
template <typename RAIIType, class UnaryPredicate>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes, UnaryPredicate p )
{
std::vector<typename RAIIType::CppType> cppTypes;
for ( auto const & t : raiiTypes )
{
if ( p( t ) )
{
cppTypes.push_back( *t );
}
}
return cppTypes;
}
} // namespace VULKAN_HPP_RAII_NAMESPACE
} // namespace VULKAN_HPP_NAMESPACE
#endif

View File

@ -1184,6 +1184,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkInstance;
using CppType = vk::Instance;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eInstance;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -1324,6 +1325,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPhysicalDevice;
using CppType = vk::PhysicalDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -1620,6 +1622,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDevice;
using CppType = vk::Device;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2044,6 +2047,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBuffer;
using CppType = vk::Buffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2172,6 +2176,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBufferView;
using CppType = vk::BufferView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eBufferView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2294,6 +2299,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandPool;
using CppType = vk::CommandPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2425,6 +2431,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandBuffer;
using CppType = vk::CommandBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -2959,6 +2966,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDebugUtilsMessengerEXT;
using CppType = vk::DebugUtilsMessengerEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3082,6 +3090,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorPool;
using CppType = vk::DescriptorPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3209,6 +3218,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSet;
using CppType = vk::DescriptorSet;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3343,6 +3353,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSetLayout;
using CppType = vk::DescriptorSetLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3466,6 +3477,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDeviceMemory;
using CppType = vk::DeviceMemory;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3598,6 +3610,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayKHR;
using CppType = vk::DisplayKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3746,6 +3759,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayModeKHR;
using CppType = vk::DisplayModeKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3856,6 +3870,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkEvent;
using CppType = vk::Event;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eEvent;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -3986,6 +4001,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFence;
using CppType = vk::Fence;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFence;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4150,6 +4166,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFramebuffer;
using CppType = vk::Framebuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4272,6 +4289,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImage;
using CppType = vk::Image;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImage;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4407,6 +4425,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImageView;
using CppType = vk::ImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4529,6 +4548,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineCache;
using CppType = vk::PipelineCache;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4670,6 +4690,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipeline;
using CppType = vk::Pipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -4899,6 +4920,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineLayout;
using CppType = vk::PipelineLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5022,6 +5044,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPrivateDataSlot;
using CppType = vk::PrivateDataSlot;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlot;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5145,6 +5168,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueryPool;
using CppType = vk::QueryPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5288,6 +5312,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueue;
using CppType = vk::Queue;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eQueue;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5414,6 +5439,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkRenderPass;
using CppType = vk::RenderPass;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5558,6 +5584,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSampler;
using CppType = vk::Sampler;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSampler;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5680,6 +5707,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSamplerYcbcrConversion;
using CppType = vk::SamplerYcbcrConversion;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5803,6 +5831,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSemaphore;
using CppType = vk::Semaphore;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -5930,6 +5959,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSemaphoreSciSyncPoolNV;
using CppType = vk::SemaphoreSciSyncPoolNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSemaphoreSciSyncPoolNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6054,6 +6084,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkShaderModule;
using CppType = vk::ShaderModule;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6176,6 +6207,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSurfaceKHR;
using CppType = vk::SurfaceKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -6316,6 +6348,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSwapchainKHR;
using CppType = vk::SwapchainKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType = VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::DebugReportObjectTypeEXT debugReportObjectType =
@ -10470,6 +10503,32 @@ namespace VULKAN_HPP_NAMESPACE
}
# endif /*VK_USE_PLATFORM_SCREEN_QNX*/
//====================
//=== RAII Helpers ===
//====================
template <typename RAIIType>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes )
{
std::vector<typename RAIIType::CppType> cppTypes( raiiTypes.size() );
std::transform( raiiTypes.begin(), raiiTypes.end(), cppTypes.begin(), []( RAIIType const & d ) { return *d; } );
return cppTypes;
}
template <typename RAIIType, class UnaryPredicate>
std::vector<typename RAIIType::CppType> filterCppTypes( std::vector<RAIIType> const & raiiTypes, UnaryPredicate p )
{
std::vector<typename RAIIType::CppType> cppTypes;
for ( auto const & t : raiiTypes )
{
if ( p( t ) )
{
cppTypes.push_back( *t );
}
}
return cppTypes;
}
} // namespace VULKAN_HPP_RAII_NAMESPACE
} // namespace VULKAN_HPP_NAMESPACE
#endif