Merge pull request #1057 from asuessenbach/CStructureType

Introduce NativeType to get the C-type from the corresponding Cpp-type.
This commit is contained in:
Andreas Süßenbach 2021-08-31 18:37:48 +02:00 committed by GitHub
commit e0eb94e848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1469 additions and 46 deletions

View File

@ -7503,6 +7503,7 @@ ${enter} class ${className}
{
public:
using CType = Vk${className};
using NativeType = Vk${className};
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};
@ -12025,6 +12026,8 @@ std::string VulkanHppGenerator::generateStructure( std::pair<std::string, Struct
static const std::string structureTemplate = R"( struct ${structureName}
{
using NativeType = Vk${structureName};
${allowDuplicate}
${structureType}
${constructorAndSetters}
@ -12132,6 +12135,9 @@ std::string VulkanHppGenerator::generateUnion( std::pair<std::string, StructureD
str += " union " + unionName +
"\n"
" {\n"
" using NativeType = " +
structure.first +
";\n"
"#if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )\n"
" " +
unionName + "( VULKAN_HPP_NAMESPACE::" + unionName +

View File

@ -1238,6 +1238,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSurfaceKHR;
using NativeType = VkSurfaceKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eSurfaceKHR;
@ -1334,6 +1335,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDebugReportCallbackEXT;
using NativeType = VkDebugReportCallbackEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDebugReportCallbackEXT;
@ -1432,6 +1434,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDebugUtilsMessengerEXT;
using NativeType = VkDebugUtilsMessengerEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDebugUtilsMessengerEXT;
@ -1523,6 +1526,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayKHR;
using NativeType = VkDisplayKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDisplayKHR;
@ -1619,6 +1623,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSwapchainKHR;
using NativeType = VkSwapchainKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eSwapchainKHR;
@ -1716,6 +1721,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSemaphore;
using NativeType = VkSemaphore;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eSemaphore;
@ -1811,6 +1817,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFence;
using NativeType = VkFence;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eFence;
@ -1904,6 +1911,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPerformanceConfigurationINTEL;
using NativeType = VkPerformanceConfigurationINTEL;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePerformanceConfigurationINTEL;
@ -1997,6 +2005,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueryPool;
using NativeType = VkQueryPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eQueryPool;
@ -2092,6 +2101,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBuffer;
using NativeType = VkBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eBuffer;
@ -2186,6 +2196,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineLayout;
using NativeType = VkPipelineLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePipelineLayout;
@ -2283,6 +2294,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSet;
using NativeType = VkDescriptorSet;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSet;
@ -2380,6 +2392,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImageView;
using NativeType = VkImageView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eImageView;
@ -2475,6 +2488,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipeline;
using NativeType = VkPipeline;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePipeline;
@ -2569,6 +2583,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkImage;
using NativeType = VkImage;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eImage;
@ -2662,6 +2677,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkAccelerationStructureNV;
using NativeType = VkAccelerationStructureNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureNV;
@ -2760,6 +2776,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorUpdateTemplate;
using NativeType = VkDescriptorUpdateTemplate;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorUpdateTemplate;
@ -2859,6 +2876,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkEvent;
using NativeType = VkEvent;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eEvent;
@ -2952,6 +2970,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkAccelerationStructureKHR;
using NativeType = VkAccelerationStructureKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eAccelerationStructureKHR;
@ -3050,6 +3069,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandBuffer;
using NativeType = VkCommandBuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eCommandBuffer;
@ -4753,6 +4773,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDeviceMemory;
using NativeType = VkDeviceMemory;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDeviceMemory;
@ -4851,6 +4872,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkVideoSessionKHR;
using NativeType = VkVideoSessionKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionKHR;
@ -4942,6 +4964,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDeferredOperationKHR;
using NativeType = VkDeferredOperationKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDeferredOperationKHR;
@ -5032,6 +5055,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkBufferView;
using NativeType = VkBufferView;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eBufferView;
@ -5128,6 +5152,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCommandPool;
using NativeType = VkCommandPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eCommandPool;
@ -5225,6 +5250,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPipelineCache;
using NativeType = VkPipelineCache;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePipelineCache;
@ -5322,6 +5348,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCuFunctionNVX;
using NativeType = VkCuFunctionNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eCuFunctionNVX;
@ -5419,6 +5446,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkCuModuleNVX;
using NativeType = VkCuModuleNVX;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eCuModuleNVX;
@ -5516,6 +5544,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorPool;
using NativeType = VkDescriptorPool;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorPool;
@ -5613,6 +5642,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDescriptorSetLayout;
using NativeType = VkDescriptorSetLayout;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDescriptorSetLayout;
@ -5710,6 +5740,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkFramebuffer;
using NativeType = VkFramebuffer;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eFramebuffer;
@ -5807,6 +5838,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkIndirectCommandsLayoutNV;
using NativeType = VkIndirectCommandsLayoutNV;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eIndirectCommandsLayoutNV;
@ -5898,6 +5930,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPrivateDataSlotEXT;
using NativeType = VkPrivateDataSlotEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePrivateDataSlotEXT;
@ -5988,6 +6021,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkRenderPass;
using NativeType = VkRenderPass;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eRenderPass;
@ -6084,6 +6118,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSampler;
using NativeType = VkSampler;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eSampler;
@ -6178,6 +6213,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkSamplerYcbcrConversion;
using NativeType = VkSamplerYcbcrConversion;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eSamplerYcbcrConversion;
@ -6277,6 +6313,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkShaderModule;
using NativeType = VkShaderModule;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eShaderModule;
@ -6374,6 +6411,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkValidationCacheEXT;
using NativeType = VkValidationCacheEXT;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eValidationCacheEXT;
@ -6472,6 +6510,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkVideoSessionParametersKHR;
using NativeType = VkVideoSessionParametersKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eVideoSessionParametersKHR;
@ -6564,6 +6603,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkQueue;
using NativeType = VkQueue;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eQueue;
@ -7052,6 +7092,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDevice;
using NativeType = VkDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDevice;
@ -11438,6 +11479,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkDisplayModeKHR;
using NativeType = VkDisplayModeKHR;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eDisplayModeKHR;
@ -11545,6 +11587,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkPhysicalDevice;
using NativeType = VkPhysicalDevice;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::ePhysicalDevice;
@ -13065,6 +13108,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using CType = VkInstance;
using NativeType = VkInstance;
static VULKAN_HPP_CONST_OR_CONSTEXPR VULKAN_HPP_NAMESPACE::ObjectType objectType =
VULKAN_HPP_NAMESPACE::ObjectType::eInstance;

File diff suppressed because it is too large Load Diff