mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Extend vk::su::createInstance to also take a vk::InstanceCreateFlagBits. (#1888)
This commit is contained in:
parent
eb1f4cfb58
commit
4557f02974
@ -749,7 +749,7 @@ namespace vk
|
|||||||
#else
|
#else
|
||||||
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
||||||
#endif
|
#endif
|
||||||
instanceCreateInfoChain = vk::su::makeInstanceCreateInfoChain( applicationInfo, enabledLayers, enabledExtensions );
|
instanceCreateInfoChain = vk::su::makeInstanceCreateInfoChain( {}, applicationInfo, enabledLayers, enabledExtensions );
|
||||||
|
|
||||||
return vk::raii::Instance( context, instanceCreateInfoChain.get<vk::InstanceCreateInfo>() );
|
return vk::raii::Instance( context, instanceCreateInfoChain.get<vk::InstanceCreateInfo>() );
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ namespace vk
|
|||||||
);
|
);
|
||||||
|
|
||||||
vk::Instance instance =
|
vk::Instance instance =
|
||||||
vk::createInstance( makeInstanceCreateInfoChain( applicationInfo, enabledLayers, enabledExtensions ).get<vk::InstanceCreateInfo>() );
|
vk::createInstance( makeInstanceCreateInfoChain( {}, applicationInfo, enabledLayers, enabledExtensions ).get<vk::InstanceCreateInfo>() );
|
||||||
|
|
||||||
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
|
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
|
||||||
// initialize function pointers for instance
|
// initialize function pointers for instance
|
||||||
@ -1039,13 +1039,14 @@ namespace vk
|
|||||||
#else
|
#else
|
||||||
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
||||||
#endif
|
#endif
|
||||||
makeInstanceCreateInfoChain( vk::ApplicationInfo const & applicationInfo,
|
makeInstanceCreateInfoChain( vk::InstanceCreateFlagBits instanceCreateFlagBits,
|
||||||
|
vk::ApplicationInfo const & applicationInfo,
|
||||||
std::vector<char const *> const & layers,
|
std::vector<char const *> const & layers,
|
||||||
std::vector<char const *> const & extensions )
|
std::vector<char const *> const & extensions )
|
||||||
{
|
{
|
||||||
#if defined( NDEBUG )
|
#if defined( NDEBUG )
|
||||||
// in non-debug mode just use the InstanceCreateInfo for instance creation
|
// in non-debug mode just use the InstanceCreateInfo for instance creation
|
||||||
vk::StructureChain<vk::InstanceCreateInfo> instanceCreateInfo( { {}, &applicationInfo, layers, extensions } );
|
vk::StructureChain<vk::InstanceCreateInfo> instanceCreateInfo( { instanceCreateFlagBits, &applicationInfo, layers, extensions } );
|
||||||
#else
|
#else
|
||||||
// in debug mode, addionally use the debugUtilsMessengerCallback in instance creation!
|
// in debug mode, addionally use the debugUtilsMessengerCallback in instance creation!
|
||||||
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags( vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
|
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags( vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
|
||||||
@ -1053,7 +1054,7 @@ namespace vk
|
|||||||
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags( vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance |
|
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags( vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance |
|
||||||
vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation );
|
vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation );
|
||||||
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT> instanceCreateInfo(
|
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT> instanceCreateInfo(
|
||||||
{ {}, &applicationInfo, layers, extensions }, { {}, severityFlags, messageTypeFlags, &vk::su::debugUtilsMessengerCallback } );
|
{ instanceCreateFlagBits, &applicationInfo, layers, extensions }, { {}, severityFlags, messageTypeFlags, &vk::su::debugUtilsMessengerCallback } );
|
||||||
#endif
|
#endif
|
||||||
return instanceCreateInfo;
|
return instanceCreateInfo;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,8 @@ namespace vk
|
|||||||
#else
|
#else
|
||||||
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
vk::StructureChain<vk::InstanceCreateInfo, vk::DebugUtilsMessengerCreateInfoEXT>
|
||||||
#endif
|
#endif
|
||||||
makeInstanceCreateInfoChain( vk::ApplicationInfo const & applicationInfo,
|
makeInstanceCreateInfoChain( vk::InstanceCreateFlagBits instanceCreateFlagBits,
|
||||||
|
vk::ApplicationInfo const & applicationInfo,
|
||||||
std::vector<char const *> const & layers,
|
std::vector<char const *> const & layers,
|
||||||
std::vector<char const *> const & extensions );
|
std::vector<char const *> const & extensions );
|
||||||
vk::Format pickDepthFormat( vk::PhysicalDevice const & physicalDevice );
|
vk::Format pickDepthFormat( vk::PhysicalDevice const & physicalDevice );
|
||||||
|
@ -83,7 +83,7 @@ vk::UniqueInstance createInstanceUnique( std::string const & appNam
|
|||||||
);
|
);
|
||||||
|
|
||||||
vk::UniqueInstance instance =
|
vk::UniqueInstance instance =
|
||||||
vk::createInstanceUnique( vk::su::makeInstanceCreateInfoChain( applicationInfo, enabledLayers, enabledExtensions ).get<vk::InstanceCreateInfo>() );
|
vk::createInstanceUnique( vk::su::makeInstanceCreateInfoChain( {}, applicationInfo, enabledLayers, enabledExtensions ).get<vk::InstanceCreateInfo>() );
|
||||||
|
|
||||||
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
|
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
|
||||||
// initialize function pointers for instance
|
// initialize function pointers for instance
|
||||||
|
Loading…
Reference in New Issue
Block a user