mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Introduce copy constructor and assignment operator for vk::raii classes that hold handles without a destructor.
This commit is contained in:
parent
3740f14c38
commit
23c11fe38d
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
/* VULKAN_HPP_KEY_START */
|
||||
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex );
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties();
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( queueFamilyProperties );
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -44,7 +44,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex );
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex );
|
||||
|
@ -44,7 +44,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex );
|
||||
|
@ -43,7 +43,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -33,7 +33,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex );
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 64, 64 ) );
|
||||
|
||||
|
@ -42,7 +42,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 64, 64 ) );
|
||||
|
||||
|
@ -45,7 +45,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -46,7 +46,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -70,7 +70,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
if ( desiredVersion <= pdh.getProperties().apiVersion )
|
||||
{
|
||||
desiredPhysicalDevices.push_back( std::move( pdh ) );
|
||||
desiredPhysicalDevices.push_back( pdh );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 640, 640 ) );
|
||||
|
||||
|
@ -37,7 +37,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -41,7 +41,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -164,7 +164,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
vk::DebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfoEXT( {}, severityFlags, messageTypeFlags, &debugMessageFunc );
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, debugUtilsMessengerCreateInfoEXT );
|
||||
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
// get the index of the first queue family that supports graphics
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
|
@ -32,7 +32,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
uint32_t graphicsQueueFamilyIndex = vk::su::findGraphicsQueueFamilyIndex( physicalDevice.getQueueFamilyProperties() );
|
||||
vk::raii::Device device = vk::raii::su::makeDevice( physicalDevice, graphicsQueueFamilyIndex, vk::su::getDeviceExtensions() );
|
||||
|
@ -49,7 +49,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -46,7 +46,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 50, 50 ) );
|
||||
|
||||
|
@ -75,7 +75,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( vk::Format::eR8G8B8A8Unorm );
|
||||
if ( !( formatProperties.optimalTilingFeatures & vk::FormatFeatureFlagBits::eColorAttachment ) )
|
||||
|
@ -99,7 +99,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( vk::Format::eR8G8B8A8Unorm );
|
||||
if ( !( formatProperties.optimalTilingFeatures & vk::FormatFeatureFlagBits::eColorAttachment ) )
|
||||
|
@ -37,7 +37,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( vk::Format::eR8G8B8A8Unorm );
|
||||
if ( !( formatProperties.optimalTilingFeatures & vk::FormatFeatureFlagBits::eColorAttachment ) )
|
||||
|
@ -77,7 +77,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
vk::PhysicalDeviceProperties properties = physicalDevice.getProperties();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
@ -45,7 +45,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -87,7 +87,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -56,7 +56,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
// Once instance is created, need to make sure the extension is available
|
||||
extensionProperties = physicalDevice.enumerateDeviceExtensionProperties();
|
||||
|
@ -689,7 +689,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
std::vector<vk::ExtensionProperties> extensionProperties = physicalDevice.enumerateDeviceExtensionProperties();
|
||||
assert( vk::su::contains( extensionProperties, VK_KHR_SWAPCHAIN_EXTENSION_NAME ) );
|
||||
|
@ -47,7 +47,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -75,7 +75,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -37,7 +37,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::raii::su::SurfaceData surfaceData( instance, AppName, vk::Extent2D( 500, 500 ) );
|
||||
|
||||
|
@ -64,7 +64,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
#if !defined( NDEBUG )
|
||||
vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
vk::raii::PhysicalDevice physicalDevice = std::move( vk::raii::PhysicalDevices( instance ).front() );
|
||||
vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front();
|
||||
|
||||
vk::PhysicalDeviceProperties physicalDeviceProperties = physicalDevice.getProperties();
|
||||
if ( physicalDeviceProperties.limits.maxTexelBufferElements < 4 )
|
||||
|
@ -6181,6 +6181,31 @@ std::string VulkanHppGenerator::generateRAIIHandle( std::pair<std::string, Handl
|
||||
getParent += " }\n";
|
||||
}
|
||||
|
||||
std::string assignmentOperator, copyConstructor;
|
||||
if ( handle.second.destructorIt == m_commands.end() )
|
||||
{
|
||||
// allow copy constructor and assignment operator for classes without destructor
|
||||
std::string const copyConstructorTemplate =
|
||||
R"( ${handleType}( ${handleType} const & rhs ) : m_${handleName}( rhs.m_${handleName} ), m_dispatcher( rhs.m_dispatcher ) {})";
|
||||
copyConstructor += replaceWithMap( copyConstructorTemplate, { { "handleName", handleName }, { "handleType", handleType } } );
|
||||
|
||||
std::string assignmentOperatorTemplate = R"( ${handleType} & operator=( ${handleType} const & rhs )
|
||||
{
|
||||
m_${handleName} = rhs.m_${handleName};
|
||||
m_dispatcher = rhs.m_dispatcher;
|
||||
return *this;
|
||||
})";
|
||||
assignmentOperator += replaceWithMap( assignmentOperatorTemplate, { { "handleName", handleName }, { "handleType", handleType } } );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string const copyConstructorTemplate = R"( ${handleType}( ${handleType} const & ) = delete;)";
|
||||
copyConstructor += replaceWithMap( copyConstructorTemplate, { { "handleType", handleType } } );
|
||||
|
||||
std::string const assignmentOperatorTemplate = R"( ${handleType} & operator=( ${handleType} const & ) = delete;)";
|
||||
assignmentOperator += replaceWithMap( assignmentOperatorTemplate, { { "handleType", handleType } } );
|
||||
}
|
||||
|
||||
const std::string handleTemplate = R"(
|
||||
${enter} class ${handleType}
|
||||
{
|
||||
@ -6200,11 +6225,11 @@ ${singularConstructors}
|
||||
}
|
||||
|
||||
${handleType}() = delete;
|
||||
${handleType}( ${handleType} const & ) = delete;
|
||||
${copyConstructor}
|
||||
${handleType}( ${handleType} && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
: ${moveConstructorInitializerList}
|
||||
{}
|
||||
${handleType} & operator=( ${handleType} const & ) = delete;
|
||||
${assignmentOperator}
|
||||
${handleType} & operator=( ${handleType} && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( this != &rhs )
|
||||
@ -6245,7 +6270,9 @@ ${memberFunctionsDeclarations}
|
||||
${leave})";
|
||||
|
||||
str += replaceWithMap( handleTemplate,
|
||||
{ { "clearMembers", clearMembers },
|
||||
{ { "assignmentOperator", assignmentOperator },
|
||||
{ "clearMembers", clearMembers },
|
||||
{ "copyConstructor", copyConstructor },
|
||||
{ "debugReportObjectType", debugReportObjectType },
|
||||
{ "dispatcherType", dispatcherType },
|
||||
{ "enter", enter },
|
||||
@ -12750,9 +12777,8 @@ void VulkanHppGenerator::readSPIRVCapabilitiesSPIRVCapabilityEnableProperty( int
|
||||
}
|
||||
if ( attribute.first == "requires" )
|
||||
{
|
||||
std::vector<std::string>
|
||||
requires = tokenize( attribute.second, "," );
|
||||
for ( auto const & r : requires )
|
||||
std::vector<std::string> requiresAttribute = tokenize( attribute.second, "," );
|
||||
for ( auto const & r : requiresAttribute )
|
||||
{
|
||||
check( ( m_features.find( r ) != m_features.end() ) || ( m_extensions.find( r ) != m_extensions.end() ),
|
||||
xmlLine,
|
||||
@ -12799,9 +12825,8 @@ void VulkanHppGenerator::readSPIRVCapabilitiesSPIRVCapabilityEnableStruct( int x
|
||||
{
|
||||
if ( attribute.first == "requires" )
|
||||
{
|
||||
std::vector<std::string>
|
||||
requires = tokenize( attribute.second, "," );
|
||||
for ( auto const & r : requires )
|
||||
std::vector<std::string> requiresAttribute = tokenize( attribute.second, "," );
|
||||
for ( auto const & r : requiresAttribute )
|
||||
{
|
||||
check( ( m_features.find( r ) != m_features.end() ) || ( m_extensions.find( r ) != m_extensions.end() ),
|
||||
xmlLine,
|
||||
|
@ -31,7 +31,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
try
|
||||
{
|
||||
// to prevent a warning on unreferenced function vk::getDispatchLoaderStatic, use just one arbitrary vk-function
|
||||
vk::enumerateInstanceVersion();
|
||||
(void)vk::enumerateInstanceVersion();
|
||||
|
||||
// nullptr_t
|
||||
fct( nullptr );
|
||||
|
@ -2594,14 +2594,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
PhysicalDevice() = delete;
|
||||
PhysicalDevice( PhysicalDevice const & ) = delete;
|
||||
PhysicalDevice( PhysicalDevice const & rhs ) : m_physicalDevice( rhs.m_physicalDevice ), m_dispatcher( rhs.m_dispatcher ) {}
|
||||
PhysicalDevice( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
: m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) )
|
||||
, m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) )
|
||||
{
|
||||
}
|
||||
PhysicalDevice & operator=( PhysicalDevice const & ) = delete;
|
||||
PhysicalDevice & operator =( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
PhysicalDevice & operator=( PhysicalDevice const & rhs )
|
||||
{
|
||||
m_physicalDevice = rhs.m_physicalDevice;
|
||||
m_dispatcher = rhs.m_dispatcher;
|
||||
return *this;
|
||||
}
|
||||
PhysicalDevice & operator=( PhysicalDevice && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( this != &rhs )
|
||||
{
|
||||
@ -6695,15 +6700,20 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
DisplayModeKHR() = delete;
|
||||
DisplayModeKHR( DisplayModeKHR const & ) = delete;
|
||||
DisplayModeKHR( DisplayModeKHR const & rhs ) : m_displayModeKHR( rhs.m_displayModeKHR ), m_dispatcher( rhs.m_dispatcher ) {}
|
||||
DisplayModeKHR( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
: m_physicalDevice( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_physicalDevice, {} ) )
|
||||
, m_displayModeKHR( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_displayModeKHR, {} ) )
|
||||
, m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) )
|
||||
{
|
||||
}
|
||||
DisplayModeKHR & operator=( DisplayModeKHR const & ) = delete;
|
||||
DisplayModeKHR & operator =( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
DisplayModeKHR & operator=( DisplayModeKHR const & rhs )
|
||||
{
|
||||
m_displayModeKHR = rhs.m_displayModeKHR;
|
||||
m_dispatcher = rhs.m_dispatcher;
|
||||
return *this;
|
||||
}
|
||||
DisplayModeKHR & operator=( DisplayModeKHR && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( this != &rhs )
|
||||
{
|
||||
@ -8462,14 +8472,19 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
}
|
||||
|
||||
Queue() = delete;
|
||||
Queue( Queue const & ) = delete;
|
||||
Queue( Queue const & rhs ) : m_queue( rhs.m_queue ), m_dispatcher( rhs.m_dispatcher ) {}
|
||||
Queue( Queue && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
: m_queue( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_queue, {} ) )
|
||||
, m_dispatcher( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::exchange( rhs.m_dispatcher, nullptr ) )
|
||||
{
|
||||
}
|
||||
Queue & operator=( Queue const & ) = delete;
|
||||
Queue & operator =( Queue && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
Queue & operator=( Queue const & rhs )
|
||||
{
|
||||
m_queue = rhs.m_queue;
|
||||
m_dispatcher = rhs.m_dispatcher;
|
||||
return *this;
|
||||
}
|
||||
Queue & operator=( Queue && rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( this != &rhs )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user