diff options
author | Mark Lobodzinski <mark@lunarg.com> | 2017-02-13 10:15:53 -0700 |
---|---|---|
committer | Mark Lobodzinski <mark@lunarg.com> | 2017-02-14 15:18:19 -0700 |
commit | b7c38e4a5aa96ba927b83608d8ad912f0aa32ea6 (patch) | |
tree | 8d5adef483c616ccdb8a0938339f3ddffe50809d /include | |
parent | f470c882aa6489bae4cd1878e4ef04e9c288ce7d (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/vulkan/vk_platform.h | 2 | ||||
-rw-r--r-- | include/vulkan/vulkan.h | 10 | ||||
-rw-r--r-- | include/vulkan/vulkan.hpp | 6899 |
3 files changed, 4166 insertions, 2745 deletions
diff --git a/include/vulkan/vk_platform.h b/include/vulkan/vk_platform.h index 0fa62ee2..72f80493 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 81dedf77..0b04d414 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 dd346512..5084d2aa 100644 --- a/include/vulkan/vulkan.hpp +++ b/include/vulkan/vulkan.hpp @@ -41,12 +41,14 @@ # include <vector> #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 <typename Type, typename Deleter> + 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<Type, Deleter> & 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 <typename Type, typename Deleter> + VULKAN_HPP_INLINE void swap( UniqueHandle<Type,Deleter> & lhs, UniqueHandle<Type,Deleter> & 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,12 +6073,6 @@ namespace vk return *this; } - DeviceQueueCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - DeviceQueueCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -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,12 +13982,6 @@ namespace vk return *this; } - GraphicsPipelineCreateInfo& setSType( StructureType sType_ ) - { - sType = sType_; - return *this; - } - GraphicsPipelineCreateInfo& setPNext( const void* pNext_ ) { pNext = pNext_; @@ -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 Allocator = std::allocator<LayerProperties>> + typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) { return static_cast<Result>( vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<LayerProperties>> - typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties() + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties() { std::vector<LayerProperties,Allocator> 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 Allocator = std::allocator<ExtensionProperties>> + typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr ); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) { return static_cast<Result>( vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<ExtensionProperties>> - typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr ) + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName ) { std::vector<ExtensionProperties,Allocator> 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<Result>( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( pBeginInfo ) ) ); - } - + Result begin( const CommandBufferBeginInfo* pBeginInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type begin( const CommandBufferBeginInfo & beginInfo ) const - { - Result result = static_cast<Result>( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( &beginInfo ) ) ); - return createResultValue( result, "vk::CommandBuffer::begin" ); - } + ResultValueType<void>::type begin( const CommandBufferBeginInfo & beginInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result end( ) const - { - return static_cast<Result>( vkEndCommandBuffer( m_commandBuffer ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type end() const - { - Result result = static_cast<Result>( vkEndCommandBuffer( m_commandBuffer ) ); - return createResultValue( result, "vk::CommandBuffer::end" ); - } + Result end() const; +#else + ResultValueType<void>::type end() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result reset( CommandBufferResetFlags flags ) const - { - return static_cast<Result>( vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type reset( CommandBufferResetFlags flags ) const - { - Result result = static_cast<Result>( vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) ); - return createResultValue( result, "vk::CommandBuffer::reset" ); - } + Result reset( CommandBufferResetFlags flags ) const; +#else + ResultValueType<void>::type reset( CommandBufferResetFlags flags ) 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<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) ); - } -#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 - void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const - { - vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) ); - } + void setViewport( uint32_t firstViewport, ArrayProxy<const Viewport> viewports ) 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<const VkViewport*>( pViewports ) ); - } - + void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setViewport( uint32_t firstViewport, ArrayProxy<const Viewport> viewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast<const VkViewport*>( viewports.data() ) ); - } + void setScissor( uint32_t firstScissor, ArrayProxy<const Rect2D> scissors ) 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<const VkRect2D*>( pScissors ) ); - } + void setLineWidth( float lineWidth ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setScissor( uint32_t firstScissor, ArrayProxy<const Rect2D> scissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast<const VkRect2D*>( scissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const; -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setLineWidth( float lineWidth ) const - { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void setBlendConstants( const float blendConstants[4] ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setLineWidth( float lineWidth ) const - { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const; -#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 setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const; -#ifndef 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 setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const; -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setBlendConstants( const float blendConstants[4] ) const - { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + 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 setBlendConstants( const float blendConstants[4] ) const - { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy<const DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets ) 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 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 setDepthBounds( float minDepthBounds, float maxDepthBounds ) const - { - vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); - } + void bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets ) 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<VkStencilFaceFlags>( faceMask ), compareMask ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const - { - vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const; -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const - { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const - { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const - { - vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + 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 setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const - { - vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), reference ); - } + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy<const BufferCopy> 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<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); - } - + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy<const DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); - } + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageCopy> regions ) 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<VkBuffer>( buffer ), offset, static_cast<VkIndexType>( indexType ) ); - } -#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 bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const - { - vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkIndexType>( indexType ) ); - } + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageBlit> regions, Filter filter ) 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<const VkBuffer*>( pBuffers ), pOffsets ); - } - + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> 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<const VkBuffer*>( buffers.data() ), offsets.data() ); - } + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const BufferImageCopy> regions ) 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 copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) 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 copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy<const BufferImageCopy> regions ) 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 updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) 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 ); - } + template <typename T> + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy<const T> data ) 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<VkBuffer>( buffer ), offset, drawCount, stride ); - } -#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 drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride ); - } + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const ImageSubresourceRange> ranges ) 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<VkBuffer>( buffer ), offset, drawCount, stride ); - } -#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 drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride ); - } + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const ImageSubresourceRange> ranges ) 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 clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) 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 clearAttachments( ArrayProxy<const ClearAttachment> attachments, ArrayProxy<const ClearRect> rects ) 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<VkBuffer>( buffer ), offset ); - } -#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 dispatchIndirect( Buffer buffer, DeviceSize offset ) const - { - vkCmdDispatchIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset ); - } + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageResolve> regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferCopy*>( pRegions ) ); - } + 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 copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy<const BufferCopy> regions ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferCopy*>( regions.data() ) ); - } + void waitEvents( ArrayProxy<const Event> events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageCopy*>( pRegions ) ); - } - + 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 copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageCopy> regions ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageCopy*>( regions.data() ) ); - } + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const; #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<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageBlit*>( pRegions ), static_cast<VkFilter>( filter ) ); - } + void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const; -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageBlit> regions, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void endQuery( QueryPool queryPool, uint32_t query ) const; - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) ); - } + 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 copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const BufferImageCopy> regions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) ); - } + template <typename T> + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values ) const; #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<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) ); - } - + void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy<const BufferImageCopy> regions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) ); - } + void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, dataSize, pData ); - } + void nextSubpass( SubpassContents contents ) const; + + void endRenderPass() const; + void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename T> - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy<const T> data ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast<const void*>( data.data() ) ); - } + void executeCommands( ArrayProxy<const CommandBuffer> commandBuffers ) const; #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<VkBuffer>( dstBuffer ), dstOffset, size, data ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const - { - vkCmdFillBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, size, data ); - } + DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( pColor ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) ); - } + void debugMarkerEndEXT() const; + void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const ImageSubresourceRange> ranges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) ); - } + DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( pDepthStencil ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) ); - } + 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 clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const ImageSubresourceRange> ranges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) ); - } + void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast<const VkClearAttachment*>( pAttachments ), rectCount, reinterpret_cast<const VkClearRect*>( pRects ) ); - } - + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearAttachments( ArrayProxy<const ClearAttachment> attachments, ArrayProxy<const ClearRect> rects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast<const VkClearAttachment*>( attachments.data() ), rects.size() , reinterpret_cast<const VkClearRect*>( rects.data() ) ); - } + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkCommandBuffer() const { - vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageResolve*>( pRegions ) ); + return m_commandBuffer; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageResolve> regions ) const + explicit operator bool() const { - vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageResolve*>( regions.data() ) ); + return m_commandBuffer != VK_NULL_HANDLE; } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setEvent( Event event, PipelineStageFlags stageMask ) const + bool operator!() const { - vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) ); + return m_commandBuffer == VK_NULL_HANDLE; } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + 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<Result>( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( pBeginInfo ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) ); - } + VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo ) const + { + Result result = static_cast<Result>( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast<const VkCommandBufferBeginInfo*>( &beginInfo ) ) ); + return createResultValue( result, "vk::CommandBuffer::begin" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result CommandBuffer::end() const + { + return static_cast<Result>( vkEndCommandBuffer( m_commandBuffer ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::end() const + { + Result result = static_cast<Result>( vkEndCommandBuffer( m_commandBuffer ) ); + return createResultValue( result, "vk::CommandBuffer::end" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + return static_cast<Result>( vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + Result result = static_cast<Result>( vkResetCommandBuffer( m_commandBuffer, static_cast<VkCommandBufferResetFlags>( flags ) ) ); + return createResultValue( result, "vk::CommandBuffer::reset" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - 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<const VkEvent*>( pEvents ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const + { + vkCmdBindPipeline( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipeline>( pipeline ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast<const VkViewport*>( pViewports ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void waitEvents( ArrayProxy<const Event> events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const - { - vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy<const Viewport> viewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast<const VkViewport*>( viewports.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<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast<const VkRect2D*>( pScissors ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy<const Rect2D> scissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast<const VkRect2D*>( scissors.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<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) ); - } -#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 beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const - { - vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) ); - } -#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 ); + } -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endQuery( QueryPool queryPool, uint32_t query ) const - { - vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const + { + vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); + } + VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const + { + vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const + { + vkCmdSetStencilCompareMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), compareMask ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const + { + vkCmdSetStencilWriteMask( m_commandBuffer, static_cast<VkStencilFaceFlags>( faceMask ), writeMask ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const + { + vkCmdSetStencilReference( m_commandBuffer, static_cast<VkStencilFaceFlags>( 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<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endQuery( QueryPool queryPool, uint32_t query ) const - { - vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query ); - } + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy<const DescriptorSet> descriptorSets, ArrayProxy<const uint32_t> dynamicOffsets ) const + { + vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.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<VkQueryPool>( queryPool ), firstQuery, queryCount ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const + { + vkCmdBindIndexBuffer( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, static_cast<VkIndexType>( 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<const VkBuffer*>( pBuffers ), pOffsets ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy<const Buffer> buffers, ArrayProxy<const DeviceSize> offsets ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( buffers.size() == offsets.size() ); +#else + if ( buffers.size() != offsets.size() ) { - vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount ); + throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } +#endif // VULKAN_HPP_NO_EXCEPTIONS + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast<const VkBuffer*>( buffers.data() ), offsets.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<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query ); - } -#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 ); + } + + 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 ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast<VkBuffer>( buffer ), offset, drawCount, stride ); + } + + 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<VkBuffer>( buffer ), offset ); + } + + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferCopy*>( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const - { - vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy<const BufferCopy> regions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferCopy*>( regions.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<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), dstOffset, stride, static_cast<VkQueryResultFlags>( flags ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + 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<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageCopy*>( pRegions ) ); + } #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<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), dstOffset, stride, static_cast<VkQueryResultFlags>( flags ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageCopy> regions ) const + { + vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageCopy*>( regions.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<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, size, pValues ); - } + 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<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageBlit*>( pRegions ), static_cast<VkFilter>( filter ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageBlit> regions, Filter filter ) const + { + vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) ); + } +#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<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename T> - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast<const void*>( values.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const BufferImageCopy> regions ) const + { + vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( pRenderPassBegin ), static_cast<VkSubpassContents>( contents ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regionCount, reinterpret_cast<const VkBufferImageCopy*>( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy<const BufferImageCopy> regions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), regions.size() , reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) ); + } +#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<VkBuffer>( dstBuffer ), dstOffset, dataSize, pData ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), static_cast<VkSubpassContents>( contents ) ); - } + template <typename T> + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy<const T> data ) const + { + vkCmdUpdateBuffer( m_commandBuffer, static_cast<VkBuffer>( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast<const void*>( data.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void nextSubpass( SubpassContents contents ) const - { - vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) ); - } -#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<VkBuffer>( 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<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( pColor ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void nextSubpass( SubpassContents contents ) const - { - vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( contents ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy<const ImageSubresourceRange> ranges ) const + { + vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.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::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( pDepthStencil ), rangeCount, reinterpret_cast<const VkImageSubresourceRange*>( pRanges ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void endRenderPass() const - { - vkCmdEndRenderPass( m_commandBuffer ); - } + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy<const ImageSubresourceRange> ranges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), ranges.size() , reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) ); - } + 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<const VkClearAttachment*>( pAttachments ), rectCount, reinterpret_cast<const VkClearRect*>( pRects ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy<const ClearAttachment> attachments, ArrayProxy<const ClearRect> rects ) const + { + vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast<const VkClearAttachment*>( attachments.data() ), rects.size() , reinterpret_cast<const VkClearRect*>( rects.data() ) ); + } +#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<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regionCount, reinterpret_cast<const VkImageResolve*>( pRegions ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void executeCommands( ArrayProxy<const CommandBuffer> commandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy<const ImageResolve> regions ) const + { + vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), regions.size() , reinterpret_cast<const VkImageResolve*>( regions.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdSetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( stageMask ) ); + } + VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdResetEvent( m_commandBuffer, static_cast<VkEvent>( event ), static_cast<VkPipelineStageFlags>( 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<const VkEvent*>( pEvents ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( &markerInfo ) ); - return markerInfo; - } + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy<const Event> events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const + { + vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerEndEXT( ) const - { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - + 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<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarrierCount, reinterpret_cast<const VkMemoryBarrier*>( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast<const VkBufferMemoryBarrier*>( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast<const VkImageMemoryBarrier*>( pImageMemoryBarriers ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugMarkerEndEXT() const - { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy<const MemoryBarrier> memoryBarriers, ArrayProxy<const BufferMemoryBarrier> bufferMemoryBarriers, ArrayProxy<const ImageMemoryBarrier> imageMemoryBarriers ) const + { + vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), memoryBarriers.size() , reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) ); - } + VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const + { + vkCmdBeginQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query, static_cast<VkQueryControlFlags>( flags ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query ) const + { + vkCmdEndQuery( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), query ); + } + + VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const + { + vkCmdResetQueryPool( m_commandBuffer, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount ); + } + VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const + { + vkCmdWriteTimestamp( m_commandBuffer, static_cast<VkPipelineStageFlagBits>( pipelineStage ), static_cast<VkQueryPool>( queryPool ), query ); + } + + 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<VkQueryPool>( queryPool ), firstQuery, queryCount, static_cast<VkBuffer>( dstBuffer ), dstOffset, stride, static_cast<VkQueryResultFlags>( 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<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, size, pValues ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( &markerInfo ) ); - return markerInfo; - } + template <typename T> + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy<const T> values ) const + { + vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast<const void*>( 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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( 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<const VkRenderPassBeginInfo*>( pRenderPassBegin ), static_cast<VkSubpassContents>( 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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const + { + vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast<const VkRenderPassBeginInfo*>( &renderPassBegin ), static_cast<VkSubpassContents>( 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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents ) const + { + vkCmdNextSubpass( m_commandBuffer, static_cast<VkSubpassContents>( 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<const VkCommandBuffer*>( 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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy<const CommandBuffer> commandBuffers ) const + { + vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( pProcessCommandsInfo ) ); - } - + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( &processCommandsInfo ) ); - } + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerBeginEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( &markerInfo ) ); + return markerInfo; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( 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<VkDebugMarkerMarkerInfoEXT*>( pMarkerInfo ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( &reserveSpaceInfo ) ); - } + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerInsertEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast<VkDebugMarkerMarkerInfoEXT*>( &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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( 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<VkBuffer>( buffer ), offset, static_cast<VkBuffer>( 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<const VkCmdProcessCommandsInfoNVX*>( pProcessCommandsInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const + { + vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdProcessCommandsInfoNVX*>( &processCommandsInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( pReserveSpaceInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast<const VkCmdReserveSpaceForCommandsInfoNVX*>( &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<Result>( vkQueueSubmit( m_queue, submitCount, reinterpret_cast<const VkSubmitInfo*>( pSubmits ), static_cast<VkFence>( fence ) ) ); - } - + Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type submit( ArrayProxy<const SubmitInfo> submits, Fence fence ) const - { - Result result = static_cast<Result>( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast<const VkSubmitInfo*>( submits.data() ), static_cast<VkFence>( fence ) ) ); - return createResultValue( result, "vk::Queue::submit" ); - } + ResultValueType<void>::type submit( ArrayProxy<const SubmitInfo> submits, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast<Result>( vkQueueWaitIdle( m_queue ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type waitIdle() const - { - Result result = static_cast<Result>( vkQueueWaitIdle( m_queue ) ); - return createResultValue( result, "vk::Queue::waitIdle" ); - } + Result waitIdle() const; +#else + ResultValueType<void>::type waitIdle() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const - { - return static_cast<Result>( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast<const VkBindSparseInfo*>( pBindInfo ), static_cast<VkFence>( fence ) ) ); - } - + Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type bindSparse( ArrayProxy<const BindSparseInfo> bindInfo, Fence fence ) const - { - Result result = static_cast<Result>( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast<const VkBindSparseInfo*>( bindInfo.data() ), static_cast<VkFence>( fence ) ) ); - return createResultValue( result, "vk::Queue::bindSparse" ); - } + ResultValueType<void>::type bindSparse( ArrayProxy<const BindSparseInfo> bindInfo, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result presentKHR( const PresentInfoKHR* pPresentInfo ) const - { - return static_cast<Result>( vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( pPresentInfo ) ) ); - } - + Result presentKHR( const PresentInfoKHR* pPresentInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result presentKHR( const PresentInfoKHR & presentInfo ) const - { - Result result = static_cast<Result>( vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( &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<Result>( vkQueueSubmit( m_queue, submitCount, reinterpret_cast<const VkSubmitInfo*>( pSubmits ), static_cast<VkFence>( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Queue::submit( ArrayProxy<const SubmitInfo> submits, Fence fence ) const + { + Result result = static_cast<Result>( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast<const VkSubmitInfo*>( submits.data() ), static_cast<VkFence>( 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<Result>( vkQueueWaitIdle( m_queue ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Queue::waitIdle() const + { + Result result = static_cast<Result>( 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<Result>( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast<const VkBindSparseInfo*>( pBindInfo ), static_cast<VkFence>( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Queue::bindSparse( ArrayProxy<const BindSparseInfo> bindInfo, Fence fence ) const + { + Result result = static_cast<Result>( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast<const VkBindSparseInfo*>( bindInfo.data() ), static_cast<VkFence>( 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<Result>( vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( pPresentInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo ) const + { + Result result = static_cast<Result>( vkQueuePresentKHR( m_queue, reinterpret_cast<const VkPresentInfoKHR*>( &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<Buffer, BufferDeleter>; + class BufferViewDeleter; + using UniqueBufferView = UniqueHandle<BufferView, BufferViewDeleter>; + class CommandBufferDeleter; + using UniqueCommandBuffer = UniqueHandle<CommandBuffer, CommandBufferDeleter>; + class CommandPoolDeleter; + using UniqueCommandPool = UniqueHandle<CommandPool, CommandPoolDeleter>; + class DescriptorPoolDeleter; + using UniqueDescriptorPool = UniqueHandle<DescriptorPool, DescriptorPoolDeleter>; + class DescriptorSetDeleter; + using UniqueDescriptorSet = UniqueHandle<DescriptorSet, DescriptorSetDeleter>; + class DescriptorSetLayoutDeleter; + using UniqueDescriptorSetLayout = UniqueHandle<DescriptorSetLayout, DescriptorSetLayoutDeleter>; + class DeviceMemoryDeleter; + using UniqueDeviceMemory = UniqueHandle<DeviceMemory, DeviceMemoryDeleter>; + class EventDeleter; + using UniqueEvent = UniqueHandle<Event, EventDeleter>; + class FenceDeleter; + using UniqueFence = UniqueHandle<Fence, FenceDeleter>; + class FramebufferDeleter; + using UniqueFramebuffer = UniqueHandle<Framebuffer, FramebufferDeleter>; + class ImageDeleter; + using UniqueImage = UniqueHandle<Image, ImageDeleter>; + class ImageViewDeleter; + using UniqueImageView = UniqueHandle<ImageView, ImageViewDeleter>; + class IndirectCommandsLayoutNVXDeleter; + using UniqueIndirectCommandsLayoutNVX = UniqueHandle<IndirectCommandsLayoutNVX, IndirectCommandsLayoutNVXDeleter>; + class ObjectTableNVXDeleter; + using UniqueObjectTableNVX = UniqueHandle<ObjectTableNVX, ObjectTableNVXDeleter>; + class PipelineDeleter; + using UniquePipeline = UniqueHandle<Pipeline, PipelineDeleter>; + class PipelineCacheDeleter; + using UniquePipelineCache = UniqueHandle<PipelineCache, PipelineCacheDeleter>; + class PipelineLayoutDeleter; + using UniquePipelineLayout = UniqueHandle<PipelineLayout, PipelineLayoutDeleter>; + class QueryPoolDeleter; + using UniqueQueryPool = UniqueHandle<QueryPool, QueryPoolDeleter>; + class RenderPassDeleter; + using UniqueRenderPass = UniqueHandle<RenderPass, RenderPassDeleter>; + class SamplerDeleter; + using UniqueSampler = UniqueHandle<Sampler, SamplerDeleter>; + class SemaphoreDeleter; + using UniqueSemaphore = UniqueHandle<Semaphore, SemaphoreDeleter>; + class ShaderModuleDeleter; + using UniqueShaderModule = UniqueHandle<ShaderModule, ShaderModuleDeleter>; + class SwapchainKHRDeleter; + using UniqueSwapchainKHR = UniqueHandle<SwapchainKHR, SwapchainKHRDeleter>; +#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,1314 +18596,2420 @@ 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<const VkAllocationCallbacks*>( pAllocator ) ); - } + void destroy( const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroy( Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) 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<VkQueue*>( pQueue ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result waitIdle() const; +#else + ResultValueType<void>::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 - Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const - { - Queue queue; - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( &queue ) ); - return queue; - } + ResultValueType<DeviceMemory>::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast<Result>( vkDeviceWaitIdle( m_device ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void freeMemory( DeviceMemory memory, Optional<const AllocationCallbacks> 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<void>::type waitIdle() const - { - Result result = static_cast<Result>( vkDeviceWaitIdle( m_device ) ); - return createResultValue( result, "vk::Device::waitIdle" ); - } + ResultValueType<void*>::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const - { - return static_cast<Result>( vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( pAllocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDeviceMemory*>( pMemory ) ) ); - } + void unmapMemory( DeviceMemory memory ) const; + Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<DeviceMemory>::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - DeviceMemory memory; - Result result = static_cast<Result>( vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDeviceMemory*>( &memory ) ) ); - return createResultValue( result, memory, "vk::Device::allocateMemory" ); - } + ResultValueType<void>::type flushMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const - { - vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<void>::type invalidateMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeMemory( DeviceMemory memory, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + DeviceSize getMemoryCommitment( DeviceMemory memory ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) 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<Result>( vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), ppData ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType<void>::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<void*>::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const - { - void* pData; - Result result = static_cast<Result>( vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), &pData ) ); - return createResultValue( result, pData, "vk::Device::mapMemory" ); - } + MemoryRequirements getImageMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void unmapMemory( DeviceMemory memory ) const - { - vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType<void>::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 - void unmapMemory( DeviceMemory memory ) const - { - vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) ); - } + template <typename Allocator = std::allocator<SparseImageMemoryRequirements>> + std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast<Result>( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) ); - } + Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Fence>::type createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type flushMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const - { - Result result = static_cast<Result>( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); - } + void destroyFence( Fence fence, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) ); - } + Result resetFences( uint32_t fenceCount, const Fence* pFences ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<void>::type resetFences( ArrayProxy<const Fence> fences ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifdef 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<void>::type invalidateMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const - { - Result result = static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); - } + Result waitForFences( ArrayProxy<const Fence> fences, Bool32 waitAll, uint64_t timeout ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const - { - vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), pCommittedMemoryInBytes ); - } + Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Semaphore>::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DeviceSize getMemoryCommitment( DeviceMemory memory ) const - { - DeviceSize committedMemoryInBytes; - vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), &committedMemoryInBytes ); - return committedMemoryInBytes; - } + void destroySemaphore( Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const - { - vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) ); - } + Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Event>::type createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const - { - MemoryRequirements memoryRequirements; - vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) ); - return memoryRequirements; - } + void destroyEvent( Event event, Optional<const AllocationCallbacks> allocator = nullptr ) 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<Result>( vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getEventStatus( Event event ) const; +#else + Result getEventStatus( Event event ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result setEvent( Event event ) const; +#else + ResultValueType<void>::type setEvent( Event event ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result resetEvent( Event event ) const; +#else + ResultValueType<void>::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 - ResultValueType<void>::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast<Result>( vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindBufferMemory" ); - } + ResultValueType<QueryPool>::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const - { - vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) ); - } + void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyQueryPool( QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getImageMemoryRequirements( Image image ) const - { - MemoryRequirements memoryRequirements; - vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) ); - return memoryRequirements; - } + template <typename T> + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, DeviceSize stride, QueryResultFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - return static_cast<Result>( vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Buffer>::type createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - ResultValueType<void>::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast<Result>( vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindImageMemory" ); - } + void destroyBuffer( Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const - { - vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( pSparseMemoryRequirements ) ); - } + Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<BufferView>::type createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - template <typename Allocator = std::allocator<SparseImageMemoryRequirements>> - std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image ) const - { - std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( sparseMemoryRequirements.data() ) ); - return sparseMemoryRequirements; - } + void destroyBufferView( BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast<Result>( vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); - } + Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Image>::type createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - ResultValueType<Fence>::type createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Fence fence; - Result result = static_cast<Result>( vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkFence*>( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::createFence" ); - } + void destroyImage( Image image, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const - { - vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + 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 - void destroyFence( Fence fence, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + ResultValueType<ImageView>::type createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result resetFences( uint32_t fenceCount, const Fence* pFences ) const - { - return static_cast<Result>( vkResetFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ) ) ); - } + void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyImageView( ImageView imageView, Optional<const AllocationCallbacks> 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<void>::type resetFences( ArrayProxy<const Fence> fences ) const - { - Result result = static_cast<Result>( vkResetFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ) ) ); - return createResultValue( result, "vk::Device::resetFences" ); - } + ResultValueType<ShaderModule>::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getFenceStatus( Fence fence ) const - { - return static_cast<Result>( vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) ); - } -#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<const AllocationCallbacks> 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 - Result getFenceStatus( Fence fence ) const - { - Result result = static_cast<Result>( vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) ); - return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); - } + ResultValueType<PipelineCache>::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<Result>( vkWaitForFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ), waitAll, timeout ) ); - } + void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyPipelineCache( PipelineCache pipelineCache, Optional<const AllocationCallbacks> 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 - Result waitForFences( ArrayProxy<const Fence> fences, Bool32 waitAll, uint64_t timeout ) const - { - Result result = static_cast<Result>( vkWaitForFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ), waitAll, timeout ) ); - return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); - } + template <typename Allocator = std::allocator<uint8_t>> + typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const - { - return static_cast<Result>( vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSemaphore*>( pSemaphore ) ) ); - } + Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<void>::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy<const PipelineCache> 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 - ResultValueType<Semaphore>::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Semaphore semaphore; - Result result = static_cast<Result>( vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSemaphore*>( &semaphore ) ) ); - return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); - } + template <typename Allocator = std::allocator<Pipeline>> + typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + ResultValueType<Pipeline>::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator = std::allocator<Pipeline>> + std::vector<UniquePipeline> createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const - { - vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<Pipeline>> + typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + ResultValueType<Pipeline>::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator = std::allocator<Pipeline>> + std::vector<UniquePipeline> createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - void destroySemaphore( Semaphore semaphore, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroyPipeline( Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const - { - return static_cast<Result>( vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkEvent*>( pEvent ) ) ); - } + Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<PipelineLayout>::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<Event>::type createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Event event; - Result result = static_cast<Result>( vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkEvent*>( &event ) ) ); - return createResultValue( result, event, "vk::Device::createEvent" ); - } + void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const - { - vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Sampler>::type createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 destroyEvent( Event event, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroySampler( Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getEventStatus( Event event ) const - { - return static_cast<Result>( vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<DescriptorSetLayout>::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - Result getEventStatus( Event event ) const - { - Result result = static_cast<Result>( vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) ); - return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); - } + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result setEvent( Event event ) const - { - return static_cast<Result>( vkSetEvent( m_device, static_cast<VkEvent>( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<DescriptorPool>::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - ResultValueType<void>::type setEvent( Event event ) const - { - Result result = static_cast<Result>( vkSetEvent( m_device, static_cast<VkEvent>( event ) ) ); - return createResultValue( result, "vk::Device::setEvent" ); - } + void destroyDescriptorPool( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetEvent( Event event ) const - { - return static_cast<Result>( vkResetEvent( m_device, static_cast<VkEvent>( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const; +#else + ResultValueType<void>::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<void>::type resetEvent( Event event ) const - { - Result result = static_cast<Result>( vkResetEvent( m_device, static_cast<VkEvent>( event ) ) ); - return createResultValue( result, "vk::Device::resetEvent" ); - } + template <typename Allocator = std::allocator<DescriptorSet>> + typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator = std::allocator<DescriptorSet>> + std::vector<UniqueDescriptorSet> allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) 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<Result>( vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkQueryPool*>( pQueryPool ) ) ); - } - + Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<QueryPool>::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - QueryPool queryPool; - Result result = static_cast<Result>( vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkQueryPool*>( &queryPool ) ) ); - return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); - } + ResultValueType<void>::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void updateDescriptorSets( ArrayProxy<const WriteDescriptorSet> descriptorWrites, ArrayProxy<const CopyDescriptorSet> 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 - void destroyQueryPool( QueryPool queryPool, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + ResultValueType<Framebuffer>::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<Result>( vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast<VkQueryResultFlags>( flags ) ) ); - } + void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyFramebuffer( Framebuffer framebuffer, Optional<const AllocationCallbacks> 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 - template <typename T> - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, DeviceSize stride, QueryResultFlags flags ) const - { - Result result = static_cast<Result>( vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ), stride, static_cast<VkQueryResultFlags>( flags ) ) ); - return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); - } + ResultValueType<RenderPass>::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const - { - return static_cast<Result>( vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBuffer*>( pBuffer ) ) ); - } + void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyRenderPass( RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Buffer>::type createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Buffer buffer; - Result result = static_cast<Result>( vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkBuffer*>( &buffer ) ) ); - return createResultValue( result, buffer, "vk::Device::createBuffer" ); - } + Extent2D getRenderAreaGranularity( RenderPass renderPass ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<CommandPool>::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - void destroyBuffer( Buffer buffer, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroyCommandPool( CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const - { - return static_cast<Result>( vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBufferView*>( pView ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; +#else + ResultValueType<void>::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 - ResultValueType<BufferView>::type createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - BufferView view; - Result result = static_cast<Result>( vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkBufferView*>( &view ) ) ); - return createResultValue( result, view, "vk::Device::createBufferView" ); - } + template <typename Allocator = std::allocator<CommandBuffer>> + typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator = std::allocator<CommandBuffer>> + std::vector<UniqueCommandBuffer> allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void freeCommandBuffers( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBufferView( BufferView bufferView, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + template <typename Allocator = std::allocator<SwapchainKHR>> + typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator = std::allocator<SwapchainKHR>> + std::vector<UniqueSwapchainKHR> createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const; + UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const - { - return static_cast<Result>( vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImage*>( pImage ) ) ); - } + Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<SwapchainKHR>::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Image>::type createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Image image; - Result result = static_cast<Result>( vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkImage*>( &image ) ) ); - return createResultValue( result, image, "vk::Device::createImage" ); - } + void destroySwapchainKHR( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const - { - vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<Image>> + typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImage( Image image, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + ResultValue<uint32_t> acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const - { - vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( pSubresource ), reinterpret_cast<VkSubresourceLayout*>( pLayout ) ); - } + Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<DebugMarkerObjectNameInfoEXT>::type debugMarkerSetObjectNameEXT() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const - { - SubresourceLayout layout; - vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( &subresource ), reinterpret_cast<VkSubresourceLayout*>( &layout ) ); - return layout; - } + ResultValueType<DebugMarkerObjectTagInfoEXT>::type debugMarkerSetObjectTagEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const - { - return static_cast<Result>( vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImageView*>( pView ) ) ); - } +#ifdef VK_USE_PLATFORM_WIN32_KHR + Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<HANDLE>::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ImageView>::type createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - ImageView view; - Result result = static_cast<Result>( vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkImageView*>( &view ) ) ); - return createResultValue( result, view, "vk::Device::createImageView" ); - } + ResultValueType<IndirectCommandsLayoutNVX>::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> 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<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> 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 - void destroyImageView( ImageView imageView, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + ResultValueType<ObjectTableNVX>::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const - { - return static_cast<Result>( vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkShaderModule*>( pShaderModule ) ) ); - } + void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ShaderModule>::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - ShaderModule shaderModule; - Result result = static_cast<Result>( vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) ); - return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); - } + ResultValueType<void>::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const - { - vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<void>::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const; + + Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyShaderModule( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + ResultValueType<void>::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const - { - return static_cast<Result>( vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineCache*>( pPipelineCache ) ) ); - } + Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Fence>::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<PipelineCache>::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - PipelineCache pipelineCache; - Result result = static_cast<Result>( vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) ); - return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); - } + ResultValueType<Fence>::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const + Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValue<uint64_t> getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkDevice() const { - vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + return m_device; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineCache( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator = nullptr ) const + explicit operator bool() const { - vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + return m_device != VK_NULL_HANDLE; } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + bool operator!() const { - return static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) ); + return m_device == VK_NULL_HANDLE; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<uint8_t>> - typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache ) const + private: + VkDevice m_device; + }; + static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); + +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class BufferDeleter + { + public: + BufferDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Buffer buffer ) { - std::vector<uint8_t,Allocator> data; - size_t dataSize; - Result result; - do - { - result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, nullptr ) ); - if ( ( result == Result::eSuccess ) && dataSize ) - { - data.resize( dataSize ); - result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( dataSize <= data.size() ); - data.resize( dataSize ); - return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); + m_device.destroyBuffer( buffer, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class BufferViewDeleter + { + public: + BufferViewDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( BufferView bufferView ) { - return static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCacheCount, reinterpret_cast<const VkPipelineCache*>( pSrcCaches ) ) ); + m_device.destroyBufferView( bufferView, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy<const PipelineCache> srcCaches ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class CommandBufferDeleter + { + public: + CommandBufferDeleter( Device device = Device(), CommandPool commandPool = CommandPool() ) + : m_device( device ) + , m_commandPool( commandPool ) + {} + + void operator()( CommandBuffer commandBuffer ) { - Result result = static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCaches.size() , reinterpret_cast<const VkPipelineCache*>( srcCaches.data() ) ) ); - return createResultValue( result, "vk::Device::mergePipelineCaches" ); + m_device.freeCommandBuffers( m_commandPool, commandBuffer ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + private: + Device m_device; + CommandPool m_commandPool; + }; + + class CommandPoolDeleter + { + public: + CommandPoolDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( CommandPool commandPool ) { - return static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) ); + m_device.destroyCommandPool( commandPool, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<Pipeline>> - typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class DescriptorPoolDeleter + { + public: + DescriptorPoolDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DescriptorPool descriptorPool ) { - std::vector<Pipeline,Allocator> pipelines( createInfos.size() ); - Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); + m_device.destroyDescriptorPool( descriptorPool, m_allocator ); } - ResultValueType<Pipeline>::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class DescriptorSetDeleter + { + public: + DescriptorSetDeleter( Device device = Device(), DescriptorPool descriptorPool = DescriptorPool() ) + : m_device( device ) + , m_descriptorPool( descriptorPool ) + {} + + void operator()( DescriptorSet descriptorSet ) { - Pipeline pipeline; - Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( &pipeline ) ) ); - return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); + m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + private: + Device m_device; + DescriptorPool m_descriptorPool; + }; + + class DescriptorSetLayoutDeleter + { + public: + DescriptorSetLayoutDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DescriptorSetLayout descriptorSetLayout ) { - return static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkComputePipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) ); + m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<Pipeline>> - typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class DeviceMemoryDeleter + { + public: + DeviceMemoryDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DeviceMemory deviceMemory ) { - std::vector<Pipeline,Allocator> pipelines( createInfos.size() ); - Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); + m_device.freeMemory( deviceMemory, m_allocator ); } - ResultValueType<Pipeline>::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class EventDeleter + { + public: + EventDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Event event ) { - Pipeline pipeline; - Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( &pipeline ) ) ); - return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); + m_device.destroyEvent( event, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class FenceDeleter + { + public: + FenceDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Fence fence ) { - vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + m_device.destroyFence( fence, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipeline( Pipeline pipeline, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class FramebufferDeleter + { + public: + FramebufferDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Framebuffer framebuffer ) { - vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + m_device.destroyFramebuffer( framebuffer, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class ImageDeleter + { + public: + ImageDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Image image ) { - return static_cast<Result>( vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineLayout*>( pPipelineLayout ) ) ); + m_device.destroyImage( image, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<PipelineLayout>::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class ImageViewDeleter + { + public: + ImageViewDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ImageView imageView ) { - PipelineLayout pipelineLayout; - Result result = static_cast<Result>( vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) ); - return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); + m_device.destroyImageView( imageView, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class IndirectCommandsLayoutNVXDeleter + { + public: + IndirectCommandsLayoutNVXDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) { - vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class ObjectTableNVXDeleter + { + public: + ObjectTableNVXDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ObjectTableNVX objectTableNVX ) { - vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class PipelineDeleter + { + public: + PipelineDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Pipeline pipeline ) { - return static_cast<Result>( vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSampler*>( pSampler ) ) ); + m_device.destroyPipeline( pipeline, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Sampler>::type createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class PipelineCacheDeleter + { + public: + PipelineCacheDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( PipelineCache pipelineCache ) { - Sampler sampler; - Result result = static_cast<Result>( vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSampler*>( &sampler ) ) ); - return createResultValue( result, sampler, "vk::Device::createSampler" ); + m_device.destroyPipelineCache( pipelineCache, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class PipelineLayoutDeleter + { + public: + PipelineLayoutDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( PipelineLayout pipelineLayout ) { - vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySampler( Sampler sampler, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class QueryPoolDeleter + { + public: + QueryPoolDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( QueryPool queryPool ) { - vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + m_device.destroyQueryPool( queryPool, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class RenderPassDeleter + { + public: + RenderPassDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( RenderPass renderPass ) { - return static_cast<Result>( vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorSetLayout*>( pSetLayout ) ) ); + m_device.destroyRenderPass( renderPass, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<DescriptorSetLayout>::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class SamplerDeleter + { + public: + SamplerDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Sampler sampler ) { - DescriptorSetLayout setLayout; - Result result = static_cast<Result>( vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) ); - return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); + m_device.destroySampler( sampler, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class SemaphoreDeleter + { + public: + SemaphoreDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Semaphore semaphore ) { - vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + m_device.destroySemaphore( semaphore, m_allocator ); } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator = nullptr ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class ShaderModuleDeleter + { + public: + ShaderModuleDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ShaderModule shaderModule ) { - vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + m_device.destroyShaderModule( shaderModule, m_allocator ); } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const + private: + Device m_device; + Optional<const AllocationCallbacks> m_allocator; + }; + + class SwapchainKHRDeleter + { + public: + SwapchainKHRDeleter( Device device = Device(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( SwapchainKHR swapchainKHR ) { - return static_cast<Result>( vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorPool*>( pDescriptorPool ) ) ); + m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); } + private: + Device m_device; + Optional<const AllocationCallbacks> 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 - ResultValueType<DescriptorPool>::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - DescriptorPool descriptorPool; - Result result = static_cast<Result>( vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) ); - return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); - } + 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 destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroy( Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const + { + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( pQueue ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorPool( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + { + Queue queue; + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast<VkQueue*>( &queue ) ); + return queue; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const - { - return static_cast<Result>( vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::waitIdle() const + { + return static_cast<Result>( vkDeviceWaitIdle( m_device ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::waitIdle() const + { + Result result = static_cast<Result>( 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<Result>( vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( pAllocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDeviceMemory*>( pMemory ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const - { - Result result = static_cast<Result>( vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) ); - return createResultValue( result, "vk::Device::resetDescriptorPool" ); - } + VULKAN_HPP_INLINE ResultValueType<DeviceMemory>::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator ) const + { + DeviceMemory memory; + Result result = static_cast<Result>( vkAllocateMemory( m_device, reinterpret_cast<const VkMemoryAllocateInfo*>( &allocateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDeviceMemory*>( &memory ) ) ); + return createResultValue( result, memory, "vk::Device::allocateMemory" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional<const AllocationCallbacks> allocator ) const + { + DeviceMemoryDeleter deleter( *this, allocator ); + return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const - { - return static_cast<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkDescriptorSet*>( pDescriptorSets ) ) ); - } + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const + { + vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional<const AllocationCallbacks> allocator ) const + { + vkFreeMemory( m_device, static_cast<VkDeviceMemory>( memory ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const + { + return static_cast<Result>( vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), ppData ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<DescriptorSet>> - typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const - { - std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount ); - Result result = static_cast<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) ); - return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); - } + VULKAN_HPP_INLINE ResultValueType<void*>::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags ) const + { + void* pData; + Result result = static_cast<Result>( vkMapMemory( m_device, static_cast<VkDeviceMemory>( memory ), offset, size, static_cast<VkMemoryMapFlags>( flags ), &pData ) ); + return createResultValue( result, pData, "vk::Device::mapMemory" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const - { - return static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) ); - } + VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory ) const + { + vkUnmapMemory( m_device, static_cast<VkDeviceMemory>( memory ) ); + } + VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + { + return static_cast<Result>( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets ) const - { - Result result = static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ) ) ); - return createResultValue( result, "vk::Device::freeDescriptorSets" ); - } + VULKAN_HPP_INLINE ResultValueType<void>::type Device::flushMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const + { + Result result = static_cast<Result>( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast<const VkWriteDescriptorSet*>( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast<const VkCopyDescriptorSet*>( pDescriptorCopies ) ); - } - + VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + { + return static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast<const VkMappedMemoryRange*>( pMemoryRanges ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void updateDescriptorSets( ArrayProxy<const WriteDescriptorSet> descriptorWrites, ArrayProxy<const CopyDescriptorSet> descriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) ); - } + VULKAN_HPP_INLINE ResultValueType<void>::type Device::invalidateMappedMemoryRanges( ArrayProxy<const MappedMemoryRange> memoryRanges ) const + { + Result result = static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const - { - return static_cast<Result>( vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFramebuffer*>( pFramebuffer ) ) ); - } + VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const + { + vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), pCommittedMemoryInBytes ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory ) const + { + DeviceSize committedMemoryInBytes; + vkGetDeviceMemoryCommitment( m_device, static_cast<VkDeviceMemory>( memory ), &committedMemoryInBytes ); + return committedMemoryInBytes; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const + { + vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Framebuffer>::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Framebuffer framebuffer; - Result result = static_cast<Result>( vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) ); - return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); - } + VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer ) const + { + MemoryRequirements memoryRequirements; + vkGetBufferMemoryRequirements( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) ); + return memoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const - { - vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast<Result>( vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast<Result>( vkBindBufferMemory( m_device, static_cast<VkBuffer>( buffer ), static_cast<VkDeviceMemory>( 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<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( pMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFramebuffer( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image ) const + { + MemoryRequirements memoryRequirements; + vkGetImageMemoryRequirements( m_device, static_cast<VkImage>( image ), reinterpret_cast<VkMemoryRequirements*>( &memoryRequirements ) ); + return memoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const - { - return static_cast<Result>( vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast<Result>( vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast<Result>( vkBindImageMemory( m_device, static_cast<VkImage>( image ), static_cast<VkDeviceMemory>( 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<VkImage>( image ), pSparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( pSparseMemoryRequirements ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<RenderPass>::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - RenderPass renderPass; - Result result = static_cast<Result>( vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkRenderPass*>( &renderPass ) ) ); - return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); - } + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( Image image ) const + { + std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; + vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, reinterpret_cast<VkSparseImageMemoryRequirements*>( sparseMemoryRequirements.data() ) ); + return sparseMemoryRequirements; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const - { - vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast<Result>( vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::createFence( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Fence fence; + Result result = static_cast<Result>( vkCreateFence( m_device, reinterpret_cast<const VkFenceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkFence*>( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::createFence" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyRenderPass( RenderPass renderPass, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyFence( m_device, static_cast<VkFence>( fence ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const - { - vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( pGranularity ) ); - } + VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences ) const + { + return static_cast<Result>( vkResetFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetFences( ArrayProxy<const Fence> fences ) const + { + Result result = static_cast<Result>( vkResetFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( 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<Result>( vkGetFenceStatus( m_device, static_cast<VkFence>( fence ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + { + Result result = static_cast<Result>( vkGetFenceStatus( m_device, static_cast<VkFence>( 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<Result>( vkWaitForFences( m_device, fenceCount, reinterpret_cast<const VkFence*>( pFences ), waitAll, timeout ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Extent2D getRenderAreaGranularity( RenderPass renderPass ) const - { - Extent2D granularity; - vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( &granularity ) ); - return granularity; - } + VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy<const Fence> fences, Bool32 waitAll, uint64_t timeout ) const + { + Result result = static_cast<Result>( vkWaitForFences( m_device, fences.size() , reinterpret_cast<const VkFence*>( fences.data() ), waitAll, timeout ) ); + return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const - { - return static_cast<Result>( vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkCommandPool*>( pCommandPool ) ) ); - } + VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const + { + return static_cast<Result>( vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSemaphore*>( pSemaphore ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Semaphore>::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Semaphore semaphore; + Result result = static_cast<Result>( vkCreateSemaphore( m_device, reinterpret_cast<const VkSemaphoreCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSemaphore*>( &semaphore ) ) ); + return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<CommandPool>::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - CommandPool commandPool; - Result result = static_cast<Result>( vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkCommandPool*>( &commandPool ) ) ); - return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); - } + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroySemaphore( m_device, static_cast<VkSemaphore>( semaphore ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const + { + return static_cast<Result>( vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkEvent*>( pEvent ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Event>::type Device::createEvent( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Event event; + Result result = static_cast<Result>( vkCreateEvent( m_device, reinterpret_cast<const VkEventCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkEvent*>( &event ) ) ); + return createResultValue( result, event, "vk::Device::createEvent" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueEvent Device::createEventUnique( const EventCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyCommandPool( CommandPool commandPool, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyEvent( m_device, static_cast<VkEvent>( event ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const - { - return static_cast<Result>( vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + return static_cast<Result>( vkGetEventStatus( m_device, static_cast<VkEvent>( event ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + Result result = static_cast<Result>( vkGetEventStatus( m_device, static_cast<VkEvent>( 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<Result>( vkSetEvent( m_device, static_cast<VkEvent>( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::setEvent( Event event ) const + { + Result result = static_cast<Result>( vkSetEvent( m_device, static_cast<VkEvent>( 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<Result>( vkResetEvent( m_device, static_cast<VkEvent>( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetEvent( Event event ) const + { + Result result = static_cast<Result>( vkResetEvent( m_device, static_cast<VkEvent>( 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<Result>( vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkQueryPool*>( pQueryPool ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const - { - Result result = static_cast<Result>( vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) ); - return createResultValue( result, "vk::Device::resetCommandPool" ); - } + VULKAN_HPP_INLINE ResultValueType<QueryPool>::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + QueryPool queryPool; + Result result = static_cast<Result>( vkCreateQueryPool( m_device, reinterpret_cast<const VkQueryPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkQueryPool*>( &queryPool ) ) ); + return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + QueryPoolDeleter deleter( *this, allocator ); + return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const - { - return static_cast<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkCommandBuffer*>( pCommandBuffers ) ) ); - } + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyQueryPool( m_device, static_cast<VkQueryPool>( queryPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( 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<Result>( vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast<VkQueryResultFlags>( flags ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<CommandBuffer>> - typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const - { - std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount ); - Result result = static_cast<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) ); - return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); - } + template <typename T> + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy<T> data, DeviceSize stride, QueryResultFlags flags ) const + { + Result result = static_cast<Result>( vkGetQueryPoolResults( m_device, static_cast<VkQueryPool>( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast<void*>( data.data() ), stride, static_cast<VkQueryResultFlags>( flags ) ) ); + return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) ); - } + VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const + { + return static_cast<Result>( vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBuffer*>( pBuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Buffer>::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Buffer buffer; + Result result = static_cast<Result>( vkCreateBuffer( m_device, reinterpret_cast<const VkBufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkBuffer*>( &buffer ) ) ); + return createResultValue( result, buffer, "vk::Device::createBuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeCommandBuffers( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) ); - } + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyBuffer( m_device, static_cast<VkBuffer>( buffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const - { - return static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchains ) ) ); - } + VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const + { + return static_cast<Result>( vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkBufferView*>( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<BufferView>::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + BufferView view; + Result result = static_cast<Result>( vkCreateBufferView( m_device, reinterpret_cast<const VkBufferViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkBufferView*>( &view ) ) ); + return createResultValue( result, view, "vk::Device::createBufferView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBufferView Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<SwapchainKHR>> - typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size() ); - Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) ); - return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); - } + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyBufferView( m_device, static_cast<VkBufferView>( bufferView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); - } + VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const + { + return static_cast<Result>( vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImage*>( pImage ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Image>::type Device::createImage( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Image image; + Result result = static_cast<Result>( vkCreateImage( m_device, reinterpret_cast<const VkImageCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkImage*>( &image ) ) ); + return createResultValue( result, image, "vk::Device::createImage" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + ImageDeleter deleter( *this, allocator ); + return UniqueImage( createImage( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const - { - return static_cast<Result>( vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchain ) ) ); - } + VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator ) const + { + vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyImage( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( 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<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( pSubresource ), reinterpret_cast<VkSubresourceLayout*>( pLayout ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<SwapchainKHR>::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast<Result>( vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); - } + VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const + { + SubresourceLayout layout; + vkGetImageSubresourceLayout( m_device, static_cast<VkImage>( image ), reinterpret_cast<const VkImageSubresource*>( &subresource ), reinterpret_cast<VkSubresourceLayout*>( &layout ) ); + return layout; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const - { - vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const + { + return static_cast<Result>( vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkImageView*>( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<ImageView>::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + ImageView view; + Result result = static_cast<Result>( vkCreateImageView( m_device, reinterpret_cast<const VkImageViewCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkImageView*>( &view ) ) ); + return createResultValue( result, view, "vk::Device::createImageView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySwapchainKHR( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyImageView( m_device, static_cast<VkImageView>( imageView ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const - { - return static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), pSwapchainImageCount, reinterpret_cast<VkImage*>( pSwapchainImages ) ) ); - } + VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const + { + return static_cast<Result>( vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkShaderModule*>( pShaderModule ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<ShaderModule>::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + ShaderModule shaderModule; + Result result = static_cast<Result>( vkCreateShaderModule( m_device, reinterpret_cast<const VkShaderModuleCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkShaderModule*>( &shaderModule ) ) ); + return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueShaderModule Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyShaderModule( m_device, static_cast<VkShaderModule>( shaderModule ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( 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<Result>( vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineCache*>( pPipelineCache ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<Image>> - typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const + VULKAN_HPP_INLINE ResultValueType<PipelineCache>::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + PipelineCache pipelineCache; + Result result = static_cast<Result>( vkCreatePipelineCache( m_device, reinterpret_cast<const VkPipelineCacheCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipelineCache*>( &pipelineCache ) ) ); + return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineCache Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyPipelineCache( m_device, static_cast<VkPipelineCache>( pipelineCache ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + { + return static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( PipelineCache pipelineCache ) const + { + std::vector<uint8_t,Allocator> data; + size_t dataSize; + Result result; + do { - std::vector<Image,Allocator> swapchainImages; - uint32_t swapchainImageCount; - Result result; - do + result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && dataSize ) { - result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( swapchainImageCount <= swapchainImages.size() ); - swapchainImages.resize( swapchainImageCount ); - return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); - } + data.resize( dataSize ); + result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( 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*/ - Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const - { - return static_cast<Result>( vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), pImageIndex ) ); - } + VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const + { + return static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCacheCount, reinterpret_cast<const VkPipelineCache*>( pSrcCaches ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy<const PipelineCache> srcCaches ) const + { + Result result = static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), srcCaches.size() , reinterpret_cast<const VkPipelineCache*>( 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<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue<uint32_t> acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + std::vector<Pipeline,Allocator> pipelines( createInfos.size() ); + Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); + } + VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Pipeline pipeline; + Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( &pipeline ) ) ); + return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector<Pipeline,Allocator> pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); + std::vector<UniquePipeline> uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) { - uint32_t imageIndex; - Result result = static_cast<Result>( vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), &imageIndex ) ); - return createResultValue( result, imageIndex, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> 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*/ - Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const + VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + { + return static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfoCount, reinterpret_cast<const VkComputePipelineCreateInfo*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipeline*>( pPipelines ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + std::vector<Pipeline,Allocator> pipelines( createInfos.size() ); + Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); + } + VULKAN_HPP_INLINE ResultValueType<Pipeline>::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Pipeline pipeline; + Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), 1 , reinterpret_cast<const VkComputePipelineCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( &pipeline ) ) ); + return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector<Pipeline,Allocator> pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); + std::vector<UniquePipeline> uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) { - return static_cast<Result>( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>( pNameInfo ) ) ); + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<DebugMarkerObjectNameInfoEXT>::type debugMarkerSetObjectNameEXT() const - { - DebugMarkerObjectNameInfoEXT nameInfo; - Result result = static_cast<Result>( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>( &nameInfo ) ) ); - return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); - } + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyPipeline( m_device, static_cast<VkPipeline>( pipeline ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const - { - return static_cast<Result>( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>( pTagInfo ) ) ); - } + VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const + { + return static_cast<Result>( vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkPipelineLayout*>( pPipelineLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<PipelineLayout>::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + PipelineLayout pipelineLayout; + Result result = static_cast<Result>( vkCreatePipelineLayout( m_device, reinterpret_cast<const VkPipelineLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipelineLayout*>( &pipelineLayout ) ) ); + return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<DebugMarkerObjectTagInfoEXT>::type debugMarkerSetObjectTagEXT() const - { - DebugMarkerObjectTagInfoEXT tagInfo; - Result result = static_cast<Result>( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>( &tagInfo ) ) ); - return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); - } + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyPipelineLayout( m_device, static_cast<VkPipelineLayout>( pipelineLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const - { - return static_cast<Result>( vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), pHandle ) ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const + { + return static_cast<Result>( vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSampler*>( pSampler ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Sampler>::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Sampler sampler; + Result result = static_cast<Result>( vkCreateSampler( m_device, reinterpret_cast<const VkSamplerCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSampler*>( &sampler ) ) ); + return createResultValue( result, sampler, "vk::Device::createSampler" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType<HANDLE>::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const - { - HANDLE handle; - Result result = static_cast<Result>( vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroySampler( m_device, static_cast<VkSampler>( sampler ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const - { - return static_cast<Result>( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( pIndirectCommandsLayout ) ) ); - } + VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + { + return static_cast<Result>( vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorSetLayout*>( pSetLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DescriptorSetLayout>::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DescriptorSetLayout setLayout; + Result result = static_cast<Result>( vkCreateDescriptorSetLayout( m_device, reinterpret_cast<const VkDescriptorSetLayoutCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDescriptorSetLayout*>( &setLayout ) ) ); + return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<IndirectCommandsLayoutNVX>::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - IndirectCommandsLayoutNVX indirectCommandsLayout; - Result result = static_cast<Result>( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) ); - return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); - } + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyDescriptorSetLayout( m_device, static_cast<VkDescriptorSetLayout>( descriptorSetLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const + { + return static_cast<Result>( vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDescriptorPool*>( pDescriptorPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DescriptorPool>::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DescriptorPool descriptorPool; + Result result = static_cast<Result>( vkCreateDescriptorPool( m_device, reinterpret_cast<const VkDescriptorPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDescriptorPool*>( &descriptorPool ) ) ); + return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const - { - return static_cast<Result>( vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkObjectTableNVX*>( pObjectTable ) ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + return static_cast<Result>( vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + Result result = static_cast<Result>( vkResetDescriptorPool( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<VkDescriptorPoolResetFlags>( 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<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkDescriptorSet*>( pDescriptorSets ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ObjectTableNVX>::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const + { + std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) ); + return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<UniqueDescriptorSet> Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const + { + DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); + std::vector<DescriptorSet,Allocator> descriptorSets = allocateDescriptorSets( allocateInfo ); + std::vector<UniqueDescriptorSet> uniqueDescriptorSets; + uniqueDescriptorSets.reserve( descriptorSets.size() ); + for ( auto descriptorSet : descriptorSets ) { - ObjectTableNVX objectTable; - Result result = static_cast<Result>( vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) ); - return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); + uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); } + return uniqueDescriptorSets; + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const - { - vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } + VULKAN_HPP_INLINE Result Device::freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const + { + return static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSetCount, reinterpret_cast<const VkDescriptorSet*>( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy<const DescriptorSet> descriptorSets ) const + { + Result result = static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), descriptorSets.size() , reinterpret_cast<const VkDescriptorSet*>( 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<const VkWriteDescriptorSet*>( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast<const VkCopyDescriptorSet*>( pDescriptorCopies ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy<const WriteDescriptorSet> descriptorWrites, ArrayProxy<const CopyDescriptorSet> descriptorCopies ) const + { + vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const - { - return static_cast<Result>( vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectTableEntryNVX* const*>( ppObjectTableEntries ), pObjectIndices ) ); - } + VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const + { + return static_cast<Result>( vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFramebuffer*>( pFramebuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Framebuffer>::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Framebuffer framebuffer; + Result result = static_cast<Result>( vkCreateFramebuffer( m_device, reinterpret_cast<const VkFramebufferCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkFramebuffer*>( &framebuffer ) ) ); + return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( pObjectTableEntries.size() == objectIndices.size() ); + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyFramebuffer( m_device, static_cast<VkFramebuffer>( framebuffer ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( 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<Result>( vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkRenderPass*>( pRenderPass ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<RenderPass>::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + RenderPass renderPass; + Result result = static_cast<Result>( vkCreateRenderPass( m_device, reinterpret_cast<const VkRenderPassCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkRenderPass*>( &renderPass ) ) ); + return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyRenderPass( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const + { + vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( pGranularity ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass ) const + { + Extent2D granularity; + vkGetRenderAreaGranularity( m_device, static_cast<VkRenderPass>( renderPass ), reinterpret_cast<VkExtent2D*>( &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<Result>( vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkCommandPool*>( pCommandPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<CommandPool>::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + CommandPool commandPool; + Result result = static_cast<Result>( vkCreateCommandPool( m_device, reinterpret_cast<const VkCommandPoolCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkCommandPool*>( &commandPool ) ) ); + return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( 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<Result>( vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( flags ) ) ); + } #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<Result>( vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), pObjectTableEntries.size() , reinterpret_cast<const VkObjectTableEntryNVX* const*>( pObjectTableEntries.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::registerObjectsNVX" ); + VULKAN_HPP_INLINE ResultValueType<void>::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + { + Result result = static_cast<Result>( vkResetCommandPool( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolResetFlags>( 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<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( pAllocateInfo ), reinterpret_cast<VkCommandBuffer*>( pCommandBuffers ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const + { + std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) ); + return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<UniqueCommandBuffer> Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const + { + CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); + std::vector<CommandBuffer,Allocator> commandBuffers = allocateCommandBuffers( allocateInfo ); + std::vector<UniqueCommandBuffer> 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*/ - Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBufferCount, reinterpret_cast<const VkCommandBuffer*>( pCommandBuffers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy<const CommandBuffer> commandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), commandBuffers.size() , reinterpret_cast<const VkCommandBuffer*>( 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<Result>( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfos ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchains ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size() ); + Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) ); + return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); + } + VULKAN_HPP_INLINE ResultValueType<SwapchainKHR>::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<UniqueSwapchainKHR> Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + std::vector<SwapchainKHR,Allocator> swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); + std::vector<UniqueSwapchainKHR> uniqueSwapchainKHRs; + uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); + for ( auto swapchainKHR : swapchainKHRs ) { - return static_cast<Result>( vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectEntryTypeNVX*>( pObjectEntryTypes ), pObjectIndices ) ); + uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); } + return uniqueSwapchainKHRs; + } + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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<Result>( vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSwapchainKHR*>( pSwapchain ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SwapchainKHR>::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast<Result>( vkCreateSwapchainKHR( m_device, reinterpret_cast<const VkSwapchainCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroySwapchainKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const + { + return static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), pSwapchainImageCount, reinterpret_cast<VkImage*>( pSwapchainImages ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices ) const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain ) const + { + std::vector<Image,Allocator> swapchainImages; + uint32_t swapchainImageCount; + Result result; + do { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( objectEntryTypes.size() == objectIndices.size() ); -#else - if ( objectEntryTypes.size() != objectIndices.size() ) + result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && swapchainImageCount ) { - throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); + swapchainImages.resize( swapchainImageCount ); + result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) ); } -#endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast<Result>( vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectEntryTypes.size() , reinterpret_cast<const VkObjectEntryTypeNVX*>( objectEntryTypes.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); - } + } while ( result == Result::eIncomplete ); + assert( swapchainImageCount <= swapchainImages.size() ); + swapchainImages.resize( swapchainImageCount ); + return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const - { - vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlagsKHR>( flags ) ); - } -#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<Result>( vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( fence ), pImageIndex ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue<uint32_t> Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const + { + uint32_t imageIndex; + Result result = static_cast<Result>( vkAcquireNextImageKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), timeout, static_cast<VkSemaphore>( semaphore ), static_cast<VkFence>( 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<Result>( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>( pNameInfo ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags = CommandPoolTrimFlagsKHR() ) const - { - vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlagsKHR>( flags ) ); - } + VULKAN_HPP_INLINE ResultValueType<DebugMarkerObjectNameInfoEXT>::type Device::debugMarkerSetObjectNameEXT() const + { + DebugMarkerObjectNameInfoEXT nameInfo; + Result result = static_cast<Result>( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast<VkDebugMarkerObjectNameInfoEXT*>( &nameInfo ) ) ); + return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const - { - return static_cast<Result>( vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( pDisplayPowerInfo ) ) ); - } + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const + { + return static_cast<Result>( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>( pTagInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DebugMarkerObjectTagInfoEXT>::type Device::debugMarkerSetObjectTagEXT() const + { + DebugMarkerObjectTagInfoEXT tagInfo; + Result result = static_cast<Result>( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast<VkDebugMarkerObjectTagInfoEXT*>( &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<Result>( vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), pHandle ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const - { - Result result = static_cast<Result>( vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( &displayPowerInfo ) ) ); - return createResultValue( result, "vk::Device::displayPowerControlEXT" ); - } + VULKAN_HPP_INLINE ResultValueType<HANDLE>::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const + { + HANDLE handle; + Result result = static_cast<Result>( vkGetMemoryWin32HandleNV( m_device, static_cast<VkDeviceMemory>( memory ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( handleType ), &handle ) ); + return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast<Result>( vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( pDeviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); - } + VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const + { + return static_cast<Result>( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( pIndirectCommandsLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<IndirectCommandsLayoutNVX>::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast<Result>( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast<const VkIndirectCommandsLayoutCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkIndirectCommandsLayoutNVX*>( &indirectCommandsLayout ) ) ); + return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> 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<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Fence>::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast<Result>( vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( &deviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( &allocator ), reinterpret_cast<VkFence*>( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerEventEXT" ); - } + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast<VkIndirectCommandsLayoutNVX>( indirectCommandsLayout ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast<Result>( vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( pDisplayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); - } + VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const + { + return static_cast<Result>( vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkObjectTableNVX*>( pObjectTable ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<ObjectTableNVX>::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + ObjectTableNVX objectTable; + Result result = static_cast<Result>( vkCreateObjectTableNVX( m_device, reinterpret_cast<const VkObjectTableCreateInfoNVX*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkObjectTableNVX*>( &objectTable ) ) ); + return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional<const AllocationCallbacks> 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<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<Fence>::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast<Result>( vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( &displayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( &allocator ), reinterpret_cast<VkFence*>( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); - } + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyObjectTableNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const + VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + { + return static_cast<Result>( vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectTableEntryNVX* const*>( ppObjectTableEntries ), pObjectIndices ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectTableEntryNVX* const> pObjectTableEntries, ArrayProxy<const uint32_t> objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( pObjectTableEntries.size() == objectIndices.size() ); +#else + if ( pObjectTableEntries.size() != objectIndices.size() ) { - return static_cast<Result>( vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), pCounterValue ) ); + throw std::logic_error( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast<Result>( vkRegisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), pObjectTableEntries.size() , reinterpret_cast<const VkObjectTableEntryNVX* const*>( 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<Result>( vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectCount, reinterpret_cast<const VkObjectEntryTypeNVX*>( pObjectEntryTypes ), pObjectIndices ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue<uint64_t> getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const + VULKAN_HPP_INLINE ResultValueType<void>::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy<const ObjectEntryTypeNVX> objectEntryTypes, ArrayProxy<const uint32_t> objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( objectEntryTypes.size() == objectIndices.size() ); +#else + if ( objectEntryTypes.size() != objectIndices.size() ) { - uint64_t counterValue; - Result result = static_cast<Result>( vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), &counterValue ) ); - return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); + throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast<Result>( vkUnregisterObjectsNVX( m_device, static_cast<VkObjectTableNVX>( objectTable ), objectEntryTypes.size() , reinterpret_cast<const VkObjectEntryTypeNVX*>( objectEntryTypes.data() ), objectIndices.data() ) ); + return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) - explicit -#endif - operator VkDevice() const - { - return m_device; - } + VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const + { + vkTrimCommandPoolKHR( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<VkCommandPoolTrimFlagsKHR>( flags ) ); + } - explicit operator bool() const - { - return m_device != VK_NULL_HANDLE; - } + VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const + { + return static_cast<Result>( vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( pDisplayPowerInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<void>::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const + { + Result result = static_cast<Result>( vkDisplayPowerControlEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayPowerInfoEXT*>( &displayPowerInfo ) ) ); + return createResultValue( result, "vk::Device::displayPowerControlEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - bool operator!() const - { - return m_device == VK_NULL_HANDLE; - } + VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast<Result>( vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( pDeviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast<Result>( vkRegisterDeviceEventEXT( m_device, reinterpret_cast<const VkDeviceEventInfoEXT*>( &deviceEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( &allocator ), reinterpret_cast<VkFence*>( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::registerEventEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - private: - VkDevice m_device; - }; - static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast<Result>( vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( pDisplayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkFence*>( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Fence>::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast<Result>( vkRegisterDisplayEventEXT( m_device, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayEventInfoEXT*>( &displayEventInfo ), reinterpret_cast<const VkAllocationCallbacks*>( &allocator ), reinterpret_cast<VkFence*>( &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<Result>( vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( counter ), pCounterValue ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue<uint64_t> Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const + { + uint64_t counterValue; + Result result = static_cast<Result>( vkGetSwapchainCounterEXT( m_device, static_cast<VkSwapchainKHR>( swapchain ), static_cast<VkSurfaceCounterFlagBitsEXT>( 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<Device, DeviceDeleter>; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class PhysicalDevice { @@ -20026,6 +21018,10 @@ namespace vk : 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) @@ -20038,6 +21034,12 @@ namespace vk } #endif + PhysicalDevice& operator=( nullptr_t ) + { + m_physicalDevice = VK_NULL_HANDLE; + return *this; + } + bool operator==(PhysicalDevice const &rhs) const { return m_physicalDevice == rhs.m_physicalDevice; @@ -20053,698 +21055,888 @@ namespace vk return m_physicalDevice < rhs.m_physicalDevice; } - void getProperties( PhysicalDeviceProperties* pProperties ) const - { - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( pProperties ) ); - } + 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 - PhysicalDeviceProperties getProperties() const - { - PhysicalDeviceProperties properties; - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( &properties ) ); - return properties; - } + template <typename Allocator = std::allocator<QueueFamilyProperties>> + std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const - { - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( pQueueFamilyProperties ) ); - } + 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 - template <typename Allocator = std::allocator<QueueFamilyProperties>> - std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties() const - { - std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + PhysicalDeviceFeatures getFeatures() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( pMemoryProperties ) ); - } + 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 - PhysicalDeviceMemoryProperties getMemoryProperties() const - { - PhysicalDeviceMemoryProperties memoryProperties; - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( &memoryProperties ) ); - return memoryProperties; - } + ResultValueType<ImageFormatProperties>::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures( PhysicalDeviceFeatures* pFeatures ) const - { - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( pFeatures ) ); - } + Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Device>::type createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> 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 - PhysicalDeviceFeatures getFeatures() const - { - PhysicalDeviceFeatures features; - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( &features ) ); - return features; - } + template <typename Allocator = std::allocator<LayerProperties>> + typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( pFormatProperties ) ); - } + Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<ExtensionProperties>> + typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> 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 - FormatProperties getFormatProperties( Format format ) const - { - FormatProperties formatProperties; - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( &formatProperties ) ); - return formatProperties; - } + template <typename Allocator = std::allocator<SparseImageFormatProperties>> + std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const - { - return static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( pImageFormatProperties ) ) ); - } + Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<DisplayPropertiesKHR>> + typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR() const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ImageFormatProperties>::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const - { - ImageFormatProperties imageFormatProperties; - Result result = static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties" ); - } + template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>> + typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const - { - return static_cast<Result>( vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDevice*>( pDevice ) ) ); - } + Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<DisplayKHR>> + typename ResultValueType<std::vector<DisplayKHR,Allocator>>::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 - ResultValueType<Device>::type createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - Device device; - Result result = static_cast<Result>( vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDevice*>( &device ) ) ); - return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); - } + template <typename Allocator = std::allocator<DisplayModePropertiesKHR>> + typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const - { - return static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) ); - } + Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<DisplayModeKHR>::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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 - template <typename Allocator = std::allocator<LayerProperties>> - typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties() const - { - std::vector<LayerProperties,Allocator> properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); - } + ResultValueType<DisplayPlaneCapabilitiesKHR>::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const - { - return static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) ); - } +#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 - template <typename Allocator = std::allocator<ExtensionProperties>> - typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName = nullptr ) const - { - std::vector<ExtensionProperties,Allocator> properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); - } + ResultValueType<Bool32>::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) 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 - { - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( pProperties ) ); - } + Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<SurfaceCapabilitiesKHR>::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 Allocator = std::allocator<SparseImageFormatProperties>> - std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const - { - std::vector<SparseImageFormatProperties,Allocator> properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( properties.data() ) ); - return properties; - } + template <typename Allocator = std::allocator<SurfaceFormatKHR>> + typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const - { - return static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( pProperties ) ) ); - } + Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator = std::allocator<PresentModeKHR>> + typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::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 - template <typename Allocator = std::allocator<DisplayPropertiesKHR>> - typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR() const - { - std::vector<DisplayPropertiesKHR,Allocator> properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); - } + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const - { - return static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( pProperties ) ) ); - } +#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 - template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>> - typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR() const - { - std::vector<DisplayPlanePropertiesKHR,Allocator> properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - } + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const - { - return static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR*>( pDisplays ) ) ); - } +#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 - template <typename Allocator = std::allocator<DisplayKHR>> - typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const - { - std::vector<DisplayKHR,Allocator> displays; - uint32_t displayCount; - Result result; - do - { - result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( displays.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( displayCount <= displays.size() ); - displays.resize( displayCount ); - return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); - } + ResultValueType<ExternalImageFormatPropertiesNV>::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const - { - return static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( pProperties ) ) ); - } + 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 - template <typename Allocator = std::allocator<DisplayModePropertiesKHR>> - typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display ) const - { - std::vector<DisplayModePropertiesKHR,Allocator> properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); - } + PhysicalDeviceFeatures2KHR getFeatures2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const - { - return static_cast<Result>( vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDisplayModeKHR*>( pMode ) ) ); - } + 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 - ResultValueType<DisplayModeKHR>::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - DisplayModeKHR mode; - Result result = static_cast<Result>( vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDisplayModeKHR*>( &mode ) ) ); - return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); - } + FormatProperties2KHR getFormatProperties2KHR( Format format ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const - { - return static_cast<Result>( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( pCapabilities ) ) ); - } + Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<ImageFormatProperties2KHR>::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 - ResultValueType<DisplayPlaneCapabilitiesKHR>::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const - { - DisplayPlaneCapabilitiesKHR capabilities; - Result result = static_cast<Result>( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( &capabilities ) ) ); - return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - } + template <typename Allocator = std::allocator<QueueFamilyProperties2KHR>> + std::vector<QueueFamilyProperties2KHR,Allocator> getQueueFamilyProperties2KHR() const; #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*/ + 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 -#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 <typename Allocator = std::allocator<SparseImageFormatProperties2KHR>> + std::vector<SparseImageFormatProperties2KHR,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const - { - return static_cast<Result>( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), pSupported ) ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result releaseDisplayEXT( DisplayKHR display ) const; +#else + ResultValueType<void>::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<Bool32>::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const - { - Bool32 supported; - Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), &supported ) ); - return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); - } + ResultValueType<Display>::type acquireXlibDisplayEXT( DisplayKHR display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const - { - return static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( pSurfaceCapabilities ) ) ); - } +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<DisplayKHR>::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<SurfaceCapabilitiesKHR>::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const - { - SurfaceCapabilitiesKHR surfaceCapabilities; - Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - } + ResultValueType<SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const +#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) + explicit +#endif + operator VkPhysicalDevice() const { - return static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( pSurfaceFormats ) ) ); + return m_physicalDevice; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<SurfaceFormatKHR>> - typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const + explicit operator bool() const { - std::vector<SurfaceFormatKHR,Allocator> surfaceFormats; - uint32_t surfaceFormatCount; - Result result; - do - { - result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( surfaceFormats.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( surfaceFormatCount <= surfaceFormats.size() ); - surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + return m_physicalDevice != VK_NULL_HANDLE; } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const + bool operator!() const { - return static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pPresentModeCount, reinterpret_cast<VkPresentModeKHR*>( pPresentModes ) ) ); + return m_physicalDevice == VK_NULL_HANDLE; } -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<PresentModeKHR>> - typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const - { - std::vector<PresentModeKHR,Allocator> presentModes; - uint32_t presentModeCount; - Result result; - do - { - result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( 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*/ + private: + VkPhysicalDevice m_physicalDevice; + }; + static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DeviceDeleter + { + public: + DeviceDeleter( Optional<const AllocationCallbacks> allocator = nullptr ) + : m_allocator( allocator ) + {} + + void operator()( Device device ) { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); + device.destroy( m_allocator ); } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + private: + Optional<const AllocationCallbacks> m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties ) const + { + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( pProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const - { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties() const + { + PhysicalDeviceProperties properties; + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties*>( &properties ) ); + return properties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const - { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( pQueueFamilyProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<QueueFamilyProperties,Allocator> PhysicalDevice::getQueueFamilyProperties() const + { + std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties*>( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( pMemoryProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const - { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const + { + PhysicalDeviceMemoryProperties memoryProperties; + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties*>( &memoryProperties ) ); + return memoryProperties; + } #endif /*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*/ + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures ) const + { + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( pFeatures ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures() const + { + PhysicalDeviceFeatures features; + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures*>( &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<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( pFormatProperties ) ); + } #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*/ + VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format ) const + { + FormatProperties formatProperties; + vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties*>( &formatProperties ) ); + return formatProperties; + } #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*/ + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const + { + return static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( pImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<ImageFormatProperties>::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const + { + ImageFormatProperties imageFormatProperties; + Result result = static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), reinterpret_cast<VkImageFormatProperties*>( &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<Result>( vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDevice*>( pDevice ) ) ); + } #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*/ + VULKAN_HPP_INLINE ResultValueType<Device>::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + Device device; + Result result = static_cast<Result>( vkCreateDevice( m_physicalDevice, reinterpret_cast<const VkDeviceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDevice*>( &device ) ) ); + return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DeviceDeleter deleter( allocator ); + return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const + { + return static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast<VkLayerProperties*>( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type PhysicalDevice::enumerateDeviceLayerProperties() const + { + std::vector<LayerProperties,Allocator> properties; + uint32_t propertyCount; + Result result; + do { - return static_cast<Result>( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( pExternalImageFormatProperties ) ) ); - } + result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( 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<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast<VkExtensionProperties*>( pProperties ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ExternalImageFormatPropertiesNV>::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName ) const + { + std::vector<ExtensionProperties,Allocator> properties; + uint32_t propertyCount; + Result result; + do { - ExternalImageFormatPropertiesNV externalImageFormatProperties; - Result result = static_cast<Result>( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( &externalImageFormatProperties ) ) ); - return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - } + result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( 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*/ - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const - { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( pFeatures ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( pLimits ) ); - } + 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<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const + { + std::vector<SparseImageFormatProperties,Allocator> properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties*>( 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<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( pProperties ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, DeviceGeneratedCommandsLimitsNVX & limits ) const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPropertiesKHR() const + { + std::vector<DisplayPropertiesKHR,Allocator> properties; + uint32_t propertyCount; + Result result; + do { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( &features ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( &limits ) ); - } + result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( 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*/ - void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const + { + return static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPlanePropertiesKHR() const + { + std::vector<DisplayPlanePropertiesKHR,Allocator> properties; + uint32_t propertyCount; + Result result; + do { - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2KHR*>( pFeatures ) ); - } + result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( 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<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast<VkDisplayKHR*>( pDisplays ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures2KHR getFeatures2KHR() const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + { + std::vector<DisplayKHR,Allocator> displays; + uint32_t displayCount; + Result result; + do { - PhysicalDeviceFeatures2KHR features; - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2KHR*>( &features ) ); - return features; - } + result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && displayCount ) + { + displays.resize( displayCount ); + result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( 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*/ - void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const + { + return static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), pPropertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display ) const + { + std::vector<DisplayModePropertiesKHR,Allocator> properties; + uint32_t propertyCount; + Result result; + do { - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2KHR*>( pProperties ) ); - } + result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( 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<Result>( vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDisplayModeKHR*>( pMode ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties2KHR getProperties2KHR() const - { - PhysicalDeviceProperties2KHR properties; - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2KHR*>( &properties ) ); - return properties; - } + VULKAN_HPP_INLINE ResultValueType<DisplayModeKHR>::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DisplayModeKHR mode; + Result result = static_cast<Result>( vkCreateDisplayModeKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), reinterpret_cast<const VkDisplayModeCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDisplayModeKHR*>( &mode ) ) ); + return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2KHR*>( pFormatProperties ) ); - } + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const + { + return static_cast<Result>( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( pCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DisplayPlaneCapabilitiesKHR>::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const + { + DisplayPlaneCapabilitiesKHR capabilities; + Result result = static_cast<Result>( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast<VkDisplayModeKHR>( mode ), planeIndex, reinterpret_cast<VkDisplayPlaneCapabilitiesKHR*>( &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 - FormatProperties2KHR getFormatProperties2KHR( Format format ) const - { - FormatProperties2KHR formatProperties; - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2KHR*>( &formatProperties ) ); - return formatProperties; - } + 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*/ - Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const - { - return static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2KHR*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2KHR*>( pImageFormatProperties ) ) ); - } + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const + { + return static_cast<Result>( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( surface ), pSupported ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Bool32>::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const + { + Bool32 supported; + Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast<VkSurfaceKHR>( 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<Result>( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( pSurfaceCapabilities ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<ImageFormatProperties2KHR>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const - { - ImageFormatProperties2KHR imageFormatProperties; - Result result = static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2KHR*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2KHR*>( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); - } + VULKAN_HPP_INLINE ResultValueType<SurfaceCapabilitiesKHR>::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const + { + SurfaceCapabilitiesKHR surfaceCapabilities; + Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilitiesKHR*>( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const + { + return static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pSurfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( pSurfaceFormats ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface ) const + { + std::vector<SurfaceFormatKHR,Allocator> surfaceFormats; + uint32_t surfaceFormatCount; + Result result; + do { - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2KHR*>( pQueueFamilyProperties ) ); - } + result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && surfaceFormatCount ) + { + surfaceFormats.resize( surfaceFormatCount ); + result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( 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<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), pPresentModeCount, reinterpret_cast<VkPresentModeKHR*>( pPresentModes ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<QueueFamilyProperties2KHR>> - std::vector<QueueFamilyProperties2KHR,Allocator> getQueueFamilyProperties2KHR() const + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface ) const + { + std::vector<PresentModeKHR,Allocator> presentModes; + uint32_t presentModeCount; + Result result; + do { - std::vector<QueueFamilyProperties2KHR,Allocator> queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2KHR*>( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && presentModeCount ) + { + presentModes.resize( presentModeCount ); + result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( 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*/ - void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2KHR*>( pMemoryProperties ) ); - } +#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 - PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const - { - PhysicalDeviceMemoryProperties2KHR memoryProperties; - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2KHR*>( &memoryProperties ) ); - return memoryProperties; - } + 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*/ - void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const - { - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2KHR*>( pProperties ) ); - } +#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<Result>( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( pExternalImageFormatProperties ) ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<SparseImageFormatProperties2KHR>> - std::vector<SparseImageFormatProperties2KHR,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const - { - std::vector<SparseImageFormatProperties2KHR,Allocator> properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2KHR*>( properties.data() ) ); - return properties; - } + VULKAN_HPP_INLINE ResultValueType<ExternalImageFormatPropertiesNV>::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const + { + ExternalImageFormatPropertiesNV externalImageFormatProperties; + Result result = static_cast<Result>( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkImageTiling>( tiling ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageCreateFlags>( flags ), static_cast<VkExternalMemoryHandleTypeFlagsNV>( externalHandleType ), reinterpret_cast<VkExternalImageFormatPropertiesNV*>( &externalImageFormatProperties ) ) ); + return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result releaseDisplayEXT( DisplayKHR display ) const - { - return static_cast<Result>( vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const + { + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( pFeatures ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( pLimits ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const + { + DeviceGeneratedCommandsLimitsNVX limits; + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast<VkDeviceGeneratedCommandsFeaturesNVX*>( &features ), reinterpret_cast<VkDeviceGeneratedCommandsLimitsNVX*>( &limits ) ); + return limits; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const + { + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2KHR*>( pFeatures ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<void>::type releaseDisplayEXT( DisplayKHR display ) const - { - Result result = static_cast<Result>( vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); - } + VULKAN_HPP_INLINE PhysicalDeviceFeatures2KHR PhysicalDevice::getFeatures2KHR() const + { + PhysicalDeviceFeatures2KHR features; + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceFeatures2KHR*>( &features ) ); + return features; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const - { - return static_cast<Result>( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast<VkDisplayKHR>( display ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2KHR*>( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceProperties2KHR PhysicalDevice::getProperties2KHR() const + { + PhysicalDeviceProperties2KHR properties; + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceProperties2KHR*>( &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<VkFormat>( format ), reinterpret_cast<VkFormatProperties2KHR*>( pFormatProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType<Display>::type acquireXlibDisplayEXT( DisplayKHR display ) const - { - Display dpy; - Result result = static_cast<Result>( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast<VkDisplayKHR>( display ) ) ); - return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + VULKAN_HPP_INLINE FormatProperties2KHR PhysicalDevice::getFormatProperties2KHR( Format format ) const + { + FormatProperties2KHR formatProperties; + vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast<VkFormat>( format ), reinterpret_cast<VkFormatProperties2KHR*>( &formatProperties ) ); + return formatProperties; + } #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<Result>( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( pDisplay ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const + { + return static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2KHR*>( pImageFormatInfo ), reinterpret_cast<VkImageFormatProperties2KHR*>( pImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<ImageFormatProperties2KHR>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const + { + ImageFormatProperties2KHR imageFormatProperties; + Result result = static_cast<Result>( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceImageFormatInfo2KHR*>( &imageFormatInfo ), reinterpret_cast<VkImageFormatProperties2KHR*>( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2KHR*>( pQueueFamilyProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType<void>::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, DisplayKHR & display ) const - { - Result result = static_cast<Result>( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( &display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2KHR,Allocator> PhysicalDevice::getQueueFamilyProperties2KHR() const + { + std::vector<QueueFamilyProperties2KHR,Allocator> queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast<VkQueueFamilyProperties2KHR*>( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const - { - return static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( pSurfaceCapabilities ) ) ); - } + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2KHR*>( pMemoryProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2KHR PhysicalDevice::getMemoryProperties2KHR() const + { + PhysicalDeviceMemoryProperties2KHR memoryProperties; + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast<VkPhysicalDeviceMemoryProperties2KHR*>( &memoryProperties ) ); + return memoryProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( pFormatInfo ), pPropertyCount, reinterpret_cast<VkSparseImageFormatProperties2KHR*>( pProperties ) ); + } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<SurfaceCapabilities2EXT>::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const - { - SurfaceCapabilities2EXT surfaceCapabilities; - Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); - } + template <typename Allocator> + VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2KHR,Allocator> PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const + { + std::vector<SparseImageFormatProperties2KHR,Allocator> properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, reinterpret_cast<VkSparseImageFormatProperties2KHR*>( properties.data() ) ); + return properties; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) - explicit -#endif - operator VkPhysicalDevice() const - { - return m_physicalDevice; - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + return static_cast<Result>( vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType<void>::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + Result result = static_cast<Result>( vkReleaseDisplayEXT( m_physicalDevice, static_cast<VkDisplayKHR>( display ) ) ); + return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - explicit operator bool() const - { - return m_physicalDevice != VK_NULL_HANDLE; - } +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const + { + return static_cast<Result>( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast<VkDisplayKHR>( display ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<Display>::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display ) const + { + Display dpy; + Result result = static_cast<Result>( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast<VkDisplayKHR>( display ) ) ); + return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - bool operator!() const - { - return m_physicalDevice == VK_NULL_HANDLE; - } +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const + { + return static_cast<Result>( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( pDisplay ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DisplayKHR>::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const + { + DisplayKHR display; + Result result = static_cast<Result>( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast<VkDisplayKHR*>( &display ) ) ); + return createResultValue( result, display, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - private: - VkPhysicalDevice m_physicalDevice; - }; - static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const + { + return static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( pSurfaceCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceCapabilities2EXT>::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface ) const + { + SurfaceCapabilities2EXT surfaceCapabilities; + Result result = static_cast<Result>( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<VkSurfaceCapabilities2EXT*>( &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<DebugReportCallbackEXT, DebugReportCallbackEXTDeleter>; + class SurfaceKHRDeleter; + using UniqueSurfaceKHR = UniqueHandle<SurfaceKHR, SurfaceKHRDeleter>; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class Instance { @@ -20753,6 +21945,10 @@ namespace vk : m_instance(VK_NULL_HANDLE) {} + Instance( nullptr_t ) + : m_instance(VK_NULL_HANDLE) + {} + #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) Instance(VkInstance instance) : m_instance(instance) @@ -20765,6 +21961,12 @@ namespace vk } #endif + Instance& operator=( nullptr_t ) + { + m_instance = VK_NULL_HANDLE; + return *this; + } + bool operator==(Instance const &rhs) const { return m_instance == rhs.m_instance; @@ -20780,253 +21982,121 @@ namespace vk return m_instance < rhs.m_instance; } - void destroy( const AllocationCallbacks* pAllocator ) const - { - vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } - + void destroy( const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroy( Optional<const AllocationCallbacks> allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const - { - return static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( pPhysicalDevices ) ) ); - } - + Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template <typename Allocator = std::allocator<PhysicalDevice>> - typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices() const - { - std::vector<PhysicalDevice,Allocator> physicalDevices; - uint32_t physicalDeviceCount; - Result result; - do - { - result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( physicalDeviceCount <= physicalDevices.size() ); - physicalDevices.resize( physicalDeviceCount ); - return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); - } + template <typename Allocator = std::allocator<PhysicalDevice>> + typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - PFN_vkVoidFunction getProcAddr( const char* pName ) const - { - return vkGetInstanceProcAddr( m_instance, pName ); - } - + PFN_vkVoidFunction getProcAddr( const char* pName ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const - { - return vkGetInstanceProcAddr( m_instance, name.c_str() ); - } + PFN_vkVoidFunction getProcAddr( const std::string & name ) const; #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<Result>( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - + Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_ANDROID_KHR - ResultValueType<SurfaceKHR>::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + ResultValueType<SurfaceKHR>::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } - + Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<SurfaceKHR>::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); - } + ResultValueType<SurfaceKHR>::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast<const VkMirSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - + Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_MIR_KHR - ResultValueType<SurfaceKHR>::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast<const VkMirSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ + ResultValueType<SurfaceKHR>::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } - + void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySurfaceKHR( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroySurfaceKHR( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator = nullptr ) const; #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<Result>( vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_VI_NN*/ - + Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_VI_NN - ResultValueType<SurfaceKHR>::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); - } -#endif /*VK_USE_PLATFORM_VI_NN*/ + ResultValueType<SurfaceKHR>::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - + Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - ResultValueType<SurfaceKHR>::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + ResultValueType<SurfaceKHR>::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - + Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType<SurfaceKHR>::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + ResultValueType<SurfaceKHR>::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ - + Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_KHR - ResultValueType<SurfaceKHR>::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + ResultValueType<SurfaceKHR>::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ - + Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XCB_KHR - ResultValueType<SurfaceKHR>::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast<Result>( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ + ResultValueType<SurfaceKHR>::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<Result>( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugReportCallbackEXT*>( pCallback ) ) ); - } - + Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType<DebugReportCallbackEXT>::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - DebugReportCallbackEXT callback; - Result result = static_cast<Result>( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) ); - return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); - } + ResultValueType<DebugReportCallbackEXT>::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; +#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<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); - } - + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr ) const - { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); - } + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator = nullptr ) const; #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<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); - } - + 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 - void 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() ); -#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<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); - } + 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) @@ -21052,6 +22122,326 @@ namespace vk }; static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DebugReportCallbackEXTDeleter + { + public: + DebugReportCallbackEXTDeleter( Instance instance = Instance(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) + {} + + void operator()( DebugReportCallbackEXT debugReportCallbackEXT ) + { + m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); + } + + private: + Instance m_instance; + Optional<const AllocationCallbacks> m_allocator; + }; + + class SurfaceKHRDeleter + { + public: + SurfaceKHRDeleter( Instance instance = Instance(), Optional<const AllocationCallbacks> allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) + {} + + void operator()( SurfaceKHR surfaceKHR ) + { + m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); + } + + private: + Instance m_instance; + Optional<const AllocationCallbacks> m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroy( Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const + { + return static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( pPhysicalDevices ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template <typename Allocator> + VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type Instance::enumeratePhysicalDevices() const + { + std::vector<PhysicalDevice,Allocator> physicalDevices; + uint32_t physicalDeviceCount; + Result result; + do + { + result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && physicalDeviceCount ) + { + physicalDevices.resize( physicalDeviceCount ); + result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( 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*/ + + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName ) const + { + return vkGetInstanceProcAddr( m_instance, pName ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + 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 + VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast<const VkAndroidSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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*/ + + VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast<const VkDisplaySurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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 + VULKAN_HPP_INLINE Result Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast<const VkMirSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast<const VkMirSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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*/ + + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast<VkSurfaceKHR>( surface ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_VI_NN + VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateViSurfaceNN( m_instance, reinterpret_cast<const VkViSurfaceCreateInfoNN*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional<const AllocationCallbacks> 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 + VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast<const VkWaylandSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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 + VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast<const VkWin32SurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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 + VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast<const VkXlibSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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 + VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast<Result>( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkSurfaceKHR*>( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<SurfaceKHR>::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + SurfaceKHR surface; + Result result = static_cast<Result>( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast<const VkXcbSurfaceCreateInfoKHR*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSurfaceKHR*>( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> 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*/ + + VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const + { + return static_cast<Result>( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkDebugReportCallbackEXT*>( pCallback ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType<DebugReportCallbackEXT>::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DebugReportCallbackEXT callback; + Result result = static_cast<Result>( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkDebugReportCallbackEXT*>( &callback ) ) ); + return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional<const AllocationCallbacks> allocator ) const + { + DebugReportCallbackEXTDeleter deleter( *this, allocator ); + return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional<const AllocationCallbacks> allocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast<VkDebugReportCallbackEXT>( callback ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + 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<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + 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() ); +#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<VkDebugReportFlagsEXT>( flags ), static_cast<VkDebugReportObjectTypeEXT>( 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<Instance, InstanceDeleter>; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType<Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> 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<const AllocationCallbacks> allocator = nullptr ) + : m_allocator( allocator ) + {} + + void operator()( Instance instance ) + { + instance.destroy( m_allocator ); + } + + private: + Optional<const AllocationCallbacks> m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ) { return static_cast<Result>( vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( pCreateInfo ), reinterpret_cast<const VkAllocationCallbacks*>( pAllocator ), reinterpret_cast<VkInstance*>( pInstance ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType<Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) + VULKAN_HPP_INLINE ResultValueType<Instance>::type createInstance( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator ) { Instance instance; Result result = static_cast<Result>( vkCreateInstance( reinterpret_cast<const VkInstanceCreateInfo*>( &createInfo ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkInstance*>( &instance ) ) ); return createResultValue( result, instance, "vk::createInstance" ); } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional<const AllocationCallbacks> 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) |