From 21596cd8dff8766fe7827217c1f9c204bfb223d8 Mon Sep 17 00:00:00 2001 From: Mark Lobodzinski Date: Mon, 13 Feb 2017 10:15:53 -0700 Subject: [PATCH] header: Update to Vulkan 1.0.40 fixed: - generators for latex math changes updated: - include/vulkan/vk_platform.h - include/vulkan/vulkan.h - scripts/generator.py - scripts/lvl_genvk.py - scripts/reg.py - scripts/vk.xml - include/vulkan/vulkan.hpp - layers/tests json files - loader SOVERSION Change-Id: Id7d6f9dee73888877f2e7528f5701871f54ece79 --- include/vulkan/vk_platform.h | 2 +- include/vulkan/vulkan.h | 10 +- include/vulkan/vulkan.hpp | 7281 +++++++++++++--------- layers/linux/VkLayer_core_validation.json | 2 +- layers/linux/VkLayer_image.json | 2 +- layers/linux/VkLayer_object_tracker.json | 2 +- layers/linux/VkLayer_parameter_validation.json | 2 +- layers/linux/VkLayer_swapchain.json | 2 +- layers/linux/VkLayer_threading.json | 2 +- layers/linux/VkLayer_unique_objects.json | 2 +- layers/windows/VkLayer_core_validation.json | 2 +- layers/windows/VkLayer_image.json | 2 +- layers/windows/VkLayer_object_tracker.json | 2 +- layers/windows/VkLayer_parameter_validation.json | 2 +- layers/windows/VkLayer_swapchain.json | 2 +- layers/windows/VkLayer_threading.json | 2 +- layers/windows/VkLayer_unique_objects.json | 2 +- loader/CMakeLists.txt | 2 +- scripts/generator.py | 2 +- scripts/helper_file_generator.py | 8 +- scripts/lvl_genvk.py | 15 +- scripts/parameter_validation_generator.py | 8 +- scripts/reg.py | 2 +- scripts/vk.xml | 83 +- 24 files changed, 4452 insertions(+), 2989 deletions(-) diff --git a/include/vulkan/vk_platform.h b/include/vulkan/vk_platform.h index 0fa62ee..72f8049 100644 --- a/include/vulkan/vk_platform.h +++ b/include/vulkan/vk_platform.h @@ -2,7 +2,7 @@ // File: vk_platform.h // /* -** Copyright (c) 2014-2015 The Khronos Group Inc. +** Copyright (c) 2014-2017 The Khronos Group Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 81dedf7..0b04d41 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 39 +#define VK_HEADER_VERSION 40 #define VK_NULL_HANDLE 0 @@ -3905,7 +3905,7 @@ VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR( #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) -#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 4 +#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 5 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" #define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT @@ -4060,7 +4060,7 @@ typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { #define VK_EXT_debug_marker 1 -#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3 +#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 #define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" typedef struct VkDebugMarkerObjectNameInfoEXT { @@ -4752,8 +4752,8 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT( #endif #define VK_EXT_swapchain_colorspace 1 -#define VK_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 1 -#define VK_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" +#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 1 +#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" #ifdef __cplusplus diff --git a/include/vulkan/vulkan.hpp b/include/vulkan/vulkan.hpp index dd34651..5084d2a 100644 --- a/include/vulkan/vulkan.hpp +++ b/include/vulkan/vulkan.hpp @@ -41,12 +41,14 @@ # include #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -static_assert( VK_HEADER_VERSION == 39 , "Wrong VK_HEADER_VERSION!" ); +static_assert( VK_HEADER_VERSION == 40 , "Wrong VK_HEADER_VERSION!" ); // 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) -#define VULKAN_HPP_TYPESAFE_CONVERSION 1 +# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION ) +# define VULKAN_HPP_TYPESAFE_CONVERSION +# endif #endif #if !defined(VULKAN_HPP_HAS_UNRESTRICTED_UNIONS) @@ -317,6 +319,115 @@ namespace vk }; #endif + +#if defined(VULKAN_HPP_NO_EXCEPTIONS) && !defined(VULKAN_HPP_NO_SMART_HANDLE) +# define VULKAN_HPP_NO_SMART_HANDLE +#endif + +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + class UniqueHandle + { + public: + explicit UniqueHandle( Type const& value = Type(), Deleter const& deleter = Deleter() ) + : m_value( value ) + , m_deleter( deleter ) + {} + + UniqueHandle( UniqueHandle const& ) = delete; + + UniqueHandle( UniqueHandle && other ) + : m_value( other.release() ) + , m_deleter( std::move( other.m_deleter ) ) + {} + + ~UniqueHandle() + { + destroy(); + } + + UniqueHandle & operator=( UniqueHandle const& ) = delete; + + UniqueHandle & operator=( UniqueHandle && other ) + { + reset( other.release() ); + m_deleter = std::move( other.m_deleter ); + return *this; + } + + explicit operator bool() const + { + return m_value.operator bool(); + } + + Type const* operator->() const + { + return &m_value; + } + + Type const& operator*() const + { + return m_value; + } + + Type get() const + { + return m_value; + } + + Deleter & getDeleter() + { + return m_deleter; + } + + Deleter const& getDeleter() const + { + return m_deleter; + } + + void reset( Type const& value = Type() ) + { + if ( m_value != value ) + { + destroy(); + m_value = value; + } + } + + Type release() + { + Type value = m_value; + m_value = nullptr; + return value; + } + + void swap( UniqueHandle & rhs ) + { + std::swap(m_value, rhs.m_value); + std::swap(m_deleter, rhs.m_deleter); + } + + private: + void destroy() + { + if ( m_value ) + { + m_deleter( m_value ); + } + } + + private: + Type m_value; + Deleter m_deleter; + }; + + template + VULKAN_HPP_INLINE void swap( UniqueHandle & lhs, UniqueHandle & rhs ) + { + lhs.swap( rhs ); + } +#endif + enum class Result { eSuccess = VK_SUCCESS, @@ -981,6 +1092,10 @@ namespace vk : m_deviceMemory(VK_NULL_HANDLE) {} + DeviceMemory( nullptr_t ) + : m_deviceMemory(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DeviceMemory(VkDeviceMemory deviceMemory) : m_deviceMemory(deviceMemory) @@ -993,6 +1108,12 @@ namespace vk } #endif + DeviceMemory& operator=( nullptr_t ) + { + m_deviceMemory = VK_NULL_HANDLE; + return *this; + } + bool operator==(DeviceMemory const &rhs) const { return m_deviceMemory == rhs.m_deviceMemory; @@ -1038,6 +1159,10 @@ namespace vk : m_commandPool(VK_NULL_HANDLE) {} + CommandPool( nullptr_t ) + : m_commandPool(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) CommandPool(VkCommandPool commandPool) : m_commandPool(commandPool) @@ -1050,6 +1175,12 @@ namespace vk } #endif + CommandPool& operator=( nullptr_t ) + { + m_commandPool = VK_NULL_HANDLE; + return *this; + } + bool operator==(CommandPool const &rhs) const { return m_commandPool == rhs.m_commandPool; @@ -1095,6 +1226,10 @@ namespace vk : m_buffer(VK_NULL_HANDLE) {} + Buffer( nullptr_t ) + : m_buffer(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Buffer(VkBuffer buffer) : m_buffer(buffer) @@ -1107,6 +1242,12 @@ namespace vk } #endif + Buffer& operator=( nullptr_t ) + { + m_buffer = VK_NULL_HANDLE; + return *this; + } + bool operator==(Buffer const &rhs) const { return m_buffer == rhs.m_buffer; @@ -1152,6 +1293,10 @@ namespace vk : m_bufferView(VK_NULL_HANDLE) {} + BufferView( nullptr_t ) + : m_bufferView(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) BufferView(VkBufferView bufferView) : m_bufferView(bufferView) @@ -1164,6 +1309,12 @@ namespace vk } #endif + BufferView& operator=( nullptr_t ) + { + m_bufferView = VK_NULL_HANDLE; + return *this; + } + bool operator==(BufferView const &rhs) const { return m_bufferView == rhs.m_bufferView; @@ -1209,6 +1360,10 @@ namespace vk : m_image(VK_NULL_HANDLE) {} + Image( nullptr_t ) + : m_image(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Image(VkImage image) : m_image(image) @@ -1221,6 +1376,12 @@ namespace vk } #endif + Image& operator=( nullptr_t ) + { + m_image = VK_NULL_HANDLE; + return *this; + } + bool operator==(Image const &rhs) const { return m_image == rhs.m_image; @@ -1266,6 +1427,10 @@ namespace vk : m_imageView(VK_NULL_HANDLE) {} + ImageView( nullptr_t ) + : m_imageView(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) ImageView(VkImageView imageView) : m_imageView(imageView) @@ -1278,6 +1443,12 @@ namespace vk } #endif + ImageView& operator=( nullptr_t ) + { + m_imageView = VK_NULL_HANDLE; + return *this; + } + bool operator==(ImageView const &rhs) const { return m_imageView == rhs.m_imageView; @@ -1323,6 +1494,10 @@ namespace vk : m_shaderModule(VK_NULL_HANDLE) {} + ShaderModule( nullptr_t ) + : m_shaderModule(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) ShaderModule(VkShaderModule shaderModule) : m_shaderModule(shaderModule) @@ -1335,6 +1510,12 @@ namespace vk } #endif + ShaderModule& operator=( nullptr_t ) + { + m_shaderModule = VK_NULL_HANDLE; + return *this; + } + bool operator==(ShaderModule const &rhs) const { return m_shaderModule == rhs.m_shaderModule; @@ -1380,6 +1561,10 @@ namespace vk : m_pipeline(VK_NULL_HANDLE) {} + Pipeline( nullptr_t ) + : m_pipeline(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Pipeline(VkPipeline pipeline) : m_pipeline(pipeline) @@ -1392,6 +1577,12 @@ namespace vk } #endif + Pipeline& operator=( nullptr_t ) + { + m_pipeline = VK_NULL_HANDLE; + return *this; + } + bool operator==(Pipeline const &rhs) const { return m_pipeline == rhs.m_pipeline; @@ -1437,6 +1628,10 @@ namespace vk : m_pipelineLayout(VK_NULL_HANDLE) {} + PipelineLayout( nullptr_t ) + : m_pipelineLayout(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) PipelineLayout(VkPipelineLayout pipelineLayout) : m_pipelineLayout(pipelineLayout) @@ -1449,6 +1644,12 @@ namespace vk } #endif + PipelineLayout& operator=( nullptr_t ) + { + m_pipelineLayout = VK_NULL_HANDLE; + return *this; + } + bool operator==(PipelineLayout const &rhs) const { return m_pipelineLayout == rhs.m_pipelineLayout; @@ -1494,6 +1695,10 @@ namespace vk : m_sampler(VK_NULL_HANDLE) {} + Sampler( nullptr_t ) + : m_sampler(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Sampler(VkSampler sampler) : m_sampler(sampler) @@ -1506,6 +1711,12 @@ namespace vk } #endif + Sampler& operator=( nullptr_t ) + { + m_sampler = VK_NULL_HANDLE; + return *this; + } + bool operator==(Sampler const &rhs) const { return m_sampler == rhs.m_sampler; @@ -1551,6 +1762,10 @@ namespace vk : m_descriptorSet(VK_NULL_HANDLE) {} + DescriptorSet( nullptr_t ) + : m_descriptorSet(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DescriptorSet(VkDescriptorSet descriptorSet) : m_descriptorSet(descriptorSet) @@ -1563,6 +1778,12 @@ namespace vk } #endif + DescriptorSet& operator=( nullptr_t ) + { + m_descriptorSet = VK_NULL_HANDLE; + return *this; + } + bool operator==(DescriptorSet const &rhs) const { return m_descriptorSet == rhs.m_descriptorSet; @@ -1608,6 +1829,10 @@ namespace vk : m_descriptorSetLayout(VK_NULL_HANDLE) {} + DescriptorSetLayout( nullptr_t ) + : m_descriptorSetLayout(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DescriptorSetLayout(VkDescriptorSetLayout descriptorSetLayout) : m_descriptorSetLayout(descriptorSetLayout) @@ -1620,6 +1845,12 @@ namespace vk } #endif + DescriptorSetLayout& operator=( nullptr_t ) + { + m_descriptorSetLayout = VK_NULL_HANDLE; + return *this; + } + bool operator==(DescriptorSetLayout const &rhs) const { return m_descriptorSetLayout == rhs.m_descriptorSetLayout; @@ -1665,6 +1896,10 @@ namespace vk : m_descriptorPool(VK_NULL_HANDLE) {} + DescriptorPool( nullptr_t ) + : m_descriptorPool(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DescriptorPool(VkDescriptorPool descriptorPool) : m_descriptorPool(descriptorPool) @@ -1677,6 +1912,12 @@ namespace vk } #endif + DescriptorPool& operator=( nullptr_t ) + { + m_descriptorPool = VK_NULL_HANDLE; + return *this; + } + bool operator==(DescriptorPool const &rhs) const { return m_descriptorPool == rhs.m_descriptorPool; @@ -1722,6 +1963,10 @@ namespace vk : m_fence(VK_NULL_HANDLE) {} + Fence( nullptr_t ) + : m_fence(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Fence(VkFence fence) : m_fence(fence) @@ -1734,6 +1979,12 @@ namespace vk } #endif + Fence& operator=( nullptr_t ) + { + m_fence = VK_NULL_HANDLE; + return *this; + } + bool operator==(Fence const &rhs) const { return m_fence == rhs.m_fence; @@ -1779,6 +2030,10 @@ namespace vk : m_semaphore(VK_NULL_HANDLE) {} + Semaphore( nullptr_t ) + : m_semaphore(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Semaphore(VkSemaphore semaphore) : m_semaphore(semaphore) @@ -1791,6 +2046,12 @@ namespace vk } #endif + Semaphore& operator=( nullptr_t ) + { + m_semaphore = VK_NULL_HANDLE; + return *this; + } + bool operator==(Semaphore const &rhs) const { return m_semaphore == rhs.m_semaphore; @@ -1836,6 +2097,10 @@ namespace vk : m_event(VK_NULL_HANDLE) {} + Event( nullptr_t ) + : m_event(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Event(VkEvent event) : m_event(event) @@ -1848,6 +2113,12 @@ namespace vk } #endif + Event& operator=( nullptr_t ) + { + m_event = VK_NULL_HANDLE; + return *this; + } + bool operator==(Event const &rhs) const { return m_event == rhs.m_event; @@ -1893,6 +2164,10 @@ namespace vk : m_queryPool(VK_NULL_HANDLE) {} + QueryPool( nullptr_t ) + : m_queryPool(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) QueryPool(VkQueryPool queryPool) : m_queryPool(queryPool) @@ -1905,6 +2180,12 @@ namespace vk } #endif + QueryPool& operator=( nullptr_t ) + { + m_queryPool = VK_NULL_HANDLE; + return *this; + } + bool operator==(QueryPool const &rhs) const { return m_queryPool == rhs.m_queryPool; @@ -1950,6 +2231,10 @@ namespace vk : m_framebuffer(VK_NULL_HANDLE) {} + Framebuffer( nullptr_t ) + : m_framebuffer(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Framebuffer(VkFramebuffer framebuffer) : m_framebuffer(framebuffer) @@ -1962,6 +2247,12 @@ namespace vk } #endif + Framebuffer& operator=( nullptr_t ) + { + m_framebuffer = VK_NULL_HANDLE; + return *this; + } + bool operator==(Framebuffer const &rhs) const { return m_framebuffer == rhs.m_framebuffer; @@ -2007,6 +2298,10 @@ namespace vk : m_renderPass(VK_NULL_HANDLE) {} + RenderPass( nullptr_t ) + : m_renderPass(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) RenderPass(VkRenderPass renderPass) : m_renderPass(renderPass) @@ -2019,6 +2314,12 @@ namespace vk } #endif + RenderPass& operator=( nullptr_t ) + { + m_renderPass = VK_NULL_HANDLE; + return *this; + } + bool operator==(RenderPass const &rhs) const { return m_renderPass == rhs.m_renderPass; @@ -2064,6 +2365,10 @@ namespace vk : m_pipelineCache(VK_NULL_HANDLE) {} + PipelineCache( nullptr_t ) + : m_pipelineCache(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) PipelineCache(VkPipelineCache pipelineCache) : m_pipelineCache(pipelineCache) @@ -2076,6 +2381,12 @@ namespace vk } #endif + PipelineCache& operator=( nullptr_t ) + { + m_pipelineCache = VK_NULL_HANDLE; + return *this; + } + bool operator==(PipelineCache const &rhs) const { return m_pipelineCache == rhs.m_pipelineCache; @@ -2121,6 +2432,10 @@ namespace vk : m_objectTableNVX(VK_NULL_HANDLE) {} + ObjectTableNVX( nullptr_t ) + : m_objectTableNVX(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) ObjectTableNVX(VkObjectTableNVX objectTableNVX) : m_objectTableNVX(objectTableNVX) @@ -2133,6 +2448,12 @@ namespace vk } #endif + ObjectTableNVX& operator=( nullptr_t ) + { + m_objectTableNVX = VK_NULL_HANDLE; + return *this; + } + bool operator==(ObjectTableNVX const &rhs) const { return m_objectTableNVX == rhs.m_objectTableNVX; @@ -2178,6 +2499,10 @@ namespace vk : m_indirectCommandsLayoutNVX(VK_NULL_HANDLE) {} + IndirectCommandsLayoutNVX( nullptr_t ) + : m_indirectCommandsLayoutNVX(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) IndirectCommandsLayoutNVX(VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX) : m_indirectCommandsLayoutNVX(indirectCommandsLayoutNVX) @@ -2190,6 +2515,12 @@ namespace vk } #endif + IndirectCommandsLayoutNVX& operator=( nullptr_t ) + { + m_indirectCommandsLayoutNVX = VK_NULL_HANDLE; + return *this; + } + bool operator==(IndirectCommandsLayoutNVX const &rhs) const { return m_indirectCommandsLayoutNVX == rhs.m_indirectCommandsLayoutNVX; @@ -2235,6 +2566,10 @@ namespace vk : m_displayKHR(VK_NULL_HANDLE) {} + DisplayKHR( nullptr_t ) + : m_displayKHR(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DisplayKHR(VkDisplayKHR displayKHR) : m_displayKHR(displayKHR) @@ -2247,6 +2582,12 @@ namespace vk } #endif + DisplayKHR& operator=( nullptr_t ) + { + m_displayKHR = VK_NULL_HANDLE; + return *this; + } + bool operator==(DisplayKHR const &rhs) const { return m_displayKHR == rhs.m_displayKHR; @@ -2292,6 +2633,10 @@ namespace vk : m_displayModeKHR(VK_NULL_HANDLE) {} + DisplayModeKHR( nullptr_t ) + : m_displayModeKHR(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DisplayModeKHR(VkDisplayModeKHR displayModeKHR) : m_displayModeKHR(displayModeKHR) @@ -2304,6 +2649,12 @@ namespace vk } #endif + DisplayModeKHR& operator=( nullptr_t ) + { + m_displayModeKHR = VK_NULL_HANDLE; + return *this; + } + bool operator==(DisplayModeKHR const &rhs) const { return m_displayModeKHR == rhs.m_displayModeKHR; @@ -2349,6 +2700,10 @@ namespace vk : m_surfaceKHR(VK_NULL_HANDLE) {} + SurfaceKHR( nullptr_t ) + : m_surfaceKHR(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) SurfaceKHR(VkSurfaceKHR surfaceKHR) : m_surfaceKHR(surfaceKHR) @@ -2361,6 +2716,12 @@ namespace vk } #endif + SurfaceKHR& operator=( nullptr_t ) + { + m_surfaceKHR = VK_NULL_HANDLE; + return *this; + } + bool operator==(SurfaceKHR const &rhs) const { return m_surfaceKHR == rhs.m_surfaceKHR; @@ -2406,6 +2767,10 @@ namespace vk : m_swapchainKHR(VK_NULL_HANDLE) {} + SwapchainKHR( nullptr_t ) + : m_swapchainKHR(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) SwapchainKHR(VkSwapchainKHR swapchainKHR) : m_swapchainKHR(swapchainKHR) @@ -2418,6 +2783,12 @@ namespace vk } #endif + SwapchainKHR& operator=( nullptr_t ) + { + m_swapchainKHR = VK_NULL_HANDLE; + return *this; + } + bool operator==(SwapchainKHR const &rhs) const { return m_swapchainKHR == rhs.m_swapchainKHR; @@ -2463,6 +2834,10 @@ namespace vk : m_debugReportCallbackEXT(VK_NULL_HANDLE) {} + DebugReportCallbackEXT( nullptr_t ) + : m_debugReportCallbackEXT(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) DebugReportCallbackEXT(VkDebugReportCallbackEXT debugReportCallbackEXT) : m_debugReportCallbackEXT(debugReportCallbackEXT) @@ -2475,6 +2850,12 @@ namespace vk } #endif + DebugReportCallbackEXT& operator=( nullptr_t ) + { + m_debugReportCallbackEXT = VK_NULL_HANDLE; + return *this; + } + bool operator==(DebugReportCallbackEXT const &rhs) const { return m_debugReportCallbackEXT == rhs.m_debugReportCallbackEXT; @@ -5599,12 +5980,6 @@ namespace vk return *this; } - ApplicationInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ApplicationInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -5698,13 +6073,7 @@ namespace vk return *this; } - DeviceQueueCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - - DeviceQueueCreateInfo& setPNext( const void* pNext_ ) + DeviceQueueCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; return *this; @@ -5793,12 +6162,6 @@ namespace vk return *this; } - DeviceCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DeviceCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -5918,12 +6281,6 @@ namespace vk return *this; } - InstanceCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - InstanceCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6023,12 +6380,6 @@ namespace vk return *this; } - MemoryAllocateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - MemoryAllocateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6097,12 +6448,6 @@ namespace vk return *this; } - MappedMemoryRange& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - MappedMemoryRange& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6184,12 +6529,6 @@ namespace vk return *this; } - WriteDescriptorSet& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - WriteDescriptorSet& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6310,12 +6649,6 @@ namespace vk return *this; } - CopyDescriptorSet& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CopyDescriptorSet& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6426,12 +6759,6 @@ namespace vk return *this; } - BufferViewCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - BufferViewCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6524,12 +6851,6 @@ namespace vk return *this; } - ShaderModuleCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ShaderModuleCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6606,12 +6927,6 @@ namespace vk return *this; } - DescriptorSetAllocateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DescriptorSetAllocateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6690,12 +7005,6 @@ namespace vk return *this; } - PipelineVertexInputStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineVertexInputStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6788,12 +7097,6 @@ namespace vk return *this; } - PipelineInputAssemblyStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineInputAssemblyStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6869,12 +7172,6 @@ namespace vk return *this; } - PipelineTessellationStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineTessellationStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -6945,12 +7242,6 @@ namespace vk return *this; } - PipelineViewportStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineViewportStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7051,12 +7342,6 @@ namespace vk return *this; } - PipelineRasterizationStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineRasterizationStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7204,12 +7489,6 @@ namespace vk return *this; } - PipelineDepthStencilStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineDepthStencilStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7342,12 +7621,6 @@ namespace vk return *this; } - PipelineCacheCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineCacheCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7437,12 +7710,6 @@ namespace vk return *this; } - SamplerCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - SamplerCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7623,12 +7890,6 @@ namespace vk return *this; } - CommandBufferAllocateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CommandBufferAllocateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7707,12 +7968,6 @@ namespace vk return *this; } - RenderPassBeginInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - RenderPassBeginInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7803,12 +8058,6 @@ namespace vk return *this; } - EventCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - EventCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7867,12 +8116,6 @@ namespace vk return *this; } - SemaphoreCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - SemaphoreCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -7937,12 +8180,6 @@ namespace vk return *this; } - FramebufferCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - FramebufferCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8050,12 +8287,6 @@ namespace vk return *this; } - DisplayModeCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DisplayModeCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8124,12 +8355,6 @@ namespace vk return *this; } - DisplayPresentInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DisplayPresentInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8206,12 +8431,6 @@ namespace vk return *this; } - AndroidSurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - AndroidSurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8282,12 +8501,6 @@ namespace vk return *this; } - MirSurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - MirSurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8365,12 +8578,6 @@ namespace vk return *this; } - ViSurfaceCreateInfoNN& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ViSurfaceCreateInfoNN& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8441,12 +8648,6 @@ namespace vk return *this; } - WaylandSurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - WaylandSurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8525,12 +8726,6 @@ namespace vk return *this; } - Win32SurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - Win32SurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8609,12 +8804,6 @@ namespace vk return *this; } - XlibSurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - XlibSurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8693,12 +8882,6 @@ namespace vk return *this; } - XcbSurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - XcbSurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8775,12 +8958,6 @@ namespace vk return *this; } - DebugMarkerMarkerInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DebugMarkerMarkerInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8847,12 +9024,6 @@ namespace vk return *this; } - DedicatedAllocationImageCreateInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DedicatedAllocationImageCreateInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8911,12 +9082,6 @@ namespace vk return *this; } - DedicatedAllocationBufferCreateInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DedicatedAllocationBufferCreateInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -8976,12 +9141,6 @@ namespace vk return *this; } - DedicatedAllocationMemoryAllocateInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DedicatedAllocationMemoryAllocateInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9050,12 +9209,6 @@ namespace vk return *this; } - ExportMemoryWin32HandleInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ExportMemoryWin32HandleInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9130,12 +9283,6 @@ namespace vk return *this; } - Win32KeyedMutexAcquireReleaseInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - Win32KeyedMutexAcquireReleaseInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9243,12 +9390,6 @@ namespace vk return *this; } - DeviceGeneratedCommandsFeaturesNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DeviceGeneratedCommandsFeaturesNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9311,12 +9452,6 @@ namespace vk return *this; } - DeviceGeneratedCommandsLimitsNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DeviceGeneratedCommandsLimitsNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9409,12 +9544,6 @@ namespace vk return *this; } - CmdReserveSpaceForCommandsInfoNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CmdReserveSpaceForCommandsInfoNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9489,12 +9618,6 @@ namespace vk return *this; } - PhysicalDeviceFeatures2KHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PhysicalDeviceFeatures2KHR& setPNext( void* pNext_ ) { pNext = pNext_; @@ -9564,12 +9687,6 @@ namespace vk return *this; } - PresentInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PresentInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -9683,12 +9800,6 @@ namespace vk return *this; } - PipelineDynamicStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineDynamicStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10045,12 +10156,6 @@ namespace vk return *this; } - MemoryBarrier& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - MemoryBarrier& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10123,12 +10228,6 @@ namespace vk return *this; } - BufferMemoryBarrier& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - BufferMemoryBarrier& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10300,12 +10399,6 @@ namespace vk return *this; } - BufferCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - BufferCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10517,12 +10610,6 @@ namespace vk return *this; } - DescriptorSetLayoutCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DescriptorSetLayoutCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10601,12 +10688,6 @@ namespace vk return *this; } - PipelineShaderStageCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineShaderStageCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10762,12 +10843,6 @@ namespace vk return *this; } - PipelineLayoutCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineLayoutCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -10924,12 +10999,6 @@ namespace vk return *this; } - PhysicalDeviceImageFormatInfo2KHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PhysicalDeviceImageFormatInfo2KHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11051,12 +11120,6 @@ namespace vk return *this; } - ComputePipelineCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ComputePipelineCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11286,12 +11349,6 @@ namespace vk return *this; } - PipelineColorBlendStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineColorBlendStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11415,12 +11472,6 @@ namespace vk return *this; } - FenceCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - FenceCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11692,12 +11743,6 @@ namespace vk return *this; } - CommandBufferInheritanceInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CommandBufferInheritanceInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11797,12 +11842,6 @@ namespace vk return *this; } - CommandBufferBeginInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CommandBufferBeginInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -11872,12 +11911,6 @@ namespace vk return *this; } - QueryPoolCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - QueryPoolCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -12205,12 +12238,6 @@ namespace vk return *this; } - ImageMemoryBarrier& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ImageMemoryBarrier& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -12330,12 +12357,6 @@ namespace vk return *this; } - ImageViewCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ImageViewCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -13292,12 +13313,6 @@ namespace vk return *this; } - BindSparseInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - BindSparseInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -13497,12 +13512,6 @@ namespace vk return *this; } - CommandPoolCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CommandPoolCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -13691,12 +13700,6 @@ namespace vk return *this; } - ImageCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ImageCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -13857,12 +13860,6 @@ namespace vk return *this; } - PipelineMultisampleStateCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineMultisampleStateCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -13985,15 +13982,9 @@ namespace vk return *this; } - GraphicsPipelineCreateInfo& setSType( StructureType sType_ ) + GraphicsPipelineCreateInfo& setPNext( const void* pNext_ ) { - sType = sType_; - return *this; - } - - GraphicsPipelineCreateInfo& setPNext( const void* pNext_ ) - { - pNext = pNext_; + pNext = pNext_; return *this; } @@ -14505,12 +14496,6 @@ namespace vk return *this; } - PhysicalDeviceSparseImageFormatInfo2KHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PhysicalDeviceSparseImageFormatInfo2KHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -14796,12 +14781,6 @@ namespace vk return *this; } - DescriptorPoolCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DescriptorPoolCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15012,12 +14991,6 @@ namespace vk return *this; } - RenderPassCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - RenderPassCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15338,12 +15311,6 @@ namespace vk return *this; } - DisplaySurfaceCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DisplaySurfaceCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15512,12 +15479,6 @@ namespace vk return *this; } - SwapchainCreateInfoKHR& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - SwapchainCreateInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15727,12 +15688,6 @@ namespace vk return *this; } - DebugReportCallbackCreateInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DebugReportCallbackCreateInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15846,12 +15801,6 @@ namespace vk return *this; } - DebugMarkerObjectNameInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DebugMarkerObjectNameInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -15930,12 +15879,6 @@ namespace vk return *this; } - DebugMarkerObjectTagInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DebugMarkerObjectTagInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16038,12 +15981,6 @@ namespace vk return *this; } - PipelineRasterizationStateRasterizationOrderAMD& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - PipelineRasterizationStateRasterizationOrderAMD& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16130,12 +16067,6 @@ namespace vk return *this; } - ExternalMemoryImageCreateInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ExternalMemoryImageCreateInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16194,12 +16125,6 @@ namespace vk return *this; } - ExportMemoryAllocateInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ExportMemoryAllocateInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16260,12 +16185,6 @@ namespace vk return *this; } - ImportMemoryWin32HandleInfoNV& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ImportMemoryWin32HandleInfoNV& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16393,12 +16312,6 @@ namespace vk return *this; } - ValidationFlagsEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ValidationFlagsEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16665,12 +16578,6 @@ namespace vk return *this; } - IndirectCommandsLayoutCreateInfoNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - IndirectCommandsLayoutCreateInfoNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -16770,12 +16677,6 @@ namespace vk return *this; } - ObjectTableCreateInfoNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - ObjectTableCreateInfoNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -17355,12 +17256,6 @@ namespace vk return *this; } - SwapchainCounterCreateInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - SwapchainCounterCreateInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -17426,12 +17321,6 @@ namespace vk return *this; } - DisplayPowerInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DisplayPowerInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -17495,12 +17384,6 @@ namespace vk return *this; } - DeviceEventInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DeviceEventInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -17564,12 +17447,6 @@ namespace vk return *this; } - DisplayEventInfoEXT& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DisplayEventInfoEXT& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -17608,14 +17485,19 @@ namespace vk }; static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" ); + Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateInstanceLayerProperties(); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) { return static_cast( vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceLayerProperties() + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties() { std::vector properties; uint32_t propertyCount; @@ -17635,14 +17517,19 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr ); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) { return static_cast( vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr ) + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName ) { std::vector properties; uint32_t propertyCount; @@ -17672,6 +17559,10 @@ namespace vk : m_commandBuffer(VK_NULL_HANDLE) {} + CommandBuffer( nullptr_t ) + : m_commandBuffer(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) CommandBuffer(VkCommandBuffer commandBuffer) : m_commandBuffer(commandBuffer) @@ -17684,6 +17575,12 @@ namespace vk } #endif + CommandBuffer& operator=( nullptr_t ) + { + m_commandBuffer = VK_NULL_HANDLE; + return *this; + } + bool operator==(CommandBuffer const &rhs) const { return m_commandBuffer == rhs.m_commandBuffer; @@ -17699,754 +17596,663 @@ namespace vk return m_commandBuffer < rhs.m_commandBuffer; } - Result begin( const CommandBufferBeginInfo* pBeginInfo ) const - { - return static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); - } - + Result begin( const CommandBufferBeginInfo* pBeginInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo ) const - { - Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); - return createResultValue( result, "vk::CommandBuffer::begin" ); - } + ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result end( ) const - { - return static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type end() const - { - Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - return createResultValue( result, "vk::CommandBuffer::end" ); - } + Result end() const; +#else + ResultValueType::type end() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result reset( CommandBufferResetFlags flags ) const - { - return static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result reset( CommandBufferResetFlags flags ) const; +#else + ResultValueType::type reset( CommandBufferResetFlags flags ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const; + + void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type reset( CommandBufferResetFlags flags ) const - { - Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - return createResultValue( result, "vk::CommandBuffer::reset" ); - } + void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const - { - vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const - { - vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); - } + void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); - } + void setLineWidth( float lineWidth ) const; + + void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const; + + void setBlendConstants( const float blendConstants[4] ) const; + + void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const; + + void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const; + + void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const; + void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const; + + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); - } + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); - } + void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const; + void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); - } + void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setLineWidth( float lineWidth ) const - { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const; + + void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const; + + void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + + void dispatch( uint32_t x, uint32_t y, uint32_t z ) const; + + void dispatchIndirect( Buffer buffer, DeviceSize offset ) const; + + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setLineWidth( float lineWidth ) const - { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const - { - vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const - { - vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setBlendConstants( const float blendConstants[4] ) const - { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setBlendConstants( const float blendConstants[4] ) const - { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const - { - vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const - { - vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); - } + template + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const - { - vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const; + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const - { - vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); - } + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const - { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const - { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); - } + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const - { - vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const - { - vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); - } + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); - } + void setEvent( Event event, PipelineStageFlags stageMask ) const; + void resetEvent( Event event, PipelineStageFlags stageMask ) const; + + void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); - } + void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const - { - vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const - { - vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); - } + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const - { - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); - } + void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const; + + void endQuery( QueryPool queryPool, uint32_t query ) const; + + void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const; + + void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const; + void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const; + + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( buffers.size() == offsets.size() ); -#else - if ( buffers.size() != offsets.size() ) - { - throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); - } + template + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const - { - vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const - { - vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); - } + void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const - { - vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void nextSubpass( SubpassContents contents ) const; + void endRenderPass() const; + + void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const - { - vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } + void executeCommands( ArrayProxy commandBuffers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } + DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void debugMarkerEndEXT() const; + void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } + DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void dispatch( uint32_t x, uint32_t y, uint32_t z ) const - { - vkCmdDispatch( m_commandBuffer, x, y, z ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; + + void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; + void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void dispatch( uint32_t x, uint32_t y, uint32_t z ) const - { - vkCmdDispatch( m_commandBuffer, x, y, z ); - } + void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void dispatchIndirect( Buffer buffer, DeviceSize offset ) const - { - vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void dispatchIndirect( Buffer buffer, DeviceSize offset ) const - { - vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); - } + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkCommandBuffer() const { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + return m_commandBuffer; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const + explicit operator bool() const { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + return m_commandBuffer != VK_NULL_HANDLE; } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const + bool operator!() const { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + return m_commandBuffer == VK_NULL_HANDLE; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); - } + private: + VkCommandBuffer m_commandBuffer; + }; + static_assert( sizeof( CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result CommandBuffer::begin( const CommandBufferBeginInfo* pBeginInfo ) const + { + return static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); - } + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo ) const + { + Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); + return createResultValue( result, "vk::CommandBuffer::begin" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result CommandBuffer::end() const + { + return static_cast( vkEndCommandBuffer( m_commandBuffer ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::end() const + { + Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); + return createResultValue( result, "vk::CommandBuffer::end" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + return static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + return createResultValue( result, "vk::CommandBuffer::reset" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const + { + vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy viewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); - } - + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy scissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const - { - vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth ) const + { + vkCmdSetLineWidth( m_commandBuffer, lineWidth ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const - { - vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const + { + vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); + } - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const + { + vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const + { + vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); + } - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const + { + vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const + { + vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); + } - void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const + { + vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); + } + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const + { + vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const + { + vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const - { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const + { + vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const + { + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( buffers.size() == offsets.size() ); +#else + if ( buffers.size() != offsets.size() ) { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } +#endif // VULKAN_HPP_NO_EXCEPTIONS + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const + { + vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const + { + vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); + } -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } - void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const - { - vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t x, uint32_t y, uint32_t z ) const + { + vkCmdDispatch( m_commandBuffer, x, y, z ); + } + VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset ) const + { + vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); + } + + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const - { - vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const + { + vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + { + vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const - { - vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const + { + vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const - { - vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const + { + vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endQuery( QueryPool queryPool, uint32_t query ) const - { - vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const + { + vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endQuery( QueryPool queryPool, uint32_t query ) const - { - vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + { + vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const - { - vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const - { - vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const - { - vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const + { + vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const - { - vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); - } + template + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const + { + vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const - { - vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const + { + vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); + } + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + { + vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const - { - vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const + { + vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); - } - + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const + { + vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const + { + vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void nextSubpass( SubpassContents contents ) const - { - vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const + { + vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void nextSubpass( SubpassContents contents ) const - { - vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + { + vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endRenderPass( ) const - { - vkCmdEndRenderPass( m_commandBuffer ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + { + vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endRenderPass() const - { - vkCmdEndRenderPass( m_commandBuffer ); - } + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const + { + vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + { + vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void executeCommands( ArrayProxy commandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const + { + vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const + { + vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query ) const + { + vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); + } -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerEndEXT( ) const - { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const + { + vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); + } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerEndEXT() const - { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const + { + vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); + } - void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const + { + vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const + { + vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; - } + template + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const + { + vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const + { + vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const + { + vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents ) const + { + vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::endRenderPass() const + { + vkCmdEndRenderPass( m_commandBuffer ); + } + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + { + vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy commandBuffers ) const + { + vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); - } + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerBeginEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + return markerInfo; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT() const + { + vkCmdDebugMarkerEndEXT( m_commandBuffer ); + } + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); - } + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerInsertEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + return markerInfo; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) - explicit -#endif - operator VkCommandBuffer() const - { - return m_commandBuffer; - } - - explicit operator bool() const - { - return m_commandBuffer != VK_NULL_HANDLE; - } + VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } - bool operator!() const - { - return m_commandBuffer == VK_NULL_HANDLE; - } + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } - private: - VkCommandBuffer m_commandBuffer; - }; - static_assert( sizeof( CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const + { + vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const + { + vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct SubmitInfo { SubmitInfo( uint32_t waitSemaphoreCount_ = 0, const Semaphore* pWaitSemaphores_ = nullptr, const PipelineStageFlags* pWaitDstStageMask_ = nullptr, uint32_t commandBufferCount_ = 0, const CommandBuffer* pCommandBuffers_ = nullptr, uint32_t signalSemaphoreCount_ = 0, const Semaphore* pSignalSemaphores_ = nullptr ) @@ -18473,12 +18279,6 @@ namespace vk return *this; } - SubmitInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - SubmitInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -18572,6 +18372,10 @@ namespace vk : m_queue(VK_NULL_HANDLE) {} + Queue( nullptr_t ) + : m_queue(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Queue(VkQueue queue) : m_queue(queue) @@ -18584,6 +18388,12 @@ namespace vk } #endif + Queue& operator=( nullptr_t ) + { + m_queue = VK_NULL_HANDLE; + return *this; + } + bool operator==(Queue const &rhs) const { return m_queue == rhs.m_queue; @@ -18599,58 +18409,25 @@ namespace vk return m_queue < rhs.m_queue; } - Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const - { - return static_cast( vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); - } - + Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type submit( ArrayProxy submits, Fence fence ) const - { - Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::submit" ); - } + ResultValueType::type submit( ArrayProxy submits, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast( vkQueueWaitIdle( m_queue ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type waitIdle() const - { - Result result = static_cast( vkQueueWaitIdle( m_queue ) ); - return createResultValue( result, "vk::Queue::waitIdle" ); - } + Result waitIdle() const; +#else + ResultValueType::type waitIdle() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const - { - return static_cast( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); - } - + Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence ) const - { - Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::bindSparse" ); - } + ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result presentKHR( const PresentInfoKHR* pPresentInfo ) const - { - return static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); - } - + Result presentKHR( const PresentInfoKHR* pPresentInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result presentKHR( const PresentInfoKHR & presentInfo ) const - { - Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); - return createResultValue( result, "vk::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); - } + Result presentKHR( const PresentInfoKHR & presentInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -18676,6 +18453,105 @@ namespace vk }; static_assert( sizeof( Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const + { + return static_cast( vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Queue::submit( ArrayProxy submits, Fence fence ) const + { + Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + return createResultValue( result, "vk::Queue::submit" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Queue::waitIdle() const + { + return static_cast( vkQueueWaitIdle( m_queue ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Queue::waitIdle() const + { + Result result = static_cast( vkQueueWaitIdle( m_queue ) ); + return createResultValue( result, "vk::Queue::waitIdle" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const + { + return static_cast( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Queue::bindSparse( ArrayProxy bindInfo, Fence fence ) const + { + Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); + return createResultValue( result, "vk::Queue::bindSparse" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR* pPresentInfo ) const + { + return static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo ) const + { + Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); + return createResultValue( result, "vk::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class BufferDeleter; + using UniqueBuffer = UniqueHandle; + class BufferViewDeleter; + using UniqueBufferView = UniqueHandle; + class CommandBufferDeleter; + using UniqueCommandBuffer = UniqueHandle; + class CommandPoolDeleter; + using UniqueCommandPool = UniqueHandle; + class DescriptorPoolDeleter; + using UniqueDescriptorPool = UniqueHandle; + class DescriptorSetDeleter; + using UniqueDescriptorSet = UniqueHandle; + class DescriptorSetLayoutDeleter; + using UniqueDescriptorSetLayout = UniqueHandle; + class DeviceMemoryDeleter; + using UniqueDeviceMemory = UniqueHandle; + class EventDeleter; + using UniqueEvent = UniqueHandle; + class FenceDeleter; + using UniqueFence = UniqueHandle; + class FramebufferDeleter; + using UniqueFramebuffer = UniqueHandle; + class ImageDeleter; + using UniqueImage = UniqueHandle; + class ImageViewDeleter; + using UniqueImageView = UniqueHandle; + class IndirectCommandsLayoutNVXDeleter; + using UniqueIndirectCommandsLayoutNVX = UniqueHandle; + class ObjectTableNVXDeleter; + using UniqueObjectTableNVX = UniqueHandle; + class PipelineDeleter; + using UniquePipeline = UniqueHandle; + class PipelineCacheDeleter; + using UniquePipelineCache = UniqueHandle; + class PipelineLayoutDeleter; + using UniquePipelineLayout = UniqueHandle; + class QueryPoolDeleter; + using UniqueQueryPool = UniqueHandle; + class RenderPassDeleter; + using UniqueRenderPass = UniqueHandle; + class SamplerDeleter; + using UniqueSampler = UniqueHandle; + class SemaphoreDeleter; + using UniqueSemaphore = UniqueHandle; + class ShaderModuleDeleter; + using UniqueShaderModule = UniqueHandle; + class SwapchainKHRDeleter; + using UniqueSwapchainKHR = UniqueHandle; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + class Device { public: @@ -18683,6 +18559,10 @@ namespace vk : m_device(VK_NULL_HANDLE) {} + Device( nullptr_t ) + : m_device(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Device(VkDevice device) : m_device(device) @@ -18695,6 +18575,12 @@ namespace vk } #endif + Device& operator=( nullptr_t ) + { + m_device = VK_NULL_HANDLE; + return *this; + } + bool operator==(Device const &rhs) const { return m_device == rhs.m_device; @@ -18710,2348 +18596,3852 @@ namespace vk return m_device < rhs.m_device; } - PFN_vkVoidFunction getProcAddr( const char* pName ) const - { - return vkGetDeviceProcAddr( m_device, pName ); - } - + PFN_vkVoidFunction getProcAddr( const char* pName ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const - { - return vkGetDeviceProcAddr( m_device, name.c_str() ); - } + PFN_vkVoidFunction getProcAddr( const std::string & name ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroy( const AllocationCallbacks* pAllocator ) const - { - vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); - } - + void destroy( const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const - { - vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator)) ); - } + void destroy( Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const - { - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); - } - + void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const - { - Queue queue; - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); - return queue; - } + Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast( vkDeviceWaitIdle( m_device ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result waitIdle() const; +#else + ResultValueType::type waitIdle() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type waitIdle() const - { - Result result = static_cast( vkDeviceWaitIdle( m_device ) ); - return createResultValue( result, "vk::Device::waitIdle" ); - } + ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const - { - return static_cast( vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); - } + void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const - { - DeviceMemory memory; - Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &memory ) ) ); - return createResultValue( result, memory, "vk::Device::allocateMemory" ); - } + ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const - { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); - } + void unmapMemory( DeviceMemory memory ) const; + Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const - { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator)) ); - } + ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const - { - return static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const - { - void* pData; - Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); - return createResultValue( result, pData, "vk::Device::mapMemory" ); - } + ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void unmapMemory( DeviceMemory memory ) const - { - vkUnmapMemory( m_device, static_cast( memory ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + DeviceSize getMemoryCommitment( DeviceMemory memory ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void unmapMemory( DeviceMemory memory ) const - { - vkUnmapMemory( m_device, static_cast( memory ) ); - } + MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges ) const - { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); - } + MemoryRequirements getImageMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const - { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); - } + template > + std::vector getImageSparseMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const - { - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); - } - + Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DeviceSize getMemoryCommitment( DeviceMemory memory ) const - { - DeviceSize committedMemoryInBytes; - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); - return committedMemoryInBytes; - } + ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const - { - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); - } + void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyFence( Fence fence, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result resetFences( uint32_t fenceCount, const Fence* pFences ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const - { - MemoryRequirements memoryRequirements; - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); - return memoryRequirements; - } + ResultValueType::type resetFences( ArrayProxy fences ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const - { - return static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getFenceStatus( Fence fence ) const; +#else + Result getFenceStatus( Fence fence ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindBufferMemory" ); - } + Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const - { - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); - } - + Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getImageMemoryRequirements( Image image ) const - { - MemoryRequirements memoryRequirements; - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); - return memoryRequirements; - } + ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - return static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindImageMemory" ); - } + void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const - { - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); - } - + Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getImageSparseMemoryRequirements( Image image ) const - { - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - return sparseMemoryRequirements; - } + ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - + void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Fence fence; - Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::createFence" ); - } + void destroyEvent( Event event, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const - { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFence( Fence fence, Optional allocator = nullptr ) const - { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator)) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result getEventStatus( Event event ) const; +#else + Result getEventStatus( Event event ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result resetFences( uint32_t fenceCount, const Fence* pFences ) const - { - return static_cast( vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetFences( ArrayProxy fences ) const - { - Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); - return createResultValue( result, "vk::Device::resetFences" ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result setEvent( Event event ) const; +#else + ResultValueType::type setEvent( Event event ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getFenceStatus( Fence fence ) const - { - return static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result resetEvent( Event event ) const; +#else + ResultValueType::type resetEvent( Event event ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getFenceStatus( Fence fence ) const - { - Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); - } + ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const - { - return static_cast( vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); - } - + void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const - { - Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); - return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); - } + void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const - { - return static_cast( vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); - } - + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Semaphore semaphore; - Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &semaphore ) ) ); - return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); - } + template + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const - { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); - } + Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const - { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const - { - return static_cast( vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); - } + Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Event event; - Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &event ) ) ); - return createResultValue( result, event, "vk::Device::createEvent" ); - } + void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const - { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); - } + Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyEvent( Event event, Optional allocator = nullptr ) const - { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyImage( Image image, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getEventStatus( Event event ) const - { - return static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getEventStatus( Event event ) const - { - Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); - } + ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result setEvent( Event event ) const - { - return static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type setEvent( Event event ) const - { - Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::setEvent" ); - } + ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetEvent( Event event ) const - { - return static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetEvent( Event event ) const - { - Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::resetEvent" ); - } + ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const - { - return static_cast( vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); - } + void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const - { - QueryPool queryPool; - Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &queryPool ) ) ); - return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); - } + template > + typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); - } + Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const - { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator)) ); - } + template > + typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template > + std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const - { - return static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); - } + Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template > + std::vector createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const - { - Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); - } + void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const - { - return static_cast( vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); - } + Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Buffer buffer; - Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &buffer ) ) ); - return createResultValue( result, buffer, "vk::Device::createBuffer" ); - } + void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); - } + Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const - { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator)) ); - } + void destroySampler( Sampler sampler, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const - { - return static_cast( vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); - } + Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const - { - BufferView view; - Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "vk::Device::createBufferView" ); - } + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); - } + Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const - { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const - { - return static_cast( vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const; +#else + ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Image image; - Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &image ) ) ); - return createResultValue( result, image, "vk::Device::createImage" ); - } + template > + typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template > + std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const - { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); - } - + Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImage( Image image, Optional allocator = nullptr ) const - { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator)) ); - } + ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const - { - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); - } + void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const - { - SubresourceLayout layout; - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); - return layout; - } + ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const - { - return static_cast( vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); - } + void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const - { - ImageView view; - Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "vk::Device::createImageView" ); - } + ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const - { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); - } + void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const - { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator)) ); - } + Extent2D getRenderAreaGranularity( RenderPass renderPass ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const - { - return static_cast( vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); - } + Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const - { - ShaderModule shaderModule; - Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &shaderModule ) ) ); - return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); - } + void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const - { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; +#else + ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const - { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator)) ); - } + template > + typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template > + std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const - { - return static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); - } - + void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineCache pipelineCache; - Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineCache ) ) ); - return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); - } + void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); - } + Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template > + std::vector createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const - { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator)) ); - } + ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const - { - return static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); - } + void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache ) const - { - std::vector data; - size_t dataSize; - Result result; - do - { - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); - if ( ( result == Result::eSuccess ) && dataSize ) - { - data.resize( dataSize ); - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( dataSize <= data.size() ); - data.resize( dataSize ); - return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); - } + template > + typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const - { - return static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); - } + Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const - { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); - return createResultValue( result, "vk::Device::mergePipelineCaches" ); - } + ResultValueType::type debugMarkerSetObjectNameEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const - { - return static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); - } + Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type debugMarkerSetObjectTagEXT() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); - } + ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Pipeline pipeline; - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); - return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); - } + Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const - { - return static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); - } + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); - } + ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Pipeline pipeline; - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); - return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); - } + void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); - } + Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const - { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator)) ); - } + ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const - { - return static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); - } + void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const; + Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineLayout pipelineLayout; - Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineLayout ) ) ); - return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); - } + ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); - } - + Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const - { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator)) ); - } + ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const - { - return static_cast( vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); - } + Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Sampler sampler; - Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &sampler ) ) ); - return createResultValue( result, sampler, "vk::Device::createSampler" ); - } + ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkDevice() const { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + return m_device; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySampler( Sampler sampler, Optional allocator = nullptr ) const + explicit operator bool() const { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator)) ); + return m_device != VK_NULL_HANDLE; } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + bool operator!() const { - return static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); + return m_device == VK_NULL_HANDLE; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const - { - DescriptorSetLayout setLayout; - Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &setLayout ) ) ); - return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + VkDevice m_device; + }; + static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); - } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class BufferDeleter + { + public: + BufferDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const + void operator()( Buffer buffer ) { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator)) ); + m_device.destroyBuffer( buffer, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const - { - return static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const - { - DescriptorPool descriptorPool; - Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &descriptorPool ) ) ); - return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class BufferViewDeleter + { + public: + BufferViewDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const + void operator()( BufferView bufferView ) { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + m_device.destroyBufferView( bufferView, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const - { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator)) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const - { - return static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class CommandBufferDeleter + { + public: + CommandBufferDeleter( Device device = Device(), CommandPool commandPool = CommandPool() ) + : m_device( device ) + , m_commandPool( commandPool ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const + void operator()( CommandBuffer commandBuffer ) { - Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetDescriptorPool" ); + m_device.freeCommandBuffers( m_commandPool, commandBuffer ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const - { - return static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); - } + private: + Device m_device; + CommandPool m_commandPool; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const - { - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class CommandPoolDeleter + { + public: + CommandPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const + void operator()( CommandPool commandPool ) { - return static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + m_device.destroyCommandPool( commandPool, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const - { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, "vk::Device::freeDescriptorSets" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); - } + class DescriptorPoolDeleter + { + public: + DescriptorPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const + void operator()( DescriptorPool descriptorPool ) { - vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); + m_device.destroyDescriptorPool( descriptorPool, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const - { - return static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Framebuffer framebuffer; - Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &framebuffer ) ) ); - return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class DescriptorSetDeleter + { + public: + DescriptorSetDeleter( Device device = Device(), DescriptorPool descriptorPool = DescriptorPool() ) + : m_device( device ) + , m_descriptorPool( descriptorPool ) + {} - void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const + void operator()( DescriptorSet descriptorSet ) { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const - { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator)) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + DescriptorPool m_descriptorPool; + }; - Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const - { - return static_cast( vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); - } + class DescriptorSetLayoutDeleter + { + public: + DescriptorSetLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const + void operator()( DescriptorSetLayout descriptorSetLayout ) { - RenderPass renderPass; - Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &renderPass ) ) ); - return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); + m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const - { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const - { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator)) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class DeviceMemoryDeleter + { + public: + DeviceMemoryDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const + void operator()( DeviceMemory deviceMemory ) { - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); + m_device.freeMemory( deviceMemory, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Extent2D getRenderAreaGranularity( RenderPass renderPass ) const - { - Extent2D granularity; - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); - return granularity; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const - { - return static_cast( vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); - } + class EventDeleter + { + public: + EventDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const + void operator()( Event event ) { - CommandPool commandPool; - Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &commandPool ) ) ); - return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); + m_device.destroyEvent( event, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const - { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator)) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class FenceDeleter + { + public: + FenceDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + void operator()( Fence fence ) { - return static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + m_device.destroyFence( fence, m_allocator ); } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const - { - Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetCommandPool" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const - { - return static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); - } + class FramebufferDeleter + { + public: + FramebufferDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const + void operator()( Framebuffer framebuffer ) { - std::vector commandBuffers( allocateInfo.commandBufferCount ); - Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); - return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); + m_device.destroyFramebuffer( framebuffer, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class ImageDeleter + { + public: + ImageDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const + void operator()( Image image ) { - return static_cast( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); + m_device.destroyImage( image, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector swapchains( createInfos.size() ); - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); - return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); - } + private: + Device m_device; + Optional m_allocator; + }; - ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class ImageViewDeleter + { + public: + ImageViewDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const + void operator()( ImageView imageView ) { - return static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); + m_device.destroyImageView( imageView, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const - { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); - } + class IndirectCommandsLayoutNVXDeleter + { + public: + IndirectCommandsLayoutNVXDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const + void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator)) ); + m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const - { - return static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const - { - std::vector swapchainImages; - uint32_t swapchainImageCount; - Result result; - do - { - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( swapchainImageCount <= swapchainImages.size() ); - swapchainImages.resize( swapchainImageCount ); - return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class ObjectTableNVXDeleter + { + public: + ObjectTableNVXDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const + void operator()( ObjectTableNVX objectTableNVX ) { - return static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); + m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const - { - uint32_t imageIndex; - Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); - return createResultValue( result, imageIndex, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const - { - return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); - } + class PipelineDeleter + { + public: + PipelineDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectNameEXT() const + void operator()( Pipeline pipeline ) { - DebugMarkerObjectNameInfoEXT nameInfo; - Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); - return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); + m_device.destroyPipeline( pipeline, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const - { - return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectTagEXT() const - { - DebugMarkerObjectTagInfoEXT tagInfo; - Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); - return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class PipelineCacheDeleter + { + public: + PipelineCacheDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const + void operator()( PipelineCache pipelineCache ) { - return static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); + m_device.destroyPipelineCache( pipelineCache, m_allocator ); } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const - { - HANDLE handle; - Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const - { - return static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); - } + class PipelineLayoutDeleter + { + public: + PipelineLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const + void operator()( PipelineLayout pipelineLayout ) { - IndirectCommandsLayoutNVX indirectCommandsLayout; - Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &indirectCommandsLayout ) ) ); - return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); + m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); - } + private: + Device m_device; + Optional m_allocator; + }; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator)) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + class QueryPoolDeleter + { + public: + QueryPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const + void operator()( QueryPool queryPool ) { - return static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); + m_device.destroyQueryPool( queryPool, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const - { - ObjectTableNVX objectTable; - Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &objectTable ) ) ); - return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + private: + Device m_device; + Optional m_allocator; + }; - void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const - { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); - } + class RenderPassDeleter + { + public: + RenderPassDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr ) const + void operator()( RenderPass renderPass ) { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator)) ); + m_device.destroyRenderPass( renderPass, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + private: + Device m_device; + Optional m_allocator; + }; + + class SamplerDeleter + { + public: + SamplerDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Sampler sampler ) { - return static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); + m_device.destroySampler( sampler, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( pObjectTableEntries.size() == objectIndices.size() ); -#else - if ( pObjectTableEntries.size() != objectIndices.size() ) - { - throw std::logic_error( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::registerObjectsNVX" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const - { - return static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( objectEntryTypes.size() == objectIndices.size() ); -#else - if ( objectEntryTypes.size() != objectIndices.size() ) - { - throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const - { - vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags = CommandPoolTrimFlagsKHR() ) const - { - vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const - { - return static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const - { - Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); - return createResultValue( result, "vk::Device::displayPowerControlEXT" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerEventEXT" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const - { - return static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const - { - uint64_t counterValue; - Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); - return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) - explicit -#endif - operator VkDevice() const - { - return m_device; - } + private: + Device m_device; + Optional m_allocator; + }; - explicit operator bool() const - { - return m_device != VK_NULL_HANDLE; - } + class SemaphoreDeleter + { + public: + SemaphoreDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - bool operator!() const + void operator()( Semaphore semaphore ) { - return m_device == VK_NULL_HANDLE; + m_device.destroySemaphore( semaphore, m_allocator ); } private: - VkDevice m_device; + Device m_device; + Optional m_allocator; }; - static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); - class PhysicalDevice + class ShaderModuleDeleter { public: - PhysicalDevice() - : m_physicalDevice(VK_NULL_HANDLE) - {} - -#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) - PhysicalDevice(VkPhysicalDevice physicalDevice) - : m_physicalDevice(physicalDevice) + ShaderModuleDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) {} - PhysicalDevice& operator=(VkPhysicalDevice physicalDevice) + void operator()( ShaderModule shaderModule ) { - m_physicalDevice = physicalDevice; - return *this; + m_device.destroyShaderModule( shaderModule, m_allocator ); } -#endif - bool operator==(PhysicalDevice const &rhs) const - { - return m_physicalDevice == rhs.m_physicalDevice; - } + private: + Device m_device; + Optional m_allocator; + }; - bool operator!=(PhysicalDevice const &rhs) const - { - return m_physicalDevice != rhs.m_physicalDevice; - } + class SwapchainKHRDeleter + { + public: + SwapchainKHRDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} - bool operator<(PhysicalDevice const &rhs) const + void operator()( SwapchainKHR swapchainKHR ) { - return m_physicalDevice < rhs.m_physicalDevice; + m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); } - void getProperties( PhysicalDeviceProperties* pProperties ) const - { - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); - } + private: + Device m_device; + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName ) const + { + return vkGetDeviceProcAddr( m_device, pName ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties getProperties() const - { - PhysicalDeviceProperties properties; - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); - return properties; - } + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name ) const + { + return vkGetDeviceProcAddr( m_device, name.c_str() ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const - { - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - + VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + VULKAN_HPP_INLINE void Device::destroy( Optional allocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - + VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const + { + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties getMemoryProperties() const - { - PhysicalDeviceMemoryProperties memoryProperties; - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - return memoryProperties; - } + VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + { + Queue queue; + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); + return queue; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures( PhysicalDeviceFeatures* pFeatures ) const - { - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::waitIdle() const + { + return static_cast( vkDeviceWaitIdle( m_device ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::waitIdle() const + { + Result result = static_cast( vkDeviceWaitIdle( m_device ) ); + return createResultValue( result, "vk::Device::waitIdle" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const + { + return static_cast( vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures getFeatures() const - { - PhysicalDeviceFeatures features; - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); - return features; - } + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + { + DeviceMemory memory; + Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &memory ) ) ); + return createResultValue( result, memory, "vk::Device::allocateMemory" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + { + DeviceMemoryDeleter deleter( *this, allocator ); + return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const + { + vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties getFormatProperties( Format format ) const - { - FormatProperties formatProperties; - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - return formatProperties; - } + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional allocator ) const + { + vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); - } - + VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const + { + return static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const - { - ImageFormatProperties imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties" ); - } + VULKAN_HPP_INLINE ResultValueType::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags ) const + { + void* pData; + Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); + return createResultValue( result, pData, "vk::Device::mapMemory" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const - { - return static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); - } + VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory ) const + { + vkUnmapMemory( m_device, static_cast( memory ) ); + } + VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + { + return static_cast( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const - { - Device device; - Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &device ) ) ); - return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); - } + VULKAN_HPP_INLINE ResultValueType::type Device::flushMappedMemoryRanges( ArrayProxy memoryRanges ) const + { + Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const - { - return static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + { + return static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceLayerProperties() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); - } + VULKAN_HPP_INLINE ResultValueType::type Device::invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const + { + Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const - { - return static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const + { + vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr ) const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); - } + VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory ) const + { + DeviceSize committedMemoryInBytes; + vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); + return committedMemoryInBytes; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const - { - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); - } - + VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const + { + vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const - { - std::vector properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); - return properties; - } + VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer ) const + { + MemoryRequirements memoryRequirements; + vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); + return memoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const - { - return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, "vk::Device::bindBufferMemory" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const + { + vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPropertiesKHR() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); - } + VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image ) const + { + MemoryRequirements memoryRequirements; + vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); + return memoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const - { - return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, "vk::Device::bindImageMemory" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const + { + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlanePropertiesKHR() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - } + template + VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( Image image ) const + { + std::vector sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); + return sparseMemoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const - { - return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); - } + VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast( vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createFence( const FenceCreateInfo & createInfo, Optional allocator ) const + { + Fence fence; + Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::createFence" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const + { + FenceDeleter deleter( *this, allocator ); + return UniqueFence( createFence( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const + { + vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional allocator ) const + { + vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences ) const + { + return static_cast( vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::resetFences( ArrayProxy fences ) const + { + Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); + return createResultValue( result, "vk::Device::resetFences" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + { + return static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + { + Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); + return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const + { + return static_cast( vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const + { + Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); + return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const + { + return static_cast( vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + { + Semaphore semaphore; + Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &semaphore ) ) ); + return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + { + SemaphoreDeleter deleter( *this, allocator ); + return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const + { + vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional allocator ) const + { + vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const + { + return static_cast( vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createEvent( const EventCreateInfo & createInfo, Optional allocator ) const + { + Event event; + Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &event ) ) ); + return createResultValue( result, event, "vk::Device::createEvent" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueEvent Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator ) const + { + EventDeleter deleter( *this, allocator ); + return UniqueEvent( createEvent( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const + { + vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional allocator ) const + { + vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + return static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::setEvent( Event event ) const + { + return static_cast( vkSetEvent( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::setEvent( Event event ) const + { + Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::setEvent" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetEvent( Event event ) const + { + return static_cast( vkResetEvent( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetEvent( Event event ) const + { + Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::resetEvent" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const + { + return static_cast( vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + { + QueryPool queryPool; + Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &queryPool ) ) ); + return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + { + QueryPoolDeleter deleter( *this, allocator ); + return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional allocator ) const + { + vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const + { + return static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const + { + Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const + { + return static_cast( vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional allocator ) const + { + Buffer buffer; + Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &buffer ) ) ); + return createResultValue( result, buffer, "vk::Device::createBuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const + { + BufferDeleter deleter( *this, allocator ); + return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const + { + vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional allocator ) const + { + vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const + { + return static_cast( vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator ) const + { + BufferView view; + Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, "vk::Device::createBufferView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBufferView Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator ) const + { + BufferViewDeleter deleter( *this, allocator ); + return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const + { + vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional allocator ) const + { + vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const + { + return static_cast( vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createImage( const ImageCreateInfo & createInfo, Optional allocator ) const + { + Image image; + Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &image ) ) ); + return createResultValue( result, image, "vk::Device::createImage" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const + { + ImageDeleter deleter( *this, allocator ); + return UniqueImage( createImage( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator ) const + { + vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional allocator ) const + { + vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const + { + vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const + { + SubresourceLayout layout; + vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); + return layout; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const + { + return static_cast( vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional allocator ) const + { + ImageView view; + Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, "vk::Device::createImageView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const + { + ImageViewDeleter deleter( *this, allocator ); + return UniqueImageView( createImageView( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const + { + vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional allocator ) const + { + vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const + { + return static_cast( vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + { + ShaderModule shaderModule; + Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &shaderModule ) ) ); + return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueShaderModule Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + { + ShaderModuleDeleter deleter( *this, allocator ); + return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const + { + vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional allocator ) const + { + vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const + { + return static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + { + PipelineCache pipelineCache; + Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineCache ) ) ); + return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineCache Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + { + PipelineCacheDeleter deleter( *this, allocator ); + return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional allocator ) const + { + vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + { + return static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( PipelineCache pipelineCache ) const + { + std::vector data; + size_t dataSize; + Result result; + do { - std::vector displays; - uint32_t displayCount; - Result result; - do + result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && dataSize ) { - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( displayCount <= displays.size() ); - displays.resize( displayCount ); - return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + data.resize( dataSize ); + result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( dataSize <= data.size() ); + data.resize( dataSize ); + return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const + { + return static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const + { + Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); + return createResultValue( result, "vk::Device::mergePipelineCaches" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + { + return static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + std::vector pipelines( createInfos.size() ); + Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + { + Pipeline pipeline; + Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); + return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); + std::vector uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) + { + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); + } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + { + return static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + std::vector pipelines( createInfos.size() ); + Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + { + Pipeline pipeline; + Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); + return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); + std::vector uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) + { + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional allocator ) const + { + vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const + { + return static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + { + PipelineLayout pipelineLayout; + Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineLayout ) ) ); + return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + { + PipelineLayoutDeleter deleter( *this, allocator ); + return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator ) const + { + vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const + { + return static_cast( vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional allocator ) const + { + Sampler sampler; + Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &sampler ) ) ); + return createResultValue( result, sampler, "vk::Device::createSampler" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const + { + SamplerDeleter deleter( *this, allocator ); + return UniqueSampler( createSampler( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const + { + vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional allocator ) const + { + vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + { + return static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + { + DescriptorSetLayout setLayout; + Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &setLayout ) ) ); + return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + { + DescriptorSetLayoutDeleter deleter( *this, allocator ); + return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator ) const + { + vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const + { + return static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + { + DescriptorPool descriptorPool; + Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &descriptorPool ) ) ); + return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + { + DescriptorPoolDeleter deleter( *this, allocator ); + return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator ) const + { + vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + return static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::resetDescriptorPool" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const + { + return static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const + { + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const + { + DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); + std::vector descriptorSets = allocateDescriptorSets( allocateInfo ); + std::vector uniqueDescriptorSets; + uniqueDescriptorSets.reserve( descriptorSets.size() ); + for ( auto descriptorSet : descriptorSets ) + { + uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); + } + return uniqueDescriptorSets; + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const + { + return static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const + { + Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, "vk::Device::freeDescriptorSets" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const + { + vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const + { + vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const + { + return static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator ) const + { + Framebuffer framebuffer; + Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &framebuffer ) ) ); + return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const + { + FramebufferDeleter deleter( *this, allocator ); + return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const + { + vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional allocator ) const + { + vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const + { + return static_cast( vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator ) const + { + RenderPass renderPass; + Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &renderPass ) ) ); + return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const + { + RenderPassDeleter deleter( *this, allocator ); + return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const + { + vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional allocator ) const + { + vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const + { + vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass ) const + { + Extent2D granularity; + vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); + return granularity; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const + { + return static_cast( vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + { + CommandPool commandPool; + Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &commandPool ) ) ); + return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + { + CommandPoolDeleter deleter( *this, allocator ); + return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional allocator ) const + { + vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + { + return static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + { + Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::resetCommandPool" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const + { + return static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const + { + std::vector commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const + { + CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); + std::vector commandBuffers = allocateCommandBuffers( allocateInfo ); + std::vector uniqueCommandBuffers; + uniqueCommandBuffers.reserve( commandBuffers.size() ); + for ( auto commandBuffer : commandBuffers ) + { + uniqueCommandBuffers.push_back( UniqueCommandBuffer( commandBuffer, deleter ) ); + } + return uniqueCommandBuffers; + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const + { + return static_cast( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator ) const + { + std::vector swapchains( createInfos.size() ); + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); + return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); + std::vector uniqueSwapchainKHRs; + uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); + for ( auto swapchainKHR : swapchainKHRs ) + { + uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); + } + return uniqueSwapchainKHRs; + } + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const + { + return static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const + { + vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator ) const + { + vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const + { + return static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain ) const + { + std::vector swapchainImages; + uint32_t swapchainImageCount; + Result result; + do + { + result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && swapchainImageCount ) + { + swapchainImages.resize( swapchainImageCount ); + result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( swapchainImageCount <= swapchainImages.size() ); + swapchainImages.resize( swapchainImageCount ); + return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const + { + return static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const + { + uint32_t imageIndex; + Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); + return createResultValue( result, imageIndex, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const + { + return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT() const + { + DebugMarkerObjectNameInfoEXT nameInfo; + Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const + { + return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT() const + { + DebugMarkerObjectTagInfoEXT tagInfo; + Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const + { + return static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const + { + HANDLE handle; + Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); + return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const + { + return static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + { + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &indirectCommandsLayout ) ) ); + return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + { + IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); + return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator ) const + { + vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const + { + return static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + { + ObjectTableNVX objectTable; + Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &objectTable ) ) ); + return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + { + ObjectTableNVXDeleter deleter( *this, allocator ); + return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const + { + vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator ) const + { + vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + { + return static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( pObjectTableEntries.size() == objectIndices.size() ); +#else + if ( pObjectTableEntries.size() != objectIndices.size() ) + { + throw std::logic_error( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); + return createResultValue( result, "vk::Device::registerObjectsNVX" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const + { + return static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( objectEntryTypes.size() == objectIndices.size() ); +#else + if ( objectEntryTypes.size() != objectIndices.size() ) + { + throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); + return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const + { + vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); + } + + VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const + { + return static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const + { + Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + return createResultValue( result, "vk::Device::displayPowerControlEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::registerEventEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const + { + return static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const + { + uint64_t counterValue; + Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); + return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DeviceDeleter; + using UniqueDevice = UniqueHandle; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + class PhysicalDevice + { + public: + PhysicalDevice() + : m_physicalDevice(VK_NULL_HANDLE) + {} + + PhysicalDevice( nullptr_t ) + : m_physicalDevice(VK_NULL_HANDLE) + {} + +#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) + PhysicalDevice(VkPhysicalDevice physicalDevice) + : m_physicalDevice(physicalDevice) + {} + + PhysicalDevice& operator=(VkPhysicalDevice physicalDevice) + { + m_physicalDevice = physicalDevice; + return *this; + } +#endif + + PhysicalDevice& operator=( nullptr_t ) + { + m_physicalDevice = VK_NULL_HANDLE; + return *this; + } + + bool operator==(PhysicalDevice const &rhs) const + { + return m_physicalDevice == rhs.m_physicalDevice; + } + + bool operator!=(PhysicalDevice const &rhs) const + { + return m_physicalDevice != rhs.m_physicalDevice; + } + + bool operator<(PhysicalDevice const &rhs) const + { + return m_physicalDevice < rhs.m_physicalDevice; + } + + void getProperties( PhysicalDeviceProperties* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceProperties getProperties() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + std::vector getQueueFamilyProperties() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceMemoryProperties getMemoryProperties() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getFeatures( PhysicalDeviceFeatures* pFeatures ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceFeatures getFeatures() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + FormatProperties getFormatProperties( Format format ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateDeviceLayerProperties() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getDisplayPropertiesKHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getDisplayPlanePropertiesKHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + + Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + +#ifdef VK_USE_PLATFORM_XLIB_KHR + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + +#ifdef VK_USE_PLATFORM_XCB_KHR + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ + + Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceFeatures2KHR getFeatures2KHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceProperties2KHR getProperties2KHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + FormatProperties2KHR getFormatProperties2KHR( Format format ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + std::vector getQueueFamilyProperties2KHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result releaseDisplayEXT( DisplayKHR display ) const; +#else + ResultValueType::type releaseDisplayEXT( DisplayKHR display ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + + Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkPhysicalDevice() const + { + return m_physicalDevice; + } + + explicit operator bool() const + { + return m_physicalDevice != VK_NULL_HANDLE; + } + + bool operator!() const + { + return m_physicalDevice == VK_NULL_HANDLE; + } + + private: + VkPhysicalDevice m_physicalDevice; + }; + static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); + +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DeviceDeleter + { + public: + DeviceDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} + + void operator()( Device device ) + { + device.destroy( m_allocator ); + } + + private: + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties ) const + { + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties() const + { + PhysicalDeviceProperties properties; + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties() const + { + std::vector queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const + { + PhysicalDeviceMemoryProperties memoryProperties; + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + return memoryProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures ) const + { + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures() const + { + PhysicalDeviceFeatures features; + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); + return features; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( Format format, FormatProperties* pFormatProperties ) const + { + vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format ) const + { + FormatProperties formatProperties; + vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + return formatProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const + { + ImageFormatProperties imageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const + { + return static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional allocator ) const + { + Device device; + Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &device ) ) ); + return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const + { + DeviceDeleter deleter( allocator ); + return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const + { + return static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const + { + return static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName ) const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const + { + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const + { + std::vector properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const + { + return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const + { + return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const + { + return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + { + std::vector displays; + uint32_t displayCount; + Result result; + do + { + result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && displayCount ) + { + displays.resize( displayCount ); + result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( displayCount <= displays.size() ); + displays.resize( displayCount ); + return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const + { + return static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display ) const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const + { + return static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator ) const + { + DisplayModeKHR mode; + Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &mode ) ) ); + return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const + { + return static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const + { + DisplayPlaneCapabilitiesKHR capabilities; + Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); + return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const + { + return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const + { + return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const + { + Bool32 supported; + Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); + return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const + { + SurfaceCapabilitiesKHR surfaceCapabilities; + Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface ) const + { + std::vector surfaceFormats; + uint32_t surfaceFormatCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && surfaceFormatCount ) + { + surfaceFormats.resize( surfaceFormatCount ); + result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( surfaceFormatCount <= surfaceFormats.size() ); + surfaceFormats.resize( surfaceFormatCount ); + return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const + { + return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface ) const + { + std::vector presentModes; + uint32_t presentModeCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && presentModeCount ) + { + presentModes.resize( presentModeCount ); + result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( presentModeCount <= presentModes.size() ); + presentModes.resize( presentModeCount ); + return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const + { + return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const + { + return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const + { + return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + +#ifdef VK_USE_PLATFORM_XLIB_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const + { + return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const + { + return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + +#ifdef VK_USE_PLATFORM_XCB_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const + { + return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const + { + return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const + { + ExternalImageFormatPropertiesNV externalImageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); + return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const + { + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const + { + DeviceGeneratedCommandsLimitsNVX limits; + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); + return limits; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const + { + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceFeatures2KHR PhysicalDevice::getFeatures2KHR() const + { + PhysicalDeviceFeatures2KHR features; + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); + return features; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceProperties2KHR PhysicalDevice::getProperties2KHR() const + { + PhysicalDeviceProperties2KHR properties; + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const + { + vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE FormatProperties2KHR PhysicalDevice::getFormatProperties2KHR( Format format ) const + { + FormatProperties2KHR formatProperties; + vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + return formatProperties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const - { - return static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display ) const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); - } + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const + { + ImageFormatProperties2KHR imageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const - { - return static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); - } - + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - DisplayModeKHR mode; - Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &mode ) ) ); - return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); - } + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const + { + std::vector queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const - { - return static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); - } - + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const - { - DisplayPlaneCapabilitiesKHR capabilities; - Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); - return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - } + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2KHR PhysicalDevice::getMemoryProperties2KHR() const + { + PhysicalDeviceMemoryProperties2KHR memoryProperties; + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + return memoryProperties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_MIR_KHR - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const - { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_MIR_KHR - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const - { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const + { + std::vector properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); + return properties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + return static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const + { + return static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const - { - Bool32 supported; - Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); - return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); - } + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display ) const + { + Display dpy; + Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); + return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const + { + return static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const - { - SurfaceCapabilitiesKHR surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - } + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const + { + DisplayKHR display; + Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); + return createResultValue( result, display, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); - } - + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const - { - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( surfaceFormatCount <= surfaceFormats.size() ); - surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); - } + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface ) const + { + SurfaceCapabilities2EXT surfaceCapabilities; + Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DebugReportCallbackEXTDeleter; + using UniqueDebugReportCallbackEXT = UniqueHandle; + class SurfaceKHRDeleter; + using UniqueSurfaceKHR = UniqueHandle; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const - { - return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); - } + class Instance + { + public: + Instance() + : m_instance(VK_NULL_HANDLE) + {} -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const - { - std::vector presentModes; - uint32_t presentModeCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( presentModeCount <= presentModes.size() ); - presentModes.resize( presentModeCount ); - return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Instance( nullptr_t ) + : m_instance(VK_NULL_HANDLE) + {} -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const +#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) + Instance(VkInstance instance) + : m_instance(instance) + {} + + Instance& operator=(VkInstance instance) { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); + m_instance = instance; + return *this; } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ +#endif -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const + Instance& operator=( nullptr_t ) { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); + m_instance = VK_NULL_HANDLE; + return *this; } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const + bool operator==(Instance const &rhs) const { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + return m_instance == rhs.m_instance; } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const + bool operator!=(Instance const &rhs) const { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + return m_instance != rhs.m_instance; } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_XLIB_KHR - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const + bool operator<(Instance const &rhs) const { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); + return m_instance < rhs.m_instance; } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + void destroy( const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_KHR - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const - { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + void destroy( Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_XCB_KHR - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const - { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - + Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XCB_KHR - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const - { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ + template > + typename ResultValueType>::type enumeratePhysicalDevices() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); - } - + PFN_vkVoidFunction getProcAddr( const char* pName ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const - { - ExternalImageFormatPropertiesNV externalImageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); - return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - } + PFN_vkVoidFunction getProcAddr( const std::string & name ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const - { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); - } - +#ifdef VK_USE_PLATFORM_ANDROID_KHR + Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, DeviceGeneratedCommandsLimitsNVX & limits ) const - { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); - } + ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const - { - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - + Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures2KHR getFeatures2KHR() const - { - PhysicalDeviceFeatures2KHR features; - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); - return features; - } + ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const - { - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - +#ifdef VK_USE_PLATFORM_MIR_KHR + Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties2KHR getProperties2KHR() const - { - PhysicalDeviceProperties2KHR properties; - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); - return properties; - } + ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ - void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - + void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties2KHR getFormatProperties2KHR( Format format ) const - { - FormatProperties2KHR formatProperties; - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - return formatProperties; - } + void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); - } - +#ifdef VK_USE_PLATFORM_VI_NN + Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const - { - ImageFormatProperties2KHR imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); - } + ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_VI_NN*/ - void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const - { - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties2KHR() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - +#ifdef VK_USE_PLATFORM_WIN32_KHR + Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const - { - PhysicalDeviceMemoryProperties2KHR memoryProperties; - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - return memoryProperties; - } + ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const - { - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); - } - +#ifdef VK_USE_PLATFORM_XLIB_KHR + Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const - { - std::vector properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); - return properties; - } + ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result releaseDisplayEXT( DisplayKHR display ) const - { - return static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - +#ifdef VK_USE_PLATFORM_XCB_KHR + Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type releaseDisplayEXT( DisplayKHR display ) const - { - Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); - } + ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const - { - return static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - + Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display ) const - { - Display dpy; - Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); - return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const - { - return static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, DisplayKHR & display ) const - { - Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const - { - SurfaceCapabilities2EXT surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); - } + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) explicit #endif - operator VkPhysicalDevice() const + operator VkInstance() const { - return m_physicalDevice; + return m_instance; } explicit operator bool() const { - return m_physicalDevice != VK_NULL_HANDLE; + return m_instance != VK_NULL_HANDLE; } bool operator!() const { - return m_physicalDevice == VK_NULL_HANDLE; + return m_instance == VK_NULL_HANDLE; } private: - VkPhysicalDevice m_physicalDevice; + VkInstance m_instance; }; - static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); + static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); - class Instance +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DebugReportCallbackEXTDeleter { public: - Instance() - : m_instance(VK_NULL_HANDLE) - {} - -#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) - Instance(VkInstance instance) - : m_instance(instance) + DebugReportCallbackEXTDeleter( Instance instance = Instance(), Optional allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) {} - Instance& operator=(VkInstance instance) - { - m_instance = instance; - return *this; - } -#endif - - bool operator==(Instance const &rhs) const + void operator()( DebugReportCallbackEXT debugReportCallbackEXT ) { - return m_instance == rhs.m_instance; + m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); } - bool operator!=(Instance const &rhs) const - { - return m_instance != rhs.m_instance; - } + private: + Instance m_instance; + Optional m_allocator; + }; - bool operator<(Instance const &rhs) const - { - return m_instance < rhs.m_instance; - } + class SurfaceKHRDeleter + { + public: + SurfaceKHRDeleter( Instance instance = Instance(), Optional allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) + {} - void destroy( const AllocationCallbacks* pAllocator ) const + void operator()( SurfaceKHR surfaceKHR ) { - vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); + m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); } + private: + Instance m_instance; + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const - { - vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator)) ); - } + VULKAN_HPP_INLINE void Instance::destroy( Optional allocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const - { - return static_cast( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); - } - + VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const + { + return static_cast( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumeratePhysicalDevices() const + template + VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices() const + { + std::vector physicalDevices; + uint32_t physicalDeviceCount; + Result result; + do { - std::vector physicalDevices; - uint32_t physicalDeviceCount; - Result result; - do + result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && physicalDeviceCount ) { - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( physicalDeviceCount <= physicalDevices.size() ); - physicalDevices.resize( physicalDeviceCount ); - return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); - } + physicalDevices.resize( physicalDeviceCount ); + result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( physicalDeviceCount <= physicalDevices.size() ); + physicalDevices.resize( physicalDeviceCount ); + return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - PFN_vkVoidFunction getProcAddr( const char* pName ) const - { - return vkGetInstanceProcAddr( m_instance, pName ); - } - + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName ) const + { + return vkGetInstanceProcAddr( m_instance, pName ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const - { - return vkGetInstanceProcAddr( m_instance, name.c_str() ); - } + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name ) const + { + return vkGetInstanceProcAddr( m_instance, name.c_str() ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_ANDROID_KHR - Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_ANDROID_KHR - ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } - + VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); - } + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_MIR_KHR - ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ - void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const - { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); - } - + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const - { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator)) ); - } + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional allocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_VI_NN - Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_VI_NN*/ - + VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_VI_NN - ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); - } -#endif /*VK_USE_PLATFORM_VI_NN*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_VI_NN*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ #ifdef VK_USE_PLATFORM_XLIB_KHR - Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_KHR - ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ #ifdef VK_USE_PLATFORM_XCB_KHR - Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - + VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XCB_KHR - ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ - Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const - { - return static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); - } - + VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const + { + return static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const - { - DebugReportCallbackEXT callback; - Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &callback ) ) ); - return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); - } + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + { + DebugReportCallbackEXT callback; + Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &callback ) ) ); + return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + { + DebugReportCallbackEXTDeleter deleter( *this, allocator ); + return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); - } - + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const - { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator)) ); - } + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const - { - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); - } - + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const + { + vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const - { + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const + { #ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( layerPrefix.size() == message.size() ); + assert( layerPrefix.size() == message.size() ); #else - if ( layerPrefix.size() != message.size() ) - { - throw std::logic_error( "vk::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) - explicit -#endif - operator VkInstance() const - { - return m_instance; - } - - explicit operator bool() const - { - return m_instance != VK_NULL_HANDLE; - } - - bool operator!() const + if ( layerPrefix.size() != message.size() ) { - return m_instance == VK_NULL_HANDLE; + throw std::logic_error( "vk::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); } - - private: - VkInstance m_instance; - }; - static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); - +#endif // VULKAN_HPP_NO_EXCEPTIONS + vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct CmdProcessCommandsInfoNVX { CmdProcessCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(), IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(), uint32_t indirectCommandsTokenCount_ = 0, const IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr, uint32_t maxSequencesCount_ = 0, CommandBuffer targetCommandBuffer_ = CommandBuffer(), Buffer sequencesCountBuffer_ = Buffer(), DeviceSize sequencesCountOffset_ = 0, Buffer sequencesIndexBuffer_ = Buffer(), DeviceSize sequencesIndexOffset_ = 0 ) @@ -21081,12 +22471,6 @@ namespace vk return *this; } - CmdProcessCommandsInfoNVX& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - CmdProcessCommandsInfoNVX& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -21197,18 +22581,55 @@ namespace vk }; static_assert( sizeof( CmdProcessCommandsInfoNVX ) == sizeof( VkCmdProcessCommandsInfoNVX ), "struct and wrapper have different size!" ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class InstanceDeleter; + using UniqueInstance = UniqueHandle; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class InstanceDeleter + { + public: + InstanceDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} + + void operator()( Instance instance ) + { + instance.destroy( m_allocator ); + } + + private: + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ) { return static_cast( vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pInstance ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ) + VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator ) { Instance instance; Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &instance ) ) ); return createResultValue( result, instance, "vk::createInstance" ); } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) + { + InstanceDeleter deleter( allocator ); + return UniqueInstance( createInstance( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits) diff --git a/layers/linux/VkLayer_core_validation.json b/layers/linux/VkLayer_core_validation.json index 7fb94d2..c935f5e 100644 --- a/layers/linux/VkLayer_core_validation.json +++ b/layers/linux/VkLayer_core_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", "library_path": "./libVkLayer_core_validation.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_image.json b/layers/linux/VkLayer_image.json index 39dd4e6..f9b5f39 100644 --- a/layers/linux/VkLayer_image.json +++ b/layers/linux/VkLayer_image.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_image", "type": "GLOBAL", "library_path": "./libVkLayer_image.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_object_tracker.json b/layers/linux/VkLayer_object_tracker.json index 95bf280..3dfa8b7 100644 --- a/layers/linux/VkLayer_object_tracker.json +++ b/layers/linux/VkLayer_object_tracker.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", "library_path": "./libVkLayer_object_tracker.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_parameter_validation.json b/layers/linux/VkLayer_parameter_validation.json index d679e66..15e4587 100644 --- a/layers/linux/VkLayer_parameter_validation.json +++ b/layers/linux/VkLayer_parameter_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", "library_path": "./libVkLayer_parameter_validation.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_swapchain.json b/layers/linux/VkLayer_swapchain.json index f9feb06..e48998c 100644 --- a/layers/linux/VkLayer_swapchain.json +++ b/layers/linux/VkLayer_swapchain.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", "library_path": "./libVkLayer_swapchain.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_threading.json b/layers/linux/VkLayer_threading.json index 2b0a3a3..0c0d793 100644 --- a/layers/linux/VkLayer_threading.json +++ b/layers/linux/VkLayer_threading.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", "library_path": "./libVkLayer_threading.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "Google Validation Layer", "instance_extensions": [ diff --git a/layers/linux/VkLayer_unique_objects.json b/layers/linux/VkLayer_unique_objects.json index a5f7a6f..6da3603 100644 --- a/layers/linux/VkLayer_unique_objects.json +++ b/layers/linux/VkLayer_unique_objects.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", "library_path": "./libVkLayer_unique_objects.so", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "Google Validation Layer" } diff --git a/layers/windows/VkLayer_core_validation.json b/layers/windows/VkLayer_core_validation.json index dff857f..1fb0c72 100644 --- a/layers/windows/VkLayer_core_validation.json +++ b/layers/windows/VkLayer_core_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", "library_path": ".\\VkLayer_core_validation.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_image.json b/layers/windows/VkLayer_image.json index de1ae7e..fc421b9 100644 --- a/layers/windows/VkLayer_image.json +++ b/layers/windows/VkLayer_image.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_image", "type": "GLOBAL", "library_path": ".\\VkLayer_image.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_object_tracker.json b/layers/windows/VkLayer_object_tracker.json index 4f64872..11385a5 100644 --- a/layers/windows/VkLayer_object_tracker.json +++ b/layers/windows/VkLayer_object_tracker.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", "library_path": ".\\VkLayer_object_tracker.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_parameter_validation.json b/layers/windows/VkLayer_parameter_validation.json index 8704672..bd2876c 100644 --- a/layers/windows/VkLayer_parameter_validation.json +++ b/layers/windows/VkLayer_parameter_validation.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", "library_path": ".\\VkLayer_parameter_validation.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_swapchain.json b/layers/windows/VkLayer_swapchain.json index 9715996..1f5d03b 100644 --- a/layers/windows/VkLayer_swapchain.json +++ b/layers/windows/VkLayer_swapchain.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", "library_path": ".\\VkLayer_swapchain.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "LunarG Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_threading.json b/layers/windows/VkLayer_threading.json index c9cd979..54764ed 100644 --- a/layers/windows/VkLayer_threading.json +++ b/layers/windows/VkLayer_threading.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", "library_path": ".\\VkLayer_threading.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "Google Validation Layer", "instance_extensions": [ diff --git a/layers/windows/VkLayer_unique_objects.json b/layers/windows/VkLayer_unique_objects.json index 8f55bac..1c50366 100644 --- a/layers/windows/VkLayer_unique_objects.json +++ b/layers/windows/VkLayer_unique_objects.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", "library_path": ".\\VkLayer_unique_objects.dll", - "api_version": "1.0.39", + "api_version": "1.0.40", "implementation_version": "1", "description": "Google Validation Layer" } diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index ce49086..fdaed30 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -113,7 +113,7 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") add_library(${API_LOWERCASE} SHARED ${LOADER_SRCS}) - set_target_properties(${API_LOWERCASE} PROPERTIES SOVERSION "1" VERSION "1.0.39") + set_target_properties(${API_LOWERCASE} PROPERTIES SOVERSION "1" VERSION "1.0.40") target_link_libraries(${API_LOWERCASE} -ldl -lpthread -lm) install(TARGETS ${API_LOWERCASE} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/scripts/generator.py b/scripts/generator.py index 680cd6a..709ac14 100755 --- a/scripts/generator.py +++ b/scripts/generator.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright (c) 2013-2016 The Khronos Group Inc. +# Copyright (c) 2013-2017 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/helper_file_generator.py b/scripts/helper_file_generator.py index 3340faf..39a9aa8 100644 --- a/scripts/helper_file_generator.py +++ b/scripts/helper_file_generator.py @@ -204,15 +204,15 @@ class HelperFileOutputGenerator(OutputGenerator): name = 'ERROR' decoratedName = 'ERROR' if 'mathit' in source: - # Matches expressions similar to 'latexmath:[$\lceil{\mathit{rasterizationSamples} \over 32}\rceil$]' - match = re.match(r'latexmath\s*\:\s*\[\s*\$\\l(\w+)\s*\{\s*\\mathit\s*\{\s*(\w+)\s*\}\s*\\over\s*(\d+)\s*\}\s*\\r(\w+)\$\s*\]', source) + # Matches expressions similar to 'latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]' + match = re.match(r'latexmath\s*\:\s*\[\s*\\l(\w+)\s*\{\s*\\mathit\s*\{\s*(\w+)\s*\}\s*\\over\s*(\d+)\s*\}\s*\\r(\w+)\s*\]', source) if not match or match.group(1) != match.group(4): raise 'Unrecognized latexmath expression' name = match.group(2) decoratedName = '{}/{}'.format(*match.group(2, 3)) else: - # Matches expressions similar to 'latexmath : [$dataSize \over 4$]' - match = re.match(r'latexmath\s*\:\s*\[\s*\$\s*(\w+)\s*\\over\s*(\d+)\s*\$\s*\]', source) + # Matches expressions similar to 'latexmath : [dataSize \over 4]' + match = re.match(r'latexmath\s*\:\s*\[\s*\s*(\w+)\s*\\over\s*(\d+)\s*\s*\]', source) name = match.group(1) decoratedName = '{}/{}'.format(*match.group(1, 2)) return name, decoratedName diff --git a/scripts/lvl_genvk.py b/scripts/lvl_genvk.py index f4ef85e..0be5d3e 100644 --- a/scripts/lvl_genvk.py +++ b/scripts/lvl_genvk.py @@ -1,7 +1,6 @@ #!/usr/bin/python3 # # Copyright (c) 2013-2017 The Khronos Group Inc. -# Copyright (c) 2015-2017 LunarG, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,9 +17,8 @@ import argparse, cProfile, pdb, string, sys, time from reg import * from generator import write - -# -# LoaderAndValidationLayer Generator Additions +from cgenerator import CGeneratorOptions, COutputGenerator +# LoaderAndValidationLayer Generator Modifications from threading_generator import ThreadGeneratorOptions, ThreadOutputGenerator from parameter_validation_generator import ParamCheckerGeneratorOptions, ParamCheckerOutputGenerator from unique_objects_generator import UniqueObjectsGeneratorOptions, UniqueObjectsOutputGenerator @@ -67,7 +65,7 @@ def makeGenOpts(extensions = [], removeExtensions = [], protect = True, director # Copyright text prefixing all headers (list of strings). prefixStrings = [ '/*', - '** Copyright (c) 2015-2016 The Khronos Group Inc.', + '** Copyright (c) 2015-2017 The Khronos Group Inc.', '**', '** Licensed under the Apache License, Version 2.0 (the "License");', '** you may not use this file except in compliance with the License.', @@ -98,7 +96,8 @@ def makeGenOpts(extensions = [], removeExtensions = [], protect = True, director protectFeature = protect protectProto = protect - # + + # # LoaderAndValidationLayer Generators # Options for threading layer genOpts['thread_check.h'] = [ @@ -295,8 +294,6 @@ def makeGenOpts(extensions = [], removeExtensions = [], protect = True, director helper_file_type = 'safe_struct_source') ] - - # Generate a target based on the options in the matching genOpts{} object. # This is encapsulated in a function so it can be profiled and/or timed. # The args parameter is an parsed argument object containing the following @@ -397,7 +394,7 @@ if __name__ == '__main__': if (args.dump): write('* Dumping registry to regdump.txt', file=sys.stderr) - reg.dumpReg(filehandle = open('regdump.txt','w', encoding='utf-8')) + reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8')) # create error/warning & diagnostic files if (args.errfile): diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index ba03d41..c4b3205 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -579,15 +579,15 @@ class ParamCheckerOutputGenerator(OutputGenerator): name = 'ERROR' decoratedName = 'ERROR' if 'mathit' in source: - # Matches expressions similar to 'latexmath:[$\lceil{\mathit{rasterizationSamples} \over 32}\rceil$]' - match = re.match(r'latexmath\s*\:\s*\[\s*\$\\l(\w+)\s*\{\s*\\mathit\s*\{\s*(\w+)\s*\}\s*\\over\s*(\d+)\s*\}\s*\\r(\w+)\$\s*\]', source) + # Matches expressions similar to 'latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]' + match = re.match(r'latexmath\s*\:\s*\[\s*\\l(\w+)\s*\{\s*\\mathit\s*\{\s*(\w+)\s*\}\s*\\over\s*(\d+)\s*\}\s*\\r(\w+)\s*\]', source) if not match or match.group(1) != match.group(4): raise 'Unrecognized latexmath expression' name = match.group(2) decoratedName = '{}({}/{})'.format(*match.group(1, 2, 3)) else: - # Matches expressions similar to 'latexmath : [$dataSize \over 4$]' - match = re.match(r'latexmath\s*\:\s*\[\s*\$\s*(\w+)\s*\\over\s*(\d+)\s*\$\s*\]', source) + # Matches expressions similar to 'latexmath : [dataSize \over 4]' + match = re.match(r'latexmath\s*\:\s*\[\s*\s*(\w+)\s*\\over\s*(\d+)\s*\s*\]', source) name = match.group(1) decoratedName = '{}/{}'.format(*match.group(1, 2)) return name, decoratedName diff --git a/scripts/reg.py b/scripts/reg.py index 98436a3..1554c30 100755 --- a/scripts/reg.py +++ b/scripts/reg.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright (c) 2013-2016 The Khronos Group Inc. +# Copyright (c) 2013-2017 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/vk.xml b/scripts/vk.xml index 779875b..3a774fa 100644 --- a/scripts/vk.xml +++ b/scripts/vk.xml @@ -63,6 +63,8 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + + @@ -107,7 +109,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0) // Version of this file -#define VK_HEADER_VERSION 39 +#define VK_HEADER_VERSION 40 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -799,7 +801,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. const void* pNext VkShaderModuleCreateFlags flags size_t codeSize - const uint32_t* pCode + const uint32_t* pCode uint32_t binding @@ -927,7 +929,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkSampleCountFlagBits rasterizationSamples VkBool32 sampleShadingEnable float minSampleShading - const VkSampleMask* pSampleMask + const VkSampleMask* pSampleMask VkBool32 alphaToCoverageEnable VkBool32 alphaToOneEnable @@ -1538,7 +1540,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. const VkSemaphore* pWaitSemaphores uint32_t swapchainCount const VkSwapchainKHR* pSwapchains - const uint32_t* pImageIndices + const uint32_t* pImageIndices VkResult* pResults @@ -1825,6 +1827,20 @@ maintained in the master branch of the Khronos Vulkan GitHub project. const void* pNext VkSurfaceCounterFlagsEXT surfaceCounters + + + float x + float y + + + + VkXYColorEXT displayPrimaryRed + VkXYColorEXT displayPrimaryGreen + VkXYColorEXT displayPrimaryBlue + VkXYColorEXT whitePoint + float maxLuminance + float minLuminance + @@ -4088,6 +4104,13 @@ maintained in the master branch of the Khronos Vulkan GitHub project. VkSurfaceKHR surface VkSurfaceCapabilities2EXT* pSurfaceCapabilities + + void vkSetSMPTE2086MetadataEXT + VkDevice device + uint32_t swapchainCount + const VkSwapchainKHR* pSwapchains + const VkSMPTE2086MetadataEXT* pMetadata + @@ -4460,7 +4483,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + @@ -4540,13 +4563,14 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - + + @@ -4806,7 +4830,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + @@ -4851,7 +4875,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + @@ -4867,13 +4891,13 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - + @@ -4897,7 +4921,7 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + @@ -5175,10 +5199,10 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - - + + @@ -5188,15 +5212,18 @@ maintained in the master branch of the Khronos Vulkan GitHub project. - + - + - - + + + + + @@ -5265,5 +5292,23 @@ maintained in the master branch of the Khronos Vulkan GitHub project. + + + + + + + + + + + + + + + + + + -- 2.7.4