// Copyright(c) 2015-2016, NVIDIA CORPORATION. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of NVIDIA CORPORATION nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #pragma once #include #include #include #include #ifdef VKCPP_ENHANCED_MODE # include #endif // VKCPP_ENHANCED_MODE static_assert( VK_MAKE_VERSION(1, 0, 3) == VK_API_VERSION, "Wrong VK_API_VERSION!" ); namespace vk { template class Flags { public: Flags() : m_mask(0) { } Flags(BitType bit) : m_mask(static_cast(bit)) { } Flags(Flags const& rhs) : m_mask(rhs.m_mask) { } Flags & operator=(Flags const& rhs) { m_mask = rhs.m_mask; return *this; } Flags & operator|=(Flags const& rhs) { m_mask |= rhs.m_mask; return *this; } Flags & operator&=(Flags const& rhs) { m_mask &= rhs.m_mask; return *this; } Flags & operator^=(Flags const& rhs) { m_mask ^= rhs.m_mask; return *this; } Flags operator|(Flags const& rhs) const { Flags result(*this); result |= rhs; return result; } Flags operator&(Flags const& rhs) const { Flags result(*this); result &= rhs; return result; } Flags operator^(Flags const& rhs) const { Flags result(*this); result ^= rhs; return result; } bool operator!() const { return !m_mask; } bool operator==(Flags const& rhs) const { return m_mask == rhs.m_mask; } bool operator!=(Flags const& rhs) const { return m_mask != rhs.m_mask; } operator bool() const { return !!m_mask; } private: MaskType m_mask; }; template Flags operator|(BitType bit, Flags const& flags) { return flags | bit; } template Flags operator&(BitType bit, Flags const& flags) { return flags & bit; } template Flags operator^(BitType bit, Flags const& flags) { return flags ^ bit; } typedef uint32_t SampleMask; typedef uint32_t Bool32; typedef uint64_t DeviceSize; typedef VkFlags FramebufferCreateFlags; typedef VkFlags QueryPoolCreateFlags; typedef VkFlags RenderPassCreateFlags; typedef VkFlags SamplerCreateFlags; typedef VkFlags PipelineLayoutCreateFlags; typedef VkFlags PipelineCacheCreateFlags; typedef VkFlags PipelineDepthStencilStateCreateFlags; typedef VkFlags PipelineDynamicStateCreateFlags; typedef VkFlags PipelineColorBlendStateCreateFlags; typedef VkFlags PipelineMultisampleStateCreateFlags; typedef VkFlags PipelineRasterizationStateCreateFlags; typedef VkFlags PipelineViewportStateCreateFlags; typedef VkFlags PipelineTessellationStateCreateFlags; typedef VkFlags PipelineInputAssemblyStateCreateFlags; typedef VkFlags PipelineVertexInputStateCreateFlags; typedef VkFlags PipelineShaderStageCreateFlags; typedef VkFlags DescriptorSetLayoutCreateFlags; typedef VkFlags BufferViewCreateFlags; typedef VkFlags InstanceCreateFlags; typedef VkFlags DeviceCreateFlags; typedef VkFlags DeviceQueueCreateFlags; typedef VkFlags ImageViewCreateFlags; typedef VkFlags SemaphoreCreateFlags; typedef VkFlags ShaderModuleCreateFlags; typedef VkFlags EventCreateFlags; typedef VkFlags MemoryMapFlags; typedef VkFlags SubpassDescriptionFlags; typedef VkFlags DescriptorPoolResetFlags; typedef VkFlags SwapchainCreateFlagsKHR; typedef VkFlags DisplayModeCreateFlagsKHR; typedef VkFlags DisplaySurfaceCreateFlagsKHR; typedef VkInstance Instance; typedef VkPhysicalDevice PhysicalDevice; typedef VkDevice Device; typedef VkQueue Queue; typedef VkCommandBuffer CommandBuffer; typedef VkDeviceMemory DeviceMemory; typedef VkCommandPool CommandPool; typedef VkBuffer Buffer; typedef VkBufferView BufferView; typedef VkImage Image; typedef VkImageView ImageView; typedef VkShaderModule ShaderModule; typedef VkPipeline Pipeline; typedef VkPipelineLayout PipelineLayout; typedef VkSampler Sampler; typedef VkDescriptorSet DescriptorSet; typedef VkDescriptorSetLayout DescriptorSetLayout; typedef VkDescriptorPool DescriptorPool; typedef VkFence Fence; typedef VkSemaphore Semaphore; typedef VkEvent Event; typedef VkQueryPool QueryPool; typedef VkFramebuffer Framebuffer; typedef VkRenderPass RenderPass; typedef VkPipelineCache PipelineCache; typedef VkDisplayKHR DisplayKHR; typedef VkDisplayModeKHR DisplayModeKHR; typedef VkSurfaceKHR SurfaceKHR; typedef VkSwapchainKHR SwapchainKHR; typedef VkDebugReportCallbackEXT DebugReportCallbackEXT; class Offset2D { public: Offset2D() : Offset2D( 0, 0 ) {} Offset2D( int32_t x, int32_t y) { m_offset2D.x = x; m_offset2D.y = y; } const int32_t& x() const { return m_offset2D.x; } Offset2D& x( int32_t x ) { m_offset2D.x = x; return *this; } const int32_t& y() const { return m_offset2D.y; } Offset2D& y( int32_t y ) { m_offset2D.y = y; return *this; } operator const VkOffset2D&() const { return m_offset2D; } private: VkOffset2D m_offset2D; }; class Offset3D { public: Offset3D() : Offset3D( 0, 0, 0 ) {} Offset3D( int32_t x, int32_t y, int32_t z) { m_offset3D.x = x; m_offset3D.y = y; m_offset3D.z = z; } const int32_t& x() const { return m_offset3D.x; } Offset3D& x( int32_t x ) { m_offset3D.x = x; return *this; } const int32_t& y() const { return m_offset3D.y; } Offset3D& y( int32_t y ) { m_offset3D.y = y; return *this; } const int32_t& z() const { return m_offset3D.z; } Offset3D& z( int32_t z ) { m_offset3D.z = z; return *this; } operator const VkOffset3D&() const { return m_offset3D; } private: VkOffset3D m_offset3D; }; class Extent2D { public: Extent2D() : Extent2D( 0, 0 ) {} Extent2D( uint32_t width, uint32_t height) { m_extent2D.width = width; m_extent2D.height = height; } const uint32_t& width() const { return m_extent2D.width; } Extent2D& width( uint32_t width ) { m_extent2D.width = width; return *this; } const uint32_t& height() const { return m_extent2D.height; } Extent2D& height( uint32_t height ) { m_extent2D.height = height; return *this; } operator const VkExtent2D&() const { return m_extent2D; } private: VkExtent2D m_extent2D; }; class Extent3D { public: Extent3D() : Extent3D( 0, 0, 0 ) {} Extent3D( uint32_t width, uint32_t height, uint32_t depth) { m_extent3D.width = width; m_extent3D.height = height; m_extent3D.depth = depth; } const uint32_t& width() const { return m_extent3D.width; } Extent3D& width( uint32_t width ) { m_extent3D.width = width; return *this; } const uint32_t& height() const { return m_extent3D.height; } Extent3D& height( uint32_t height ) { m_extent3D.height = height; return *this; } const uint32_t& depth() const { return m_extent3D.depth; } Extent3D& depth( uint32_t depth ) { m_extent3D.depth = depth; return *this; } operator const VkExtent3D&() const { return m_extent3D; } private: VkExtent3D m_extent3D; }; class Viewport { public: Viewport() : Viewport( 0, 0, 0, 0, 0, 0 ) {} Viewport( float x, float y, float width, float height, float minDepth, float maxDepth) { m_viewport.x = x; m_viewport.y = y; m_viewport.width = width; m_viewport.height = height; m_viewport.minDepth = minDepth; m_viewport.maxDepth = maxDepth; } const float& x() const { return m_viewport.x; } Viewport& x( float x ) { m_viewport.x = x; return *this; } const float& y() const { return m_viewport.y; } Viewport& y( float y ) { m_viewport.y = y; return *this; } const float& width() const { return m_viewport.width; } Viewport& width( float width ) { m_viewport.width = width; return *this; } const float& height() const { return m_viewport.height; } Viewport& height( float height ) { m_viewport.height = height; return *this; } const float& minDepth() const { return m_viewport.minDepth; } Viewport& minDepth( float minDepth ) { m_viewport.minDepth = minDepth; return *this; } const float& maxDepth() const { return m_viewport.maxDepth; } Viewport& maxDepth( float maxDepth ) { m_viewport.maxDepth = maxDepth; return *this; } operator const VkViewport&() const { return m_viewport; } private: VkViewport m_viewport; }; class Rect2D { public: Rect2D() : Rect2D( Offset2D(), Extent2D() ) {} Rect2D( Offset2D offset, Extent2D extent) { m_rect2D.offset = static_cast( offset ); m_rect2D.extent = static_cast( extent ); } const Offset2D& offset() const { return reinterpret_cast( m_rect2D.offset ); } Rect2D& offset( Offset2D offset ) { m_rect2D.offset = static_cast( offset ); return *this; } const Extent2D& extent() const { return reinterpret_cast( m_rect2D.extent ); } Rect2D& extent( Extent2D extent ) { m_rect2D.extent = static_cast( extent ); return *this; } operator const VkRect2D&() const { return m_rect2D; } private: VkRect2D m_rect2D; }; class ClearRect { public: ClearRect() : ClearRect( Rect2D(), 0, 0 ) {} ClearRect( Rect2D rect, uint32_t baseArrayLayer, uint32_t layerCount) { m_clearRect.rect = static_cast( rect ); m_clearRect.baseArrayLayer = baseArrayLayer; m_clearRect.layerCount = layerCount; } const Rect2D& rect() const { return reinterpret_cast( m_clearRect.rect ); } ClearRect& rect( Rect2D rect ) { m_clearRect.rect = static_cast( rect ); return *this; } const uint32_t& baseArrayLayer() const { return m_clearRect.baseArrayLayer; } ClearRect& baseArrayLayer( uint32_t baseArrayLayer ) { m_clearRect.baseArrayLayer = baseArrayLayer; return *this; } const uint32_t& layerCount() const { return m_clearRect.layerCount; } ClearRect& layerCount( uint32_t layerCount ) { m_clearRect.layerCount = layerCount; return *this; } operator const VkClearRect&() const { return m_clearRect; } private: VkClearRect m_clearRect; }; class ExtensionProperties { public: const char* extensionName() const { return reinterpret_cast( m_extensionProperties.extensionName ); } const uint32_t& specVersion() const { return m_extensionProperties.specVersion; } operator const VkExtensionProperties&() const { return m_extensionProperties; } private: VkExtensionProperties m_extensionProperties; }; class LayerProperties { public: const char* layerName() const { return reinterpret_cast( m_layerProperties.layerName ); } const uint32_t& specVersion() const { return m_layerProperties.specVersion; } const uint32_t& implementationVersion() const { return m_layerProperties.implementationVersion; } const char* description() const { return reinterpret_cast( m_layerProperties.description ); } operator const VkLayerProperties&() const { return m_layerProperties; } private: VkLayerProperties m_layerProperties; }; class AllocationCallbacks { public: AllocationCallbacks( void* pUserData, PFN_vkAllocationFunction pfnAllocation, PFN_vkReallocationFunction pfnReallocation, PFN_vkFreeFunction pfnFree, PFN_vkInternalAllocationNotification pfnInternalAllocation, PFN_vkInternalFreeNotification pfnInternalFree) { m_allocationCallbacks.pUserData = pUserData; m_allocationCallbacks.pfnAllocation = pfnAllocation; m_allocationCallbacks.pfnReallocation = pfnReallocation; m_allocationCallbacks.pfnFree = pfnFree; m_allocationCallbacks.pfnInternalAllocation = pfnInternalAllocation; m_allocationCallbacks.pfnInternalFree = pfnInternalFree; } const void* pUserData() const { return reinterpret_cast( m_allocationCallbacks.pUserData ); } AllocationCallbacks& pUserData( void* pUserData ) { m_allocationCallbacks.pUserData = pUserData; return *this; } const PFN_vkAllocationFunction& pfnAllocation() const { return m_allocationCallbacks.pfnAllocation; } AllocationCallbacks& pfnAllocation( PFN_vkAllocationFunction pfnAllocation ) { m_allocationCallbacks.pfnAllocation = pfnAllocation; return *this; } const PFN_vkReallocationFunction& pfnReallocation() const { return m_allocationCallbacks.pfnReallocation; } AllocationCallbacks& pfnReallocation( PFN_vkReallocationFunction pfnReallocation ) { m_allocationCallbacks.pfnReallocation = pfnReallocation; return *this; } const PFN_vkFreeFunction& pfnFree() const { return m_allocationCallbacks.pfnFree; } AllocationCallbacks& pfnFree( PFN_vkFreeFunction pfnFree ) { m_allocationCallbacks.pfnFree = pfnFree; return *this; } const PFN_vkInternalAllocationNotification& pfnInternalAllocation() const { return m_allocationCallbacks.pfnInternalAllocation; } AllocationCallbacks& pfnInternalAllocation( PFN_vkInternalAllocationNotification pfnInternalAllocation ) { m_allocationCallbacks.pfnInternalAllocation = pfnInternalAllocation; return *this; } const PFN_vkInternalFreeNotification& pfnInternalFree() const { return m_allocationCallbacks.pfnInternalFree; } AllocationCallbacks& pfnInternalFree( PFN_vkInternalFreeNotification pfnInternalFree ) { m_allocationCallbacks.pfnInternalFree = pfnInternalFree; return *this; } operator const VkAllocationCallbacks&() const { return m_allocationCallbacks; } private: VkAllocationCallbacks m_allocationCallbacks; }; class MemoryRequirements { public: const DeviceSize& size() const { return m_memoryRequirements.size; } const DeviceSize& alignment() const { return m_memoryRequirements.alignment; } const uint32_t& memoryTypeBits() const { return m_memoryRequirements.memoryTypeBits; } operator const VkMemoryRequirements&() const { return m_memoryRequirements; } private: VkMemoryRequirements m_memoryRequirements; }; class DescriptorBufferInfo { public: DescriptorBufferInfo() : DescriptorBufferInfo( nullptr, 0, 0 ) {} DescriptorBufferInfo( Buffer buffer, DeviceSize offset, DeviceSize range) { m_descriptorBufferInfo.buffer = buffer; m_descriptorBufferInfo.offset = offset; m_descriptorBufferInfo.range = range; } const Buffer& buffer() const { return m_descriptorBufferInfo.buffer; } DescriptorBufferInfo& buffer( Buffer buffer ) { m_descriptorBufferInfo.buffer = buffer; return *this; } const DeviceSize& offset() const { return m_descriptorBufferInfo.offset; } DescriptorBufferInfo& offset( DeviceSize offset ) { m_descriptorBufferInfo.offset = offset; return *this; } const DeviceSize& range() const { return m_descriptorBufferInfo.range; } DescriptorBufferInfo& range( DeviceSize range ) { m_descriptorBufferInfo.range = range; return *this; } operator const VkDescriptorBufferInfo&() const { return m_descriptorBufferInfo; } private: VkDescriptorBufferInfo m_descriptorBufferInfo; }; class SubresourceLayout { public: SubresourceLayout() : SubresourceLayout( 0, 0, 0, 0, 0 ) {} SubresourceLayout( DeviceSize offset, DeviceSize size, DeviceSize rowPitch, DeviceSize arrayPitch, DeviceSize depthPitch) { m_subresourceLayout.offset = offset; m_subresourceLayout.size = size; m_subresourceLayout.rowPitch = rowPitch; m_subresourceLayout.arrayPitch = arrayPitch; m_subresourceLayout.depthPitch = depthPitch; } const DeviceSize& offset() const { return m_subresourceLayout.offset; } SubresourceLayout& offset( DeviceSize offset ) { m_subresourceLayout.offset = offset; return *this; } const DeviceSize& size() const { return m_subresourceLayout.size; } SubresourceLayout& size( DeviceSize size ) { m_subresourceLayout.size = size; return *this; } const DeviceSize& rowPitch() const { return m_subresourceLayout.rowPitch; } SubresourceLayout& rowPitch( DeviceSize rowPitch ) { m_subresourceLayout.rowPitch = rowPitch; return *this; } const DeviceSize& arrayPitch() const { return m_subresourceLayout.arrayPitch; } SubresourceLayout& arrayPitch( DeviceSize arrayPitch ) { m_subresourceLayout.arrayPitch = arrayPitch; return *this; } const DeviceSize& depthPitch() const { return m_subresourceLayout.depthPitch; } SubresourceLayout& depthPitch( DeviceSize depthPitch ) { m_subresourceLayout.depthPitch = depthPitch; return *this; } operator const VkSubresourceLayout&() const { return m_subresourceLayout; } private: VkSubresourceLayout m_subresourceLayout; }; class BufferCopy { public: BufferCopy() : BufferCopy( 0, 0, 0 ) {} BufferCopy( DeviceSize srcOffset, DeviceSize dstOffset, DeviceSize size) { m_bufferCopy.srcOffset = srcOffset; m_bufferCopy.dstOffset = dstOffset; m_bufferCopy.size = size; } const DeviceSize& srcOffset() const { return m_bufferCopy.srcOffset; } BufferCopy& srcOffset( DeviceSize srcOffset ) { m_bufferCopy.srcOffset = srcOffset; return *this; } const DeviceSize& dstOffset() const { return m_bufferCopy.dstOffset; } BufferCopy& dstOffset( DeviceSize dstOffset ) { m_bufferCopy.dstOffset = dstOffset; return *this; } const DeviceSize& size() const { return m_bufferCopy.size; } BufferCopy& size( DeviceSize size ) { m_bufferCopy.size = size; return *this; } operator const VkBufferCopy&() const { return m_bufferCopy; } private: VkBufferCopy m_bufferCopy; }; class SpecializationMapEntry { public: SpecializationMapEntry() : SpecializationMapEntry( 0, 0, 0 ) {} SpecializationMapEntry( uint32_t constantID, uint32_t offset, size_t size) { m_specializationMapEntry.constantID = constantID; m_specializationMapEntry.offset = offset; m_specializationMapEntry.size = size; } const uint32_t& constantID() const { return m_specializationMapEntry.constantID; } SpecializationMapEntry& constantID( uint32_t constantID ) { m_specializationMapEntry.constantID = constantID; return *this; } const uint32_t& offset() const { return m_specializationMapEntry.offset; } SpecializationMapEntry& offset( uint32_t offset ) { m_specializationMapEntry.offset = offset; return *this; } const size_t& size() const { return m_specializationMapEntry.size; } SpecializationMapEntry& size( size_t size ) { m_specializationMapEntry.size = size; return *this; } operator const VkSpecializationMapEntry&() const { return m_specializationMapEntry; } private: VkSpecializationMapEntry m_specializationMapEntry; }; class SpecializationInfo { public: SpecializationInfo() : SpecializationInfo( 0, nullptr, 0, nullptr ) {} SpecializationInfo( uint32_t mapEntryCount, const SpecializationMapEntry* pMapEntries, size_t dataSize, const void* pData) { m_specializationInfo.mapEntryCount = mapEntryCount; m_specializationInfo.pMapEntries = reinterpret_cast( pMapEntries ); m_specializationInfo.dataSize = dataSize; m_specializationInfo.pData = pData; } const uint32_t& mapEntryCount() const { return m_specializationInfo.mapEntryCount; } SpecializationInfo& mapEntryCount( uint32_t mapEntryCount ) { m_specializationInfo.mapEntryCount = mapEntryCount; return *this; } const SpecializationMapEntry* pMapEntries() const { return reinterpret_cast( m_specializationInfo.pMapEntries ); } SpecializationInfo& pMapEntries( const SpecializationMapEntry* pMapEntries ) { m_specializationInfo.pMapEntries = reinterpret_cast( pMapEntries ); return *this; } const size_t& dataSize() const { return m_specializationInfo.dataSize; } SpecializationInfo& dataSize( size_t dataSize ) { m_specializationInfo.dataSize = dataSize; return *this; } const void* pData() const { return reinterpret_cast( m_specializationInfo.pData ); } SpecializationInfo& pData( const void* pData ) { m_specializationInfo.pData = pData; return *this; } operator const VkSpecializationInfo&() const { return m_specializationInfo; } private: VkSpecializationInfo m_specializationInfo; }; class ClearColorValue { public: ClearColorValue( const std::array& float32 = { 0 } ) { memcpy( &m_clearColorValue.float32, float32.data(), 4 * sizeof( float ) ); } const float* float32() const { return reinterpret_cast( m_clearColorValue.float32 ); } ClearColorValue& float32( std::array float32 ) { memcpy( &m_clearColorValue.float32, float32.data(), 4 * sizeof( float ) ); return *this; } ClearColorValue( const std::array& int32 ) { memcpy( &m_clearColorValue.int32, int32.data(), 4 * sizeof( int32_t ) ); } const int32_t* int32() const { return reinterpret_cast( m_clearColorValue.int32 ); } ClearColorValue& int32( std::array int32 ) { memcpy( &m_clearColorValue.int32, int32.data(), 4 * sizeof( int32_t ) ); return *this; } ClearColorValue( const std::array& uint32 ) { memcpy( &m_clearColorValue.uint32, uint32.data(), 4 * sizeof( uint32_t ) ); } const uint32_t* uint32() const { return reinterpret_cast( m_clearColorValue.uint32 ); } ClearColorValue& uint32( std::array uint32 ) { memcpy( &m_clearColorValue.uint32, uint32.data(), 4 * sizeof( uint32_t ) ); return *this; } operator VkClearColorValue const& () const { return m_clearColorValue; } private: VkClearColorValue m_clearColorValue; }; class ClearDepthStencilValue { public: ClearDepthStencilValue() : ClearDepthStencilValue( 0, 0 ) {} ClearDepthStencilValue( float depth, uint32_t stencil) { m_clearDepthStencilValue.depth = depth; m_clearDepthStencilValue.stencil = stencil; } const float& depth() const { return m_clearDepthStencilValue.depth; } ClearDepthStencilValue& depth( float depth ) { m_clearDepthStencilValue.depth = depth; return *this; } const uint32_t& stencil() const { return m_clearDepthStencilValue.stencil; } ClearDepthStencilValue& stencil( uint32_t stencil ) { m_clearDepthStencilValue.stencil = stencil; return *this; } operator const VkClearDepthStencilValue&() const { return m_clearDepthStencilValue; } private: VkClearDepthStencilValue m_clearDepthStencilValue; }; class ClearValue { public: ClearValue( ClearColorValue color = ClearColorValue() ) { m_clearValue.color = color; } const ClearColorValue& color() const { return reinterpret_cast( m_clearValue.color ); } ClearValue& color( ClearColorValue color ) { m_clearValue.color = static_cast( color ); return *this; } ClearValue( ClearDepthStencilValue depthStencil ) { m_clearValue.depthStencil = depthStencil; } const ClearDepthStencilValue& depthStencil() const { return reinterpret_cast( m_clearValue.depthStencil ); } ClearValue& depthStencil( ClearDepthStencilValue depthStencil ) { m_clearValue.depthStencil = static_cast( depthStencil ); return *this; } operator VkClearValue const& () const { return m_clearValue; } private: VkClearValue m_clearValue; }; class PhysicalDeviceFeatures { public: PhysicalDeviceFeatures() : PhysicalDeviceFeatures( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) {} PhysicalDeviceFeatures( Bool32 robustBufferAccess, Bool32 fullDrawIndexUint32, Bool32 imageCubeArray, Bool32 independentBlend, Bool32 geometryShader, Bool32 tessellationShader, Bool32 sampleRateShading, Bool32 dualSrcBlend, Bool32 logicOp, Bool32 multiDrawIndirect, Bool32 drawIndirectFirstInstance, Bool32 depthClamp, Bool32 depthBiasClamp, Bool32 fillModeNonSolid, Bool32 depthBounds, Bool32 wideLines, Bool32 largePoints, Bool32 alphaToOne, Bool32 multiViewport, Bool32 samplerAnisotropy, Bool32 textureCompressionETC2, Bool32 textureCompressionASTC_LDR, Bool32 textureCompressionBC, Bool32 occlusionQueryPrecise, Bool32 pipelineStatisticsQuery, Bool32 vertexPipelineStoresAndAtomics, Bool32 fragmentStoresAndAtomics, Bool32 shaderTessellationAndGeometryPointSize, Bool32 shaderImageGatherExtended, Bool32 shaderStorageImageExtendedFormats, Bool32 shaderStorageImageMultisample, Bool32 shaderStorageImageReadWithoutFormat, Bool32 shaderStorageImageWriteWithoutFormat, Bool32 shaderUniformBufferArrayDynamicIndexing, Bool32 shaderSampledImageArrayDynamicIndexing, Bool32 shaderStorageBufferArrayDynamicIndexing, Bool32 shaderStorageImageArrayDynamicIndexing, Bool32 shaderClipDistance, Bool32 shaderCullDistance, Bool32 shaderFloat64, Bool32 shaderInt64, Bool32 shaderInt16, Bool32 shaderResourceResidency, Bool32 shaderResourceMinLod, Bool32 sparseBinding, Bool32 sparseResidencyBuffer, Bool32 sparseResidencyImage2D, Bool32 sparseResidencyImage3D, Bool32 sparseResidency2Samples, Bool32 sparseResidency4Samples, Bool32 sparseResidency8Samples, Bool32 sparseResidency16Samples, Bool32 sparseResidencyAliased, Bool32 variableMultisampleRate, Bool32 inheritedQueries) { m_physicalDeviceFeatures.robustBufferAccess = robustBufferAccess; m_physicalDeviceFeatures.fullDrawIndexUint32 = fullDrawIndexUint32; m_physicalDeviceFeatures.imageCubeArray = imageCubeArray; m_physicalDeviceFeatures.independentBlend = independentBlend; m_physicalDeviceFeatures.geometryShader = geometryShader; m_physicalDeviceFeatures.tessellationShader = tessellationShader; m_physicalDeviceFeatures.sampleRateShading = sampleRateShading; m_physicalDeviceFeatures.dualSrcBlend = dualSrcBlend; m_physicalDeviceFeatures.logicOp = logicOp; m_physicalDeviceFeatures.multiDrawIndirect = multiDrawIndirect; m_physicalDeviceFeatures.drawIndirectFirstInstance = drawIndirectFirstInstance; m_physicalDeviceFeatures.depthClamp = depthClamp; m_physicalDeviceFeatures.depthBiasClamp = depthBiasClamp; m_physicalDeviceFeatures.fillModeNonSolid = fillModeNonSolid; m_physicalDeviceFeatures.depthBounds = depthBounds; m_physicalDeviceFeatures.wideLines = wideLines; m_physicalDeviceFeatures.largePoints = largePoints; m_physicalDeviceFeatures.alphaToOne = alphaToOne; m_physicalDeviceFeatures.multiViewport = multiViewport; m_physicalDeviceFeatures.samplerAnisotropy = samplerAnisotropy; m_physicalDeviceFeatures.textureCompressionETC2 = textureCompressionETC2; m_physicalDeviceFeatures.textureCompressionASTC_LDR = textureCompressionASTC_LDR; m_physicalDeviceFeatures.textureCompressionBC = textureCompressionBC; m_physicalDeviceFeatures.occlusionQueryPrecise = occlusionQueryPrecise; m_physicalDeviceFeatures.pipelineStatisticsQuery = pipelineStatisticsQuery; m_physicalDeviceFeatures.vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics; m_physicalDeviceFeatures.fragmentStoresAndAtomics = fragmentStoresAndAtomics; m_physicalDeviceFeatures.shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize; m_physicalDeviceFeatures.shaderImageGatherExtended = shaderImageGatherExtended; m_physicalDeviceFeatures.shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats; m_physicalDeviceFeatures.shaderStorageImageMultisample = shaderStorageImageMultisample; m_physicalDeviceFeatures.shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat; m_physicalDeviceFeatures.shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat; m_physicalDeviceFeatures.shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing; m_physicalDeviceFeatures.shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing; m_physicalDeviceFeatures.shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing; m_physicalDeviceFeatures.shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing; m_physicalDeviceFeatures.shaderClipDistance = shaderClipDistance; m_physicalDeviceFeatures.shaderCullDistance = shaderCullDistance; m_physicalDeviceFeatures.shaderFloat64 = shaderFloat64; m_physicalDeviceFeatures.shaderInt64 = shaderInt64; m_physicalDeviceFeatures.shaderInt16 = shaderInt16; m_physicalDeviceFeatures.shaderResourceResidency = shaderResourceResidency; m_physicalDeviceFeatures.shaderResourceMinLod = shaderResourceMinLod; m_physicalDeviceFeatures.sparseBinding = sparseBinding; m_physicalDeviceFeatures.sparseResidencyBuffer = sparseResidencyBuffer; m_physicalDeviceFeatures.sparseResidencyImage2D = sparseResidencyImage2D; m_physicalDeviceFeatures.sparseResidencyImage3D = sparseResidencyImage3D; m_physicalDeviceFeatures.sparseResidency2Samples = sparseResidency2Samples; m_physicalDeviceFeatures.sparseResidency4Samples = sparseResidency4Samples; m_physicalDeviceFeatures.sparseResidency8Samples = sparseResidency8Samples; m_physicalDeviceFeatures.sparseResidency16Samples = sparseResidency16Samples; m_physicalDeviceFeatures.sparseResidencyAliased = sparseResidencyAliased; m_physicalDeviceFeatures.variableMultisampleRate = variableMultisampleRate; m_physicalDeviceFeatures.inheritedQueries = inheritedQueries; } const Bool32& robustBufferAccess() const { return m_physicalDeviceFeatures.robustBufferAccess; } PhysicalDeviceFeatures& robustBufferAccess( Bool32 robustBufferAccess ) { m_physicalDeviceFeatures.robustBufferAccess = robustBufferAccess; return *this; } const Bool32& fullDrawIndexUint32() const { return m_physicalDeviceFeatures.fullDrawIndexUint32; } PhysicalDeviceFeatures& fullDrawIndexUint32( Bool32 fullDrawIndexUint32 ) { m_physicalDeviceFeatures.fullDrawIndexUint32 = fullDrawIndexUint32; return *this; } const Bool32& imageCubeArray() const { return m_physicalDeviceFeatures.imageCubeArray; } PhysicalDeviceFeatures& imageCubeArray( Bool32 imageCubeArray ) { m_physicalDeviceFeatures.imageCubeArray = imageCubeArray; return *this; } const Bool32& independentBlend() const { return m_physicalDeviceFeatures.independentBlend; } PhysicalDeviceFeatures& independentBlend( Bool32 independentBlend ) { m_physicalDeviceFeatures.independentBlend = independentBlend; return *this; } const Bool32& geometryShader() const { return m_physicalDeviceFeatures.geometryShader; } PhysicalDeviceFeatures& geometryShader( Bool32 geometryShader ) { m_physicalDeviceFeatures.geometryShader = geometryShader; return *this; } const Bool32& tessellationShader() const { return m_physicalDeviceFeatures.tessellationShader; } PhysicalDeviceFeatures& tessellationShader( Bool32 tessellationShader ) { m_physicalDeviceFeatures.tessellationShader = tessellationShader; return *this; } const Bool32& sampleRateShading() const { return m_physicalDeviceFeatures.sampleRateShading; } PhysicalDeviceFeatures& sampleRateShading( Bool32 sampleRateShading ) { m_physicalDeviceFeatures.sampleRateShading = sampleRateShading; return *this; } const Bool32& dualSrcBlend() const { return m_physicalDeviceFeatures.dualSrcBlend; } PhysicalDeviceFeatures& dualSrcBlend( Bool32 dualSrcBlend ) { m_physicalDeviceFeatures.dualSrcBlend = dualSrcBlend; return *this; } const Bool32& logicOp() const { return m_physicalDeviceFeatures.logicOp; } PhysicalDeviceFeatures& logicOp( Bool32 logicOp ) { m_physicalDeviceFeatures.logicOp = logicOp; return *this; } const Bool32& multiDrawIndirect() const { return m_physicalDeviceFeatures.multiDrawIndirect; } PhysicalDeviceFeatures& multiDrawIndirect( Bool32 multiDrawIndirect ) { m_physicalDeviceFeatures.multiDrawIndirect = multiDrawIndirect; return *this; } const Bool32& drawIndirectFirstInstance() const { return m_physicalDeviceFeatures.drawIndirectFirstInstance; } PhysicalDeviceFeatures& drawIndirectFirstInstance( Bool32 drawIndirectFirstInstance ) { m_physicalDeviceFeatures.drawIndirectFirstInstance = drawIndirectFirstInstance; return *this; } const Bool32& depthClamp() const { return m_physicalDeviceFeatures.depthClamp; } PhysicalDeviceFeatures& depthClamp( Bool32 depthClamp ) { m_physicalDeviceFeatures.depthClamp = depthClamp; return *this; } const Bool32& depthBiasClamp() const { return m_physicalDeviceFeatures.depthBiasClamp; } PhysicalDeviceFeatures& depthBiasClamp( Bool32 depthBiasClamp ) { m_physicalDeviceFeatures.depthBiasClamp = depthBiasClamp; return *this; } const Bool32& fillModeNonSolid() const { return m_physicalDeviceFeatures.fillModeNonSolid; } PhysicalDeviceFeatures& fillModeNonSolid( Bool32 fillModeNonSolid ) { m_physicalDeviceFeatures.fillModeNonSolid = fillModeNonSolid; return *this; } const Bool32& depthBounds() const { return m_physicalDeviceFeatures.depthBounds; } PhysicalDeviceFeatures& depthBounds( Bool32 depthBounds ) { m_physicalDeviceFeatures.depthBounds = depthBounds; return *this; } const Bool32& wideLines() const { return m_physicalDeviceFeatures.wideLines; } PhysicalDeviceFeatures& wideLines( Bool32 wideLines ) { m_physicalDeviceFeatures.wideLines = wideLines; return *this; } const Bool32& largePoints() const { return m_physicalDeviceFeatures.largePoints; } PhysicalDeviceFeatures& largePoints( Bool32 largePoints ) { m_physicalDeviceFeatures.largePoints = largePoints; return *this; } const Bool32& alphaToOne() const { return m_physicalDeviceFeatures.alphaToOne; } PhysicalDeviceFeatures& alphaToOne( Bool32 alphaToOne ) { m_physicalDeviceFeatures.alphaToOne = alphaToOne; return *this; } const Bool32& multiViewport() const { return m_physicalDeviceFeatures.multiViewport; } PhysicalDeviceFeatures& multiViewport( Bool32 multiViewport ) { m_physicalDeviceFeatures.multiViewport = multiViewport; return *this; } const Bool32& samplerAnisotropy() const { return m_physicalDeviceFeatures.samplerAnisotropy; } PhysicalDeviceFeatures& samplerAnisotropy( Bool32 samplerAnisotropy ) { m_physicalDeviceFeatures.samplerAnisotropy = samplerAnisotropy; return *this; } const Bool32& textureCompressionETC2() const { return m_physicalDeviceFeatures.textureCompressionETC2; } PhysicalDeviceFeatures& textureCompressionETC2( Bool32 textureCompressionETC2 ) { m_physicalDeviceFeatures.textureCompressionETC2 = textureCompressionETC2; return *this; } const Bool32& textureCompressionASTC_LDR() const { return m_physicalDeviceFeatures.textureCompressionASTC_LDR; } PhysicalDeviceFeatures& textureCompressionASTC_LDR( Bool32 textureCompressionASTC_LDR ) { m_physicalDeviceFeatures.textureCompressionASTC_LDR = textureCompressionASTC_LDR; return *this; } const Bool32& textureCompressionBC() const { return m_physicalDeviceFeatures.textureCompressionBC; } PhysicalDeviceFeatures& textureCompressionBC( Bool32 textureCompressionBC ) { m_physicalDeviceFeatures.textureCompressionBC = textureCompressionBC; return *this; } const Bool32& occlusionQueryPrecise() const { return m_physicalDeviceFeatures.occlusionQueryPrecise; } PhysicalDeviceFeatures& occlusionQueryPrecise( Bool32 occlusionQueryPrecise ) { m_physicalDeviceFeatures.occlusionQueryPrecise = occlusionQueryPrecise; return *this; } const Bool32& pipelineStatisticsQuery() const { return m_physicalDeviceFeatures.pipelineStatisticsQuery; } PhysicalDeviceFeatures& pipelineStatisticsQuery( Bool32 pipelineStatisticsQuery ) { m_physicalDeviceFeatures.pipelineStatisticsQuery = pipelineStatisticsQuery; return *this; } const Bool32& vertexPipelineStoresAndAtomics() const { return m_physicalDeviceFeatures.vertexPipelineStoresAndAtomics; } PhysicalDeviceFeatures& vertexPipelineStoresAndAtomics( Bool32 vertexPipelineStoresAndAtomics ) { m_physicalDeviceFeatures.vertexPipelineStoresAndAtomics = vertexPipelineStoresAndAtomics; return *this; } const Bool32& fragmentStoresAndAtomics() const { return m_physicalDeviceFeatures.fragmentStoresAndAtomics; } PhysicalDeviceFeatures& fragmentStoresAndAtomics( Bool32 fragmentStoresAndAtomics ) { m_physicalDeviceFeatures.fragmentStoresAndAtomics = fragmentStoresAndAtomics; return *this; } const Bool32& shaderTessellationAndGeometryPointSize() const { return m_physicalDeviceFeatures.shaderTessellationAndGeometryPointSize; } PhysicalDeviceFeatures& shaderTessellationAndGeometryPointSize( Bool32 shaderTessellationAndGeometryPointSize ) { m_physicalDeviceFeatures.shaderTessellationAndGeometryPointSize = shaderTessellationAndGeometryPointSize; return *this; } const Bool32& shaderImageGatherExtended() const { return m_physicalDeviceFeatures.shaderImageGatherExtended; } PhysicalDeviceFeatures& shaderImageGatherExtended( Bool32 shaderImageGatherExtended ) { m_physicalDeviceFeatures.shaderImageGatherExtended = shaderImageGatherExtended; return *this; } const Bool32& shaderStorageImageExtendedFormats() const { return m_physicalDeviceFeatures.shaderStorageImageExtendedFormats; } PhysicalDeviceFeatures& shaderStorageImageExtendedFormats( Bool32 shaderStorageImageExtendedFormats ) { m_physicalDeviceFeatures.shaderStorageImageExtendedFormats = shaderStorageImageExtendedFormats; return *this; } const Bool32& shaderStorageImageMultisample() const { return m_physicalDeviceFeatures.shaderStorageImageMultisample; } PhysicalDeviceFeatures& shaderStorageImageMultisample( Bool32 shaderStorageImageMultisample ) { m_physicalDeviceFeatures.shaderStorageImageMultisample = shaderStorageImageMultisample; return *this; } const Bool32& shaderStorageImageReadWithoutFormat() const { return m_physicalDeviceFeatures.shaderStorageImageReadWithoutFormat; } PhysicalDeviceFeatures& shaderStorageImageReadWithoutFormat( Bool32 shaderStorageImageReadWithoutFormat ) { m_physicalDeviceFeatures.shaderStorageImageReadWithoutFormat = shaderStorageImageReadWithoutFormat; return *this; } const Bool32& shaderStorageImageWriteWithoutFormat() const { return m_physicalDeviceFeatures.shaderStorageImageWriteWithoutFormat; } PhysicalDeviceFeatures& shaderStorageImageWriteWithoutFormat( Bool32 shaderStorageImageWriteWithoutFormat ) { m_physicalDeviceFeatures.shaderStorageImageWriteWithoutFormat = shaderStorageImageWriteWithoutFormat; return *this; } const Bool32& shaderUniformBufferArrayDynamicIndexing() const { return m_physicalDeviceFeatures.shaderUniformBufferArrayDynamicIndexing; } PhysicalDeviceFeatures& shaderUniformBufferArrayDynamicIndexing( Bool32 shaderUniformBufferArrayDynamicIndexing ) { m_physicalDeviceFeatures.shaderUniformBufferArrayDynamicIndexing = shaderUniformBufferArrayDynamicIndexing; return *this; } const Bool32& shaderSampledImageArrayDynamicIndexing() const { return m_physicalDeviceFeatures.shaderSampledImageArrayDynamicIndexing; } PhysicalDeviceFeatures& shaderSampledImageArrayDynamicIndexing( Bool32 shaderSampledImageArrayDynamicIndexing ) { m_physicalDeviceFeatures.shaderSampledImageArrayDynamicIndexing = shaderSampledImageArrayDynamicIndexing; return *this; } const Bool32& shaderStorageBufferArrayDynamicIndexing() const { return m_physicalDeviceFeatures.shaderStorageBufferArrayDynamicIndexing; } PhysicalDeviceFeatures& shaderStorageBufferArrayDynamicIndexing( Bool32 shaderStorageBufferArrayDynamicIndexing ) { m_physicalDeviceFeatures.shaderStorageBufferArrayDynamicIndexing = shaderStorageBufferArrayDynamicIndexing; return *this; } const Bool32& shaderStorageImageArrayDynamicIndexing() const { return m_physicalDeviceFeatures.shaderStorageImageArrayDynamicIndexing; } PhysicalDeviceFeatures& shaderStorageImageArrayDynamicIndexing( Bool32 shaderStorageImageArrayDynamicIndexing ) { m_physicalDeviceFeatures.shaderStorageImageArrayDynamicIndexing = shaderStorageImageArrayDynamicIndexing; return *this; } const Bool32& shaderClipDistance() const { return m_physicalDeviceFeatures.shaderClipDistance; } PhysicalDeviceFeatures& shaderClipDistance( Bool32 shaderClipDistance ) { m_physicalDeviceFeatures.shaderClipDistance = shaderClipDistance; return *this; } const Bool32& shaderCullDistance() const { return m_physicalDeviceFeatures.shaderCullDistance; } PhysicalDeviceFeatures& shaderCullDistance( Bool32 shaderCullDistance ) { m_physicalDeviceFeatures.shaderCullDistance = shaderCullDistance; return *this; } const Bool32& shaderFloat64() const { return m_physicalDeviceFeatures.shaderFloat64; } PhysicalDeviceFeatures& shaderFloat64( Bool32 shaderFloat64 ) { m_physicalDeviceFeatures.shaderFloat64 = shaderFloat64; return *this; } const Bool32& shaderInt64() const { return m_physicalDeviceFeatures.shaderInt64; } PhysicalDeviceFeatures& shaderInt64( Bool32 shaderInt64 ) { m_physicalDeviceFeatures.shaderInt64 = shaderInt64; return *this; } const Bool32& shaderInt16() const { return m_physicalDeviceFeatures.shaderInt16; } PhysicalDeviceFeatures& shaderInt16( Bool32 shaderInt16 ) { m_physicalDeviceFeatures.shaderInt16 = shaderInt16; return *this; } const Bool32& shaderResourceResidency() const { return m_physicalDeviceFeatures.shaderResourceResidency; } PhysicalDeviceFeatures& shaderResourceResidency( Bool32 shaderResourceResidency ) { m_physicalDeviceFeatures.shaderResourceResidency = shaderResourceResidency; return *this; } const Bool32& shaderResourceMinLod() const { return m_physicalDeviceFeatures.shaderResourceMinLod; } PhysicalDeviceFeatures& shaderResourceMinLod( Bool32 shaderResourceMinLod ) { m_physicalDeviceFeatures.shaderResourceMinLod = shaderResourceMinLod; return *this; } const Bool32& sparseBinding() const { return m_physicalDeviceFeatures.sparseBinding; } PhysicalDeviceFeatures& sparseBinding( Bool32 sparseBinding ) { m_physicalDeviceFeatures.sparseBinding = sparseBinding; return *this; } const Bool32& sparseResidencyBuffer() const { return m_physicalDeviceFeatures.sparseResidencyBuffer; } PhysicalDeviceFeatures& sparseResidencyBuffer( Bool32 sparseResidencyBuffer ) { m_physicalDeviceFeatures.sparseResidencyBuffer = sparseResidencyBuffer; return *this; } const Bool32& sparseResidencyImage2D() const { return m_physicalDeviceFeatures.sparseResidencyImage2D; } PhysicalDeviceFeatures& sparseResidencyImage2D( Bool32 sparseResidencyImage2D ) { m_physicalDeviceFeatures.sparseResidencyImage2D = sparseResidencyImage2D; return *this; } const Bool32& sparseResidencyImage3D() const { return m_physicalDeviceFeatures.sparseResidencyImage3D; } PhysicalDeviceFeatures& sparseResidencyImage3D( Bool32 sparseResidencyImage3D ) { m_physicalDeviceFeatures.sparseResidencyImage3D = sparseResidencyImage3D; return *this; } const Bool32& sparseResidency2Samples() const { return m_physicalDeviceFeatures.sparseResidency2Samples; } PhysicalDeviceFeatures& sparseResidency2Samples( Bool32 sparseResidency2Samples ) { m_physicalDeviceFeatures.sparseResidency2Samples = sparseResidency2Samples; return *this; } const Bool32& sparseResidency4Samples() const { return m_physicalDeviceFeatures.sparseResidency4Samples; } PhysicalDeviceFeatures& sparseResidency4Samples( Bool32 sparseResidency4Samples ) { m_physicalDeviceFeatures.sparseResidency4Samples = sparseResidency4Samples; return *this; } const Bool32& sparseResidency8Samples() const { return m_physicalDeviceFeatures.sparseResidency8Samples; } PhysicalDeviceFeatures& sparseResidency8Samples( Bool32 sparseResidency8Samples ) { m_physicalDeviceFeatures.sparseResidency8Samples = sparseResidency8Samples; return *this; } const Bool32& sparseResidency16Samples() const { return m_physicalDeviceFeatures.sparseResidency16Samples; } PhysicalDeviceFeatures& sparseResidency16Samples( Bool32 sparseResidency16Samples ) { m_physicalDeviceFeatures.sparseResidency16Samples = sparseResidency16Samples; return *this; } const Bool32& sparseResidencyAliased() const { return m_physicalDeviceFeatures.sparseResidencyAliased; } PhysicalDeviceFeatures& sparseResidencyAliased( Bool32 sparseResidencyAliased ) { m_physicalDeviceFeatures.sparseResidencyAliased = sparseResidencyAliased; return *this; } const Bool32& variableMultisampleRate() const { return m_physicalDeviceFeatures.variableMultisampleRate; } PhysicalDeviceFeatures& variableMultisampleRate( Bool32 variableMultisampleRate ) { m_physicalDeviceFeatures.variableMultisampleRate = variableMultisampleRate; return *this; } const Bool32& inheritedQueries() const { return m_physicalDeviceFeatures.inheritedQueries; } PhysicalDeviceFeatures& inheritedQueries( Bool32 inheritedQueries ) { m_physicalDeviceFeatures.inheritedQueries = inheritedQueries; return *this; } operator const VkPhysicalDeviceFeatures&() const { return m_physicalDeviceFeatures; } private: VkPhysicalDeviceFeatures m_physicalDeviceFeatures; }; class PhysicalDeviceSparseProperties { public: const Bool32& residencyStandard2DBlockShape() const { return m_physicalDeviceSparseProperties.residencyStandard2DBlockShape; } const Bool32& residencyStandard2DMultisampleBlockShape() const { return m_physicalDeviceSparseProperties.residencyStandard2DMultisampleBlockShape; } const Bool32& residencyStandard3DBlockShape() const { return m_physicalDeviceSparseProperties.residencyStandard3DBlockShape; } const Bool32& residencyAlignedMipSize() const { return m_physicalDeviceSparseProperties.residencyAlignedMipSize; } const Bool32& residencyNonResidentStrict() const { return m_physicalDeviceSparseProperties.residencyNonResidentStrict; } operator const VkPhysicalDeviceSparseProperties&() const { return m_physicalDeviceSparseProperties; } private: VkPhysicalDeviceSparseProperties m_physicalDeviceSparseProperties; }; class DrawIndirectCommand { public: DrawIndirectCommand() : DrawIndirectCommand( 0, 0, 0, 0 ) {} DrawIndirectCommand( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { m_drawIndirectCommand.vertexCount = vertexCount; m_drawIndirectCommand.instanceCount = instanceCount; m_drawIndirectCommand.firstVertex = firstVertex; m_drawIndirectCommand.firstInstance = firstInstance; } const uint32_t& vertexCount() const { return m_drawIndirectCommand.vertexCount; } DrawIndirectCommand& vertexCount( uint32_t vertexCount ) { m_drawIndirectCommand.vertexCount = vertexCount; return *this; } const uint32_t& instanceCount() const { return m_drawIndirectCommand.instanceCount; } DrawIndirectCommand& instanceCount( uint32_t instanceCount ) { m_drawIndirectCommand.instanceCount = instanceCount; return *this; } const uint32_t& firstVertex() const { return m_drawIndirectCommand.firstVertex; } DrawIndirectCommand& firstVertex( uint32_t firstVertex ) { m_drawIndirectCommand.firstVertex = firstVertex; return *this; } const uint32_t& firstInstance() const { return m_drawIndirectCommand.firstInstance; } DrawIndirectCommand& firstInstance( uint32_t firstInstance ) { m_drawIndirectCommand.firstInstance = firstInstance; return *this; } operator const VkDrawIndirectCommand&() const { return m_drawIndirectCommand; } private: VkDrawIndirectCommand m_drawIndirectCommand; }; class DrawIndexedIndirectCommand { public: DrawIndexedIndirectCommand() : DrawIndexedIndirectCommand( 0, 0, 0, 0, 0 ) {} DrawIndexedIndirectCommand( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { m_drawIndexedIndirectCommand.indexCount = indexCount; m_drawIndexedIndirectCommand.instanceCount = instanceCount; m_drawIndexedIndirectCommand.firstIndex = firstIndex; m_drawIndexedIndirectCommand.vertexOffset = vertexOffset; m_drawIndexedIndirectCommand.firstInstance = firstInstance; } const uint32_t& indexCount() const { return m_drawIndexedIndirectCommand.indexCount; } DrawIndexedIndirectCommand& indexCount( uint32_t indexCount ) { m_drawIndexedIndirectCommand.indexCount = indexCount; return *this; } const uint32_t& instanceCount() const { return m_drawIndexedIndirectCommand.instanceCount; } DrawIndexedIndirectCommand& instanceCount( uint32_t instanceCount ) { m_drawIndexedIndirectCommand.instanceCount = instanceCount; return *this; } const uint32_t& firstIndex() const { return m_drawIndexedIndirectCommand.firstIndex; } DrawIndexedIndirectCommand& firstIndex( uint32_t firstIndex ) { m_drawIndexedIndirectCommand.firstIndex = firstIndex; return *this; } const int32_t& vertexOffset() const { return m_drawIndexedIndirectCommand.vertexOffset; } DrawIndexedIndirectCommand& vertexOffset( int32_t vertexOffset ) { m_drawIndexedIndirectCommand.vertexOffset = vertexOffset; return *this; } const uint32_t& firstInstance() const { return m_drawIndexedIndirectCommand.firstInstance; } DrawIndexedIndirectCommand& firstInstance( uint32_t firstInstance ) { m_drawIndexedIndirectCommand.firstInstance = firstInstance; return *this; } operator const VkDrawIndexedIndirectCommand&() const { return m_drawIndexedIndirectCommand; } private: VkDrawIndexedIndirectCommand m_drawIndexedIndirectCommand; }; class DispatchIndirectCommand { public: DispatchIndirectCommand() : DispatchIndirectCommand( 0, 0, 0 ) {} DispatchIndirectCommand( uint32_t x, uint32_t y, uint32_t z) { m_dispatchIndirectCommand.x = x; m_dispatchIndirectCommand.y = y; m_dispatchIndirectCommand.z = z; } const uint32_t& x() const { return m_dispatchIndirectCommand.x; } DispatchIndirectCommand& x( uint32_t x ) { m_dispatchIndirectCommand.x = x; return *this; } const uint32_t& y() const { return m_dispatchIndirectCommand.y; } DispatchIndirectCommand& y( uint32_t y ) { m_dispatchIndirectCommand.y = y; return *this; } const uint32_t& z() const { return m_dispatchIndirectCommand.z; } DispatchIndirectCommand& z( uint32_t z ) { m_dispatchIndirectCommand.z = z; return *this; } operator const VkDispatchIndirectCommand&() const { return m_dispatchIndirectCommand; } private: VkDispatchIndirectCommand m_dispatchIndirectCommand; }; enum class ImageLayout { eUndefined = VK_IMAGE_LAYOUT_UNDEFINED, eGeneral = VK_IMAGE_LAYOUT_GENERAL, eColorAttachmentOptimal = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, eDepthStencilAttachmentOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, eDepthStencilReadOnlyOptimal = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, eShaderReadOnlyOptimal = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, eTransferSrcOptimal = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, eTransferDstOptimal = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, ePreinitialized = VK_IMAGE_LAYOUT_PREINITIALIZED }; class DescriptorImageInfo { public: DescriptorImageInfo() : DescriptorImageInfo( nullptr, nullptr, ImageLayout::eUndefined ) {} DescriptorImageInfo( Sampler sampler, ImageView imageView, ImageLayout imageLayout) { m_descriptorImageInfo.sampler = sampler; m_descriptorImageInfo.imageView = imageView; m_descriptorImageInfo.imageLayout = static_cast( imageLayout ); } const Sampler& sampler() const { return m_descriptorImageInfo.sampler; } DescriptorImageInfo& sampler( Sampler sampler ) { m_descriptorImageInfo.sampler = sampler; return *this; } const ImageView& imageView() const { return m_descriptorImageInfo.imageView; } DescriptorImageInfo& imageView( ImageView imageView ) { m_descriptorImageInfo.imageView = imageView; return *this; } const ImageLayout& imageLayout() const { return reinterpret_cast( m_descriptorImageInfo.imageLayout ); } DescriptorImageInfo& imageLayout( ImageLayout imageLayout ) { m_descriptorImageInfo.imageLayout = static_cast( imageLayout ); return *this; } operator const VkDescriptorImageInfo&() const { return m_descriptorImageInfo; } private: VkDescriptorImageInfo m_descriptorImageInfo; }; class AttachmentReference { public: AttachmentReference() : AttachmentReference( 0, ImageLayout::eUndefined ) {} AttachmentReference( uint32_t attachment, ImageLayout layout) { m_attachmentReference.attachment = attachment; m_attachmentReference.layout = static_cast( layout ); } const uint32_t& attachment() const { return m_attachmentReference.attachment; } AttachmentReference& attachment( uint32_t attachment ) { m_attachmentReference.attachment = attachment; return *this; } const ImageLayout& layout() const { return reinterpret_cast( m_attachmentReference.layout ); } AttachmentReference& layout( ImageLayout layout ) { m_attachmentReference.layout = static_cast( layout ); return *this; } operator const VkAttachmentReference&() const { return m_attachmentReference; } private: VkAttachmentReference m_attachmentReference; }; enum class AttachmentLoadOp { eLoad = VK_ATTACHMENT_LOAD_OP_LOAD, eClear = VK_ATTACHMENT_LOAD_OP_CLEAR, eDontCare = VK_ATTACHMENT_LOAD_OP_DONT_CARE }; enum class AttachmentStoreOp { eStore = VK_ATTACHMENT_STORE_OP_STORE, eDontCare = VK_ATTACHMENT_STORE_OP_DONT_CARE }; enum class ImageType { e1D = VK_IMAGE_TYPE_1D, e2D = VK_IMAGE_TYPE_2D, e3D = VK_IMAGE_TYPE_3D }; enum class ImageTiling { eOptimal = VK_IMAGE_TILING_OPTIMAL, eLinear = VK_IMAGE_TILING_LINEAR }; enum class ImageViewType { e1D = VK_IMAGE_VIEW_TYPE_1D, e2D = VK_IMAGE_VIEW_TYPE_2D, e3D = VK_IMAGE_VIEW_TYPE_3D, eCube = VK_IMAGE_VIEW_TYPE_CUBE, e1DArray = VK_IMAGE_VIEW_TYPE_1D_ARRAY, e2DArray = VK_IMAGE_VIEW_TYPE_2D_ARRAY, eCubeArray = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY }; enum class CommandBufferLevel { ePrimary = VK_COMMAND_BUFFER_LEVEL_PRIMARY, eSecondary = VK_COMMAND_BUFFER_LEVEL_SECONDARY }; enum class ComponentSwizzle { eIdentity = VK_COMPONENT_SWIZZLE_IDENTITY, eZero = VK_COMPONENT_SWIZZLE_ZERO, eOne = VK_COMPONENT_SWIZZLE_ONE, eR = VK_COMPONENT_SWIZZLE_R, eG = VK_COMPONENT_SWIZZLE_G, eB = VK_COMPONENT_SWIZZLE_B, eA = VK_COMPONENT_SWIZZLE_A }; class ComponentMapping { public: ComponentMapping() : ComponentMapping( ComponentSwizzle::eIdentity, ComponentSwizzle::eIdentity, ComponentSwizzle::eIdentity, ComponentSwizzle::eIdentity ) {} ComponentMapping( ComponentSwizzle r, ComponentSwizzle g, ComponentSwizzle b, ComponentSwizzle a) { m_componentMapping.r = static_cast( r ); m_componentMapping.g = static_cast( g ); m_componentMapping.b = static_cast( b ); m_componentMapping.a = static_cast( a ); } const ComponentSwizzle& r() const { return reinterpret_cast( m_componentMapping.r ); } ComponentMapping& r( ComponentSwizzle r ) { m_componentMapping.r = static_cast( r ); return *this; } const ComponentSwizzle& g() const { return reinterpret_cast( m_componentMapping.g ); } ComponentMapping& g( ComponentSwizzle g ) { m_componentMapping.g = static_cast( g ); return *this; } const ComponentSwizzle& b() const { return reinterpret_cast( m_componentMapping.b ); } ComponentMapping& b( ComponentSwizzle b ) { m_componentMapping.b = static_cast( b ); return *this; } const ComponentSwizzle& a() const { return reinterpret_cast( m_componentMapping.a ); } ComponentMapping& a( ComponentSwizzle a ) { m_componentMapping.a = static_cast( a ); return *this; } operator const VkComponentMapping&() const { return m_componentMapping; } private: VkComponentMapping m_componentMapping; }; enum class DescriptorType { eSampler = VK_DESCRIPTOR_TYPE_SAMPLER, eCombinedImageSampler = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, eSampledImage = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, eStorageImage = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, eUniformTexelBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, eStorageTexelBuffer = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, eUniformBuffer = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, eStorageBuffer = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, eUniformBufferDynamic = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, eStorageBufferDynamic = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, eInputAttachment = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT }; class DescriptorPoolSize { public: DescriptorPoolSize() : DescriptorPoolSize( DescriptorType::eSampler, 0 ) {} DescriptorPoolSize( DescriptorType type, uint32_t descriptorCount) { m_descriptorPoolSize.type = static_cast( type ); m_descriptorPoolSize.descriptorCount = descriptorCount; } const DescriptorType& type() const { return reinterpret_cast( m_descriptorPoolSize.type ); } DescriptorPoolSize& type( DescriptorType type ) { m_descriptorPoolSize.type = static_cast( type ); return *this; } const uint32_t& descriptorCount() const { return m_descriptorPoolSize.descriptorCount; } DescriptorPoolSize& descriptorCount( uint32_t descriptorCount ) { m_descriptorPoolSize.descriptorCount = descriptorCount; return *this; } operator const VkDescriptorPoolSize&() const { return m_descriptorPoolSize; } private: VkDescriptorPoolSize m_descriptorPoolSize; }; enum class QueryType { eOcclusion = VK_QUERY_TYPE_OCCLUSION, ePipelineStatistics = VK_QUERY_TYPE_PIPELINE_STATISTICS, eTimestamp = VK_QUERY_TYPE_TIMESTAMP }; enum class BorderColor { eFloatTransparentBlack = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, eIntTransparentBlack = VK_BORDER_COLOR_INT_TRANSPARENT_BLACK, eFloatOpaqueBlack = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, eIntOpaqueBlack = VK_BORDER_COLOR_INT_OPAQUE_BLACK, eFloatOpaqueWhite = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, eIntOpaqueWhite = VK_BORDER_COLOR_INT_OPAQUE_WHITE }; enum class PipelineBindPoint { eGraphics = VK_PIPELINE_BIND_POINT_GRAPHICS, eCompute = VK_PIPELINE_BIND_POINT_COMPUTE }; class SubpassDescription { public: SubpassDescription() : SubpassDescription( 0, PipelineBindPoint::eGraphics, 0, nullptr, 0, nullptr, nullptr, nullptr, 0, nullptr ) {} SubpassDescription( SubpassDescriptionFlags flags, PipelineBindPoint pipelineBindPoint, uint32_t inputAttachmentCount, const AttachmentReference* pInputAttachments, uint32_t colorAttachmentCount, const AttachmentReference* pColorAttachments, const AttachmentReference* pResolveAttachments, const AttachmentReference* pDepthStencilAttachment, uint32_t preserveAttachmentCount, const uint32_t* pPreserveAttachments) { m_subpassDescription.flags = flags; m_subpassDescription.pipelineBindPoint = static_cast( pipelineBindPoint ); m_subpassDescription.inputAttachmentCount = inputAttachmentCount; m_subpassDescription.pInputAttachments = reinterpret_cast( pInputAttachments ); m_subpassDescription.colorAttachmentCount = colorAttachmentCount; m_subpassDescription.pColorAttachments = reinterpret_cast( pColorAttachments ); m_subpassDescription.pResolveAttachments = reinterpret_cast( pResolveAttachments ); m_subpassDescription.pDepthStencilAttachment = reinterpret_cast( pDepthStencilAttachment ); m_subpassDescription.preserveAttachmentCount = preserveAttachmentCount; m_subpassDescription.pPreserveAttachments = pPreserveAttachments; } const SubpassDescriptionFlags& flags() const { return m_subpassDescription.flags; } SubpassDescription& flags( SubpassDescriptionFlags flags ) { m_subpassDescription.flags = flags; return *this; } const PipelineBindPoint& pipelineBindPoint() const { return reinterpret_cast( m_subpassDescription.pipelineBindPoint ); } SubpassDescription& pipelineBindPoint( PipelineBindPoint pipelineBindPoint ) { m_subpassDescription.pipelineBindPoint = static_cast( pipelineBindPoint ); return *this; } const uint32_t& inputAttachmentCount() const { return m_subpassDescription.inputAttachmentCount; } SubpassDescription& inputAttachmentCount( uint32_t inputAttachmentCount ) { m_subpassDescription.inputAttachmentCount = inputAttachmentCount; return *this; } const AttachmentReference* pInputAttachments() const { return reinterpret_cast( m_subpassDescription.pInputAttachments ); } SubpassDescription& pInputAttachments( const AttachmentReference* pInputAttachments ) { m_subpassDescription.pInputAttachments = reinterpret_cast( pInputAttachments ); return *this; } const uint32_t& colorAttachmentCount() const { return m_subpassDescription.colorAttachmentCount; } SubpassDescription& colorAttachmentCount( uint32_t colorAttachmentCount ) { m_subpassDescription.colorAttachmentCount = colorAttachmentCount; return *this; } const AttachmentReference* pColorAttachments() const { return reinterpret_cast( m_subpassDescription.pColorAttachments ); } SubpassDescription& pColorAttachments( const AttachmentReference* pColorAttachments ) { m_subpassDescription.pColorAttachments = reinterpret_cast( pColorAttachments ); return *this; } const AttachmentReference* pResolveAttachments() const { return reinterpret_cast( m_subpassDescription.pResolveAttachments ); } SubpassDescription& pResolveAttachments( const AttachmentReference* pResolveAttachments ) { m_subpassDescription.pResolveAttachments = reinterpret_cast( pResolveAttachments ); return *this; } const AttachmentReference* pDepthStencilAttachment() const { return reinterpret_cast( m_subpassDescription.pDepthStencilAttachment ); } SubpassDescription& pDepthStencilAttachment( const AttachmentReference* pDepthStencilAttachment ) { m_subpassDescription.pDepthStencilAttachment = reinterpret_cast( pDepthStencilAttachment ); return *this; } const uint32_t& preserveAttachmentCount() const { return m_subpassDescription.preserveAttachmentCount; } SubpassDescription& preserveAttachmentCount( uint32_t preserveAttachmentCount ) { m_subpassDescription.preserveAttachmentCount = preserveAttachmentCount; return *this; } const uint32_t* pPreserveAttachments() const { return reinterpret_cast( m_subpassDescription.pPreserveAttachments ); } SubpassDescription& pPreserveAttachments( const uint32_t* pPreserveAttachments ) { m_subpassDescription.pPreserveAttachments = pPreserveAttachments; return *this; } operator const VkSubpassDescription&() const { return m_subpassDescription; } private: VkSubpassDescription m_subpassDescription; }; enum class PipelineCacheHeaderVersion { eOne = VK_PIPELINE_CACHE_HEADER_VERSION_ONE }; enum class PrimitiveTopology { ePointList = VK_PRIMITIVE_TOPOLOGY_POINT_LIST, eLineList = VK_PRIMITIVE_TOPOLOGY_LINE_LIST, eLineStrip = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, eTriangleList = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, eTriangleStrip = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, eTriangleFan = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, eLineListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, eLineStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, eTriangleListWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, eTriangleStripWithAdjacency = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, ePatchList = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST }; enum class SharingMode { eExclusive = VK_SHARING_MODE_EXCLUSIVE, eConcurrent = VK_SHARING_MODE_CONCURRENT }; enum class IndexType { eUint16 = VK_INDEX_TYPE_UINT16, eUint32 = VK_INDEX_TYPE_UINT32 }; enum class Filter { eNearest = VK_FILTER_NEAREST, eLinear = VK_FILTER_LINEAR }; enum class SamplerMipmapMode { eNearest = VK_SAMPLER_MIPMAP_MODE_NEAREST, eLinear = VK_SAMPLER_MIPMAP_MODE_LINEAR }; enum class SamplerAddressMode { eRepeat = VK_SAMPLER_ADDRESS_MODE_REPEAT, eMirroredRepeat = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, eClampToEdge = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, eClampToBorder = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, eMirrorClampToEdge = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE }; enum class CompareOp { eNever = VK_COMPARE_OP_NEVER, eLess = VK_COMPARE_OP_LESS, eEqual = VK_COMPARE_OP_EQUAL, eLessOrEqual = VK_COMPARE_OP_LESS_OR_EQUAL, eGreater = VK_COMPARE_OP_GREATER, eNotEqual = VK_COMPARE_OP_NOT_EQUAL, eGreaterOrEqual = VK_COMPARE_OP_GREATER_OR_EQUAL, eAlways = VK_COMPARE_OP_ALWAYS }; enum class PolygonMode { eFill = VK_POLYGON_MODE_FILL, eLine = VK_POLYGON_MODE_LINE, ePoint = VK_POLYGON_MODE_POINT }; enum class CullModeFlagBits { eNone = VK_CULL_MODE_NONE, eFront = VK_CULL_MODE_FRONT_BIT, eBack = VK_CULL_MODE_BACK_BIT, eFrontAndBack = VK_CULL_MODE_FRONT_AND_BACK }; typedef Flags CullModeFlags; inline CullModeFlags operator|( CullModeFlagBits bit0, CullModeFlagBits bit1 ) { return CullModeFlags( bit0 ) | bit1; } enum class FrontFace { eCounterClockwise = VK_FRONT_FACE_COUNTER_CLOCKWISE, eClockwise = VK_FRONT_FACE_CLOCKWISE }; enum class BlendFactor { eZero = VK_BLEND_FACTOR_ZERO, eOne = VK_BLEND_FACTOR_ONE, eSrcColor = VK_BLEND_FACTOR_SRC_COLOR, eOneMinusSrcColor = VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, eDstColor = VK_BLEND_FACTOR_DST_COLOR, eOneMinusDstColor = VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, eSrcAlpha = VK_BLEND_FACTOR_SRC_ALPHA, eOneMinusSrcAlpha = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, eDstAlpha = VK_BLEND_FACTOR_DST_ALPHA, eOneMinusDstAlpha = VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, eConstantColor = VK_BLEND_FACTOR_CONSTANT_COLOR, eOneMinusConstantColor = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, eConstantAlpha = VK_BLEND_FACTOR_CONSTANT_ALPHA, eOneMinusConstantAlpha = VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, eSrcAlphaSaturate = VK_BLEND_FACTOR_SRC_ALPHA_SATURATE, eSrc1Color = VK_BLEND_FACTOR_SRC1_COLOR, eOneMinusSrc1Color = VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, eSrc1Alpha = VK_BLEND_FACTOR_SRC1_ALPHA, eOneMinusSrc1Alpha = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA }; enum class BlendOp { eAdd = VK_BLEND_OP_ADD, eSubtract = VK_BLEND_OP_SUBTRACT, eReverseSubtract = VK_BLEND_OP_REVERSE_SUBTRACT, eMin = VK_BLEND_OP_MIN, eMax = VK_BLEND_OP_MAX }; enum class StencilOp { eKeep = VK_STENCIL_OP_KEEP, eZero = VK_STENCIL_OP_ZERO, eReplace = VK_STENCIL_OP_REPLACE, eIncrementAndClamp = VK_STENCIL_OP_INCREMENT_AND_CLAMP, eDecrementAndClamp = VK_STENCIL_OP_DECREMENT_AND_CLAMP, eInvert = VK_STENCIL_OP_INVERT, eIncrementAndWrap = VK_STENCIL_OP_INCREMENT_AND_WRAP, eDecrementAndWrap = VK_STENCIL_OP_DECREMENT_AND_WRAP }; class StencilOpState { public: StencilOpState() : StencilOpState( StencilOp::eKeep, StencilOp::eKeep, StencilOp::eKeep, CompareOp::eNever, 0, 0, 0 ) {} StencilOpState( StencilOp failOp, StencilOp passOp, StencilOp depthFailOp, CompareOp compareOp, uint32_t compareMask, uint32_t writeMask, uint32_t reference) { m_stencilOpState.failOp = static_cast( failOp ); m_stencilOpState.passOp = static_cast( passOp ); m_stencilOpState.depthFailOp = static_cast( depthFailOp ); m_stencilOpState.compareOp = static_cast( compareOp ); m_stencilOpState.compareMask = compareMask; m_stencilOpState.writeMask = writeMask; m_stencilOpState.reference = reference; } const StencilOp& failOp() const { return reinterpret_cast( m_stencilOpState.failOp ); } StencilOpState& failOp( StencilOp failOp ) { m_stencilOpState.failOp = static_cast( failOp ); return *this; } const StencilOp& passOp() const { return reinterpret_cast( m_stencilOpState.passOp ); } StencilOpState& passOp( StencilOp passOp ) { m_stencilOpState.passOp = static_cast( passOp ); return *this; } const StencilOp& depthFailOp() const { return reinterpret_cast( m_stencilOpState.depthFailOp ); } StencilOpState& depthFailOp( StencilOp depthFailOp ) { m_stencilOpState.depthFailOp = static_cast( depthFailOp ); return *this; } const CompareOp& compareOp() const { return reinterpret_cast( m_stencilOpState.compareOp ); } StencilOpState& compareOp( CompareOp compareOp ) { m_stencilOpState.compareOp = static_cast( compareOp ); return *this; } const uint32_t& compareMask() const { return m_stencilOpState.compareMask; } StencilOpState& compareMask( uint32_t compareMask ) { m_stencilOpState.compareMask = compareMask; return *this; } const uint32_t& writeMask() const { return m_stencilOpState.writeMask; } StencilOpState& writeMask( uint32_t writeMask ) { m_stencilOpState.writeMask = writeMask; return *this; } const uint32_t& reference() const { return m_stencilOpState.reference; } StencilOpState& reference( uint32_t reference ) { m_stencilOpState.reference = reference; return *this; } operator const VkStencilOpState&() const { return m_stencilOpState; } private: VkStencilOpState m_stencilOpState; }; enum class LogicOp { eClear = VK_LOGIC_OP_CLEAR, eAnd = VK_LOGIC_OP_AND, eAndReverse = VK_LOGIC_OP_AND_REVERSE, eCopy = VK_LOGIC_OP_COPY, eAndInverted = VK_LOGIC_OP_AND_INVERTED, eNoOp = VK_LOGIC_OP_NO_OP, eXor = VK_LOGIC_OP_XOR, eOr = VK_LOGIC_OP_OR, eNor = VK_LOGIC_OP_NOR, eEquivalent = VK_LOGIC_OP_EQUIVALENT, eInvert = VK_LOGIC_OP_INVERT, eOrReverse = VK_LOGIC_OP_OR_REVERSE, eCopyInverted = VK_LOGIC_OP_COPY_INVERTED, eOrInverted = VK_LOGIC_OP_OR_INVERTED, eNand = VK_LOGIC_OP_NAND, eSet = VK_LOGIC_OP_SET }; enum class InternalAllocationType { eExecutable = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE }; enum class SystemAllocationScope { eCommand = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, eObject = VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, eCache = VK_SYSTEM_ALLOCATION_SCOPE_CACHE, eDevice = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE, eInstance = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE }; enum class PhysicalDeviceType { eOther = VK_PHYSICAL_DEVICE_TYPE_OTHER, eIntegratedGpu = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, eDiscreteGpu = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, eVirtualGpu = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, eCpu = VK_PHYSICAL_DEVICE_TYPE_CPU }; enum class VertexInputRate { eVertex = VK_VERTEX_INPUT_RATE_VERTEX, eInstance = VK_VERTEX_INPUT_RATE_INSTANCE }; class VertexInputBindingDescription { public: VertexInputBindingDescription() : VertexInputBindingDescription( 0, 0, VertexInputRate::eVertex ) {} VertexInputBindingDescription( uint32_t binding, uint32_t stride, VertexInputRate inputRate) { m_vertexInputBindingDescription.binding = binding; m_vertexInputBindingDescription.stride = stride; m_vertexInputBindingDescription.inputRate = static_cast( inputRate ); } const uint32_t& binding() const { return m_vertexInputBindingDescription.binding; } VertexInputBindingDescription& binding( uint32_t binding ) { m_vertexInputBindingDescription.binding = binding; return *this; } const uint32_t& stride() const { return m_vertexInputBindingDescription.stride; } VertexInputBindingDescription& stride( uint32_t stride ) { m_vertexInputBindingDescription.stride = stride; return *this; } const VertexInputRate& inputRate() const { return reinterpret_cast( m_vertexInputBindingDescription.inputRate ); } VertexInputBindingDescription& inputRate( VertexInputRate inputRate ) { m_vertexInputBindingDescription.inputRate = static_cast( inputRate ); return *this; } operator const VkVertexInputBindingDescription&() const { return m_vertexInputBindingDescription; } private: VkVertexInputBindingDescription m_vertexInputBindingDescription; }; enum class Format { eUndefined = VK_FORMAT_UNDEFINED, eR4G4UnormPack8 = VK_FORMAT_R4G4_UNORM_PACK8, eR4G4B4A4UnormPack16 = VK_FORMAT_R4G4B4A4_UNORM_PACK16, eB4G4R4A4UnormPack16 = VK_FORMAT_B4G4R4A4_UNORM_PACK16, eR5G6B5UnormPack16 = VK_FORMAT_R5G6B5_UNORM_PACK16, eB5G6R5UnormPack16 = VK_FORMAT_B5G6R5_UNORM_PACK16, eR5G5B5A1UnormPack16 = VK_FORMAT_R5G5B5A1_UNORM_PACK16, eB5G5R5A1UnormPack16 = VK_FORMAT_B5G5R5A1_UNORM_PACK16, eA1R5G5B5UnormPack16 = VK_FORMAT_A1R5G5B5_UNORM_PACK16, eR8Unorm = VK_FORMAT_R8_UNORM, eR8Snorm = VK_FORMAT_R8_SNORM, eR8Uscaled = VK_FORMAT_R8_USCALED, eR8Sscaled = VK_FORMAT_R8_SSCALED, eR8Uint = VK_FORMAT_R8_UINT, eR8Sint = VK_FORMAT_R8_SINT, eR8Srgb = VK_FORMAT_R8_SRGB, eR8G8Unorm = VK_FORMAT_R8G8_UNORM, eR8G8Snorm = VK_FORMAT_R8G8_SNORM, eR8G8Uscaled = VK_FORMAT_R8G8_USCALED, eR8G8Sscaled = VK_FORMAT_R8G8_SSCALED, eR8G8Uint = VK_FORMAT_R8G8_UINT, eR8G8Sint = VK_FORMAT_R8G8_SINT, eR8G8Srgb = VK_FORMAT_R8G8_SRGB, eR8G8B8Unorm = VK_FORMAT_R8G8B8_UNORM, eR8G8B8Snorm = VK_FORMAT_R8G8B8_SNORM, eR8G8B8Uscaled = VK_FORMAT_R8G8B8_USCALED, eR8G8B8Sscaled = VK_FORMAT_R8G8B8_SSCALED, eR8G8B8Uint = VK_FORMAT_R8G8B8_UINT, eR8G8B8Sint = VK_FORMAT_R8G8B8_SINT, eR8G8B8Srgb = VK_FORMAT_R8G8B8_SRGB, eB8G8R8Unorm = VK_FORMAT_B8G8R8_UNORM, eB8G8R8Snorm = VK_FORMAT_B8G8R8_SNORM, eB8G8R8Uscaled = VK_FORMAT_B8G8R8_USCALED, eB8G8R8Sscaled = VK_FORMAT_B8G8R8_SSCALED, eB8G8R8Uint = VK_FORMAT_B8G8R8_UINT, eB8G8R8Sint = VK_FORMAT_B8G8R8_SINT, eB8G8R8Srgb = VK_FORMAT_B8G8R8_SRGB, eR8G8B8A8Unorm = VK_FORMAT_R8G8B8A8_UNORM, eR8G8B8A8Snorm = VK_FORMAT_R8G8B8A8_SNORM, eR8G8B8A8Uscaled = VK_FORMAT_R8G8B8A8_USCALED, eR8G8B8A8Sscaled = VK_FORMAT_R8G8B8A8_SSCALED, eR8G8B8A8Uint = VK_FORMAT_R8G8B8A8_UINT, eR8G8B8A8Sint = VK_FORMAT_R8G8B8A8_SINT, eR8G8B8A8Srgb = VK_FORMAT_R8G8B8A8_SRGB, eB8G8R8A8Unorm = VK_FORMAT_B8G8R8A8_UNORM, eB8G8R8A8Snorm = VK_FORMAT_B8G8R8A8_SNORM, eB8G8R8A8Uscaled = VK_FORMAT_B8G8R8A8_USCALED, eB8G8R8A8Sscaled = VK_FORMAT_B8G8R8A8_SSCALED, eB8G8R8A8Uint = VK_FORMAT_B8G8R8A8_UINT, eB8G8R8A8Sint = VK_FORMAT_B8G8R8A8_SINT, eB8G8R8A8Srgb = VK_FORMAT_B8G8R8A8_SRGB, eA8B8G8R8UnormPack32 = VK_FORMAT_A8B8G8R8_UNORM_PACK32, eA8B8G8R8SnormPack32 = VK_FORMAT_A8B8G8R8_SNORM_PACK32, eA8B8G8R8UscaledPack32 = VK_FORMAT_A8B8G8R8_USCALED_PACK32, eA8B8G8R8SscaledPack32 = VK_FORMAT_A8B8G8R8_SSCALED_PACK32, eA8B8G8R8UintPack32 = VK_FORMAT_A8B8G8R8_UINT_PACK32, eA8B8G8R8SintPack32 = VK_FORMAT_A8B8G8R8_SINT_PACK32, eA8B8G8R8SrgbPack32 = VK_FORMAT_A8B8G8R8_SRGB_PACK32, eA2R10G10B10UnormPack32 = VK_FORMAT_A2R10G10B10_UNORM_PACK32, eA2R10G10B10SnormPack32 = VK_FORMAT_A2R10G10B10_SNORM_PACK32, eA2R10G10B10UscaledPack32 = VK_FORMAT_A2R10G10B10_USCALED_PACK32, eA2R10G10B10SscaledPack32 = VK_FORMAT_A2R10G10B10_SSCALED_PACK32, eA2R10G10B10UintPack32 = VK_FORMAT_A2R10G10B10_UINT_PACK32, eA2R10G10B10SintPack32 = VK_FORMAT_A2R10G10B10_SINT_PACK32, eA2B10G10R10UnormPack32 = VK_FORMAT_A2B10G10R10_UNORM_PACK32, eA2B10G10R10SnormPack32 = VK_FORMAT_A2B10G10R10_SNORM_PACK32, eA2B10G10R10UscaledPack32 = VK_FORMAT_A2B10G10R10_USCALED_PACK32, eA2B10G10R10SscaledPack32 = VK_FORMAT_A2B10G10R10_SSCALED_PACK32, eA2B10G10R10UintPack32 = VK_FORMAT_A2B10G10R10_UINT_PACK32, eA2B10G10R10SintPack32 = VK_FORMAT_A2B10G10R10_SINT_PACK32, eR16Unorm = VK_FORMAT_R16_UNORM, eR16Snorm = VK_FORMAT_R16_SNORM, eR16Uscaled = VK_FORMAT_R16_USCALED, eR16Sscaled = VK_FORMAT_R16_SSCALED, eR16Uint = VK_FORMAT_R16_UINT, eR16Sint = VK_FORMAT_R16_SINT, eR16Sfloat = VK_FORMAT_R16_SFLOAT, eR16G16Unorm = VK_FORMAT_R16G16_UNORM, eR16G16Snorm = VK_FORMAT_R16G16_SNORM, eR16G16Uscaled = VK_FORMAT_R16G16_USCALED, eR16G16Sscaled = VK_FORMAT_R16G16_SSCALED, eR16G16Uint = VK_FORMAT_R16G16_UINT, eR16G16Sint = VK_FORMAT_R16G16_SINT, eR16G16Sfloat = VK_FORMAT_R16G16_SFLOAT, eR16G16B16Unorm = VK_FORMAT_R16G16B16_UNORM, eR16G16B16Snorm = VK_FORMAT_R16G16B16_SNORM, eR16G16B16Uscaled = VK_FORMAT_R16G16B16_USCALED, eR16G16B16Sscaled = VK_FORMAT_R16G16B16_SSCALED, eR16G16B16Uint = VK_FORMAT_R16G16B16_UINT, eR16G16B16Sint = VK_FORMAT_R16G16B16_SINT, eR16G16B16Sfloat = VK_FORMAT_R16G16B16_SFLOAT, eR16G16B16A16Unorm = VK_FORMAT_R16G16B16A16_UNORM, eR16G16B16A16Snorm = VK_FORMAT_R16G16B16A16_SNORM, eR16G16B16A16Uscaled = VK_FORMAT_R16G16B16A16_USCALED, eR16G16B16A16Sscaled = VK_FORMAT_R16G16B16A16_SSCALED, eR16G16B16A16Uint = VK_FORMAT_R16G16B16A16_UINT, eR16G16B16A16Sint = VK_FORMAT_R16G16B16A16_SINT, eR16G16B16A16Sfloat = VK_FORMAT_R16G16B16A16_SFLOAT, eR32Uint = VK_FORMAT_R32_UINT, eR32Sint = VK_FORMAT_R32_SINT, eR32Sfloat = VK_FORMAT_R32_SFLOAT, eR32G32Uint = VK_FORMAT_R32G32_UINT, eR32G32Sint = VK_FORMAT_R32G32_SINT, eR32G32Sfloat = VK_FORMAT_R32G32_SFLOAT, eR32G32B32Uint = VK_FORMAT_R32G32B32_UINT, eR32G32B32Sint = VK_FORMAT_R32G32B32_SINT, eR32G32B32Sfloat = VK_FORMAT_R32G32B32_SFLOAT, eR32G32B32A32Uint = VK_FORMAT_R32G32B32A32_UINT, eR32G32B32A32Sint = VK_FORMAT_R32G32B32A32_SINT, eR32G32B32A32Sfloat = VK_FORMAT_R32G32B32A32_SFLOAT, eR64Uint = VK_FORMAT_R64_UINT, eR64Sint = VK_FORMAT_R64_SINT, eR64Sfloat = VK_FORMAT_R64_SFLOAT, eR64G64Uint = VK_FORMAT_R64G64_UINT, eR64G64Sint = VK_FORMAT_R64G64_SINT, eR64G64Sfloat = VK_FORMAT_R64G64_SFLOAT, eR64G64B64Uint = VK_FORMAT_R64G64B64_UINT, eR64G64B64Sint = VK_FORMAT_R64G64B64_SINT, eR64G64B64Sfloat = VK_FORMAT_R64G64B64_SFLOAT, eR64G64B64A64Uint = VK_FORMAT_R64G64B64A64_UINT, eR64G64B64A64Sint = VK_FORMAT_R64G64B64A64_SINT, eR64G64B64A64Sfloat = VK_FORMAT_R64G64B64A64_SFLOAT, eB10G11R11UfloatPack32 = VK_FORMAT_B10G11R11_UFLOAT_PACK32, eE5B9G9R9UfloatPack32 = VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, eD16Unorm = VK_FORMAT_D16_UNORM, eX8D24UnormPack32 = VK_FORMAT_X8_D24_UNORM_PACK32, eD32Sfloat = VK_FORMAT_D32_SFLOAT, eS8Uint = VK_FORMAT_S8_UINT, eD16UnormS8Uint = VK_FORMAT_D16_UNORM_S8_UINT, eD24UnormS8Uint = VK_FORMAT_D24_UNORM_S8_UINT, eD32SfloatS8Uint = VK_FORMAT_D32_SFLOAT_S8_UINT, eBc1RgbUnormBlock = VK_FORMAT_BC1_RGB_UNORM_BLOCK, eBc1RgbSrgbBlock = VK_FORMAT_BC1_RGB_SRGB_BLOCK, eBc1RgbaUnormBlock = VK_FORMAT_BC1_RGBA_UNORM_BLOCK, eBc1RgbaSrgbBlock = VK_FORMAT_BC1_RGBA_SRGB_BLOCK, eBc2UnormBlock = VK_FORMAT_BC2_UNORM_BLOCK, eBc2SrgbBlock = VK_FORMAT_BC2_SRGB_BLOCK, eBc3UnormBlock = VK_FORMAT_BC3_UNORM_BLOCK, eBc3SrgbBlock = VK_FORMAT_BC3_SRGB_BLOCK, eBc4UnormBlock = VK_FORMAT_BC4_UNORM_BLOCK, eBc4SnormBlock = VK_FORMAT_BC4_SNORM_BLOCK, eBc5UnormBlock = VK_FORMAT_BC5_UNORM_BLOCK, eBc5SnormBlock = VK_FORMAT_BC5_SNORM_BLOCK, eBc6HUfloatBlock = VK_FORMAT_BC6H_UFLOAT_BLOCK, eBc6HSfloatBlock = VK_FORMAT_BC6H_SFLOAT_BLOCK, eBc7UnormBlock = VK_FORMAT_BC7_UNORM_BLOCK, eBc7SrgbBlock = VK_FORMAT_BC7_SRGB_BLOCK, eEtc2R8G8B8UnormBlock = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, eEtc2R8G8B8SrgbBlock = VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, eEtc2R8G8B8A1UnormBlock = VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, eEtc2R8G8B8A1SrgbBlock = VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, eEtc2R8G8B8A8UnormBlock = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, eEtc2R8G8B8A8SrgbBlock = VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, eEacR11UnormBlock = VK_FORMAT_EAC_R11_UNORM_BLOCK, eEacR11SnormBlock = VK_FORMAT_EAC_R11_SNORM_BLOCK, eEacR11G11UnormBlock = VK_FORMAT_EAC_R11G11_UNORM_BLOCK, eEacR11G11SnormBlock = VK_FORMAT_EAC_R11G11_SNORM_BLOCK, eAstc4x4UnormBlock = VK_FORMAT_ASTC_4x4_UNORM_BLOCK, eAstc4x4SrgbBlock = VK_FORMAT_ASTC_4x4_SRGB_BLOCK, eAstc5x4UnormBlock = VK_FORMAT_ASTC_5x4_UNORM_BLOCK, eAstc5x4SrgbBlock = VK_FORMAT_ASTC_5x4_SRGB_BLOCK, eAstc5x5UnormBlock = VK_FORMAT_ASTC_5x5_UNORM_BLOCK, eAstc5x5SrgbBlock = VK_FORMAT_ASTC_5x5_SRGB_BLOCK, eAstc6x5UnormBlock = VK_FORMAT_ASTC_6x5_UNORM_BLOCK, eAstc6x5SrgbBlock = VK_FORMAT_ASTC_6x5_SRGB_BLOCK, eAstc6x6UnormBlock = VK_FORMAT_ASTC_6x6_UNORM_BLOCK, eAstc6x6SrgbBlock = VK_FORMAT_ASTC_6x6_SRGB_BLOCK, eAstc8x5UnormBlock = VK_FORMAT_ASTC_8x5_UNORM_BLOCK, eAstc8x5SrgbBlock = VK_FORMAT_ASTC_8x5_SRGB_BLOCK, eAstc8x6UnormBlock = VK_FORMAT_ASTC_8x6_UNORM_BLOCK, eAstc8x6SrgbBlock = VK_FORMAT_ASTC_8x6_SRGB_BLOCK, eAstc8x8UnormBlock = VK_FORMAT_ASTC_8x8_UNORM_BLOCK, eAstc8x8SrgbBlock = VK_FORMAT_ASTC_8x8_SRGB_BLOCK, eAstc10x5UnormBlock = VK_FORMAT_ASTC_10x5_UNORM_BLOCK, eAstc10x5SrgbBlock = VK_FORMAT_ASTC_10x5_SRGB_BLOCK, eAstc10x6UnormBlock = VK_FORMAT_ASTC_10x6_UNORM_BLOCK, eAstc10x6SrgbBlock = VK_FORMAT_ASTC_10x6_SRGB_BLOCK, eAstc10x8UnormBlock = VK_FORMAT_ASTC_10x8_UNORM_BLOCK, eAstc10x8SrgbBlock = VK_FORMAT_ASTC_10x8_SRGB_BLOCK, eAstc10x10UnormBlock = VK_FORMAT_ASTC_10x10_UNORM_BLOCK, eAstc10x10SrgbBlock = VK_FORMAT_ASTC_10x10_SRGB_BLOCK, eAstc12x10UnormBlock = VK_FORMAT_ASTC_12x10_UNORM_BLOCK, eAstc12x10SrgbBlock = VK_FORMAT_ASTC_12x10_SRGB_BLOCK, eAstc12x12UnormBlock = VK_FORMAT_ASTC_12x12_UNORM_BLOCK, eAstc12x12SrgbBlock = VK_FORMAT_ASTC_12x12_SRGB_BLOCK }; class VertexInputAttributeDescription { public: VertexInputAttributeDescription() : VertexInputAttributeDescription( 0, 0, Format::eUndefined, 0 ) {} VertexInputAttributeDescription( uint32_t location, uint32_t binding, Format format, uint32_t offset) { m_vertexInputAttributeDescription.location = location; m_vertexInputAttributeDescription.binding = binding; m_vertexInputAttributeDescription.format = static_cast( format ); m_vertexInputAttributeDescription.offset = offset; } const uint32_t& location() const { return m_vertexInputAttributeDescription.location; } VertexInputAttributeDescription& location( uint32_t location ) { m_vertexInputAttributeDescription.location = location; return *this; } const uint32_t& binding() const { return m_vertexInputAttributeDescription.binding; } VertexInputAttributeDescription& binding( uint32_t binding ) { m_vertexInputAttributeDescription.binding = binding; return *this; } const Format& format() const { return reinterpret_cast( m_vertexInputAttributeDescription.format ); } VertexInputAttributeDescription& format( Format format ) { m_vertexInputAttributeDescription.format = static_cast( format ); return *this; } const uint32_t& offset() const { return m_vertexInputAttributeDescription.offset; } VertexInputAttributeDescription& offset( uint32_t offset ) { m_vertexInputAttributeDescription.offset = offset; return *this; } operator const VkVertexInputAttributeDescription&() const { return m_vertexInputAttributeDescription; } private: VkVertexInputAttributeDescription m_vertexInputAttributeDescription; }; enum class StructureType { eApplicationInfo = VK_STRUCTURE_TYPE_APPLICATION_INFO, eInstanceCreateInfo = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, eDeviceQueueCreateInfo = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, eDeviceCreateInfo = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, eSubmitInfo = VK_STRUCTURE_TYPE_SUBMIT_INFO, eMemoryAllocateInfo = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, eMappedMemoryRange = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, eBindSparseInfo = VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, eFenceCreateInfo = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, eSemaphoreCreateInfo = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, eEventCreateInfo = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, eQueryPoolCreateInfo = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, eBufferCreateInfo = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, eBufferViewCreateInfo = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, eImageCreateInfo = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, eImageViewCreateInfo = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, eShaderModuleCreateInfo = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, ePipelineCacheCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, ePipelineShaderStageCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, ePipelineVertexInputStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, ePipelineInputAssemblyStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, ePipelineTessellationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, ePipelineViewportStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, ePipelineRasterizationStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, ePipelineMultisampleStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, ePipelineDepthStencilStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, ePipelineColorBlendStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, ePipelineDynamicStateCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, eGraphicsPipelineCreateInfo = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, eComputePipelineCreateInfo = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, ePipelineLayoutCreateInfo = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, eSamplerCreateInfo = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, eDescriptorSetLayoutCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, eDescriptorPoolCreateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, eDescriptorSetAllocateInfo = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, eWriteDescriptorSet = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, eCopyDescriptorSet = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, eFramebufferCreateInfo = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, eRenderPassCreateInfo = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, eCommandPoolCreateInfo = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, eCommandBufferAllocateInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, eCommandBufferInheritanceInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, eCommandBufferBeginInfo = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, eRenderPassBeginInfo = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, eBufferMemoryBarrier = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, eImageMemoryBarrier = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, eMemoryBarrier = VK_STRUCTURE_TYPE_MEMORY_BARRIER, eLoaderInstanceCreateInfo = VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, eLoaderDeviceCreateInfo = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO }; class ApplicationInfo { public: ApplicationInfo() : ApplicationInfo( nullptr, 0, nullptr, 0, 0 ) {} ApplicationInfo( const char* pApplicationName, uint32_t applicationVersion, const char* pEngineName, uint32_t engineVersion, uint32_t apiVersion) { m_applicationInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; m_applicationInfo.pNext = nullptr; m_applicationInfo.pApplicationName = pApplicationName; m_applicationInfo.applicationVersion = applicationVersion; m_applicationInfo.pEngineName = pEngineName; m_applicationInfo.engineVersion = engineVersion; m_applicationInfo.apiVersion = apiVersion; } const StructureType& sType() const { return reinterpret_cast( m_applicationInfo.sType ); } ApplicationInfo& sType( StructureType sType ) { m_applicationInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_applicationInfo.pNext ); } ApplicationInfo& pNext( const void* pNext ) { m_applicationInfo.pNext = pNext; return *this; } const char* pApplicationName() const { return reinterpret_cast( m_applicationInfo.pApplicationName ); } ApplicationInfo& pApplicationName( const char* pApplicationName ) { m_applicationInfo.pApplicationName = pApplicationName; return *this; } const uint32_t& applicationVersion() const { return m_applicationInfo.applicationVersion; } ApplicationInfo& applicationVersion( uint32_t applicationVersion ) { m_applicationInfo.applicationVersion = applicationVersion; return *this; } const char* pEngineName() const { return reinterpret_cast( m_applicationInfo.pEngineName ); } ApplicationInfo& pEngineName( const char* pEngineName ) { m_applicationInfo.pEngineName = pEngineName; return *this; } const uint32_t& engineVersion() const { return m_applicationInfo.engineVersion; } ApplicationInfo& engineVersion( uint32_t engineVersion ) { m_applicationInfo.engineVersion = engineVersion; return *this; } const uint32_t& apiVersion() const { return m_applicationInfo.apiVersion; } ApplicationInfo& apiVersion( uint32_t apiVersion ) { m_applicationInfo.apiVersion = apiVersion; return *this; } operator const VkApplicationInfo&() const { return m_applicationInfo; } private: VkApplicationInfo m_applicationInfo; }; class DeviceQueueCreateInfo { public: DeviceQueueCreateInfo() : DeviceQueueCreateInfo( 0, 0, 0, nullptr ) {} DeviceQueueCreateInfo( DeviceQueueCreateFlags flags, uint32_t queueFamilyIndex, uint32_t queueCount, const float* pQueuePriorities) { m_deviceQueueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; m_deviceQueueCreateInfo.pNext = nullptr; m_deviceQueueCreateInfo.flags = flags; m_deviceQueueCreateInfo.queueFamilyIndex = queueFamilyIndex; m_deviceQueueCreateInfo.queueCount = queueCount; m_deviceQueueCreateInfo.pQueuePriorities = pQueuePriorities; } const StructureType& sType() const { return reinterpret_cast( m_deviceQueueCreateInfo.sType ); } DeviceQueueCreateInfo& sType( StructureType sType ) { m_deviceQueueCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_deviceQueueCreateInfo.pNext ); } DeviceQueueCreateInfo& pNext( const void* pNext ) { m_deviceQueueCreateInfo.pNext = pNext; return *this; } const DeviceQueueCreateFlags& flags() const { return m_deviceQueueCreateInfo.flags; } DeviceQueueCreateInfo& flags( DeviceQueueCreateFlags flags ) { m_deviceQueueCreateInfo.flags = flags; return *this; } const uint32_t& queueFamilyIndex() const { return m_deviceQueueCreateInfo.queueFamilyIndex; } DeviceQueueCreateInfo& queueFamilyIndex( uint32_t queueFamilyIndex ) { m_deviceQueueCreateInfo.queueFamilyIndex = queueFamilyIndex; return *this; } const uint32_t& queueCount() const { return m_deviceQueueCreateInfo.queueCount; } DeviceQueueCreateInfo& queueCount( uint32_t queueCount ) { m_deviceQueueCreateInfo.queueCount = queueCount; return *this; } const float* pQueuePriorities() const { return reinterpret_cast( m_deviceQueueCreateInfo.pQueuePriorities ); } DeviceQueueCreateInfo& pQueuePriorities( const float* pQueuePriorities ) { m_deviceQueueCreateInfo.pQueuePriorities = pQueuePriorities; return *this; } operator const VkDeviceQueueCreateInfo&() const { return m_deviceQueueCreateInfo; } private: VkDeviceQueueCreateInfo m_deviceQueueCreateInfo; }; class DeviceCreateInfo { public: DeviceCreateInfo() : DeviceCreateInfo( 0, 0, nullptr, 0, nullptr, 0, nullptr, nullptr ) {} DeviceCreateInfo( DeviceCreateFlags flags, uint32_t queueCreateInfoCount, const DeviceQueueCreateInfo* pQueueCreateInfos, uint32_t enabledLayerCount, const char* const* ppEnabledLayerNames, uint32_t enabledExtensionCount, const char* const* ppEnabledExtensionNames, const PhysicalDeviceFeatures* pEnabledFeatures) { m_deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; m_deviceCreateInfo.pNext = nullptr; m_deviceCreateInfo.flags = flags; m_deviceCreateInfo.queueCreateInfoCount = queueCreateInfoCount; m_deviceCreateInfo.pQueueCreateInfos = reinterpret_cast( pQueueCreateInfos ); m_deviceCreateInfo.enabledLayerCount = enabledLayerCount; m_deviceCreateInfo.ppEnabledLayerNames = ppEnabledLayerNames; m_deviceCreateInfo.enabledExtensionCount = enabledExtensionCount; m_deviceCreateInfo.ppEnabledExtensionNames = ppEnabledExtensionNames; m_deviceCreateInfo.pEnabledFeatures = reinterpret_cast( pEnabledFeatures ); } const StructureType& sType() const { return reinterpret_cast( m_deviceCreateInfo.sType ); } DeviceCreateInfo& sType( StructureType sType ) { m_deviceCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_deviceCreateInfo.pNext ); } DeviceCreateInfo& pNext( const void* pNext ) { m_deviceCreateInfo.pNext = pNext; return *this; } const DeviceCreateFlags& flags() const { return m_deviceCreateInfo.flags; } DeviceCreateInfo& flags( DeviceCreateFlags flags ) { m_deviceCreateInfo.flags = flags; return *this; } const uint32_t& queueCreateInfoCount() const { return m_deviceCreateInfo.queueCreateInfoCount; } DeviceCreateInfo& queueCreateInfoCount( uint32_t queueCreateInfoCount ) { m_deviceCreateInfo.queueCreateInfoCount = queueCreateInfoCount; return *this; } const DeviceQueueCreateInfo* pQueueCreateInfos() const { return reinterpret_cast( m_deviceCreateInfo.pQueueCreateInfos ); } DeviceCreateInfo& pQueueCreateInfos( const DeviceQueueCreateInfo* pQueueCreateInfos ) { m_deviceCreateInfo.pQueueCreateInfos = reinterpret_cast( pQueueCreateInfos ); return *this; } const uint32_t& enabledLayerCount() const { return m_deviceCreateInfo.enabledLayerCount; } DeviceCreateInfo& enabledLayerCount( uint32_t enabledLayerCount ) { m_deviceCreateInfo.enabledLayerCount = enabledLayerCount; return *this; } const char* const* ppEnabledLayerNames() const { return reinterpret_cast( m_deviceCreateInfo.ppEnabledLayerNames ); } DeviceCreateInfo& ppEnabledLayerNames( const char* const* ppEnabledLayerNames ) { m_deviceCreateInfo.ppEnabledLayerNames = ppEnabledLayerNames; return *this; } const uint32_t& enabledExtensionCount() const { return m_deviceCreateInfo.enabledExtensionCount; } DeviceCreateInfo& enabledExtensionCount( uint32_t enabledExtensionCount ) { m_deviceCreateInfo.enabledExtensionCount = enabledExtensionCount; return *this; } const char* const* ppEnabledExtensionNames() const { return reinterpret_cast( m_deviceCreateInfo.ppEnabledExtensionNames ); } DeviceCreateInfo& ppEnabledExtensionNames( const char* const* ppEnabledExtensionNames ) { m_deviceCreateInfo.ppEnabledExtensionNames = ppEnabledExtensionNames; return *this; } const PhysicalDeviceFeatures* pEnabledFeatures() const { return reinterpret_cast( m_deviceCreateInfo.pEnabledFeatures ); } DeviceCreateInfo& pEnabledFeatures( const PhysicalDeviceFeatures* pEnabledFeatures ) { m_deviceCreateInfo.pEnabledFeatures = reinterpret_cast( pEnabledFeatures ); return *this; } operator const VkDeviceCreateInfo&() const { return m_deviceCreateInfo; } private: VkDeviceCreateInfo m_deviceCreateInfo; }; class InstanceCreateInfo { public: InstanceCreateInfo() : InstanceCreateInfo( 0, nullptr, 0, nullptr, 0, nullptr ) {} InstanceCreateInfo( InstanceCreateFlags flags, const ApplicationInfo* pApplicationInfo, uint32_t enabledLayerCount, const char* const* ppEnabledLayerNames, uint32_t enabledExtensionCount, const char* const* ppEnabledExtensionNames) { m_instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; m_instanceCreateInfo.pNext = nullptr; m_instanceCreateInfo.flags = flags; m_instanceCreateInfo.pApplicationInfo = reinterpret_cast( pApplicationInfo ); m_instanceCreateInfo.enabledLayerCount = enabledLayerCount; m_instanceCreateInfo.ppEnabledLayerNames = ppEnabledLayerNames; m_instanceCreateInfo.enabledExtensionCount = enabledExtensionCount; m_instanceCreateInfo.ppEnabledExtensionNames = ppEnabledExtensionNames; } const StructureType& sType() const { return reinterpret_cast( m_instanceCreateInfo.sType ); } InstanceCreateInfo& sType( StructureType sType ) { m_instanceCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_instanceCreateInfo.pNext ); } InstanceCreateInfo& pNext( const void* pNext ) { m_instanceCreateInfo.pNext = pNext; return *this; } const InstanceCreateFlags& flags() const { return m_instanceCreateInfo.flags; } InstanceCreateInfo& flags( InstanceCreateFlags flags ) { m_instanceCreateInfo.flags = flags; return *this; } const ApplicationInfo* pApplicationInfo() const { return reinterpret_cast( m_instanceCreateInfo.pApplicationInfo ); } InstanceCreateInfo& pApplicationInfo( const ApplicationInfo* pApplicationInfo ) { m_instanceCreateInfo.pApplicationInfo = reinterpret_cast( pApplicationInfo ); return *this; } const uint32_t& enabledLayerCount() const { return m_instanceCreateInfo.enabledLayerCount; } InstanceCreateInfo& enabledLayerCount( uint32_t enabledLayerCount ) { m_instanceCreateInfo.enabledLayerCount = enabledLayerCount; return *this; } const char* const* ppEnabledLayerNames() const { return reinterpret_cast( m_instanceCreateInfo.ppEnabledLayerNames ); } InstanceCreateInfo& ppEnabledLayerNames( const char* const* ppEnabledLayerNames ) { m_instanceCreateInfo.ppEnabledLayerNames = ppEnabledLayerNames; return *this; } const uint32_t& enabledExtensionCount() const { return m_instanceCreateInfo.enabledExtensionCount; } InstanceCreateInfo& enabledExtensionCount( uint32_t enabledExtensionCount ) { m_instanceCreateInfo.enabledExtensionCount = enabledExtensionCount; return *this; } const char* const* ppEnabledExtensionNames() const { return reinterpret_cast( m_instanceCreateInfo.ppEnabledExtensionNames ); } InstanceCreateInfo& ppEnabledExtensionNames( const char* const* ppEnabledExtensionNames ) { m_instanceCreateInfo.ppEnabledExtensionNames = ppEnabledExtensionNames; return *this; } operator const VkInstanceCreateInfo&() const { return m_instanceCreateInfo; } private: VkInstanceCreateInfo m_instanceCreateInfo; }; class MemoryAllocateInfo { public: MemoryAllocateInfo() : MemoryAllocateInfo( 0, 0 ) {} MemoryAllocateInfo( DeviceSize allocationSize, uint32_t memoryTypeIndex) { m_memoryAllocateInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; m_memoryAllocateInfo.pNext = nullptr; m_memoryAllocateInfo.allocationSize = allocationSize; m_memoryAllocateInfo.memoryTypeIndex = memoryTypeIndex; } const StructureType& sType() const { return reinterpret_cast( m_memoryAllocateInfo.sType ); } MemoryAllocateInfo& sType( StructureType sType ) { m_memoryAllocateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_memoryAllocateInfo.pNext ); } MemoryAllocateInfo& pNext( const void* pNext ) { m_memoryAllocateInfo.pNext = pNext; return *this; } const DeviceSize& allocationSize() const { return m_memoryAllocateInfo.allocationSize; } MemoryAllocateInfo& allocationSize( DeviceSize allocationSize ) { m_memoryAllocateInfo.allocationSize = allocationSize; return *this; } const uint32_t& memoryTypeIndex() const { return m_memoryAllocateInfo.memoryTypeIndex; } MemoryAllocateInfo& memoryTypeIndex( uint32_t memoryTypeIndex ) { m_memoryAllocateInfo.memoryTypeIndex = memoryTypeIndex; return *this; } operator const VkMemoryAllocateInfo&() const { return m_memoryAllocateInfo; } private: VkMemoryAllocateInfo m_memoryAllocateInfo; }; class MappedMemoryRange { public: MappedMemoryRange() : MappedMemoryRange( nullptr, 0, 0 ) {} MappedMemoryRange( DeviceMemory memory, DeviceSize offset, DeviceSize size) { m_mappedMemoryRange.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; m_mappedMemoryRange.pNext = nullptr; m_mappedMemoryRange.memory = memory; m_mappedMemoryRange.offset = offset; m_mappedMemoryRange.size = size; } const StructureType& sType() const { return reinterpret_cast( m_mappedMemoryRange.sType ); } MappedMemoryRange& sType( StructureType sType ) { m_mappedMemoryRange.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_mappedMemoryRange.pNext ); } MappedMemoryRange& pNext( const void* pNext ) { m_mappedMemoryRange.pNext = pNext; return *this; } const DeviceMemory& memory() const { return m_mappedMemoryRange.memory; } MappedMemoryRange& memory( DeviceMemory memory ) { m_mappedMemoryRange.memory = memory; return *this; } const DeviceSize& offset() const { return m_mappedMemoryRange.offset; } MappedMemoryRange& offset( DeviceSize offset ) { m_mappedMemoryRange.offset = offset; return *this; } const DeviceSize& size() const { return m_mappedMemoryRange.size; } MappedMemoryRange& size( DeviceSize size ) { m_mappedMemoryRange.size = size; return *this; } operator const VkMappedMemoryRange&() const { return m_mappedMemoryRange; } private: VkMappedMemoryRange m_mappedMemoryRange; }; class WriteDescriptorSet { public: WriteDescriptorSet() : WriteDescriptorSet( nullptr, 0, 0, 0, DescriptorType::eSampler, nullptr, nullptr, nullptr ) {} WriteDescriptorSet( DescriptorSet dstSet, uint32_t dstBinding, uint32_t dstArrayElement, uint32_t descriptorCount, DescriptorType descriptorType, const DescriptorImageInfo* pImageInfo, const DescriptorBufferInfo* pBufferInfo, const BufferView* pTexelBufferView) { m_writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; m_writeDescriptorSet.pNext = nullptr; m_writeDescriptorSet.dstSet = dstSet; m_writeDescriptorSet.dstBinding = dstBinding; m_writeDescriptorSet.dstArrayElement = dstArrayElement; m_writeDescriptorSet.descriptorCount = descriptorCount; m_writeDescriptorSet.descriptorType = static_cast( descriptorType ); m_writeDescriptorSet.pImageInfo = reinterpret_cast( pImageInfo ); m_writeDescriptorSet.pBufferInfo = reinterpret_cast( pBufferInfo ); m_writeDescriptorSet.pTexelBufferView = pTexelBufferView; } const StructureType& sType() const { return reinterpret_cast( m_writeDescriptorSet.sType ); } WriteDescriptorSet& sType( StructureType sType ) { m_writeDescriptorSet.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_writeDescriptorSet.pNext ); } WriteDescriptorSet& pNext( const void* pNext ) { m_writeDescriptorSet.pNext = pNext; return *this; } const DescriptorSet& dstSet() const { return m_writeDescriptorSet.dstSet; } WriteDescriptorSet& dstSet( DescriptorSet dstSet ) { m_writeDescriptorSet.dstSet = dstSet; return *this; } const uint32_t& dstBinding() const { return m_writeDescriptorSet.dstBinding; } WriteDescriptorSet& dstBinding( uint32_t dstBinding ) { m_writeDescriptorSet.dstBinding = dstBinding; return *this; } const uint32_t& dstArrayElement() const { return m_writeDescriptorSet.dstArrayElement; } WriteDescriptorSet& dstArrayElement( uint32_t dstArrayElement ) { m_writeDescriptorSet.dstArrayElement = dstArrayElement; return *this; } const uint32_t& descriptorCount() const { return m_writeDescriptorSet.descriptorCount; } WriteDescriptorSet& descriptorCount( uint32_t descriptorCount ) { m_writeDescriptorSet.descriptorCount = descriptorCount; return *this; } const DescriptorType& descriptorType() const { return reinterpret_cast( m_writeDescriptorSet.descriptorType ); } WriteDescriptorSet& descriptorType( DescriptorType descriptorType ) { m_writeDescriptorSet.descriptorType = static_cast( descriptorType ); return *this; } const DescriptorImageInfo* pImageInfo() const { return reinterpret_cast( m_writeDescriptorSet.pImageInfo ); } WriteDescriptorSet& pImageInfo( const DescriptorImageInfo* pImageInfo ) { m_writeDescriptorSet.pImageInfo = reinterpret_cast( pImageInfo ); return *this; } const DescriptorBufferInfo* pBufferInfo() const { return reinterpret_cast( m_writeDescriptorSet.pBufferInfo ); } WriteDescriptorSet& pBufferInfo( const DescriptorBufferInfo* pBufferInfo ) { m_writeDescriptorSet.pBufferInfo = reinterpret_cast( pBufferInfo ); return *this; } const BufferView* pTexelBufferView() const { return reinterpret_cast( m_writeDescriptorSet.pTexelBufferView ); } WriteDescriptorSet& pTexelBufferView( const BufferView* pTexelBufferView ) { m_writeDescriptorSet.pTexelBufferView = pTexelBufferView; return *this; } operator const VkWriteDescriptorSet&() const { return m_writeDescriptorSet; } private: VkWriteDescriptorSet m_writeDescriptorSet; }; class CopyDescriptorSet { public: CopyDescriptorSet() : CopyDescriptorSet( nullptr, 0, 0, nullptr, 0, 0, 0 ) {} CopyDescriptorSet( DescriptorSet srcSet, uint32_t srcBinding, uint32_t srcArrayElement, DescriptorSet dstSet, uint32_t dstBinding, uint32_t dstArrayElement, uint32_t descriptorCount) { m_copyDescriptorSet.sType = VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET; m_copyDescriptorSet.pNext = nullptr; m_copyDescriptorSet.srcSet = srcSet; m_copyDescriptorSet.srcBinding = srcBinding; m_copyDescriptorSet.srcArrayElement = srcArrayElement; m_copyDescriptorSet.dstSet = dstSet; m_copyDescriptorSet.dstBinding = dstBinding; m_copyDescriptorSet.dstArrayElement = dstArrayElement; m_copyDescriptorSet.descriptorCount = descriptorCount; } const StructureType& sType() const { return reinterpret_cast( m_copyDescriptorSet.sType ); } CopyDescriptorSet& sType( StructureType sType ) { m_copyDescriptorSet.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_copyDescriptorSet.pNext ); } CopyDescriptorSet& pNext( const void* pNext ) { m_copyDescriptorSet.pNext = pNext; return *this; } const DescriptorSet& srcSet() const { return m_copyDescriptorSet.srcSet; } CopyDescriptorSet& srcSet( DescriptorSet srcSet ) { m_copyDescriptorSet.srcSet = srcSet; return *this; } const uint32_t& srcBinding() const { return m_copyDescriptorSet.srcBinding; } CopyDescriptorSet& srcBinding( uint32_t srcBinding ) { m_copyDescriptorSet.srcBinding = srcBinding; return *this; } const uint32_t& srcArrayElement() const { return m_copyDescriptorSet.srcArrayElement; } CopyDescriptorSet& srcArrayElement( uint32_t srcArrayElement ) { m_copyDescriptorSet.srcArrayElement = srcArrayElement; return *this; } const DescriptorSet& dstSet() const { return m_copyDescriptorSet.dstSet; } CopyDescriptorSet& dstSet( DescriptorSet dstSet ) { m_copyDescriptorSet.dstSet = dstSet; return *this; } const uint32_t& dstBinding() const { return m_copyDescriptorSet.dstBinding; } CopyDescriptorSet& dstBinding( uint32_t dstBinding ) { m_copyDescriptorSet.dstBinding = dstBinding; return *this; } const uint32_t& dstArrayElement() const { return m_copyDescriptorSet.dstArrayElement; } CopyDescriptorSet& dstArrayElement( uint32_t dstArrayElement ) { m_copyDescriptorSet.dstArrayElement = dstArrayElement; return *this; } const uint32_t& descriptorCount() const { return m_copyDescriptorSet.descriptorCount; } CopyDescriptorSet& descriptorCount( uint32_t descriptorCount ) { m_copyDescriptorSet.descriptorCount = descriptorCount; return *this; } operator const VkCopyDescriptorSet&() const { return m_copyDescriptorSet; } private: VkCopyDescriptorSet m_copyDescriptorSet; }; class BufferViewCreateInfo { public: BufferViewCreateInfo() : BufferViewCreateInfo( 0, nullptr, Format::eUndefined, 0, 0 ) {} BufferViewCreateInfo( BufferViewCreateFlags flags, Buffer buffer, Format format, DeviceSize offset, DeviceSize range) { m_bufferViewCreateInfo.sType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO; m_bufferViewCreateInfo.pNext = nullptr; m_bufferViewCreateInfo.flags = flags; m_bufferViewCreateInfo.buffer = buffer; m_bufferViewCreateInfo.format = static_cast( format ); m_bufferViewCreateInfo.offset = offset; m_bufferViewCreateInfo.range = range; } const StructureType& sType() const { return reinterpret_cast( m_bufferViewCreateInfo.sType ); } BufferViewCreateInfo& sType( StructureType sType ) { m_bufferViewCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_bufferViewCreateInfo.pNext ); } BufferViewCreateInfo& pNext( const void* pNext ) { m_bufferViewCreateInfo.pNext = pNext; return *this; } const BufferViewCreateFlags& flags() const { return m_bufferViewCreateInfo.flags; } BufferViewCreateInfo& flags( BufferViewCreateFlags flags ) { m_bufferViewCreateInfo.flags = flags; return *this; } const Buffer& buffer() const { return m_bufferViewCreateInfo.buffer; } BufferViewCreateInfo& buffer( Buffer buffer ) { m_bufferViewCreateInfo.buffer = buffer; return *this; } const Format& format() const { return reinterpret_cast( m_bufferViewCreateInfo.format ); } BufferViewCreateInfo& format( Format format ) { m_bufferViewCreateInfo.format = static_cast( format ); return *this; } const DeviceSize& offset() const { return m_bufferViewCreateInfo.offset; } BufferViewCreateInfo& offset( DeviceSize offset ) { m_bufferViewCreateInfo.offset = offset; return *this; } const DeviceSize& range() const { return m_bufferViewCreateInfo.range; } BufferViewCreateInfo& range( DeviceSize range ) { m_bufferViewCreateInfo.range = range; return *this; } operator const VkBufferViewCreateInfo&() const { return m_bufferViewCreateInfo; } private: VkBufferViewCreateInfo m_bufferViewCreateInfo; }; class ShaderModuleCreateInfo { public: ShaderModuleCreateInfo() : ShaderModuleCreateInfo( 0, 0, nullptr ) {} ShaderModuleCreateInfo( ShaderModuleCreateFlags flags, size_t codeSize, const uint32_t* pCode) { m_shaderModuleCreateInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; m_shaderModuleCreateInfo.pNext = nullptr; m_shaderModuleCreateInfo.flags = flags; m_shaderModuleCreateInfo.codeSize = codeSize; m_shaderModuleCreateInfo.pCode = pCode; } const StructureType& sType() const { return reinterpret_cast( m_shaderModuleCreateInfo.sType ); } ShaderModuleCreateInfo& sType( StructureType sType ) { m_shaderModuleCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_shaderModuleCreateInfo.pNext ); } ShaderModuleCreateInfo& pNext( const void* pNext ) { m_shaderModuleCreateInfo.pNext = pNext; return *this; } const ShaderModuleCreateFlags& flags() const { return m_shaderModuleCreateInfo.flags; } ShaderModuleCreateInfo& flags( ShaderModuleCreateFlags flags ) { m_shaderModuleCreateInfo.flags = flags; return *this; } const size_t& codeSize() const { return m_shaderModuleCreateInfo.codeSize; } ShaderModuleCreateInfo& codeSize( size_t codeSize ) { m_shaderModuleCreateInfo.codeSize = codeSize; return *this; } const uint32_t* pCode() const { return reinterpret_cast( m_shaderModuleCreateInfo.pCode ); } ShaderModuleCreateInfo& pCode( const uint32_t* pCode ) { m_shaderModuleCreateInfo.pCode = pCode; return *this; } operator const VkShaderModuleCreateInfo&() const { return m_shaderModuleCreateInfo; } private: VkShaderModuleCreateInfo m_shaderModuleCreateInfo; }; class DescriptorSetAllocateInfo { public: DescriptorSetAllocateInfo() : DescriptorSetAllocateInfo( nullptr, 0, nullptr ) {} DescriptorSetAllocateInfo( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSetLayout* pSetLayouts) { m_descriptorSetAllocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; m_descriptorSetAllocateInfo.pNext = nullptr; m_descriptorSetAllocateInfo.descriptorPool = descriptorPool; m_descriptorSetAllocateInfo.descriptorSetCount = descriptorSetCount; m_descriptorSetAllocateInfo.pSetLayouts = pSetLayouts; } const StructureType& sType() const { return reinterpret_cast( m_descriptorSetAllocateInfo.sType ); } DescriptorSetAllocateInfo& sType( StructureType sType ) { m_descriptorSetAllocateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_descriptorSetAllocateInfo.pNext ); } DescriptorSetAllocateInfo& pNext( const void* pNext ) { m_descriptorSetAllocateInfo.pNext = pNext; return *this; } const DescriptorPool& descriptorPool() const { return m_descriptorSetAllocateInfo.descriptorPool; } DescriptorSetAllocateInfo& descriptorPool( DescriptorPool descriptorPool ) { m_descriptorSetAllocateInfo.descriptorPool = descriptorPool; return *this; } const uint32_t& descriptorSetCount() const { return m_descriptorSetAllocateInfo.descriptorSetCount; } DescriptorSetAllocateInfo& descriptorSetCount( uint32_t descriptorSetCount ) { m_descriptorSetAllocateInfo.descriptorSetCount = descriptorSetCount; return *this; } const DescriptorSetLayout* pSetLayouts() const { return reinterpret_cast( m_descriptorSetAllocateInfo.pSetLayouts ); } DescriptorSetAllocateInfo& pSetLayouts( const DescriptorSetLayout* pSetLayouts ) { m_descriptorSetAllocateInfo.pSetLayouts = pSetLayouts; return *this; } operator const VkDescriptorSetAllocateInfo&() const { return m_descriptorSetAllocateInfo; } private: VkDescriptorSetAllocateInfo m_descriptorSetAllocateInfo; }; class PipelineVertexInputStateCreateInfo { public: PipelineVertexInputStateCreateInfo() : PipelineVertexInputStateCreateInfo( 0, 0, nullptr, 0, nullptr ) {} PipelineVertexInputStateCreateInfo( PipelineVertexInputStateCreateFlags flags, uint32_t vertexBindingDescriptionCount, const VertexInputBindingDescription* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VertexInputAttributeDescription* pVertexAttributeDescriptions) { m_pipelineVertexInputStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; m_pipelineVertexInputStateCreateInfo.pNext = nullptr; m_pipelineVertexInputStateCreateInfo.flags = flags; m_pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount = vertexBindingDescriptionCount; m_pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions = reinterpret_cast( pVertexBindingDescriptions ); m_pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount = vertexAttributeDescriptionCount; m_pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions = reinterpret_cast( pVertexAttributeDescriptions ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineVertexInputStateCreateInfo.sType ); } PipelineVertexInputStateCreateInfo& sType( StructureType sType ) { m_pipelineVertexInputStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineVertexInputStateCreateInfo.pNext ); } PipelineVertexInputStateCreateInfo& pNext( const void* pNext ) { m_pipelineVertexInputStateCreateInfo.pNext = pNext; return *this; } const PipelineVertexInputStateCreateFlags& flags() const { return m_pipelineVertexInputStateCreateInfo.flags; } PipelineVertexInputStateCreateInfo& flags( PipelineVertexInputStateCreateFlags flags ) { m_pipelineVertexInputStateCreateInfo.flags = flags; return *this; } const uint32_t& vertexBindingDescriptionCount() const { return m_pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount; } PipelineVertexInputStateCreateInfo& vertexBindingDescriptionCount( uint32_t vertexBindingDescriptionCount ) { m_pipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount = vertexBindingDescriptionCount; return *this; } const VertexInputBindingDescription* pVertexBindingDescriptions() const { return reinterpret_cast( m_pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions ); } PipelineVertexInputStateCreateInfo& pVertexBindingDescriptions( const VertexInputBindingDescription* pVertexBindingDescriptions ) { m_pipelineVertexInputStateCreateInfo.pVertexBindingDescriptions = reinterpret_cast( pVertexBindingDescriptions ); return *this; } const uint32_t& vertexAttributeDescriptionCount() const { return m_pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount; } PipelineVertexInputStateCreateInfo& vertexAttributeDescriptionCount( uint32_t vertexAttributeDescriptionCount ) { m_pipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount = vertexAttributeDescriptionCount; return *this; } const VertexInputAttributeDescription* pVertexAttributeDescriptions() const { return reinterpret_cast( m_pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions ); } PipelineVertexInputStateCreateInfo& pVertexAttributeDescriptions( const VertexInputAttributeDescription* pVertexAttributeDescriptions ) { m_pipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions = reinterpret_cast( pVertexAttributeDescriptions ); return *this; } operator const VkPipelineVertexInputStateCreateInfo&() const { return m_pipelineVertexInputStateCreateInfo; } private: VkPipelineVertexInputStateCreateInfo m_pipelineVertexInputStateCreateInfo; }; class PipelineInputAssemblyStateCreateInfo { public: PipelineInputAssemblyStateCreateInfo() : PipelineInputAssemblyStateCreateInfo( 0, PrimitiveTopology::ePointList, 0 ) {} PipelineInputAssemblyStateCreateInfo( PipelineInputAssemblyStateCreateFlags flags, PrimitiveTopology topology, Bool32 primitiveRestartEnable) { m_pipelineInputAssemblyStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; m_pipelineInputAssemblyStateCreateInfo.pNext = nullptr; m_pipelineInputAssemblyStateCreateInfo.flags = flags; m_pipelineInputAssemblyStateCreateInfo.topology = static_cast( topology ); m_pipelineInputAssemblyStateCreateInfo.primitiveRestartEnable = primitiveRestartEnable; } const StructureType& sType() const { return reinterpret_cast( m_pipelineInputAssemblyStateCreateInfo.sType ); } PipelineInputAssemblyStateCreateInfo& sType( StructureType sType ) { m_pipelineInputAssemblyStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineInputAssemblyStateCreateInfo.pNext ); } PipelineInputAssemblyStateCreateInfo& pNext( const void* pNext ) { m_pipelineInputAssemblyStateCreateInfo.pNext = pNext; return *this; } const PipelineInputAssemblyStateCreateFlags& flags() const { return m_pipelineInputAssemblyStateCreateInfo.flags; } PipelineInputAssemblyStateCreateInfo& flags( PipelineInputAssemblyStateCreateFlags flags ) { m_pipelineInputAssemblyStateCreateInfo.flags = flags; return *this; } const PrimitiveTopology& topology() const { return reinterpret_cast( m_pipelineInputAssemblyStateCreateInfo.topology ); } PipelineInputAssemblyStateCreateInfo& topology( PrimitiveTopology topology ) { m_pipelineInputAssemblyStateCreateInfo.topology = static_cast( topology ); return *this; } const Bool32& primitiveRestartEnable() const { return m_pipelineInputAssemblyStateCreateInfo.primitiveRestartEnable; } PipelineInputAssemblyStateCreateInfo& primitiveRestartEnable( Bool32 primitiveRestartEnable ) { m_pipelineInputAssemblyStateCreateInfo.primitiveRestartEnable = primitiveRestartEnable; return *this; } operator const VkPipelineInputAssemblyStateCreateInfo&() const { return m_pipelineInputAssemblyStateCreateInfo; } private: VkPipelineInputAssemblyStateCreateInfo m_pipelineInputAssemblyStateCreateInfo; }; class PipelineTessellationStateCreateInfo { public: PipelineTessellationStateCreateInfo() : PipelineTessellationStateCreateInfo( 0, 0 ) {} PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateFlags flags, uint32_t patchControlPoints) { m_pipelineTessellationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO; m_pipelineTessellationStateCreateInfo.pNext = nullptr; m_pipelineTessellationStateCreateInfo.flags = flags; m_pipelineTessellationStateCreateInfo.patchControlPoints = patchControlPoints; } const StructureType& sType() const { return reinterpret_cast( m_pipelineTessellationStateCreateInfo.sType ); } PipelineTessellationStateCreateInfo& sType( StructureType sType ) { m_pipelineTessellationStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineTessellationStateCreateInfo.pNext ); } PipelineTessellationStateCreateInfo& pNext( const void* pNext ) { m_pipelineTessellationStateCreateInfo.pNext = pNext; return *this; } const PipelineTessellationStateCreateFlags& flags() const { return m_pipelineTessellationStateCreateInfo.flags; } PipelineTessellationStateCreateInfo& flags( PipelineTessellationStateCreateFlags flags ) { m_pipelineTessellationStateCreateInfo.flags = flags; return *this; } const uint32_t& patchControlPoints() const { return m_pipelineTessellationStateCreateInfo.patchControlPoints; } PipelineTessellationStateCreateInfo& patchControlPoints( uint32_t patchControlPoints ) { m_pipelineTessellationStateCreateInfo.patchControlPoints = patchControlPoints; return *this; } operator const VkPipelineTessellationStateCreateInfo&() const { return m_pipelineTessellationStateCreateInfo; } private: VkPipelineTessellationStateCreateInfo m_pipelineTessellationStateCreateInfo; }; class PipelineViewportStateCreateInfo { public: PipelineViewportStateCreateInfo() : PipelineViewportStateCreateInfo( 0, 0, nullptr, 0, nullptr ) {} PipelineViewportStateCreateInfo( PipelineViewportStateCreateFlags flags, uint32_t viewportCount, const Viewport* pViewports, uint32_t scissorCount, const Rect2D* pScissors) { m_pipelineViewportStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; m_pipelineViewportStateCreateInfo.pNext = nullptr; m_pipelineViewportStateCreateInfo.flags = flags; m_pipelineViewportStateCreateInfo.viewportCount = viewportCount; m_pipelineViewportStateCreateInfo.pViewports = reinterpret_cast( pViewports ); m_pipelineViewportStateCreateInfo.scissorCount = scissorCount; m_pipelineViewportStateCreateInfo.pScissors = reinterpret_cast( pScissors ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineViewportStateCreateInfo.sType ); } PipelineViewportStateCreateInfo& sType( StructureType sType ) { m_pipelineViewportStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineViewportStateCreateInfo.pNext ); } PipelineViewportStateCreateInfo& pNext( const void* pNext ) { m_pipelineViewportStateCreateInfo.pNext = pNext; return *this; } const PipelineViewportStateCreateFlags& flags() const { return m_pipelineViewportStateCreateInfo.flags; } PipelineViewportStateCreateInfo& flags( PipelineViewportStateCreateFlags flags ) { m_pipelineViewportStateCreateInfo.flags = flags; return *this; } const uint32_t& viewportCount() const { return m_pipelineViewportStateCreateInfo.viewportCount; } PipelineViewportStateCreateInfo& viewportCount( uint32_t viewportCount ) { m_pipelineViewportStateCreateInfo.viewportCount = viewportCount; return *this; } const Viewport* pViewports() const { return reinterpret_cast( m_pipelineViewportStateCreateInfo.pViewports ); } PipelineViewportStateCreateInfo& pViewports( const Viewport* pViewports ) { m_pipelineViewportStateCreateInfo.pViewports = reinterpret_cast( pViewports ); return *this; } const uint32_t& scissorCount() const { return m_pipelineViewportStateCreateInfo.scissorCount; } PipelineViewportStateCreateInfo& scissorCount( uint32_t scissorCount ) { m_pipelineViewportStateCreateInfo.scissorCount = scissorCount; return *this; } const Rect2D* pScissors() const { return reinterpret_cast( m_pipelineViewportStateCreateInfo.pScissors ); } PipelineViewportStateCreateInfo& pScissors( const Rect2D* pScissors ) { m_pipelineViewportStateCreateInfo.pScissors = reinterpret_cast( pScissors ); return *this; } operator const VkPipelineViewportStateCreateInfo&() const { return m_pipelineViewportStateCreateInfo; } private: VkPipelineViewportStateCreateInfo m_pipelineViewportStateCreateInfo; }; class PipelineRasterizationStateCreateInfo { public: PipelineRasterizationStateCreateInfo() : PipelineRasterizationStateCreateInfo( 0, 0, 0, PolygonMode::eFill, CullModeFlags(), FrontFace::eCounterClockwise, 0, 0, 0, 0, 0 ) {} PipelineRasterizationStateCreateInfo( PipelineRasterizationStateCreateFlags flags, Bool32 depthClampEnable, Bool32 rasterizerDiscardEnable, PolygonMode polygonMode, CullModeFlags cullMode, FrontFace frontFace, Bool32 depthBiasEnable, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, float lineWidth) { m_pipelineRasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; m_pipelineRasterizationStateCreateInfo.pNext = nullptr; m_pipelineRasterizationStateCreateInfo.flags = flags; m_pipelineRasterizationStateCreateInfo.depthClampEnable = depthClampEnable; m_pipelineRasterizationStateCreateInfo.rasterizerDiscardEnable = rasterizerDiscardEnable; m_pipelineRasterizationStateCreateInfo.polygonMode = static_cast( polygonMode ); m_pipelineRasterizationStateCreateInfo.cullMode = static_cast( cullMode ); m_pipelineRasterizationStateCreateInfo.frontFace = static_cast( frontFace ); m_pipelineRasterizationStateCreateInfo.depthBiasEnable = depthBiasEnable; m_pipelineRasterizationStateCreateInfo.depthBiasConstantFactor = depthBiasConstantFactor; m_pipelineRasterizationStateCreateInfo.depthBiasClamp = depthBiasClamp; m_pipelineRasterizationStateCreateInfo.depthBiasSlopeFactor = depthBiasSlopeFactor; m_pipelineRasterizationStateCreateInfo.lineWidth = lineWidth; } const StructureType& sType() const { return reinterpret_cast( m_pipelineRasterizationStateCreateInfo.sType ); } PipelineRasterizationStateCreateInfo& sType( StructureType sType ) { m_pipelineRasterizationStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineRasterizationStateCreateInfo.pNext ); } PipelineRasterizationStateCreateInfo& pNext( const void* pNext ) { m_pipelineRasterizationStateCreateInfo.pNext = pNext; return *this; } const PipelineRasterizationStateCreateFlags& flags() const { return m_pipelineRasterizationStateCreateInfo.flags; } PipelineRasterizationStateCreateInfo& flags( PipelineRasterizationStateCreateFlags flags ) { m_pipelineRasterizationStateCreateInfo.flags = flags; return *this; } const Bool32& depthClampEnable() const { return m_pipelineRasterizationStateCreateInfo.depthClampEnable; } PipelineRasterizationStateCreateInfo& depthClampEnable( Bool32 depthClampEnable ) { m_pipelineRasterizationStateCreateInfo.depthClampEnable = depthClampEnable; return *this; } const Bool32& rasterizerDiscardEnable() const { return m_pipelineRasterizationStateCreateInfo.rasterizerDiscardEnable; } PipelineRasterizationStateCreateInfo& rasterizerDiscardEnable( Bool32 rasterizerDiscardEnable ) { m_pipelineRasterizationStateCreateInfo.rasterizerDiscardEnable = rasterizerDiscardEnable; return *this; } const PolygonMode& polygonMode() const { return reinterpret_cast( m_pipelineRasterizationStateCreateInfo.polygonMode ); } PipelineRasterizationStateCreateInfo& polygonMode( PolygonMode polygonMode ) { m_pipelineRasterizationStateCreateInfo.polygonMode = static_cast( polygonMode ); return *this; } const CullModeFlags& cullMode() const { return reinterpret_cast( m_pipelineRasterizationStateCreateInfo.cullMode ); } PipelineRasterizationStateCreateInfo& cullMode( CullModeFlags cullMode ) { m_pipelineRasterizationStateCreateInfo.cullMode = static_cast( cullMode ); return *this; } const FrontFace& frontFace() const { return reinterpret_cast( m_pipelineRasterizationStateCreateInfo.frontFace ); } PipelineRasterizationStateCreateInfo& frontFace( FrontFace frontFace ) { m_pipelineRasterizationStateCreateInfo.frontFace = static_cast( frontFace ); return *this; } const Bool32& depthBiasEnable() const { return m_pipelineRasterizationStateCreateInfo.depthBiasEnable; } PipelineRasterizationStateCreateInfo& depthBiasEnable( Bool32 depthBiasEnable ) { m_pipelineRasterizationStateCreateInfo.depthBiasEnable = depthBiasEnable; return *this; } const float& depthBiasConstantFactor() const { return m_pipelineRasterizationStateCreateInfo.depthBiasConstantFactor; } PipelineRasterizationStateCreateInfo& depthBiasConstantFactor( float depthBiasConstantFactor ) { m_pipelineRasterizationStateCreateInfo.depthBiasConstantFactor = depthBiasConstantFactor; return *this; } const float& depthBiasClamp() const { return m_pipelineRasterizationStateCreateInfo.depthBiasClamp; } PipelineRasterizationStateCreateInfo& depthBiasClamp( float depthBiasClamp ) { m_pipelineRasterizationStateCreateInfo.depthBiasClamp = depthBiasClamp; return *this; } const float& depthBiasSlopeFactor() const { return m_pipelineRasterizationStateCreateInfo.depthBiasSlopeFactor; } PipelineRasterizationStateCreateInfo& depthBiasSlopeFactor( float depthBiasSlopeFactor ) { m_pipelineRasterizationStateCreateInfo.depthBiasSlopeFactor = depthBiasSlopeFactor; return *this; } const float& lineWidth() const { return m_pipelineRasterizationStateCreateInfo.lineWidth; } PipelineRasterizationStateCreateInfo& lineWidth( float lineWidth ) { m_pipelineRasterizationStateCreateInfo.lineWidth = lineWidth; return *this; } operator const VkPipelineRasterizationStateCreateInfo&() const { return m_pipelineRasterizationStateCreateInfo; } private: VkPipelineRasterizationStateCreateInfo m_pipelineRasterizationStateCreateInfo; }; class PipelineDepthStencilStateCreateInfo { public: PipelineDepthStencilStateCreateInfo() : PipelineDepthStencilStateCreateInfo( 0, 0, 0, CompareOp::eNever, 0, 0, StencilOpState(), StencilOpState(), 0, 0 ) {} PipelineDepthStencilStateCreateInfo( PipelineDepthStencilStateCreateFlags flags, Bool32 depthTestEnable, Bool32 depthWriteEnable, CompareOp depthCompareOp, Bool32 depthBoundsTestEnable, Bool32 stencilTestEnable, StencilOpState front, StencilOpState back, float minDepthBounds, float maxDepthBounds) { m_pipelineDepthStencilStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; m_pipelineDepthStencilStateCreateInfo.pNext = nullptr; m_pipelineDepthStencilStateCreateInfo.flags = flags; m_pipelineDepthStencilStateCreateInfo.depthTestEnable = depthTestEnable; m_pipelineDepthStencilStateCreateInfo.depthWriteEnable = depthWriteEnable; m_pipelineDepthStencilStateCreateInfo.depthCompareOp = static_cast( depthCompareOp ); m_pipelineDepthStencilStateCreateInfo.depthBoundsTestEnable = depthBoundsTestEnable; m_pipelineDepthStencilStateCreateInfo.stencilTestEnable = stencilTestEnable; m_pipelineDepthStencilStateCreateInfo.front = static_cast( front ); m_pipelineDepthStencilStateCreateInfo.back = static_cast( back ); m_pipelineDepthStencilStateCreateInfo.minDepthBounds = minDepthBounds; m_pipelineDepthStencilStateCreateInfo.maxDepthBounds = maxDepthBounds; } const StructureType& sType() const { return reinterpret_cast( m_pipelineDepthStencilStateCreateInfo.sType ); } PipelineDepthStencilStateCreateInfo& sType( StructureType sType ) { m_pipelineDepthStencilStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineDepthStencilStateCreateInfo.pNext ); } PipelineDepthStencilStateCreateInfo& pNext( const void* pNext ) { m_pipelineDepthStencilStateCreateInfo.pNext = pNext; return *this; } const PipelineDepthStencilStateCreateFlags& flags() const { return m_pipelineDepthStencilStateCreateInfo.flags; } PipelineDepthStencilStateCreateInfo& flags( PipelineDepthStencilStateCreateFlags flags ) { m_pipelineDepthStencilStateCreateInfo.flags = flags; return *this; } const Bool32& depthTestEnable() const { return m_pipelineDepthStencilStateCreateInfo.depthTestEnable; } PipelineDepthStencilStateCreateInfo& depthTestEnable( Bool32 depthTestEnable ) { m_pipelineDepthStencilStateCreateInfo.depthTestEnable = depthTestEnable; return *this; } const Bool32& depthWriteEnable() const { return m_pipelineDepthStencilStateCreateInfo.depthWriteEnable; } PipelineDepthStencilStateCreateInfo& depthWriteEnable( Bool32 depthWriteEnable ) { m_pipelineDepthStencilStateCreateInfo.depthWriteEnable = depthWriteEnable; return *this; } const CompareOp& depthCompareOp() const { return reinterpret_cast( m_pipelineDepthStencilStateCreateInfo.depthCompareOp ); } PipelineDepthStencilStateCreateInfo& depthCompareOp( CompareOp depthCompareOp ) { m_pipelineDepthStencilStateCreateInfo.depthCompareOp = static_cast( depthCompareOp ); return *this; } const Bool32& depthBoundsTestEnable() const { return m_pipelineDepthStencilStateCreateInfo.depthBoundsTestEnable; } PipelineDepthStencilStateCreateInfo& depthBoundsTestEnable( Bool32 depthBoundsTestEnable ) { m_pipelineDepthStencilStateCreateInfo.depthBoundsTestEnable = depthBoundsTestEnable; return *this; } const Bool32& stencilTestEnable() const { return m_pipelineDepthStencilStateCreateInfo.stencilTestEnable; } PipelineDepthStencilStateCreateInfo& stencilTestEnable( Bool32 stencilTestEnable ) { m_pipelineDepthStencilStateCreateInfo.stencilTestEnable = stencilTestEnable; return *this; } const StencilOpState& front() const { return reinterpret_cast( m_pipelineDepthStencilStateCreateInfo.front ); } PipelineDepthStencilStateCreateInfo& front( StencilOpState front ) { m_pipelineDepthStencilStateCreateInfo.front = static_cast( front ); return *this; } const StencilOpState& back() const { return reinterpret_cast( m_pipelineDepthStencilStateCreateInfo.back ); } PipelineDepthStencilStateCreateInfo& back( StencilOpState back ) { m_pipelineDepthStencilStateCreateInfo.back = static_cast( back ); return *this; } const float& minDepthBounds() const { return m_pipelineDepthStencilStateCreateInfo.minDepthBounds; } PipelineDepthStencilStateCreateInfo& minDepthBounds( float minDepthBounds ) { m_pipelineDepthStencilStateCreateInfo.minDepthBounds = minDepthBounds; return *this; } const float& maxDepthBounds() const { return m_pipelineDepthStencilStateCreateInfo.maxDepthBounds; } PipelineDepthStencilStateCreateInfo& maxDepthBounds( float maxDepthBounds ) { m_pipelineDepthStencilStateCreateInfo.maxDepthBounds = maxDepthBounds; return *this; } operator const VkPipelineDepthStencilStateCreateInfo&() const { return m_pipelineDepthStencilStateCreateInfo; } private: VkPipelineDepthStencilStateCreateInfo m_pipelineDepthStencilStateCreateInfo; }; class PipelineCacheCreateInfo { public: PipelineCacheCreateInfo() : PipelineCacheCreateInfo( 0, 0, nullptr ) {} PipelineCacheCreateInfo( PipelineCacheCreateFlags flags, size_t initialDataSize, const void* pInitialData) { m_pipelineCacheCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; m_pipelineCacheCreateInfo.pNext = nullptr; m_pipelineCacheCreateInfo.flags = flags; m_pipelineCacheCreateInfo.initialDataSize = initialDataSize; m_pipelineCacheCreateInfo.pInitialData = pInitialData; } const StructureType& sType() const { return reinterpret_cast( m_pipelineCacheCreateInfo.sType ); } PipelineCacheCreateInfo& sType( StructureType sType ) { m_pipelineCacheCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineCacheCreateInfo.pNext ); } PipelineCacheCreateInfo& pNext( const void* pNext ) { m_pipelineCacheCreateInfo.pNext = pNext; return *this; } const PipelineCacheCreateFlags& flags() const { return m_pipelineCacheCreateInfo.flags; } PipelineCacheCreateInfo& flags( PipelineCacheCreateFlags flags ) { m_pipelineCacheCreateInfo.flags = flags; return *this; } const size_t& initialDataSize() const { return m_pipelineCacheCreateInfo.initialDataSize; } PipelineCacheCreateInfo& initialDataSize( size_t initialDataSize ) { m_pipelineCacheCreateInfo.initialDataSize = initialDataSize; return *this; } const void* pInitialData() const { return reinterpret_cast( m_pipelineCacheCreateInfo.pInitialData ); } PipelineCacheCreateInfo& pInitialData( const void* pInitialData ) { m_pipelineCacheCreateInfo.pInitialData = pInitialData; return *this; } operator const VkPipelineCacheCreateInfo&() const { return m_pipelineCacheCreateInfo; } private: VkPipelineCacheCreateInfo m_pipelineCacheCreateInfo; }; class SamplerCreateInfo { public: SamplerCreateInfo() : SamplerCreateInfo( 0, Filter::eNearest, Filter::eNearest, SamplerMipmapMode::eNearest, SamplerAddressMode::eRepeat, SamplerAddressMode::eRepeat, SamplerAddressMode::eRepeat, 0, 0, 0, 0, CompareOp::eNever, 0, 0, BorderColor::eFloatTransparentBlack, 0 ) {} SamplerCreateInfo( SamplerCreateFlags flags, Filter magFilter, Filter minFilter, SamplerMipmapMode mipmapMode, SamplerAddressMode addressModeU, SamplerAddressMode addressModeV, SamplerAddressMode addressModeW, float mipLodBias, Bool32 anisotropyEnable, float maxAnisotropy, Bool32 compareEnable, CompareOp compareOp, float minLod, float maxLod, BorderColor borderColor, Bool32 unnormalizedCoordinates) { m_samplerCreateInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; m_samplerCreateInfo.pNext = nullptr; m_samplerCreateInfo.flags = flags; m_samplerCreateInfo.magFilter = static_cast( magFilter ); m_samplerCreateInfo.minFilter = static_cast( minFilter ); m_samplerCreateInfo.mipmapMode = static_cast( mipmapMode ); m_samplerCreateInfo.addressModeU = static_cast( addressModeU ); m_samplerCreateInfo.addressModeV = static_cast( addressModeV ); m_samplerCreateInfo.addressModeW = static_cast( addressModeW ); m_samplerCreateInfo.mipLodBias = mipLodBias; m_samplerCreateInfo.anisotropyEnable = anisotropyEnable; m_samplerCreateInfo.maxAnisotropy = maxAnisotropy; m_samplerCreateInfo.compareEnable = compareEnable; m_samplerCreateInfo.compareOp = static_cast( compareOp ); m_samplerCreateInfo.minLod = minLod; m_samplerCreateInfo.maxLod = maxLod; m_samplerCreateInfo.borderColor = static_cast( borderColor ); m_samplerCreateInfo.unnormalizedCoordinates = unnormalizedCoordinates; } const StructureType& sType() const { return reinterpret_cast( m_samplerCreateInfo.sType ); } SamplerCreateInfo& sType( StructureType sType ) { m_samplerCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_samplerCreateInfo.pNext ); } SamplerCreateInfo& pNext( const void* pNext ) { m_samplerCreateInfo.pNext = pNext; return *this; } const SamplerCreateFlags& flags() const { return m_samplerCreateInfo.flags; } SamplerCreateInfo& flags( SamplerCreateFlags flags ) { m_samplerCreateInfo.flags = flags; return *this; } const Filter& magFilter() const { return reinterpret_cast( m_samplerCreateInfo.magFilter ); } SamplerCreateInfo& magFilter( Filter magFilter ) { m_samplerCreateInfo.magFilter = static_cast( magFilter ); return *this; } const Filter& minFilter() const { return reinterpret_cast( m_samplerCreateInfo.minFilter ); } SamplerCreateInfo& minFilter( Filter minFilter ) { m_samplerCreateInfo.minFilter = static_cast( minFilter ); return *this; } const SamplerMipmapMode& mipmapMode() const { return reinterpret_cast( m_samplerCreateInfo.mipmapMode ); } SamplerCreateInfo& mipmapMode( SamplerMipmapMode mipmapMode ) { m_samplerCreateInfo.mipmapMode = static_cast( mipmapMode ); return *this; } const SamplerAddressMode& addressModeU() const { return reinterpret_cast( m_samplerCreateInfo.addressModeU ); } SamplerCreateInfo& addressModeU( SamplerAddressMode addressModeU ) { m_samplerCreateInfo.addressModeU = static_cast( addressModeU ); return *this; } const SamplerAddressMode& addressModeV() const { return reinterpret_cast( m_samplerCreateInfo.addressModeV ); } SamplerCreateInfo& addressModeV( SamplerAddressMode addressModeV ) { m_samplerCreateInfo.addressModeV = static_cast( addressModeV ); return *this; } const SamplerAddressMode& addressModeW() const { return reinterpret_cast( m_samplerCreateInfo.addressModeW ); } SamplerCreateInfo& addressModeW( SamplerAddressMode addressModeW ) { m_samplerCreateInfo.addressModeW = static_cast( addressModeW ); return *this; } const float& mipLodBias() const { return m_samplerCreateInfo.mipLodBias; } SamplerCreateInfo& mipLodBias( float mipLodBias ) { m_samplerCreateInfo.mipLodBias = mipLodBias; return *this; } const Bool32& anisotropyEnable() const { return m_samplerCreateInfo.anisotropyEnable; } SamplerCreateInfo& anisotropyEnable( Bool32 anisotropyEnable ) { m_samplerCreateInfo.anisotropyEnable = anisotropyEnable; return *this; } const float& maxAnisotropy() const { return m_samplerCreateInfo.maxAnisotropy; } SamplerCreateInfo& maxAnisotropy( float maxAnisotropy ) { m_samplerCreateInfo.maxAnisotropy = maxAnisotropy; return *this; } const Bool32& compareEnable() const { return m_samplerCreateInfo.compareEnable; } SamplerCreateInfo& compareEnable( Bool32 compareEnable ) { m_samplerCreateInfo.compareEnable = compareEnable; return *this; } const CompareOp& compareOp() const { return reinterpret_cast( m_samplerCreateInfo.compareOp ); } SamplerCreateInfo& compareOp( CompareOp compareOp ) { m_samplerCreateInfo.compareOp = static_cast( compareOp ); return *this; } const float& minLod() const { return m_samplerCreateInfo.minLod; } SamplerCreateInfo& minLod( float minLod ) { m_samplerCreateInfo.minLod = minLod; return *this; } const float& maxLod() const { return m_samplerCreateInfo.maxLod; } SamplerCreateInfo& maxLod( float maxLod ) { m_samplerCreateInfo.maxLod = maxLod; return *this; } const BorderColor& borderColor() const { return reinterpret_cast( m_samplerCreateInfo.borderColor ); } SamplerCreateInfo& borderColor( BorderColor borderColor ) { m_samplerCreateInfo.borderColor = static_cast( borderColor ); return *this; } const Bool32& unnormalizedCoordinates() const { return m_samplerCreateInfo.unnormalizedCoordinates; } SamplerCreateInfo& unnormalizedCoordinates( Bool32 unnormalizedCoordinates ) { m_samplerCreateInfo.unnormalizedCoordinates = unnormalizedCoordinates; return *this; } operator const VkSamplerCreateInfo&() const { return m_samplerCreateInfo; } private: VkSamplerCreateInfo m_samplerCreateInfo; }; class CommandBufferAllocateInfo { public: CommandBufferAllocateInfo() : CommandBufferAllocateInfo( nullptr, CommandBufferLevel::ePrimary, 0 ) {} CommandBufferAllocateInfo( CommandPool commandPool, CommandBufferLevel level, uint32_t commandBufferCount) { m_commandBufferAllocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; m_commandBufferAllocateInfo.pNext = nullptr; m_commandBufferAllocateInfo.commandPool = commandPool; m_commandBufferAllocateInfo.level = static_cast( level ); m_commandBufferAllocateInfo.commandBufferCount = commandBufferCount; } const StructureType& sType() const { return reinterpret_cast( m_commandBufferAllocateInfo.sType ); } CommandBufferAllocateInfo& sType( StructureType sType ) { m_commandBufferAllocateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_commandBufferAllocateInfo.pNext ); } CommandBufferAllocateInfo& pNext( const void* pNext ) { m_commandBufferAllocateInfo.pNext = pNext; return *this; } const CommandPool& commandPool() const { return m_commandBufferAllocateInfo.commandPool; } CommandBufferAllocateInfo& commandPool( CommandPool commandPool ) { m_commandBufferAllocateInfo.commandPool = commandPool; return *this; } const CommandBufferLevel& level() const { return reinterpret_cast( m_commandBufferAllocateInfo.level ); } CommandBufferAllocateInfo& level( CommandBufferLevel level ) { m_commandBufferAllocateInfo.level = static_cast( level ); return *this; } const uint32_t& commandBufferCount() const { return m_commandBufferAllocateInfo.commandBufferCount; } CommandBufferAllocateInfo& commandBufferCount( uint32_t commandBufferCount ) { m_commandBufferAllocateInfo.commandBufferCount = commandBufferCount; return *this; } operator const VkCommandBufferAllocateInfo&() const { return m_commandBufferAllocateInfo; } private: VkCommandBufferAllocateInfo m_commandBufferAllocateInfo; }; class RenderPassBeginInfo { public: RenderPassBeginInfo() : RenderPassBeginInfo( nullptr, nullptr, Rect2D(), 0, nullptr ) {} RenderPassBeginInfo( RenderPass renderPass, Framebuffer framebuffer, Rect2D renderArea, uint32_t clearValueCount, const ClearValue* pClearValues) { m_renderPassBeginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; m_renderPassBeginInfo.pNext = nullptr; m_renderPassBeginInfo.renderPass = renderPass; m_renderPassBeginInfo.framebuffer = framebuffer; m_renderPassBeginInfo.renderArea = static_cast( renderArea ); m_renderPassBeginInfo.clearValueCount = clearValueCount; m_renderPassBeginInfo.pClearValues = reinterpret_cast( pClearValues ); } const StructureType& sType() const { return reinterpret_cast( m_renderPassBeginInfo.sType ); } RenderPassBeginInfo& sType( StructureType sType ) { m_renderPassBeginInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_renderPassBeginInfo.pNext ); } RenderPassBeginInfo& pNext( const void* pNext ) { m_renderPassBeginInfo.pNext = pNext; return *this; } const RenderPass& renderPass() const { return m_renderPassBeginInfo.renderPass; } RenderPassBeginInfo& renderPass( RenderPass renderPass ) { m_renderPassBeginInfo.renderPass = renderPass; return *this; } const Framebuffer& framebuffer() const { return m_renderPassBeginInfo.framebuffer; } RenderPassBeginInfo& framebuffer( Framebuffer framebuffer ) { m_renderPassBeginInfo.framebuffer = framebuffer; return *this; } const Rect2D& renderArea() const { return reinterpret_cast( m_renderPassBeginInfo.renderArea ); } RenderPassBeginInfo& renderArea( Rect2D renderArea ) { m_renderPassBeginInfo.renderArea = static_cast( renderArea ); return *this; } const uint32_t& clearValueCount() const { return m_renderPassBeginInfo.clearValueCount; } RenderPassBeginInfo& clearValueCount( uint32_t clearValueCount ) { m_renderPassBeginInfo.clearValueCount = clearValueCount; return *this; } const ClearValue* pClearValues() const { return reinterpret_cast( m_renderPassBeginInfo.pClearValues ); } RenderPassBeginInfo& pClearValues( const ClearValue* pClearValues ) { m_renderPassBeginInfo.pClearValues = reinterpret_cast( pClearValues ); return *this; } operator const VkRenderPassBeginInfo&() const { return m_renderPassBeginInfo; } private: VkRenderPassBeginInfo m_renderPassBeginInfo; }; class EventCreateInfo { public: EventCreateInfo() : EventCreateInfo( 0 ) {} EventCreateInfo( EventCreateFlags flags) { m_eventCreateInfo.sType = VK_STRUCTURE_TYPE_EVENT_CREATE_INFO; m_eventCreateInfo.pNext = nullptr; m_eventCreateInfo.flags = flags; } const StructureType& sType() const { return reinterpret_cast( m_eventCreateInfo.sType ); } EventCreateInfo& sType( StructureType sType ) { m_eventCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_eventCreateInfo.pNext ); } EventCreateInfo& pNext( const void* pNext ) { m_eventCreateInfo.pNext = pNext; return *this; } const EventCreateFlags& flags() const { return m_eventCreateInfo.flags; } EventCreateInfo& flags( EventCreateFlags flags ) { m_eventCreateInfo.flags = flags; return *this; } operator const VkEventCreateInfo&() const { return m_eventCreateInfo; } private: VkEventCreateInfo m_eventCreateInfo; }; class SemaphoreCreateInfo { public: SemaphoreCreateInfo() : SemaphoreCreateInfo( 0 ) {} SemaphoreCreateInfo( SemaphoreCreateFlags flags) { m_semaphoreCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; m_semaphoreCreateInfo.pNext = nullptr; m_semaphoreCreateInfo.flags = flags; } const StructureType& sType() const { return reinterpret_cast( m_semaphoreCreateInfo.sType ); } SemaphoreCreateInfo& sType( StructureType sType ) { m_semaphoreCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_semaphoreCreateInfo.pNext ); } SemaphoreCreateInfo& pNext( const void* pNext ) { m_semaphoreCreateInfo.pNext = pNext; return *this; } const SemaphoreCreateFlags& flags() const { return m_semaphoreCreateInfo.flags; } SemaphoreCreateInfo& flags( SemaphoreCreateFlags flags ) { m_semaphoreCreateInfo.flags = flags; return *this; } operator const VkSemaphoreCreateInfo&() const { return m_semaphoreCreateInfo; } private: VkSemaphoreCreateInfo m_semaphoreCreateInfo; }; class FramebufferCreateInfo { public: FramebufferCreateInfo() : FramebufferCreateInfo( 0, nullptr, 0, nullptr, 0, 0, 0 ) {} FramebufferCreateInfo( FramebufferCreateFlags flags, RenderPass renderPass, uint32_t attachmentCount, const ImageView* pAttachments, uint32_t width, uint32_t height, uint32_t layers) { m_framebufferCreateInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; m_framebufferCreateInfo.pNext = nullptr; m_framebufferCreateInfo.flags = flags; m_framebufferCreateInfo.renderPass = renderPass; m_framebufferCreateInfo.attachmentCount = attachmentCount; m_framebufferCreateInfo.pAttachments = pAttachments; m_framebufferCreateInfo.width = width; m_framebufferCreateInfo.height = height; m_framebufferCreateInfo.layers = layers; } const StructureType& sType() const { return reinterpret_cast( m_framebufferCreateInfo.sType ); } FramebufferCreateInfo& sType( StructureType sType ) { m_framebufferCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_framebufferCreateInfo.pNext ); } FramebufferCreateInfo& pNext( const void* pNext ) { m_framebufferCreateInfo.pNext = pNext; return *this; } const FramebufferCreateFlags& flags() const { return m_framebufferCreateInfo.flags; } FramebufferCreateInfo& flags( FramebufferCreateFlags flags ) { m_framebufferCreateInfo.flags = flags; return *this; } const RenderPass& renderPass() const { return m_framebufferCreateInfo.renderPass; } FramebufferCreateInfo& renderPass( RenderPass renderPass ) { m_framebufferCreateInfo.renderPass = renderPass; return *this; } const uint32_t& attachmentCount() const { return m_framebufferCreateInfo.attachmentCount; } FramebufferCreateInfo& attachmentCount( uint32_t attachmentCount ) { m_framebufferCreateInfo.attachmentCount = attachmentCount; return *this; } const ImageView* pAttachments() const { return reinterpret_cast( m_framebufferCreateInfo.pAttachments ); } FramebufferCreateInfo& pAttachments( const ImageView* pAttachments ) { m_framebufferCreateInfo.pAttachments = pAttachments; return *this; } const uint32_t& width() const { return m_framebufferCreateInfo.width; } FramebufferCreateInfo& width( uint32_t width ) { m_framebufferCreateInfo.width = width; return *this; } const uint32_t& height() const { return m_framebufferCreateInfo.height; } FramebufferCreateInfo& height( uint32_t height ) { m_framebufferCreateInfo.height = height; return *this; } const uint32_t& layers() const { return m_framebufferCreateInfo.layers; } FramebufferCreateInfo& layers( uint32_t layers ) { m_framebufferCreateInfo.layers = layers; return *this; } operator const VkFramebufferCreateInfo&() const { return m_framebufferCreateInfo; } private: VkFramebufferCreateInfo m_framebufferCreateInfo; }; enum class SubpassContents { eInline = VK_SUBPASS_CONTENTS_INLINE, eSecondaryCommandBuffers = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS }; enum class Result { eVkSuccess = VK_SUCCESS, eVkNotReady = VK_NOT_READY, eVkTimeout = VK_TIMEOUT, eVkEventSet = VK_EVENT_SET, eVkEventReset = VK_EVENT_RESET, eVkIncomplete = VK_INCOMPLETE, eVkErrorOutOfHostMemory = VK_ERROR_OUT_OF_HOST_MEMORY, eVkErrorOutOfDeviceMemory = VK_ERROR_OUT_OF_DEVICE_MEMORY, eVkErrorInitializationFailed = VK_ERROR_INITIALIZATION_FAILED, eVkErrorDeviceLost = VK_ERROR_DEVICE_LOST, eVkErrorMemoryMapFailed = VK_ERROR_MEMORY_MAP_FAILED, eVkErrorLayerNotPresent = VK_ERROR_LAYER_NOT_PRESENT, eVkErrorExtensionNotPresent = VK_ERROR_EXTENSION_NOT_PRESENT, eVkErrorFeatureNotPresent = VK_ERROR_FEATURE_NOT_PRESENT, eVkErrorIncompatibleDriver = VK_ERROR_INCOMPATIBLE_DRIVER, eVkErrorTooManyObjects = VK_ERROR_TOO_MANY_OBJECTS, eVkErrorFormatNotSupported = VK_ERROR_FORMAT_NOT_SUPPORTED }; class PresentInfoKHR { public: PresentInfoKHR() : PresentInfoKHR( 0, nullptr, 0, nullptr, nullptr, nullptr ) {} PresentInfoKHR( uint32_t waitSemaphoreCount, const Semaphore* pWaitSemaphores, uint32_t swapchainCount, const SwapchainKHR* pSwapchains, const uint32_t* pImageIndices, Result* pResults) { m_presentInfoKHR.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; m_presentInfoKHR.pNext = nullptr; m_presentInfoKHR.waitSemaphoreCount = waitSemaphoreCount; m_presentInfoKHR.pWaitSemaphores = pWaitSemaphores; m_presentInfoKHR.swapchainCount = swapchainCount; m_presentInfoKHR.pSwapchains = pSwapchains; m_presentInfoKHR.pImageIndices = pImageIndices; m_presentInfoKHR.pResults = reinterpret_cast( pResults ); } const StructureType& sType() const { return reinterpret_cast( m_presentInfoKHR.sType ); } PresentInfoKHR& sType( StructureType sType ) { m_presentInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_presentInfoKHR.pNext ); } PresentInfoKHR& pNext( const void* pNext ) { m_presentInfoKHR.pNext = pNext; return *this; } const uint32_t& waitSemaphoreCount() const { return m_presentInfoKHR.waitSemaphoreCount; } PresentInfoKHR& waitSemaphoreCount( uint32_t waitSemaphoreCount ) { m_presentInfoKHR.waitSemaphoreCount = waitSemaphoreCount; return *this; } const Semaphore* pWaitSemaphores() const { return reinterpret_cast( m_presentInfoKHR.pWaitSemaphores ); } PresentInfoKHR& pWaitSemaphores( const Semaphore* pWaitSemaphores ) { m_presentInfoKHR.pWaitSemaphores = pWaitSemaphores; return *this; } const uint32_t& swapchainCount() const { return m_presentInfoKHR.swapchainCount; } PresentInfoKHR& swapchainCount( uint32_t swapchainCount ) { m_presentInfoKHR.swapchainCount = swapchainCount; return *this; } const SwapchainKHR* pSwapchains() const { return reinterpret_cast( m_presentInfoKHR.pSwapchains ); } PresentInfoKHR& pSwapchains( const SwapchainKHR* pSwapchains ) { m_presentInfoKHR.pSwapchains = pSwapchains; return *this; } const uint32_t* pImageIndices() const { return reinterpret_cast( m_presentInfoKHR.pImageIndices ); } PresentInfoKHR& pImageIndices( const uint32_t* pImageIndices ) { m_presentInfoKHR.pImageIndices = pImageIndices; return *this; } const Result* pResults() const { return reinterpret_cast( m_presentInfoKHR.pResults ); } PresentInfoKHR& pResults( Result* pResults ) { m_presentInfoKHR.pResults = reinterpret_cast( pResults ); return *this; } operator const VkPresentInfoKHR&() const { return m_presentInfoKHR; } private: VkPresentInfoKHR m_presentInfoKHR; }; enum class DynamicState { eViewport = VK_DYNAMIC_STATE_VIEWPORT, eScissor = VK_DYNAMIC_STATE_SCISSOR, eLineWidth = VK_DYNAMIC_STATE_LINE_WIDTH, eDepthBias = VK_DYNAMIC_STATE_DEPTH_BIAS, eBlendConstants = VK_DYNAMIC_STATE_BLEND_CONSTANTS, eDepthBounds = VK_DYNAMIC_STATE_DEPTH_BOUNDS, eStencilCompareMask = VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, eStencilWriteMask = VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, eStencilReference = VK_DYNAMIC_STATE_STENCIL_REFERENCE }; class PipelineDynamicStateCreateInfo { public: PipelineDynamicStateCreateInfo() : PipelineDynamicStateCreateInfo( 0, 0, nullptr ) {} PipelineDynamicStateCreateInfo( PipelineDynamicStateCreateFlags flags, uint32_t dynamicStateCount, const DynamicState* pDynamicStates) { m_pipelineDynamicStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; m_pipelineDynamicStateCreateInfo.pNext = nullptr; m_pipelineDynamicStateCreateInfo.flags = flags; m_pipelineDynamicStateCreateInfo.dynamicStateCount = dynamicStateCount; m_pipelineDynamicStateCreateInfo.pDynamicStates = reinterpret_cast( pDynamicStates ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineDynamicStateCreateInfo.sType ); } PipelineDynamicStateCreateInfo& sType( StructureType sType ) { m_pipelineDynamicStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineDynamicStateCreateInfo.pNext ); } PipelineDynamicStateCreateInfo& pNext( const void* pNext ) { m_pipelineDynamicStateCreateInfo.pNext = pNext; return *this; } const PipelineDynamicStateCreateFlags& flags() const { return m_pipelineDynamicStateCreateInfo.flags; } PipelineDynamicStateCreateInfo& flags( PipelineDynamicStateCreateFlags flags ) { m_pipelineDynamicStateCreateInfo.flags = flags; return *this; } const uint32_t& dynamicStateCount() const { return m_pipelineDynamicStateCreateInfo.dynamicStateCount; } PipelineDynamicStateCreateInfo& dynamicStateCount( uint32_t dynamicStateCount ) { m_pipelineDynamicStateCreateInfo.dynamicStateCount = dynamicStateCount; return *this; } const DynamicState* pDynamicStates() const { return reinterpret_cast( m_pipelineDynamicStateCreateInfo.pDynamicStates ); } PipelineDynamicStateCreateInfo& pDynamicStates( const DynamicState* pDynamicStates ) { m_pipelineDynamicStateCreateInfo.pDynamicStates = reinterpret_cast( pDynamicStates ); return *this; } operator const VkPipelineDynamicStateCreateInfo&() const { return m_pipelineDynamicStateCreateInfo; } private: VkPipelineDynamicStateCreateInfo m_pipelineDynamicStateCreateInfo; }; enum class QueueFlagBits { eGraphics = VK_QUEUE_GRAPHICS_BIT, eCompute = VK_QUEUE_COMPUTE_BIT, eTransfer = VK_QUEUE_TRANSFER_BIT, eSparseBinding = VK_QUEUE_SPARSE_BINDING_BIT }; typedef Flags QueueFlags; inline QueueFlags operator|( QueueFlagBits bit0, QueueFlagBits bit1 ) { return QueueFlags( bit0 ) | bit1; } class QueueFamilyProperties { public: const QueueFlags& queueFlags() const { return reinterpret_cast( m_queueFamilyProperties.queueFlags ); } const uint32_t& queueCount() const { return m_queueFamilyProperties.queueCount; } const uint32_t& timestampValidBits() const { return m_queueFamilyProperties.timestampValidBits; } const Extent3D& minImageTransferGranularity() const { return reinterpret_cast( m_queueFamilyProperties.minImageTransferGranularity ); } operator const VkQueueFamilyProperties&() const { return m_queueFamilyProperties; } private: VkQueueFamilyProperties m_queueFamilyProperties; }; enum class MemoryPropertyFlagBits { eDeviceLocal = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, eHostVisible = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, eHostCoherent = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, eHostCached = VK_MEMORY_PROPERTY_HOST_CACHED_BIT, eLazilyAllocated = VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT }; typedef Flags MemoryPropertyFlags; inline MemoryPropertyFlags operator|( MemoryPropertyFlagBits bit0, MemoryPropertyFlagBits bit1 ) { return MemoryPropertyFlags( bit0 ) | bit1; } class MemoryType { public: const MemoryPropertyFlags& propertyFlags() const { return reinterpret_cast( m_memoryType.propertyFlags ); } const uint32_t& heapIndex() const { return m_memoryType.heapIndex; } operator const VkMemoryType&() const { return m_memoryType; } private: VkMemoryType m_memoryType; }; enum class MemoryHeapFlagBits { eDeviceLocal = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT }; typedef Flags MemoryHeapFlags; inline MemoryHeapFlags operator|( MemoryHeapFlagBits bit0, MemoryHeapFlagBits bit1 ) { return MemoryHeapFlags( bit0 ) | bit1; } class MemoryHeap { public: const DeviceSize& size() const { return m_memoryHeap.size; } const MemoryHeapFlags& flags() const { return reinterpret_cast( m_memoryHeap.flags ); } operator const VkMemoryHeap&() const { return m_memoryHeap; } private: VkMemoryHeap m_memoryHeap; }; class PhysicalDeviceMemoryProperties { public: const uint32_t& memoryTypeCount() const { return m_physicalDeviceMemoryProperties.memoryTypeCount; } const MemoryType* memoryTypes() const { return reinterpret_cast( m_physicalDeviceMemoryProperties.memoryTypes ); } const uint32_t& memoryHeapCount() const { return m_physicalDeviceMemoryProperties.memoryHeapCount; } const MemoryHeap* memoryHeaps() const { return reinterpret_cast( m_physicalDeviceMemoryProperties.memoryHeaps ); } operator const VkPhysicalDeviceMemoryProperties&() const { return m_physicalDeviceMemoryProperties; } private: VkPhysicalDeviceMemoryProperties m_physicalDeviceMemoryProperties; }; enum class AccessFlagBits { eIndirectCommandRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT, eIndexRead = VK_ACCESS_INDEX_READ_BIT, eVertexAttributeRead = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, eUniformRead = VK_ACCESS_UNIFORM_READ_BIT, eInputAttachmentRead = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, eShaderRead = VK_ACCESS_SHADER_READ_BIT, eShaderWrite = VK_ACCESS_SHADER_WRITE_BIT, eColorAttachmentRead = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, eColorAttachmentWrite = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, eDepthStencilAttachmentRead = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, eDepthStencilAttachmentWrite = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, eTransferRead = VK_ACCESS_TRANSFER_READ_BIT, eTransferWrite = VK_ACCESS_TRANSFER_WRITE_BIT, eHostRead = VK_ACCESS_HOST_READ_BIT, eHostWrite = VK_ACCESS_HOST_WRITE_BIT, eMemoryRead = VK_ACCESS_MEMORY_READ_BIT, eMemoryWrite = VK_ACCESS_MEMORY_WRITE_BIT }; typedef Flags AccessFlags; inline AccessFlags operator|( AccessFlagBits bit0, AccessFlagBits bit1 ) { return AccessFlags( bit0 ) | bit1; } class MemoryBarrier { public: MemoryBarrier() : MemoryBarrier( AccessFlags(), AccessFlags() ) {} MemoryBarrier( AccessFlags srcAccessMask, AccessFlags dstAccessMask) { m_memoryBarrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; m_memoryBarrier.pNext = nullptr; m_memoryBarrier.srcAccessMask = static_cast( srcAccessMask ); m_memoryBarrier.dstAccessMask = static_cast( dstAccessMask ); } const StructureType& sType() const { return reinterpret_cast( m_memoryBarrier.sType ); } MemoryBarrier& sType( StructureType sType ) { m_memoryBarrier.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_memoryBarrier.pNext ); } MemoryBarrier& pNext( const void* pNext ) { m_memoryBarrier.pNext = pNext; return *this; } const AccessFlags& srcAccessMask() const { return reinterpret_cast( m_memoryBarrier.srcAccessMask ); } MemoryBarrier& srcAccessMask( AccessFlags srcAccessMask ) { m_memoryBarrier.srcAccessMask = static_cast( srcAccessMask ); return *this; } const AccessFlags& dstAccessMask() const { return reinterpret_cast( m_memoryBarrier.dstAccessMask ); } MemoryBarrier& dstAccessMask( AccessFlags dstAccessMask ) { m_memoryBarrier.dstAccessMask = static_cast( dstAccessMask ); return *this; } operator const VkMemoryBarrier&() const { return m_memoryBarrier; } private: VkMemoryBarrier m_memoryBarrier; }; class BufferMemoryBarrier { public: BufferMemoryBarrier() : BufferMemoryBarrier( AccessFlags(), AccessFlags(), 0, 0, nullptr, 0, 0 ) {} BufferMemoryBarrier( AccessFlags srcAccessMask, AccessFlags dstAccessMask, uint32_t srcQueueFamilyIndex, uint32_t dstQueueFamilyIndex, Buffer buffer, DeviceSize offset, DeviceSize size) { m_bufferMemoryBarrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; m_bufferMemoryBarrier.pNext = nullptr; m_bufferMemoryBarrier.srcAccessMask = static_cast( srcAccessMask ); m_bufferMemoryBarrier.dstAccessMask = static_cast( dstAccessMask ); m_bufferMemoryBarrier.srcQueueFamilyIndex = srcQueueFamilyIndex; m_bufferMemoryBarrier.dstQueueFamilyIndex = dstQueueFamilyIndex; m_bufferMemoryBarrier.buffer = buffer; m_bufferMemoryBarrier.offset = offset; m_bufferMemoryBarrier.size = size; } const StructureType& sType() const { return reinterpret_cast( m_bufferMemoryBarrier.sType ); } BufferMemoryBarrier& sType( StructureType sType ) { m_bufferMemoryBarrier.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_bufferMemoryBarrier.pNext ); } BufferMemoryBarrier& pNext( const void* pNext ) { m_bufferMemoryBarrier.pNext = pNext; return *this; } const AccessFlags& srcAccessMask() const { return reinterpret_cast( m_bufferMemoryBarrier.srcAccessMask ); } BufferMemoryBarrier& srcAccessMask( AccessFlags srcAccessMask ) { m_bufferMemoryBarrier.srcAccessMask = static_cast( srcAccessMask ); return *this; } const AccessFlags& dstAccessMask() const { return reinterpret_cast( m_bufferMemoryBarrier.dstAccessMask ); } BufferMemoryBarrier& dstAccessMask( AccessFlags dstAccessMask ) { m_bufferMemoryBarrier.dstAccessMask = static_cast( dstAccessMask ); return *this; } const uint32_t& srcQueueFamilyIndex() const { return m_bufferMemoryBarrier.srcQueueFamilyIndex; } BufferMemoryBarrier& srcQueueFamilyIndex( uint32_t srcQueueFamilyIndex ) { m_bufferMemoryBarrier.srcQueueFamilyIndex = srcQueueFamilyIndex; return *this; } const uint32_t& dstQueueFamilyIndex() const { return m_bufferMemoryBarrier.dstQueueFamilyIndex; } BufferMemoryBarrier& dstQueueFamilyIndex( uint32_t dstQueueFamilyIndex ) { m_bufferMemoryBarrier.dstQueueFamilyIndex = dstQueueFamilyIndex; return *this; } const Buffer& buffer() const { return m_bufferMemoryBarrier.buffer; } BufferMemoryBarrier& buffer( Buffer buffer ) { m_bufferMemoryBarrier.buffer = buffer; return *this; } const DeviceSize& offset() const { return m_bufferMemoryBarrier.offset; } BufferMemoryBarrier& offset( DeviceSize offset ) { m_bufferMemoryBarrier.offset = offset; return *this; } const DeviceSize& size() const { return m_bufferMemoryBarrier.size; } BufferMemoryBarrier& size( DeviceSize size ) { m_bufferMemoryBarrier.size = size; return *this; } operator const VkBufferMemoryBarrier&() const { return m_bufferMemoryBarrier; } private: VkBufferMemoryBarrier m_bufferMemoryBarrier; }; enum class BufferUsageFlagBits { eTransferSrc = VK_BUFFER_USAGE_TRANSFER_SRC_BIT, eTransferDst = VK_BUFFER_USAGE_TRANSFER_DST_BIT, eUniformTexelBuffer = VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, eUniformBuffer = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, eStorageBuffer = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, eIndexBuffer = VK_BUFFER_USAGE_INDEX_BUFFER_BIT, eVertexBuffer = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, eIndirectBuffer = VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT }; typedef Flags BufferUsageFlags; inline BufferUsageFlags operator|( BufferUsageFlagBits bit0, BufferUsageFlagBits bit1 ) { return BufferUsageFlags( bit0 ) | bit1; } enum class BufferCreateFlagBits { eSparseBinding = VK_BUFFER_CREATE_SPARSE_BINDING_BIT, eSparseResidency = VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, eSparseAliased = VK_BUFFER_CREATE_SPARSE_ALIASED_BIT }; typedef Flags BufferCreateFlags; inline BufferCreateFlags operator|( BufferCreateFlagBits bit0, BufferCreateFlagBits bit1 ) { return BufferCreateFlags( bit0 ) | bit1; } class BufferCreateInfo { public: BufferCreateInfo() : BufferCreateInfo( BufferCreateFlags(), 0, BufferUsageFlags(), SharingMode::eExclusive, 0, nullptr ) {} BufferCreateInfo( BufferCreateFlags flags, DeviceSize size, BufferUsageFlags usage, SharingMode sharingMode, uint32_t queueFamilyIndexCount, const uint32_t* pQueueFamilyIndices) { m_bufferCreateInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; m_bufferCreateInfo.pNext = nullptr; m_bufferCreateInfo.flags = static_cast( flags ); m_bufferCreateInfo.size = size; m_bufferCreateInfo.usage = static_cast( usage ); m_bufferCreateInfo.sharingMode = static_cast( sharingMode ); m_bufferCreateInfo.queueFamilyIndexCount = queueFamilyIndexCount; m_bufferCreateInfo.pQueueFamilyIndices = pQueueFamilyIndices; } const StructureType& sType() const { return reinterpret_cast( m_bufferCreateInfo.sType ); } BufferCreateInfo& sType( StructureType sType ) { m_bufferCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_bufferCreateInfo.pNext ); } BufferCreateInfo& pNext( const void* pNext ) { m_bufferCreateInfo.pNext = pNext; return *this; } const BufferCreateFlags& flags() const { return reinterpret_cast( m_bufferCreateInfo.flags ); } BufferCreateInfo& flags( BufferCreateFlags flags ) { m_bufferCreateInfo.flags = static_cast( flags ); return *this; } const DeviceSize& size() const { return m_bufferCreateInfo.size; } BufferCreateInfo& size( DeviceSize size ) { m_bufferCreateInfo.size = size; return *this; } const BufferUsageFlags& usage() const { return reinterpret_cast( m_bufferCreateInfo.usage ); } BufferCreateInfo& usage( BufferUsageFlags usage ) { m_bufferCreateInfo.usage = static_cast( usage ); return *this; } const SharingMode& sharingMode() const { return reinterpret_cast( m_bufferCreateInfo.sharingMode ); } BufferCreateInfo& sharingMode( SharingMode sharingMode ) { m_bufferCreateInfo.sharingMode = static_cast( sharingMode ); return *this; } const uint32_t& queueFamilyIndexCount() const { return m_bufferCreateInfo.queueFamilyIndexCount; } BufferCreateInfo& queueFamilyIndexCount( uint32_t queueFamilyIndexCount ) { m_bufferCreateInfo.queueFamilyIndexCount = queueFamilyIndexCount; return *this; } const uint32_t* pQueueFamilyIndices() const { return reinterpret_cast( m_bufferCreateInfo.pQueueFamilyIndices ); } BufferCreateInfo& pQueueFamilyIndices( const uint32_t* pQueueFamilyIndices ) { m_bufferCreateInfo.pQueueFamilyIndices = pQueueFamilyIndices; return *this; } operator const VkBufferCreateInfo&() const { return m_bufferCreateInfo; } private: VkBufferCreateInfo m_bufferCreateInfo; }; enum class ShaderStageFlagBits { eVertex = VK_SHADER_STAGE_VERTEX_BIT, eTessellationControl = VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, eTessellationEvaluation = VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, eGeometry = VK_SHADER_STAGE_GEOMETRY_BIT, eFragment = VK_SHADER_STAGE_FRAGMENT_BIT, eCompute = VK_SHADER_STAGE_COMPUTE_BIT, eAllGraphics = VK_SHADER_STAGE_ALL_GRAPHICS, eAll = VK_SHADER_STAGE_ALL }; typedef Flags ShaderStageFlags; inline ShaderStageFlags operator|( ShaderStageFlagBits bit0, ShaderStageFlagBits bit1 ) { return ShaderStageFlags( bit0 ) | bit1; } class DescriptorSetLayoutBinding { public: DescriptorSetLayoutBinding() : DescriptorSetLayoutBinding( 0, DescriptorType::eSampler, 0, ShaderStageFlags(), nullptr ) {} DescriptorSetLayoutBinding( uint32_t binding, DescriptorType descriptorType, uint32_t descriptorCount, ShaderStageFlags stageFlags, const Sampler* pImmutableSamplers) { m_descriptorSetLayoutBinding.binding = binding; m_descriptorSetLayoutBinding.descriptorType = static_cast( descriptorType ); m_descriptorSetLayoutBinding.descriptorCount = descriptorCount; m_descriptorSetLayoutBinding.stageFlags = static_cast( stageFlags ); m_descriptorSetLayoutBinding.pImmutableSamplers = pImmutableSamplers; } const uint32_t& binding() const { return m_descriptorSetLayoutBinding.binding; } DescriptorSetLayoutBinding& binding( uint32_t binding ) { m_descriptorSetLayoutBinding.binding = binding; return *this; } const DescriptorType& descriptorType() const { return reinterpret_cast( m_descriptorSetLayoutBinding.descriptorType ); } DescriptorSetLayoutBinding& descriptorType( DescriptorType descriptorType ) { m_descriptorSetLayoutBinding.descriptorType = static_cast( descriptorType ); return *this; } const uint32_t& descriptorCount() const { return m_descriptorSetLayoutBinding.descriptorCount; } DescriptorSetLayoutBinding& descriptorCount( uint32_t descriptorCount ) { m_descriptorSetLayoutBinding.descriptorCount = descriptorCount; return *this; } const ShaderStageFlags& stageFlags() const { return reinterpret_cast( m_descriptorSetLayoutBinding.stageFlags ); } DescriptorSetLayoutBinding& stageFlags( ShaderStageFlags stageFlags ) { m_descriptorSetLayoutBinding.stageFlags = static_cast( stageFlags ); return *this; } const Sampler* pImmutableSamplers() const { return reinterpret_cast( m_descriptorSetLayoutBinding.pImmutableSamplers ); } DescriptorSetLayoutBinding& pImmutableSamplers( const Sampler* pImmutableSamplers ) { m_descriptorSetLayoutBinding.pImmutableSamplers = pImmutableSamplers; return *this; } operator const VkDescriptorSetLayoutBinding&() const { return m_descriptorSetLayoutBinding; } private: VkDescriptorSetLayoutBinding m_descriptorSetLayoutBinding; }; class DescriptorSetLayoutCreateInfo { public: DescriptorSetLayoutCreateInfo() : DescriptorSetLayoutCreateInfo( 0, 0, nullptr ) {} DescriptorSetLayoutCreateInfo( DescriptorSetLayoutCreateFlags flags, uint32_t bindingCount, const DescriptorSetLayoutBinding* pBindings) { m_descriptorSetLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; m_descriptorSetLayoutCreateInfo.pNext = nullptr; m_descriptorSetLayoutCreateInfo.flags = flags; m_descriptorSetLayoutCreateInfo.bindingCount = bindingCount; m_descriptorSetLayoutCreateInfo.pBindings = reinterpret_cast( pBindings ); } const StructureType& sType() const { return reinterpret_cast( m_descriptorSetLayoutCreateInfo.sType ); } DescriptorSetLayoutCreateInfo& sType( StructureType sType ) { m_descriptorSetLayoutCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_descriptorSetLayoutCreateInfo.pNext ); } DescriptorSetLayoutCreateInfo& pNext( const void* pNext ) { m_descriptorSetLayoutCreateInfo.pNext = pNext; return *this; } const DescriptorSetLayoutCreateFlags& flags() const { return m_descriptorSetLayoutCreateInfo.flags; } DescriptorSetLayoutCreateInfo& flags( DescriptorSetLayoutCreateFlags flags ) { m_descriptorSetLayoutCreateInfo.flags = flags; return *this; } const uint32_t& bindingCount() const { return m_descriptorSetLayoutCreateInfo.bindingCount; } DescriptorSetLayoutCreateInfo& bindingCount( uint32_t bindingCount ) { m_descriptorSetLayoutCreateInfo.bindingCount = bindingCount; return *this; } const DescriptorSetLayoutBinding* pBindings() const { return reinterpret_cast( m_descriptorSetLayoutCreateInfo.pBindings ); } DescriptorSetLayoutCreateInfo& pBindings( const DescriptorSetLayoutBinding* pBindings ) { m_descriptorSetLayoutCreateInfo.pBindings = reinterpret_cast( pBindings ); return *this; } operator const VkDescriptorSetLayoutCreateInfo&() const { return m_descriptorSetLayoutCreateInfo; } private: VkDescriptorSetLayoutCreateInfo m_descriptorSetLayoutCreateInfo; }; class PipelineShaderStageCreateInfo { public: PipelineShaderStageCreateInfo() : PipelineShaderStageCreateInfo( 0, ShaderStageFlagBits::eVertex, nullptr, nullptr, nullptr ) {} PipelineShaderStageCreateInfo( PipelineShaderStageCreateFlags flags, ShaderStageFlagBits stage, ShaderModule module, const char* pName, const SpecializationInfo* pSpecializationInfo) { m_pipelineShaderStageCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; m_pipelineShaderStageCreateInfo.pNext = nullptr; m_pipelineShaderStageCreateInfo.flags = flags; m_pipelineShaderStageCreateInfo.stage = static_cast( stage ); m_pipelineShaderStageCreateInfo.module = module; m_pipelineShaderStageCreateInfo.pName = pName; m_pipelineShaderStageCreateInfo.pSpecializationInfo = reinterpret_cast( pSpecializationInfo ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineShaderStageCreateInfo.sType ); } PipelineShaderStageCreateInfo& sType( StructureType sType ) { m_pipelineShaderStageCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineShaderStageCreateInfo.pNext ); } PipelineShaderStageCreateInfo& pNext( const void* pNext ) { m_pipelineShaderStageCreateInfo.pNext = pNext; return *this; } const PipelineShaderStageCreateFlags& flags() const { return m_pipelineShaderStageCreateInfo.flags; } PipelineShaderStageCreateInfo& flags( PipelineShaderStageCreateFlags flags ) { m_pipelineShaderStageCreateInfo.flags = flags; return *this; } const ShaderStageFlagBits& stage() const { return reinterpret_cast( m_pipelineShaderStageCreateInfo.stage ); } PipelineShaderStageCreateInfo& stage( ShaderStageFlagBits stage ) { m_pipelineShaderStageCreateInfo.stage = static_cast( stage ); return *this; } const ShaderModule& module() const { return m_pipelineShaderStageCreateInfo.module; } PipelineShaderStageCreateInfo& module( ShaderModule module ) { m_pipelineShaderStageCreateInfo.module = module; return *this; } const char* pName() const { return reinterpret_cast( m_pipelineShaderStageCreateInfo.pName ); } PipelineShaderStageCreateInfo& pName( const char* pName ) { m_pipelineShaderStageCreateInfo.pName = pName; return *this; } const SpecializationInfo* pSpecializationInfo() const { return reinterpret_cast( m_pipelineShaderStageCreateInfo.pSpecializationInfo ); } PipelineShaderStageCreateInfo& pSpecializationInfo( const SpecializationInfo* pSpecializationInfo ) { m_pipelineShaderStageCreateInfo.pSpecializationInfo = reinterpret_cast( pSpecializationInfo ); return *this; } operator const VkPipelineShaderStageCreateInfo&() const { return m_pipelineShaderStageCreateInfo; } private: VkPipelineShaderStageCreateInfo m_pipelineShaderStageCreateInfo; }; class PushConstantRange { public: PushConstantRange() : PushConstantRange( ShaderStageFlags(), 0, 0 ) {} PushConstantRange( ShaderStageFlags stageFlags, uint32_t offset, uint32_t size) { m_pushConstantRange.stageFlags = static_cast( stageFlags ); m_pushConstantRange.offset = offset; m_pushConstantRange.size = size; } const ShaderStageFlags& stageFlags() const { return reinterpret_cast( m_pushConstantRange.stageFlags ); } PushConstantRange& stageFlags( ShaderStageFlags stageFlags ) { m_pushConstantRange.stageFlags = static_cast( stageFlags ); return *this; } const uint32_t& offset() const { return m_pushConstantRange.offset; } PushConstantRange& offset( uint32_t offset ) { m_pushConstantRange.offset = offset; return *this; } const uint32_t& size() const { return m_pushConstantRange.size; } PushConstantRange& size( uint32_t size ) { m_pushConstantRange.size = size; return *this; } operator const VkPushConstantRange&() const { return m_pushConstantRange; } private: VkPushConstantRange m_pushConstantRange; }; class PipelineLayoutCreateInfo { public: PipelineLayoutCreateInfo() : PipelineLayoutCreateInfo( 0, 0, nullptr, 0, nullptr ) {} PipelineLayoutCreateInfo( PipelineLayoutCreateFlags flags, uint32_t setLayoutCount, const DescriptorSetLayout* pSetLayouts, uint32_t pushConstantRangeCount, const PushConstantRange* pPushConstantRanges) { m_pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; m_pipelineLayoutCreateInfo.pNext = nullptr; m_pipelineLayoutCreateInfo.flags = flags; m_pipelineLayoutCreateInfo.setLayoutCount = setLayoutCount; m_pipelineLayoutCreateInfo.pSetLayouts = pSetLayouts; m_pipelineLayoutCreateInfo.pushConstantRangeCount = pushConstantRangeCount; m_pipelineLayoutCreateInfo.pPushConstantRanges = reinterpret_cast( pPushConstantRanges ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineLayoutCreateInfo.sType ); } PipelineLayoutCreateInfo& sType( StructureType sType ) { m_pipelineLayoutCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineLayoutCreateInfo.pNext ); } PipelineLayoutCreateInfo& pNext( const void* pNext ) { m_pipelineLayoutCreateInfo.pNext = pNext; return *this; } const PipelineLayoutCreateFlags& flags() const { return m_pipelineLayoutCreateInfo.flags; } PipelineLayoutCreateInfo& flags( PipelineLayoutCreateFlags flags ) { m_pipelineLayoutCreateInfo.flags = flags; return *this; } const uint32_t& setLayoutCount() const { return m_pipelineLayoutCreateInfo.setLayoutCount; } PipelineLayoutCreateInfo& setLayoutCount( uint32_t setLayoutCount ) { m_pipelineLayoutCreateInfo.setLayoutCount = setLayoutCount; return *this; } const DescriptorSetLayout* pSetLayouts() const { return reinterpret_cast( m_pipelineLayoutCreateInfo.pSetLayouts ); } PipelineLayoutCreateInfo& pSetLayouts( const DescriptorSetLayout* pSetLayouts ) { m_pipelineLayoutCreateInfo.pSetLayouts = pSetLayouts; return *this; } const uint32_t& pushConstantRangeCount() const { return m_pipelineLayoutCreateInfo.pushConstantRangeCount; } PipelineLayoutCreateInfo& pushConstantRangeCount( uint32_t pushConstantRangeCount ) { m_pipelineLayoutCreateInfo.pushConstantRangeCount = pushConstantRangeCount; return *this; } const PushConstantRange* pPushConstantRanges() const { return reinterpret_cast( m_pipelineLayoutCreateInfo.pPushConstantRanges ); } PipelineLayoutCreateInfo& pPushConstantRanges( const PushConstantRange* pPushConstantRanges ) { m_pipelineLayoutCreateInfo.pPushConstantRanges = reinterpret_cast( pPushConstantRanges ); return *this; } operator const VkPipelineLayoutCreateInfo&() const { return m_pipelineLayoutCreateInfo; } private: VkPipelineLayoutCreateInfo m_pipelineLayoutCreateInfo; }; enum class ImageUsageFlagBits { eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT, eTransferDst = VK_IMAGE_USAGE_TRANSFER_DST_BIT, eSampled = VK_IMAGE_USAGE_SAMPLED_BIT, eStorage = VK_IMAGE_USAGE_STORAGE_BIT, eColorAttachment = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, eDepthStencilAttachment = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, eTransientAttachment = VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, eInputAttachment = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT }; typedef Flags ImageUsageFlags; inline ImageUsageFlags operator|( ImageUsageFlagBits bit0, ImageUsageFlagBits bit1 ) { return ImageUsageFlags( bit0 ) | bit1; } enum class ImageCreateFlagBits { eSparseBinding = VK_IMAGE_CREATE_SPARSE_BINDING_BIT, eSparseResidency = VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, eSparseAliased = VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, eMutableFormat = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, eCubeCompatible = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT }; typedef Flags ImageCreateFlags; inline ImageCreateFlags operator|( ImageCreateFlagBits bit0, ImageCreateFlagBits bit1 ) { return ImageCreateFlags( bit0 ) | bit1; } enum class PipelineCreateFlagBits { eDisableOptimization = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, eAllowDerivatives = VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, eDerivative = VK_PIPELINE_CREATE_DERIVATIVE_BIT }; typedef Flags PipelineCreateFlags; inline PipelineCreateFlags operator|( PipelineCreateFlagBits bit0, PipelineCreateFlagBits bit1 ) { return PipelineCreateFlags( bit0 ) | bit1; } class ComputePipelineCreateInfo { public: ComputePipelineCreateInfo() : ComputePipelineCreateInfo( PipelineCreateFlags(), PipelineShaderStageCreateInfo(), nullptr, nullptr, 0 ) {} ComputePipelineCreateInfo( PipelineCreateFlags flags, PipelineShaderStageCreateInfo stage, PipelineLayout layout, Pipeline basePipelineHandle, int32_t basePipelineIndex) { m_computePipelineCreateInfo.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; m_computePipelineCreateInfo.pNext = nullptr; m_computePipelineCreateInfo.flags = static_cast( flags ); m_computePipelineCreateInfo.stage = static_cast( stage ); m_computePipelineCreateInfo.layout = layout; m_computePipelineCreateInfo.basePipelineHandle = basePipelineHandle; m_computePipelineCreateInfo.basePipelineIndex = basePipelineIndex; } const StructureType& sType() const { return reinterpret_cast( m_computePipelineCreateInfo.sType ); } ComputePipelineCreateInfo& sType( StructureType sType ) { m_computePipelineCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_computePipelineCreateInfo.pNext ); } ComputePipelineCreateInfo& pNext( const void* pNext ) { m_computePipelineCreateInfo.pNext = pNext; return *this; } const PipelineCreateFlags& flags() const { return reinterpret_cast( m_computePipelineCreateInfo.flags ); } ComputePipelineCreateInfo& flags( PipelineCreateFlags flags ) { m_computePipelineCreateInfo.flags = static_cast( flags ); return *this; } const PipelineShaderStageCreateInfo& stage() const { return reinterpret_cast( m_computePipelineCreateInfo.stage ); } ComputePipelineCreateInfo& stage( PipelineShaderStageCreateInfo stage ) { m_computePipelineCreateInfo.stage = static_cast( stage ); return *this; } const PipelineLayout& layout() const { return m_computePipelineCreateInfo.layout; } ComputePipelineCreateInfo& layout( PipelineLayout layout ) { m_computePipelineCreateInfo.layout = layout; return *this; } const Pipeline& basePipelineHandle() const { return m_computePipelineCreateInfo.basePipelineHandle; } ComputePipelineCreateInfo& basePipelineHandle( Pipeline basePipelineHandle ) { m_computePipelineCreateInfo.basePipelineHandle = basePipelineHandle; return *this; } const int32_t& basePipelineIndex() const { return m_computePipelineCreateInfo.basePipelineIndex; } ComputePipelineCreateInfo& basePipelineIndex( int32_t basePipelineIndex ) { m_computePipelineCreateInfo.basePipelineIndex = basePipelineIndex; return *this; } operator const VkComputePipelineCreateInfo&() const { return m_computePipelineCreateInfo; } private: VkComputePipelineCreateInfo m_computePipelineCreateInfo; }; enum class ColorComponentFlagBits { eR = VK_COLOR_COMPONENT_R_BIT, eG = VK_COLOR_COMPONENT_G_BIT, eB = VK_COLOR_COMPONENT_B_BIT, eA = VK_COLOR_COMPONENT_A_BIT }; typedef Flags ColorComponentFlags; inline ColorComponentFlags operator|( ColorComponentFlagBits bit0, ColorComponentFlagBits bit1 ) { return ColorComponentFlags( bit0 ) | bit1; } class PipelineColorBlendAttachmentState { public: PipelineColorBlendAttachmentState() : PipelineColorBlendAttachmentState( 0, BlendFactor::eZero, BlendFactor::eZero, BlendOp::eAdd, BlendFactor::eZero, BlendFactor::eZero, BlendOp::eAdd, ColorComponentFlags() ) {} PipelineColorBlendAttachmentState( Bool32 blendEnable, BlendFactor srcColorBlendFactor, BlendFactor dstColorBlendFactor, BlendOp colorBlendOp, BlendFactor srcAlphaBlendFactor, BlendFactor dstAlphaBlendFactor, BlendOp alphaBlendOp, ColorComponentFlags colorWriteMask) { m_pipelineColorBlendAttachmentState.blendEnable = blendEnable; m_pipelineColorBlendAttachmentState.srcColorBlendFactor = static_cast( srcColorBlendFactor ); m_pipelineColorBlendAttachmentState.dstColorBlendFactor = static_cast( dstColorBlendFactor ); m_pipelineColorBlendAttachmentState.colorBlendOp = static_cast( colorBlendOp ); m_pipelineColorBlendAttachmentState.srcAlphaBlendFactor = static_cast( srcAlphaBlendFactor ); m_pipelineColorBlendAttachmentState.dstAlphaBlendFactor = static_cast( dstAlphaBlendFactor ); m_pipelineColorBlendAttachmentState.alphaBlendOp = static_cast( alphaBlendOp ); m_pipelineColorBlendAttachmentState.colorWriteMask = static_cast( colorWriteMask ); } const Bool32& blendEnable() const { return m_pipelineColorBlendAttachmentState.blendEnable; } PipelineColorBlendAttachmentState& blendEnable( Bool32 blendEnable ) { m_pipelineColorBlendAttachmentState.blendEnable = blendEnable; return *this; } const BlendFactor& srcColorBlendFactor() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.srcColorBlendFactor ); } PipelineColorBlendAttachmentState& srcColorBlendFactor( BlendFactor srcColorBlendFactor ) { m_pipelineColorBlendAttachmentState.srcColorBlendFactor = static_cast( srcColorBlendFactor ); return *this; } const BlendFactor& dstColorBlendFactor() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.dstColorBlendFactor ); } PipelineColorBlendAttachmentState& dstColorBlendFactor( BlendFactor dstColorBlendFactor ) { m_pipelineColorBlendAttachmentState.dstColorBlendFactor = static_cast( dstColorBlendFactor ); return *this; } const BlendOp& colorBlendOp() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.colorBlendOp ); } PipelineColorBlendAttachmentState& colorBlendOp( BlendOp colorBlendOp ) { m_pipelineColorBlendAttachmentState.colorBlendOp = static_cast( colorBlendOp ); return *this; } const BlendFactor& srcAlphaBlendFactor() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.srcAlphaBlendFactor ); } PipelineColorBlendAttachmentState& srcAlphaBlendFactor( BlendFactor srcAlphaBlendFactor ) { m_pipelineColorBlendAttachmentState.srcAlphaBlendFactor = static_cast( srcAlphaBlendFactor ); return *this; } const BlendFactor& dstAlphaBlendFactor() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.dstAlphaBlendFactor ); } PipelineColorBlendAttachmentState& dstAlphaBlendFactor( BlendFactor dstAlphaBlendFactor ) { m_pipelineColorBlendAttachmentState.dstAlphaBlendFactor = static_cast( dstAlphaBlendFactor ); return *this; } const BlendOp& alphaBlendOp() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.alphaBlendOp ); } PipelineColorBlendAttachmentState& alphaBlendOp( BlendOp alphaBlendOp ) { m_pipelineColorBlendAttachmentState.alphaBlendOp = static_cast( alphaBlendOp ); return *this; } const ColorComponentFlags& colorWriteMask() const { return reinterpret_cast( m_pipelineColorBlendAttachmentState.colorWriteMask ); } PipelineColorBlendAttachmentState& colorWriteMask( ColorComponentFlags colorWriteMask ) { m_pipelineColorBlendAttachmentState.colorWriteMask = static_cast( colorWriteMask ); return *this; } operator const VkPipelineColorBlendAttachmentState&() const { return m_pipelineColorBlendAttachmentState; } private: VkPipelineColorBlendAttachmentState m_pipelineColorBlendAttachmentState; }; class PipelineColorBlendStateCreateInfo { public: PipelineColorBlendStateCreateInfo() : PipelineColorBlendStateCreateInfo( 0, 0, LogicOp::eClear, 0, nullptr, { 0 } ) {} PipelineColorBlendStateCreateInfo( PipelineColorBlendStateCreateFlags flags, Bool32 logicOpEnable, LogicOp logicOp, uint32_t attachmentCount, const PipelineColorBlendAttachmentState* pAttachments, std::array const& blendConstants) { m_pipelineColorBlendStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; m_pipelineColorBlendStateCreateInfo.pNext = nullptr; m_pipelineColorBlendStateCreateInfo.flags = flags; m_pipelineColorBlendStateCreateInfo.logicOpEnable = logicOpEnable; m_pipelineColorBlendStateCreateInfo.logicOp = static_cast( logicOp ); m_pipelineColorBlendStateCreateInfo.attachmentCount = attachmentCount; m_pipelineColorBlendStateCreateInfo.pAttachments = reinterpret_cast( pAttachments ); memcpy( &m_pipelineColorBlendStateCreateInfo.blendConstants, blendConstants.data(), 4 * sizeof( float ) ); } const StructureType& sType() const { return reinterpret_cast( m_pipelineColorBlendStateCreateInfo.sType ); } PipelineColorBlendStateCreateInfo& sType( StructureType sType ) { m_pipelineColorBlendStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineColorBlendStateCreateInfo.pNext ); } PipelineColorBlendStateCreateInfo& pNext( const void* pNext ) { m_pipelineColorBlendStateCreateInfo.pNext = pNext; return *this; } const PipelineColorBlendStateCreateFlags& flags() const { return m_pipelineColorBlendStateCreateInfo.flags; } PipelineColorBlendStateCreateInfo& flags( PipelineColorBlendStateCreateFlags flags ) { m_pipelineColorBlendStateCreateInfo.flags = flags; return *this; } const Bool32& logicOpEnable() const { return m_pipelineColorBlendStateCreateInfo.logicOpEnable; } PipelineColorBlendStateCreateInfo& logicOpEnable( Bool32 logicOpEnable ) { m_pipelineColorBlendStateCreateInfo.logicOpEnable = logicOpEnable; return *this; } const LogicOp& logicOp() const { return reinterpret_cast( m_pipelineColorBlendStateCreateInfo.logicOp ); } PipelineColorBlendStateCreateInfo& logicOp( LogicOp logicOp ) { m_pipelineColorBlendStateCreateInfo.logicOp = static_cast( logicOp ); return *this; } const uint32_t& attachmentCount() const { return m_pipelineColorBlendStateCreateInfo.attachmentCount; } PipelineColorBlendStateCreateInfo& attachmentCount( uint32_t attachmentCount ) { m_pipelineColorBlendStateCreateInfo.attachmentCount = attachmentCount; return *this; } const PipelineColorBlendAttachmentState* pAttachments() const { return reinterpret_cast( m_pipelineColorBlendStateCreateInfo.pAttachments ); } PipelineColorBlendStateCreateInfo& pAttachments( const PipelineColorBlendAttachmentState* pAttachments ) { m_pipelineColorBlendStateCreateInfo.pAttachments = reinterpret_cast( pAttachments ); return *this; } const float* blendConstants() const { return reinterpret_cast( m_pipelineColorBlendStateCreateInfo.blendConstants ); } PipelineColorBlendStateCreateInfo& blendConstants( std::array blendConstants ) { memcpy( &m_pipelineColorBlendStateCreateInfo.blendConstants, blendConstants.data(), 4 * sizeof( float ) ); return *this; } operator const VkPipelineColorBlendStateCreateInfo&() const { return m_pipelineColorBlendStateCreateInfo; } private: VkPipelineColorBlendStateCreateInfo m_pipelineColorBlendStateCreateInfo; }; enum class FenceCreateFlagBits { eSignaled = VK_FENCE_CREATE_SIGNALED_BIT }; typedef Flags FenceCreateFlags; inline FenceCreateFlags operator|( FenceCreateFlagBits bit0, FenceCreateFlagBits bit1 ) { return FenceCreateFlags( bit0 ) | bit1; } class FenceCreateInfo { public: FenceCreateInfo() : FenceCreateInfo( FenceCreateFlags() ) {} FenceCreateInfo( FenceCreateFlags flags) { m_fenceCreateInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; m_fenceCreateInfo.pNext = nullptr; m_fenceCreateInfo.flags = static_cast( flags ); } const StructureType& sType() const { return reinterpret_cast( m_fenceCreateInfo.sType ); } FenceCreateInfo& sType( StructureType sType ) { m_fenceCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_fenceCreateInfo.pNext ); } FenceCreateInfo& pNext( const void* pNext ) { m_fenceCreateInfo.pNext = pNext; return *this; } const FenceCreateFlags& flags() const { return reinterpret_cast( m_fenceCreateInfo.flags ); } FenceCreateInfo& flags( FenceCreateFlags flags ) { m_fenceCreateInfo.flags = static_cast( flags ); return *this; } operator const VkFenceCreateInfo&() const { return m_fenceCreateInfo; } private: VkFenceCreateInfo m_fenceCreateInfo; }; enum class FormatFeatureFlagBits { eSampledImage = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, eStorageImage = VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, eStorageImageAtomic = VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT, eUniformTexelBuffer = VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT, eStorageTexelBuffer = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT, eStorageTexelBufferAtomic = VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, eVertexBuffer = VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT, eColorAttachment = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, eColorAttachmentBlend = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, eDepthStencilAttachment = VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, eBlitSrc = VK_FORMAT_FEATURE_BLIT_SRC_BIT, eBlitDst = VK_FORMAT_FEATURE_BLIT_DST_BIT, eSampledImageFilterLinear = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT }; typedef Flags FormatFeatureFlags; inline FormatFeatureFlags operator|( FormatFeatureFlagBits bit0, FormatFeatureFlagBits bit1 ) { return FormatFeatureFlags( bit0 ) | bit1; } class FormatProperties { public: const FormatFeatureFlags& linearTilingFeatures() const { return reinterpret_cast( m_formatProperties.linearTilingFeatures ); } const FormatFeatureFlags& optimalTilingFeatures() const { return reinterpret_cast( m_formatProperties.optimalTilingFeatures ); } const FormatFeatureFlags& bufferFeatures() const { return reinterpret_cast( m_formatProperties.bufferFeatures ); } operator const VkFormatProperties&() const { return m_formatProperties; } private: VkFormatProperties m_formatProperties; }; enum class QueryControlFlagBits { ePrecise = VK_QUERY_CONTROL_PRECISE_BIT }; typedef Flags QueryControlFlags; inline QueryControlFlags operator|( QueryControlFlagBits bit0, QueryControlFlagBits bit1 ) { return QueryControlFlags( bit0 ) | bit1; } enum class QueryResultFlagBits { e64 = VK_QUERY_RESULT_64_BIT, eWait = VK_QUERY_RESULT_WAIT_BIT, eWithAvailability = VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, ePartial = VK_QUERY_RESULT_PARTIAL_BIT }; typedef Flags QueryResultFlags; inline QueryResultFlags operator|( QueryResultFlagBits bit0, QueryResultFlagBits bit1 ) { return QueryResultFlags( bit0 ) | bit1; } enum class CommandBufferUsageFlagBits { eOneTimeSubmit = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, eRenderPassContinue = VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, eSimultaneousUse = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT }; typedef Flags CommandBufferUsageFlags; inline CommandBufferUsageFlags operator|( CommandBufferUsageFlagBits bit0, CommandBufferUsageFlagBits bit1 ) { return CommandBufferUsageFlags( bit0 ) | bit1; } enum class QueryPipelineStatisticFlagBits { eInputAssemblyVertices = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, eInputAssemblyPrimitives = VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, eVertexShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, eGeometryShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, eGeometryShaderPrimitives = VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, eClippingInvocations = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, eClippingPrimitives = VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, eFragmentShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT, eTessellationControlShaderPatches = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, eTessellationEvaluationShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT, eComputeShaderInvocations = VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT }; typedef Flags QueryPipelineStatisticFlags; inline QueryPipelineStatisticFlags operator|( QueryPipelineStatisticFlagBits bit0, QueryPipelineStatisticFlagBits bit1 ) { return QueryPipelineStatisticFlags( bit0 ) | bit1; } class CommandBufferInheritanceInfo { public: CommandBufferInheritanceInfo() : CommandBufferInheritanceInfo( nullptr, 0, nullptr, 0, QueryControlFlags(), QueryPipelineStatisticFlags() ) {} CommandBufferInheritanceInfo( RenderPass renderPass, uint32_t subpass, Framebuffer framebuffer, Bool32 occlusionQueryEnable, QueryControlFlags queryFlags, QueryPipelineStatisticFlags pipelineStatistics) { m_commandBufferInheritanceInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO; m_commandBufferInheritanceInfo.pNext = nullptr; m_commandBufferInheritanceInfo.renderPass = renderPass; m_commandBufferInheritanceInfo.subpass = subpass; m_commandBufferInheritanceInfo.framebuffer = framebuffer; m_commandBufferInheritanceInfo.occlusionQueryEnable = occlusionQueryEnable; m_commandBufferInheritanceInfo.queryFlags = static_cast( queryFlags ); m_commandBufferInheritanceInfo.pipelineStatistics = static_cast( pipelineStatistics ); } const StructureType& sType() const { return reinterpret_cast( m_commandBufferInheritanceInfo.sType ); } CommandBufferInheritanceInfo& sType( StructureType sType ) { m_commandBufferInheritanceInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_commandBufferInheritanceInfo.pNext ); } CommandBufferInheritanceInfo& pNext( const void* pNext ) { m_commandBufferInheritanceInfo.pNext = pNext; return *this; } const RenderPass& renderPass() const { return m_commandBufferInheritanceInfo.renderPass; } CommandBufferInheritanceInfo& renderPass( RenderPass renderPass ) { m_commandBufferInheritanceInfo.renderPass = renderPass; return *this; } const uint32_t& subpass() const { return m_commandBufferInheritanceInfo.subpass; } CommandBufferInheritanceInfo& subpass( uint32_t subpass ) { m_commandBufferInheritanceInfo.subpass = subpass; return *this; } const Framebuffer& framebuffer() const { return m_commandBufferInheritanceInfo.framebuffer; } CommandBufferInheritanceInfo& framebuffer( Framebuffer framebuffer ) { m_commandBufferInheritanceInfo.framebuffer = framebuffer; return *this; } const Bool32& occlusionQueryEnable() const { return m_commandBufferInheritanceInfo.occlusionQueryEnable; } CommandBufferInheritanceInfo& occlusionQueryEnable( Bool32 occlusionQueryEnable ) { m_commandBufferInheritanceInfo.occlusionQueryEnable = occlusionQueryEnable; return *this; } const QueryControlFlags& queryFlags() const { return reinterpret_cast( m_commandBufferInheritanceInfo.queryFlags ); } CommandBufferInheritanceInfo& queryFlags( QueryControlFlags queryFlags ) { m_commandBufferInheritanceInfo.queryFlags = static_cast( queryFlags ); return *this; } const QueryPipelineStatisticFlags& pipelineStatistics() const { return reinterpret_cast( m_commandBufferInheritanceInfo.pipelineStatistics ); } CommandBufferInheritanceInfo& pipelineStatistics( QueryPipelineStatisticFlags pipelineStatistics ) { m_commandBufferInheritanceInfo.pipelineStatistics = static_cast( pipelineStatistics ); return *this; } operator const VkCommandBufferInheritanceInfo&() const { return m_commandBufferInheritanceInfo; } private: VkCommandBufferInheritanceInfo m_commandBufferInheritanceInfo; }; class CommandBufferBeginInfo { public: CommandBufferBeginInfo() : CommandBufferBeginInfo( CommandBufferUsageFlags(), nullptr ) {} CommandBufferBeginInfo( CommandBufferUsageFlags flags, const CommandBufferInheritanceInfo* pInheritanceInfo) { m_commandBufferBeginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; m_commandBufferBeginInfo.pNext = nullptr; m_commandBufferBeginInfo.flags = static_cast( flags ); m_commandBufferBeginInfo.pInheritanceInfo = reinterpret_cast( pInheritanceInfo ); } const StructureType& sType() const { return reinterpret_cast( m_commandBufferBeginInfo.sType ); } CommandBufferBeginInfo& sType( StructureType sType ) { m_commandBufferBeginInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_commandBufferBeginInfo.pNext ); } CommandBufferBeginInfo& pNext( const void* pNext ) { m_commandBufferBeginInfo.pNext = pNext; return *this; } const CommandBufferUsageFlags& flags() const { return reinterpret_cast( m_commandBufferBeginInfo.flags ); } CommandBufferBeginInfo& flags( CommandBufferUsageFlags flags ) { m_commandBufferBeginInfo.flags = static_cast( flags ); return *this; } const CommandBufferInheritanceInfo* pInheritanceInfo() const { return reinterpret_cast( m_commandBufferBeginInfo.pInheritanceInfo ); } CommandBufferBeginInfo& pInheritanceInfo( const CommandBufferInheritanceInfo* pInheritanceInfo ) { m_commandBufferBeginInfo.pInheritanceInfo = reinterpret_cast( pInheritanceInfo ); return *this; } operator const VkCommandBufferBeginInfo&() const { return m_commandBufferBeginInfo; } private: VkCommandBufferBeginInfo m_commandBufferBeginInfo; }; class QueryPoolCreateInfo { public: QueryPoolCreateInfo() : QueryPoolCreateInfo( 0, QueryType::eOcclusion, 0, QueryPipelineStatisticFlags() ) {} QueryPoolCreateInfo( QueryPoolCreateFlags flags, QueryType queryType, uint32_t queryCount, QueryPipelineStatisticFlags pipelineStatistics) { m_queryPoolCreateInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; m_queryPoolCreateInfo.pNext = nullptr; m_queryPoolCreateInfo.flags = flags; m_queryPoolCreateInfo.queryType = static_cast( queryType ); m_queryPoolCreateInfo.queryCount = queryCount; m_queryPoolCreateInfo.pipelineStatistics = static_cast( pipelineStatistics ); } const StructureType& sType() const { return reinterpret_cast( m_queryPoolCreateInfo.sType ); } QueryPoolCreateInfo& sType( StructureType sType ) { m_queryPoolCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_queryPoolCreateInfo.pNext ); } QueryPoolCreateInfo& pNext( const void* pNext ) { m_queryPoolCreateInfo.pNext = pNext; return *this; } const QueryPoolCreateFlags& flags() const { return m_queryPoolCreateInfo.flags; } QueryPoolCreateInfo& flags( QueryPoolCreateFlags flags ) { m_queryPoolCreateInfo.flags = flags; return *this; } const QueryType& queryType() const { return reinterpret_cast( m_queryPoolCreateInfo.queryType ); } QueryPoolCreateInfo& queryType( QueryType queryType ) { m_queryPoolCreateInfo.queryType = static_cast( queryType ); return *this; } const uint32_t& queryCount() const { return m_queryPoolCreateInfo.queryCount; } QueryPoolCreateInfo& queryCount( uint32_t queryCount ) { m_queryPoolCreateInfo.queryCount = queryCount; return *this; } const QueryPipelineStatisticFlags& pipelineStatistics() const { return reinterpret_cast( m_queryPoolCreateInfo.pipelineStatistics ); } QueryPoolCreateInfo& pipelineStatistics( QueryPipelineStatisticFlags pipelineStatistics ) { m_queryPoolCreateInfo.pipelineStatistics = static_cast( pipelineStatistics ); return *this; } operator const VkQueryPoolCreateInfo&() const { return m_queryPoolCreateInfo; } private: VkQueryPoolCreateInfo m_queryPoolCreateInfo; }; enum class ImageAspectFlagBits { eColor = VK_IMAGE_ASPECT_COLOR_BIT, eDepth = VK_IMAGE_ASPECT_DEPTH_BIT, eStencil = VK_IMAGE_ASPECT_STENCIL_BIT, eMetadata = VK_IMAGE_ASPECT_METADATA_BIT }; typedef Flags ImageAspectFlags; inline ImageAspectFlags operator|( ImageAspectFlagBits bit0, ImageAspectFlagBits bit1 ) { return ImageAspectFlags( bit0 ) | bit1; } class ImageSubresource { public: ImageSubresource() : ImageSubresource( ImageAspectFlags(), 0, 0 ) {} ImageSubresource( ImageAspectFlags aspectMask, uint32_t mipLevel, uint32_t arrayLayer) { m_imageSubresource.aspectMask = static_cast( aspectMask ); m_imageSubresource.mipLevel = mipLevel; m_imageSubresource.arrayLayer = arrayLayer; } const ImageAspectFlags& aspectMask() const { return reinterpret_cast( m_imageSubresource.aspectMask ); } ImageSubresource& aspectMask( ImageAspectFlags aspectMask ) { m_imageSubresource.aspectMask = static_cast( aspectMask ); return *this; } const uint32_t& mipLevel() const { return m_imageSubresource.mipLevel; } ImageSubresource& mipLevel( uint32_t mipLevel ) { m_imageSubresource.mipLevel = mipLevel; return *this; } const uint32_t& arrayLayer() const { return m_imageSubresource.arrayLayer; } ImageSubresource& arrayLayer( uint32_t arrayLayer ) { m_imageSubresource.arrayLayer = arrayLayer; return *this; } operator const VkImageSubresource&() const { return m_imageSubresource; } private: VkImageSubresource m_imageSubresource; }; class ImageSubresourceLayers { public: ImageSubresourceLayers() : ImageSubresourceLayers( ImageAspectFlags(), 0, 0, 0 ) {} ImageSubresourceLayers( ImageAspectFlags aspectMask, uint32_t mipLevel, uint32_t baseArrayLayer, uint32_t layerCount) { m_imageSubresourceLayers.aspectMask = static_cast( aspectMask ); m_imageSubresourceLayers.mipLevel = mipLevel; m_imageSubresourceLayers.baseArrayLayer = baseArrayLayer; m_imageSubresourceLayers.layerCount = layerCount; } const ImageAspectFlags& aspectMask() const { return reinterpret_cast( m_imageSubresourceLayers.aspectMask ); } ImageSubresourceLayers& aspectMask( ImageAspectFlags aspectMask ) { m_imageSubresourceLayers.aspectMask = static_cast( aspectMask ); return *this; } const uint32_t& mipLevel() const { return m_imageSubresourceLayers.mipLevel; } ImageSubresourceLayers& mipLevel( uint32_t mipLevel ) { m_imageSubresourceLayers.mipLevel = mipLevel; return *this; } const uint32_t& baseArrayLayer() const { return m_imageSubresourceLayers.baseArrayLayer; } ImageSubresourceLayers& baseArrayLayer( uint32_t baseArrayLayer ) { m_imageSubresourceLayers.baseArrayLayer = baseArrayLayer; return *this; } const uint32_t& layerCount() const { return m_imageSubresourceLayers.layerCount; } ImageSubresourceLayers& layerCount( uint32_t layerCount ) { m_imageSubresourceLayers.layerCount = layerCount; return *this; } operator const VkImageSubresourceLayers&() const { return m_imageSubresourceLayers; } private: VkImageSubresourceLayers m_imageSubresourceLayers; }; class ImageSubresourceRange { public: ImageSubresourceRange() : ImageSubresourceRange( ImageAspectFlags(), 0, 0, 0, 0 ) {} ImageSubresourceRange( ImageAspectFlags aspectMask, uint32_t baseMipLevel, uint32_t levelCount, uint32_t baseArrayLayer, uint32_t layerCount) { m_imageSubresourceRange.aspectMask = static_cast( aspectMask ); m_imageSubresourceRange.baseMipLevel = baseMipLevel; m_imageSubresourceRange.levelCount = levelCount; m_imageSubresourceRange.baseArrayLayer = baseArrayLayer; m_imageSubresourceRange.layerCount = layerCount; } const ImageAspectFlags& aspectMask() const { return reinterpret_cast( m_imageSubresourceRange.aspectMask ); } ImageSubresourceRange& aspectMask( ImageAspectFlags aspectMask ) { m_imageSubresourceRange.aspectMask = static_cast( aspectMask ); return *this; } const uint32_t& baseMipLevel() const { return m_imageSubresourceRange.baseMipLevel; } ImageSubresourceRange& baseMipLevel( uint32_t baseMipLevel ) { m_imageSubresourceRange.baseMipLevel = baseMipLevel; return *this; } const uint32_t& levelCount() const { return m_imageSubresourceRange.levelCount; } ImageSubresourceRange& levelCount( uint32_t levelCount ) { m_imageSubresourceRange.levelCount = levelCount; return *this; } const uint32_t& baseArrayLayer() const { return m_imageSubresourceRange.baseArrayLayer; } ImageSubresourceRange& baseArrayLayer( uint32_t baseArrayLayer ) { m_imageSubresourceRange.baseArrayLayer = baseArrayLayer; return *this; } const uint32_t& layerCount() const { return m_imageSubresourceRange.layerCount; } ImageSubresourceRange& layerCount( uint32_t layerCount ) { m_imageSubresourceRange.layerCount = layerCount; return *this; } operator const VkImageSubresourceRange&() const { return m_imageSubresourceRange; } private: VkImageSubresourceRange m_imageSubresourceRange; }; class ImageMemoryBarrier { public: ImageMemoryBarrier() : ImageMemoryBarrier( AccessFlags(), AccessFlags(), ImageLayout::eUndefined, ImageLayout::eUndefined, 0, 0, nullptr, ImageSubresourceRange() ) {} ImageMemoryBarrier( AccessFlags srcAccessMask, AccessFlags dstAccessMask, ImageLayout oldLayout, ImageLayout newLayout, uint32_t srcQueueFamilyIndex, uint32_t dstQueueFamilyIndex, Image image, ImageSubresourceRange subresourceRange) { m_imageMemoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; m_imageMemoryBarrier.pNext = nullptr; m_imageMemoryBarrier.srcAccessMask = static_cast( srcAccessMask ); m_imageMemoryBarrier.dstAccessMask = static_cast( dstAccessMask ); m_imageMemoryBarrier.oldLayout = static_cast( oldLayout ); m_imageMemoryBarrier.newLayout = static_cast( newLayout ); m_imageMemoryBarrier.srcQueueFamilyIndex = srcQueueFamilyIndex; m_imageMemoryBarrier.dstQueueFamilyIndex = dstQueueFamilyIndex; m_imageMemoryBarrier.image = image; m_imageMemoryBarrier.subresourceRange = static_cast( subresourceRange ); } const StructureType& sType() const { return reinterpret_cast( m_imageMemoryBarrier.sType ); } ImageMemoryBarrier& sType( StructureType sType ) { m_imageMemoryBarrier.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_imageMemoryBarrier.pNext ); } ImageMemoryBarrier& pNext( const void* pNext ) { m_imageMemoryBarrier.pNext = pNext; return *this; } const AccessFlags& srcAccessMask() const { return reinterpret_cast( m_imageMemoryBarrier.srcAccessMask ); } ImageMemoryBarrier& srcAccessMask( AccessFlags srcAccessMask ) { m_imageMemoryBarrier.srcAccessMask = static_cast( srcAccessMask ); return *this; } const AccessFlags& dstAccessMask() const { return reinterpret_cast( m_imageMemoryBarrier.dstAccessMask ); } ImageMemoryBarrier& dstAccessMask( AccessFlags dstAccessMask ) { m_imageMemoryBarrier.dstAccessMask = static_cast( dstAccessMask ); return *this; } const ImageLayout& oldLayout() const { return reinterpret_cast( m_imageMemoryBarrier.oldLayout ); } ImageMemoryBarrier& oldLayout( ImageLayout oldLayout ) { m_imageMemoryBarrier.oldLayout = static_cast( oldLayout ); return *this; } const ImageLayout& newLayout() const { return reinterpret_cast( m_imageMemoryBarrier.newLayout ); } ImageMemoryBarrier& newLayout( ImageLayout newLayout ) { m_imageMemoryBarrier.newLayout = static_cast( newLayout ); return *this; } const uint32_t& srcQueueFamilyIndex() const { return m_imageMemoryBarrier.srcQueueFamilyIndex; } ImageMemoryBarrier& srcQueueFamilyIndex( uint32_t srcQueueFamilyIndex ) { m_imageMemoryBarrier.srcQueueFamilyIndex = srcQueueFamilyIndex; return *this; } const uint32_t& dstQueueFamilyIndex() const { return m_imageMemoryBarrier.dstQueueFamilyIndex; } ImageMemoryBarrier& dstQueueFamilyIndex( uint32_t dstQueueFamilyIndex ) { m_imageMemoryBarrier.dstQueueFamilyIndex = dstQueueFamilyIndex; return *this; } const Image& image() const { return m_imageMemoryBarrier.image; } ImageMemoryBarrier& image( Image image ) { m_imageMemoryBarrier.image = image; return *this; } const ImageSubresourceRange& subresourceRange() const { return reinterpret_cast( m_imageMemoryBarrier.subresourceRange ); } ImageMemoryBarrier& subresourceRange( ImageSubresourceRange subresourceRange ) { m_imageMemoryBarrier.subresourceRange = static_cast( subresourceRange ); return *this; } operator const VkImageMemoryBarrier&() const { return m_imageMemoryBarrier; } private: VkImageMemoryBarrier m_imageMemoryBarrier; }; class ImageViewCreateInfo { public: ImageViewCreateInfo() : ImageViewCreateInfo( 0, nullptr, ImageViewType::e1D, Format::eUndefined, ComponentMapping(), ImageSubresourceRange() ) {} ImageViewCreateInfo( ImageViewCreateFlags flags, Image image, ImageViewType viewType, Format format, ComponentMapping components, ImageSubresourceRange subresourceRange) { m_imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; m_imageViewCreateInfo.pNext = nullptr; m_imageViewCreateInfo.flags = flags; m_imageViewCreateInfo.image = image; m_imageViewCreateInfo.viewType = static_cast( viewType ); m_imageViewCreateInfo.format = static_cast( format ); m_imageViewCreateInfo.components = static_cast( components ); m_imageViewCreateInfo.subresourceRange = static_cast( subresourceRange ); } const StructureType& sType() const { return reinterpret_cast( m_imageViewCreateInfo.sType ); } ImageViewCreateInfo& sType( StructureType sType ) { m_imageViewCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_imageViewCreateInfo.pNext ); } ImageViewCreateInfo& pNext( const void* pNext ) { m_imageViewCreateInfo.pNext = pNext; return *this; } const ImageViewCreateFlags& flags() const { return m_imageViewCreateInfo.flags; } ImageViewCreateInfo& flags( ImageViewCreateFlags flags ) { m_imageViewCreateInfo.flags = flags; return *this; } const Image& image() const { return m_imageViewCreateInfo.image; } ImageViewCreateInfo& image( Image image ) { m_imageViewCreateInfo.image = image; return *this; } const ImageViewType& viewType() const { return reinterpret_cast( m_imageViewCreateInfo.viewType ); } ImageViewCreateInfo& viewType( ImageViewType viewType ) { m_imageViewCreateInfo.viewType = static_cast( viewType ); return *this; } const Format& format() const { return reinterpret_cast( m_imageViewCreateInfo.format ); } ImageViewCreateInfo& format( Format format ) { m_imageViewCreateInfo.format = static_cast( format ); return *this; } const ComponentMapping& components() const { return reinterpret_cast( m_imageViewCreateInfo.components ); } ImageViewCreateInfo& components( ComponentMapping components ) { m_imageViewCreateInfo.components = static_cast( components ); return *this; } const ImageSubresourceRange& subresourceRange() const { return reinterpret_cast( m_imageViewCreateInfo.subresourceRange ); } ImageViewCreateInfo& subresourceRange( ImageSubresourceRange subresourceRange ) { m_imageViewCreateInfo.subresourceRange = static_cast( subresourceRange ); return *this; } operator const VkImageViewCreateInfo&() const { return m_imageViewCreateInfo; } private: VkImageViewCreateInfo m_imageViewCreateInfo; }; class ImageCopy { public: ImageCopy() : ImageCopy( ImageSubresourceLayers(), Offset3D(), ImageSubresourceLayers(), Offset3D(), Extent3D() ) {} ImageCopy( ImageSubresourceLayers srcSubresource, Offset3D srcOffset, ImageSubresourceLayers dstSubresource, Offset3D dstOffset, Extent3D extent) { m_imageCopy.srcSubresource = static_cast( srcSubresource ); m_imageCopy.srcOffset = static_cast( srcOffset ); m_imageCopy.dstSubresource = static_cast( dstSubresource ); m_imageCopy.dstOffset = static_cast( dstOffset ); m_imageCopy.extent = static_cast( extent ); } const ImageSubresourceLayers& srcSubresource() const { return reinterpret_cast( m_imageCopy.srcSubresource ); } ImageCopy& srcSubresource( ImageSubresourceLayers srcSubresource ) { m_imageCopy.srcSubresource = static_cast( srcSubresource ); return *this; } const Offset3D& srcOffset() const { return reinterpret_cast( m_imageCopy.srcOffset ); } ImageCopy& srcOffset( Offset3D srcOffset ) { m_imageCopy.srcOffset = static_cast( srcOffset ); return *this; } const ImageSubresourceLayers& dstSubresource() const { return reinterpret_cast( m_imageCopy.dstSubresource ); } ImageCopy& dstSubresource( ImageSubresourceLayers dstSubresource ) { m_imageCopy.dstSubresource = static_cast( dstSubresource ); return *this; } const Offset3D& dstOffset() const { return reinterpret_cast( m_imageCopy.dstOffset ); } ImageCopy& dstOffset( Offset3D dstOffset ) { m_imageCopy.dstOffset = static_cast( dstOffset ); return *this; } const Extent3D& extent() const { return reinterpret_cast( m_imageCopy.extent ); } ImageCopy& extent( Extent3D extent ) { m_imageCopy.extent = static_cast( extent ); return *this; } operator const VkImageCopy&() const { return m_imageCopy; } private: VkImageCopy m_imageCopy; }; class ImageBlit { public: ImageBlit() : ImageBlit( ImageSubresourceLayers(), { Offset3D() }, ImageSubresourceLayers(), { Offset3D() } ) {} ImageBlit( ImageSubresourceLayers srcSubresource, std::array const& srcOffsets, ImageSubresourceLayers dstSubresource, std::array const& dstOffsets) { m_imageBlit.srcSubresource = static_cast( srcSubresource ); memcpy( &m_imageBlit.srcOffsets, srcOffsets.data(), 2 * sizeof( Offset3D ) ); m_imageBlit.dstSubresource = static_cast( dstSubresource ); memcpy( &m_imageBlit.dstOffsets, dstOffsets.data(), 2 * sizeof( Offset3D ) ); } const ImageSubresourceLayers& srcSubresource() const { return reinterpret_cast( m_imageBlit.srcSubresource ); } ImageBlit& srcSubresource( ImageSubresourceLayers srcSubresource ) { m_imageBlit.srcSubresource = static_cast( srcSubresource ); return *this; } const Offset3D* srcOffsets() const { return reinterpret_cast( m_imageBlit.srcOffsets ); } ImageBlit& srcOffsets( std::array srcOffsets ) { memcpy( &m_imageBlit.srcOffsets, srcOffsets.data(), 2 * sizeof( Offset3D ) ); return *this; } const ImageSubresourceLayers& dstSubresource() const { return reinterpret_cast( m_imageBlit.dstSubresource ); } ImageBlit& dstSubresource( ImageSubresourceLayers dstSubresource ) { m_imageBlit.dstSubresource = static_cast( dstSubresource ); return *this; } const Offset3D* dstOffsets() const { return reinterpret_cast( m_imageBlit.dstOffsets ); } ImageBlit& dstOffsets( std::array dstOffsets ) { memcpy( &m_imageBlit.dstOffsets, dstOffsets.data(), 2 * sizeof( Offset3D ) ); return *this; } operator const VkImageBlit&() const { return m_imageBlit; } private: VkImageBlit m_imageBlit; }; class BufferImageCopy { public: BufferImageCopy() : BufferImageCopy( 0, 0, 0, ImageSubresourceLayers(), Offset3D(), Extent3D() ) {} BufferImageCopy( DeviceSize bufferOffset, uint32_t bufferRowLength, uint32_t bufferImageHeight, ImageSubresourceLayers imageSubresource, Offset3D imageOffset, Extent3D imageExtent) { m_bufferImageCopy.bufferOffset = bufferOffset; m_bufferImageCopy.bufferRowLength = bufferRowLength; m_bufferImageCopy.bufferImageHeight = bufferImageHeight; m_bufferImageCopy.imageSubresource = static_cast( imageSubresource ); m_bufferImageCopy.imageOffset = static_cast( imageOffset ); m_bufferImageCopy.imageExtent = static_cast( imageExtent ); } const DeviceSize& bufferOffset() const { return m_bufferImageCopy.bufferOffset; } BufferImageCopy& bufferOffset( DeviceSize bufferOffset ) { m_bufferImageCopy.bufferOffset = bufferOffset; return *this; } const uint32_t& bufferRowLength() const { return m_bufferImageCopy.bufferRowLength; } BufferImageCopy& bufferRowLength( uint32_t bufferRowLength ) { m_bufferImageCopy.bufferRowLength = bufferRowLength; return *this; } const uint32_t& bufferImageHeight() const { return m_bufferImageCopy.bufferImageHeight; } BufferImageCopy& bufferImageHeight( uint32_t bufferImageHeight ) { m_bufferImageCopy.bufferImageHeight = bufferImageHeight; return *this; } const ImageSubresourceLayers& imageSubresource() const { return reinterpret_cast( m_bufferImageCopy.imageSubresource ); } BufferImageCopy& imageSubresource( ImageSubresourceLayers imageSubresource ) { m_bufferImageCopy.imageSubresource = static_cast( imageSubresource ); return *this; } const Offset3D& imageOffset() const { return reinterpret_cast( m_bufferImageCopy.imageOffset ); } BufferImageCopy& imageOffset( Offset3D imageOffset ) { m_bufferImageCopy.imageOffset = static_cast( imageOffset ); return *this; } const Extent3D& imageExtent() const { return reinterpret_cast( m_bufferImageCopy.imageExtent ); } BufferImageCopy& imageExtent( Extent3D imageExtent ) { m_bufferImageCopy.imageExtent = static_cast( imageExtent ); return *this; } operator const VkBufferImageCopy&() const { return m_bufferImageCopy; } private: VkBufferImageCopy m_bufferImageCopy; }; class ImageResolve { public: ImageResolve() : ImageResolve( ImageSubresourceLayers(), Offset3D(), ImageSubresourceLayers(), Offset3D(), Extent3D() ) {} ImageResolve( ImageSubresourceLayers srcSubresource, Offset3D srcOffset, ImageSubresourceLayers dstSubresource, Offset3D dstOffset, Extent3D extent) { m_imageResolve.srcSubresource = static_cast( srcSubresource ); m_imageResolve.srcOffset = static_cast( srcOffset ); m_imageResolve.dstSubresource = static_cast( dstSubresource ); m_imageResolve.dstOffset = static_cast( dstOffset ); m_imageResolve.extent = static_cast( extent ); } const ImageSubresourceLayers& srcSubresource() const { return reinterpret_cast( m_imageResolve.srcSubresource ); } ImageResolve& srcSubresource( ImageSubresourceLayers srcSubresource ) { m_imageResolve.srcSubresource = static_cast( srcSubresource ); return *this; } const Offset3D& srcOffset() const { return reinterpret_cast( m_imageResolve.srcOffset ); } ImageResolve& srcOffset( Offset3D srcOffset ) { m_imageResolve.srcOffset = static_cast( srcOffset ); return *this; } const ImageSubresourceLayers& dstSubresource() const { return reinterpret_cast( m_imageResolve.dstSubresource ); } ImageResolve& dstSubresource( ImageSubresourceLayers dstSubresource ) { m_imageResolve.dstSubresource = static_cast( dstSubresource ); return *this; } const Offset3D& dstOffset() const { return reinterpret_cast( m_imageResolve.dstOffset ); } ImageResolve& dstOffset( Offset3D dstOffset ) { m_imageResolve.dstOffset = static_cast( dstOffset ); return *this; } const Extent3D& extent() const { return reinterpret_cast( m_imageResolve.extent ); } ImageResolve& extent( Extent3D extent ) { m_imageResolve.extent = static_cast( extent ); return *this; } operator const VkImageResolve&() const { return m_imageResolve; } private: VkImageResolve m_imageResolve; }; class ClearAttachment { public: ClearAttachment() : ClearAttachment( ImageAspectFlags(), 0, ClearValue() ) {} ClearAttachment( ImageAspectFlags aspectMask, uint32_t colorAttachment, ClearValue clearValue) { m_clearAttachment.aspectMask = static_cast( aspectMask ); m_clearAttachment.colorAttachment = colorAttachment; m_clearAttachment.clearValue = static_cast( clearValue ); } const ImageAspectFlags& aspectMask() const { return reinterpret_cast( m_clearAttachment.aspectMask ); } ClearAttachment& aspectMask( ImageAspectFlags aspectMask ) { m_clearAttachment.aspectMask = static_cast( aspectMask ); return *this; } const uint32_t& colorAttachment() const { return m_clearAttachment.colorAttachment; } ClearAttachment& colorAttachment( uint32_t colorAttachment ) { m_clearAttachment.colorAttachment = colorAttachment; return *this; } const ClearValue& clearValue() const { return reinterpret_cast( m_clearAttachment.clearValue ); } ClearAttachment& clearValue( ClearValue clearValue ) { m_clearAttachment.clearValue = static_cast( clearValue ); return *this; } operator const VkClearAttachment&() const { return m_clearAttachment; } private: VkClearAttachment m_clearAttachment; }; enum class SparseImageFormatFlagBits { eSingleMiptail = VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, eAlignedMipSize = VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT, eNonstandardBlockSize = VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT }; typedef Flags SparseImageFormatFlags; inline SparseImageFormatFlags operator|( SparseImageFormatFlagBits bit0, SparseImageFormatFlagBits bit1 ) { return SparseImageFormatFlags( bit0 ) | bit1; } class SparseImageFormatProperties { public: const ImageAspectFlags& aspectMask() const { return reinterpret_cast( m_sparseImageFormatProperties.aspectMask ); } const Extent3D& imageGranularity() const { return reinterpret_cast( m_sparseImageFormatProperties.imageGranularity ); } const SparseImageFormatFlags& flags() const { return reinterpret_cast( m_sparseImageFormatProperties.flags ); } operator const VkSparseImageFormatProperties&() const { return m_sparseImageFormatProperties; } private: VkSparseImageFormatProperties m_sparseImageFormatProperties; }; class SparseImageMemoryRequirements { public: const SparseImageFormatProperties& formatProperties() const { return reinterpret_cast( m_sparseImageMemoryRequirements.formatProperties ); } const uint32_t& imageMipTailFirstLod() const { return m_sparseImageMemoryRequirements.imageMipTailFirstLod; } const DeviceSize& imageMipTailSize() const { return m_sparseImageMemoryRequirements.imageMipTailSize; } const DeviceSize& imageMipTailOffset() const { return m_sparseImageMemoryRequirements.imageMipTailOffset; } const DeviceSize& imageMipTailStride() const { return m_sparseImageMemoryRequirements.imageMipTailStride; } operator const VkSparseImageMemoryRequirements&() const { return m_sparseImageMemoryRequirements; } private: VkSparseImageMemoryRequirements m_sparseImageMemoryRequirements; }; enum class SparseMemoryBindFlagBits { eMetadata = VK_SPARSE_MEMORY_BIND_METADATA_BIT }; typedef Flags SparseMemoryBindFlags; inline SparseMemoryBindFlags operator|( SparseMemoryBindFlagBits bit0, SparseMemoryBindFlagBits bit1 ) { return SparseMemoryBindFlags( bit0 ) | bit1; } class SparseMemoryBind { public: SparseMemoryBind() : SparseMemoryBind( 0, 0, nullptr, 0, SparseMemoryBindFlags() ) {} SparseMemoryBind( DeviceSize resourceOffset, DeviceSize size, DeviceMemory memory, DeviceSize memoryOffset, SparseMemoryBindFlags flags) { m_sparseMemoryBind.resourceOffset = resourceOffset; m_sparseMemoryBind.size = size; m_sparseMemoryBind.memory = memory; m_sparseMemoryBind.memoryOffset = memoryOffset; m_sparseMemoryBind.flags = static_cast( flags ); } const DeviceSize& resourceOffset() const { return m_sparseMemoryBind.resourceOffset; } SparseMemoryBind& resourceOffset( DeviceSize resourceOffset ) { m_sparseMemoryBind.resourceOffset = resourceOffset; return *this; } const DeviceSize& size() const { return m_sparseMemoryBind.size; } SparseMemoryBind& size( DeviceSize size ) { m_sparseMemoryBind.size = size; return *this; } const DeviceMemory& memory() const { return m_sparseMemoryBind.memory; } SparseMemoryBind& memory( DeviceMemory memory ) { m_sparseMemoryBind.memory = memory; return *this; } const DeviceSize& memoryOffset() const { return m_sparseMemoryBind.memoryOffset; } SparseMemoryBind& memoryOffset( DeviceSize memoryOffset ) { m_sparseMemoryBind.memoryOffset = memoryOffset; return *this; } const SparseMemoryBindFlags& flags() const { return reinterpret_cast( m_sparseMemoryBind.flags ); } SparseMemoryBind& flags( SparseMemoryBindFlags flags ) { m_sparseMemoryBind.flags = static_cast( flags ); return *this; } operator const VkSparseMemoryBind&() const { return m_sparseMemoryBind; } private: VkSparseMemoryBind m_sparseMemoryBind; }; class SparseImageMemoryBind { public: SparseImageMemoryBind() : SparseImageMemoryBind( ImageSubresource(), Offset3D(), Extent3D(), nullptr, 0, SparseMemoryBindFlags() ) {} SparseImageMemoryBind( ImageSubresource subresource, Offset3D offset, Extent3D extent, DeviceMemory memory, DeviceSize memoryOffset, SparseMemoryBindFlags flags) { m_sparseImageMemoryBind.subresource = static_cast( subresource ); m_sparseImageMemoryBind.offset = static_cast( offset ); m_sparseImageMemoryBind.extent = static_cast( extent ); m_sparseImageMemoryBind.memory = memory; m_sparseImageMemoryBind.memoryOffset = memoryOffset; m_sparseImageMemoryBind.flags = static_cast( flags ); } const ImageSubresource& subresource() const { return reinterpret_cast( m_sparseImageMemoryBind.subresource ); } SparseImageMemoryBind& subresource( ImageSubresource subresource ) { m_sparseImageMemoryBind.subresource = static_cast( subresource ); return *this; } const Offset3D& offset() const { return reinterpret_cast( m_sparseImageMemoryBind.offset ); } SparseImageMemoryBind& offset( Offset3D offset ) { m_sparseImageMemoryBind.offset = static_cast( offset ); return *this; } const Extent3D& extent() const { return reinterpret_cast( m_sparseImageMemoryBind.extent ); } SparseImageMemoryBind& extent( Extent3D extent ) { m_sparseImageMemoryBind.extent = static_cast( extent ); return *this; } const DeviceMemory& memory() const { return m_sparseImageMemoryBind.memory; } SparseImageMemoryBind& memory( DeviceMemory memory ) { m_sparseImageMemoryBind.memory = memory; return *this; } const DeviceSize& memoryOffset() const { return m_sparseImageMemoryBind.memoryOffset; } SparseImageMemoryBind& memoryOffset( DeviceSize memoryOffset ) { m_sparseImageMemoryBind.memoryOffset = memoryOffset; return *this; } const SparseMemoryBindFlags& flags() const { return reinterpret_cast( m_sparseImageMemoryBind.flags ); } SparseImageMemoryBind& flags( SparseMemoryBindFlags flags ) { m_sparseImageMemoryBind.flags = static_cast( flags ); return *this; } operator const VkSparseImageMemoryBind&() const { return m_sparseImageMemoryBind; } private: VkSparseImageMemoryBind m_sparseImageMemoryBind; }; class SparseBufferMemoryBindInfo { public: SparseBufferMemoryBindInfo() : SparseBufferMemoryBindInfo( nullptr, 0, nullptr ) {} SparseBufferMemoryBindInfo( Buffer buffer, uint32_t bindCount, const SparseMemoryBind* pBinds) { m_sparseBufferMemoryBindInfo.buffer = buffer; m_sparseBufferMemoryBindInfo.bindCount = bindCount; m_sparseBufferMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); } const Buffer& buffer() const { return m_sparseBufferMemoryBindInfo.buffer; } SparseBufferMemoryBindInfo& buffer( Buffer buffer ) { m_sparseBufferMemoryBindInfo.buffer = buffer; return *this; } const uint32_t& bindCount() const { return m_sparseBufferMemoryBindInfo.bindCount; } SparseBufferMemoryBindInfo& bindCount( uint32_t bindCount ) { m_sparseBufferMemoryBindInfo.bindCount = bindCount; return *this; } const SparseMemoryBind* pBinds() const { return reinterpret_cast( m_sparseBufferMemoryBindInfo.pBinds ); } SparseBufferMemoryBindInfo& pBinds( const SparseMemoryBind* pBinds ) { m_sparseBufferMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); return *this; } operator const VkSparseBufferMemoryBindInfo&() const { return m_sparseBufferMemoryBindInfo; } private: VkSparseBufferMemoryBindInfo m_sparseBufferMemoryBindInfo; }; class SparseImageOpaqueMemoryBindInfo { public: SparseImageOpaqueMemoryBindInfo() : SparseImageOpaqueMemoryBindInfo( nullptr, 0, nullptr ) {} SparseImageOpaqueMemoryBindInfo( Image image, uint32_t bindCount, const SparseMemoryBind* pBinds) { m_sparseImageOpaqueMemoryBindInfo.image = image; m_sparseImageOpaqueMemoryBindInfo.bindCount = bindCount; m_sparseImageOpaqueMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); } const Image& image() const { return m_sparseImageOpaqueMemoryBindInfo.image; } SparseImageOpaqueMemoryBindInfo& image( Image image ) { m_sparseImageOpaqueMemoryBindInfo.image = image; return *this; } const uint32_t& bindCount() const { return m_sparseImageOpaqueMemoryBindInfo.bindCount; } SparseImageOpaqueMemoryBindInfo& bindCount( uint32_t bindCount ) { m_sparseImageOpaqueMemoryBindInfo.bindCount = bindCount; return *this; } const SparseMemoryBind* pBinds() const { return reinterpret_cast( m_sparseImageOpaqueMemoryBindInfo.pBinds ); } SparseImageOpaqueMemoryBindInfo& pBinds( const SparseMemoryBind* pBinds ) { m_sparseImageOpaqueMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); return *this; } operator const VkSparseImageOpaqueMemoryBindInfo&() const { return m_sparseImageOpaqueMemoryBindInfo; } private: VkSparseImageOpaqueMemoryBindInfo m_sparseImageOpaqueMemoryBindInfo; }; class SparseImageMemoryBindInfo { public: SparseImageMemoryBindInfo() : SparseImageMemoryBindInfo( nullptr, 0, nullptr ) {} SparseImageMemoryBindInfo( Image image, uint32_t bindCount, const SparseImageMemoryBind* pBinds) { m_sparseImageMemoryBindInfo.image = image; m_sparseImageMemoryBindInfo.bindCount = bindCount; m_sparseImageMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); } const Image& image() const { return m_sparseImageMemoryBindInfo.image; } SparseImageMemoryBindInfo& image( Image image ) { m_sparseImageMemoryBindInfo.image = image; return *this; } const uint32_t& bindCount() const { return m_sparseImageMemoryBindInfo.bindCount; } SparseImageMemoryBindInfo& bindCount( uint32_t bindCount ) { m_sparseImageMemoryBindInfo.bindCount = bindCount; return *this; } const SparseImageMemoryBind* pBinds() const { return reinterpret_cast( m_sparseImageMemoryBindInfo.pBinds ); } SparseImageMemoryBindInfo& pBinds( const SparseImageMemoryBind* pBinds ) { m_sparseImageMemoryBindInfo.pBinds = reinterpret_cast( pBinds ); return *this; } operator const VkSparseImageMemoryBindInfo&() const { return m_sparseImageMemoryBindInfo; } private: VkSparseImageMemoryBindInfo m_sparseImageMemoryBindInfo; }; class BindSparseInfo { public: BindSparseInfo() : BindSparseInfo( 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr, 0, nullptr ) {} BindSparseInfo( uint32_t waitSemaphoreCount, const Semaphore* pWaitSemaphores, uint32_t bufferBindCount, const SparseBufferMemoryBindInfo* pBufferBinds, uint32_t imageOpaqueBindCount, const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds, uint32_t imageBindCount, const SparseImageMemoryBindInfo* pImageBinds, uint32_t signalSemaphoreCount, const Semaphore* pSignalSemaphores) { m_bindSparseInfo.sType = VK_STRUCTURE_TYPE_BIND_SPARSE_INFO; m_bindSparseInfo.pNext = nullptr; m_bindSparseInfo.waitSemaphoreCount = waitSemaphoreCount; m_bindSparseInfo.pWaitSemaphores = pWaitSemaphores; m_bindSparseInfo.bufferBindCount = bufferBindCount; m_bindSparseInfo.pBufferBinds = reinterpret_cast( pBufferBinds ); m_bindSparseInfo.imageOpaqueBindCount = imageOpaqueBindCount; m_bindSparseInfo.pImageOpaqueBinds = reinterpret_cast( pImageOpaqueBinds ); m_bindSparseInfo.imageBindCount = imageBindCount; m_bindSparseInfo.pImageBinds = reinterpret_cast( pImageBinds ); m_bindSparseInfo.signalSemaphoreCount = signalSemaphoreCount; m_bindSparseInfo.pSignalSemaphores = pSignalSemaphores; } const StructureType& sType() const { return reinterpret_cast( m_bindSparseInfo.sType ); } BindSparseInfo& sType( StructureType sType ) { m_bindSparseInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_bindSparseInfo.pNext ); } BindSparseInfo& pNext( const void* pNext ) { m_bindSparseInfo.pNext = pNext; return *this; } const uint32_t& waitSemaphoreCount() const { return m_bindSparseInfo.waitSemaphoreCount; } BindSparseInfo& waitSemaphoreCount( uint32_t waitSemaphoreCount ) { m_bindSparseInfo.waitSemaphoreCount = waitSemaphoreCount; return *this; } const Semaphore* pWaitSemaphores() const { return reinterpret_cast( m_bindSparseInfo.pWaitSemaphores ); } BindSparseInfo& pWaitSemaphores( const Semaphore* pWaitSemaphores ) { m_bindSparseInfo.pWaitSemaphores = pWaitSemaphores; return *this; } const uint32_t& bufferBindCount() const { return m_bindSparseInfo.bufferBindCount; } BindSparseInfo& bufferBindCount( uint32_t bufferBindCount ) { m_bindSparseInfo.bufferBindCount = bufferBindCount; return *this; } const SparseBufferMemoryBindInfo* pBufferBinds() const { return reinterpret_cast( m_bindSparseInfo.pBufferBinds ); } BindSparseInfo& pBufferBinds( const SparseBufferMemoryBindInfo* pBufferBinds ) { m_bindSparseInfo.pBufferBinds = reinterpret_cast( pBufferBinds ); return *this; } const uint32_t& imageOpaqueBindCount() const { return m_bindSparseInfo.imageOpaqueBindCount; } BindSparseInfo& imageOpaqueBindCount( uint32_t imageOpaqueBindCount ) { m_bindSparseInfo.imageOpaqueBindCount = imageOpaqueBindCount; return *this; } const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds() const { return reinterpret_cast( m_bindSparseInfo.pImageOpaqueBinds ); } BindSparseInfo& pImageOpaqueBinds( const SparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds ) { m_bindSparseInfo.pImageOpaqueBinds = reinterpret_cast( pImageOpaqueBinds ); return *this; } const uint32_t& imageBindCount() const { return m_bindSparseInfo.imageBindCount; } BindSparseInfo& imageBindCount( uint32_t imageBindCount ) { m_bindSparseInfo.imageBindCount = imageBindCount; return *this; } const SparseImageMemoryBindInfo* pImageBinds() const { return reinterpret_cast( m_bindSparseInfo.pImageBinds ); } BindSparseInfo& pImageBinds( const SparseImageMemoryBindInfo* pImageBinds ) { m_bindSparseInfo.pImageBinds = reinterpret_cast( pImageBinds ); return *this; } const uint32_t& signalSemaphoreCount() const { return m_bindSparseInfo.signalSemaphoreCount; } BindSparseInfo& signalSemaphoreCount( uint32_t signalSemaphoreCount ) { m_bindSparseInfo.signalSemaphoreCount = signalSemaphoreCount; return *this; } const Semaphore* pSignalSemaphores() const { return reinterpret_cast( m_bindSparseInfo.pSignalSemaphores ); } BindSparseInfo& pSignalSemaphores( const Semaphore* pSignalSemaphores ) { m_bindSparseInfo.pSignalSemaphores = pSignalSemaphores; return *this; } operator const VkBindSparseInfo&() const { return m_bindSparseInfo; } private: VkBindSparseInfo m_bindSparseInfo; }; enum class PipelineStageFlagBits { eTopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, eDrawIndirect = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, eVertexInput = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, eVertexShader = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, eTessellationControlShader = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, eTessellationEvaluationShader = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, eGeometryShader = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, eFragmentShader = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, eEarlyFragmentTests = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, eLateFragmentTests = VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, eColorAttachmentOutput = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, eComputeShader = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, eTransfer = VK_PIPELINE_STAGE_TRANSFER_BIT, eBottomOfPipe = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, eHost = VK_PIPELINE_STAGE_HOST_BIT, eAllGraphics = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, eAllCommands = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT }; typedef Flags PipelineStageFlags; inline PipelineStageFlags operator|( PipelineStageFlagBits bit0, PipelineStageFlagBits bit1 ) { return PipelineStageFlags( bit0 ) | bit1; } class SubmitInfo { public: SubmitInfo() : SubmitInfo( 0, nullptr, nullptr, 0, nullptr, 0, nullptr ) {} SubmitInfo( uint32_t waitSemaphoreCount, const Semaphore* pWaitSemaphores, const PipelineStageFlags* pWaitDstStageMask, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers, uint32_t signalSemaphoreCount, const Semaphore* pSignalSemaphores) { m_submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; m_submitInfo.pNext = nullptr; m_submitInfo.waitSemaphoreCount = waitSemaphoreCount; m_submitInfo.pWaitSemaphores = pWaitSemaphores; m_submitInfo.pWaitDstStageMask = reinterpret_cast( pWaitDstStageMask ); m_submitInfo.commandBufferCount = commandBufferCount; m_submitInfo.pCommandBuffers = pCommandBuffers; m_submitInfo.signalSemaphoreCount = signalSemaphoreCount; m_submitInfo.pSignalSemaphores = pSignalSemaphores; } const StructureType& sType() const { return reinterpret_cast( m_submitInfo.sType ); } SubmitInfo& sType( StructureType sType ) { m_submitInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_submitInfo.pNext ); } SubmitInfo& pNext( const void* pNext ) { m_submitInfo.pNext = pNext; return *this; } const uint32_t& waitSemaphoreCount() const { return m_submitInfo.waitSemaphoreCount; } SubmitInfo& waitSemaphoreCount( uint32_t waitSemaphoreCount ) { m_submitInfo.waitSemaphoreCount = waitSemaphoreCount; return *this; } const Semaphore* pWaitSemaphores() const { return reinterpret_cast( m_submitInfo.pWaitSemaphores ); } SubmitInfo& pWaitSemaphores( const Semaphore* pWaitSemaphores ) { m_submitInfo.pWaitSemaphores = pWaitSemaphores; return *this; } const PipelineStageFlags* pWaitDstStageMask() const { return reinterpret_cast( m_submitInfo.pWaitDstStageMask ); } SubmitInfo& pWaitDstStageMask( const PipelineStageFlags* pWaitDstStageMask ) { m_submitInfo.pWaitDstStageMask = reinterpret_cast( pWaitDstStageMask ); return *this; } const uint32_t& commandBufferCount() const { return m_submitInfo.commandBufferCount; } SubmitInfo& commandBufferCount( uint32_t commandBufferCount ) { m_submitInfo.commandBufferCount = commandBufferCount; return *this; } const CommandBuffer* pCommandBuffers() const { return reinterpret_cast( m_submitInfo.pCommandBuffers ); } SubmitInfo& pCommandBuffers( const CommandBuffer* pCommandBuffers ) { m_submitInfo.pCommandBuffers = pCommandBuffers; return *this; } const uint32_t& signalSemaphoreCount() const { return m_submitInfo.signalSemaphoreCount; } SubmitInfo& signalSemaphoreCount( uint32_t signalSemaphoreCount ) { m_submitInfo.signalSemaphoreCount = signalSemaphoreCount; return *this; } const Semaphore* pSignalSemaphores() const { return reinterpret_cast( m_submitInfo.pSignalSemaphores ); } SubmitInfo& pSignalSemaphores( const Semaphore* pSignalSemaphores ) { m_submitInfo.pSignalSemaphores = pSignalSemaphores; return *this; } operator const VkSubmitInfo&() const { return m_submitInfo; } private: VkSubmitInfo m_submitInfo; }; enum class CommandPoolCreateFlagBits { eTransient = VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, eResetCommandBuffer = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT }; typedef Flags CommandPoolCreateFlags; inline CommandPoolCreateFlags operator|( CommandPoolCreateFlagBits bit0, CommandPoolCreateFlagBits bit1 ) { return CommandPoolCreateFlags( bit0 ) | bit1; } class CommandPoolCreateInfo { public: CommandPoolCreateInfo() : CommandPoolCreateInfo( CommandPoolCreateFlags(), 0 ) {} CommandPoolCreateInfo( CommandPoolCreateFlags flags, uint32_t queueFamilyIndex) { m_commandPoolCreateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; m_commandPoolCreateInfo.pNext = nullptr; m_commandPoolCreateInfo.flags = static_cast( flags ); m_commandPoolCreateInfo.queueFamilyIndex = queueFamilyIndex; } const StructureType& sType() const { return reinterpret_cast( m_commandPoolCreateInfo.sType ); } CommandPoolCreateInfo& sType( StructureType sType ) { m_commandPoolCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_commandPoolCreateInfo.pNext ); } CommandPoolCreateInfo& pNext( const void* pNext ) { m_commandPoolCreateInfo.pNext = pNext; return *this; } const CommandPoolCreateFlags& flags() const { return reinterpret_cast( m_commandPoolCreateInfo.flags ); } CommandPoolCreateInfo& flags( CommandPoolCreateFlags flags ) { m_commandPoolCreateInfo.flags = static_cast( flags ); return *this; } const uint32_t& queueFamilyIndex() const { return m_commandPoolCreateInfo.queueFamilyIndex; } CommandPoolCreateInfo& queueFamilyIndex( uint32_t queueFamilyIndex ) { m_commandPoolCreateInfo.queueFamilyIndex = queueFamilyIndex; return *this; } operator const VkCommandPoolCreateInfo&() const { return m_commandPoolCreateInfo; } private: VkCommandPoolCreateInfo m_commandPoolCreateInfo; }; enum class CommandPoolResetFlagBits { eReleaseResources = VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT }; typedef Flags CommandPoolResetFlags; inline CommandPoolResetFlags operator|( CommandPoolResetFlagBits bit0, CommandPoolResetFlagBits bit1 ) { return CommandPoolResetFlags( bit0 ) | bit1; } enum class CommandBufferResetFlagBits { eReleaseResources = VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT }; typedef Flags CommandBufferResetFlags; inline CommandBufferResetFlags operator|( CommandBufferResetFlagBits bit0, CommandBufferResetFlagBits bit1 ) { return CommandBufferResetFlags( bit0 ) | bit1; } enum class SampleCountFlagBits { e1 = VK_SAMPLE_COUNT_1_BIT, e2 = VK_SAMPLE_COUNT_2_BIT, e4 = VK_SAMPLE_COUNT_4_BIT, e8 = VK_SAMPLE_COUNT_8_BIT, e16 = VK_SAMPLE_COUNT_16_BIT, e32 = VK_SAMPLE_COUNT_32_BIT, e64 = VK_SAMPLE_COUNT_64_BIT }; typedef Flags SampleCountFlags; inline SampleCountFlags operator|( SampleCountFlagBits bit0, SampleCountFlagBits bit1 ) { return SampleCountFlags( bit0 ) | bit1; } class ImageFormatProperties { public: const Extent3D& maxExtent() const { return reinterpret_cast( m_imageFormatProperties.maxExtent ); } const uint32_t& maxMipLevels() const { return m_imageFormatProperties.maxMipLevels; } const uint32_t& maxArrayLayers() const { return m_imageFormatProperties.maxArrayLayers; } const SampleCountFlags& sampleCounts() const { return reinterpret_cast( m_imageFormatProperties.sampleCounts ); } const DeviceSize& maxResourceSize() const { return m_imageFormatProperties.maxResourceSize; } operator const VkImageFormatProperties&() const { return m_imageFormatProperties; } private: VkImageFormatProperties m_imageFormatProperties; }; class ImageCreateInfo { public: ImageCreateInfo() : ImageCreateInfo( ImageCreateFlags(), ImageType::e1D, Format::eUndefined, Extent3D(), 0, 0, SampleCountFlagBits::e1, ImageTiling::eOptimal, ImageUsageFlags(), SharingMode::eExclusive, 0, nullptr, ImageLayout::eUndefined ) {} ImageCreateInfo( ImageCreateFlags flags, ImageType imageType, Format format, Extent3D extent, uint32_t mipLevels, uint32_t arrayLayers, SampleCountFlagBits samples, ImageTiling tiling, ImageUsageFlags usage, SharingMode sharingMode, uint32_t queueFamilyIndexCount, const uint32_t* pQueueFamilyIndices, ImageLayout initialLayout) { m_imageCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; m_imageCreateInfo.pNext = nullptr; m_imageCreateInfo.flags = static_cast( flags ); m_imageCreateInfo.imageType = static_cast( imageType ); m_imageCreateInfo.format = static_cast( format ); m_imageCreateInfo.extent = static_cast( extent ); m_imageCreateInfo.mipLevels = mipLevels; m_imageCreateInfo.arrayLayers = arrayLayers; m_imageCreateInfo.samples = static_cast( samples ); m_imageCreateInfo.tiling = static_cast( tiling ); m_imageCreateInfo.usage = static_cast( usage ); m_imageCreateInfo.sharingMode = static_cast( sharingMode ); m_imageCreateInfo.queueFamilyIndexCount = queueFamilyIndexCount; m_imageCreateInfo.pQueueFamilyIndices = pQueueFamilyIndices; m_imageCreateInfo.initialLayout = static_cast( initialLayout ); } const StructureType& sType() const { return reinterpret_cast( m_imageCreateInfo.sType ); } ImageCreateInfo& sType( StructureType sType ) { m_imageCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_imageCreateInfo.pNext ); } ImageCreateInfo& pNext( const void* pNext ) { m_imageCreateInfo.pNext = pNext; return *this; } const ImageCreateFlags& flags() const { return reinterpret_cast( m_imageCreateInfo.flags ); } ImageCreateInfo& flags( ImageCreateFlags flags ) { m_imageCreateInfo.flags = static_cast( flags ); return *this; } const ImageType& imageType() const { return reinterpret_cast( m_imageCreateInfo.imageType ); } ImageCreateInfo& imageType( ImageType imageType ) { m_imageCreateInfo.imageType = static_cast( imageType ); return *this; } const Format& format() const { return reinterpret_cast( m_imageCreateInfo.format ); } ImageCreateInfo& format( Format format ) { m_imageCreateInfo.format = static_cast( format ); return *this; } const Extent3D& extent() const { return reinterpret_cast( m_imageCreateInfo.extent ); } ImageCreateInfo& extent( Extent3D extent ) { m_imageCreateInfo.extent = static_cast( extent ); return *this; } const uint32_t& mipLevels() const { return m_imageCreateInfo.mipLevels; } ImageCreateInfo& mipLevels( uint32_t mipLevels ) { m_imageCreateInfo.mipLevels = mipLevels; return *this; } const uint32_t& arrayLayers() const { return m_imageCreateInfo.arrayLayers; } ImageCreateInfo& arrayLayers( uint32_t arrayLayers ) { m_imageCreateInfo.arrayLayers = arrayLayers; return *this; } const SampleCountFlagBits& samples() const { return reinterpret_cast( m_imageCreateInfo.samples ); } ImageCreateInfo& samples( SampleCountFlagBits samples ) { m_imageCreateInfo.samples = static_cast( samples ); return *this; } const ImageTiling& tiling() const { return reinterpret_cast( m_imageCreateInfo.tiling ); } ImageCreateInfo& tiling( ImageTiling tiling ) { m_imageCreateInfo.tiling = static_cast( tiling ); return *this; } const ImageUsageFlags& usage() const { return reinterpret_cast( m_imageCreateInfo.usage ); } ImageCreateInfo& usage( ImageUsageFlags usage ) { m_imageCreateInfo.usage = static_cast( usage ); return *this; } const SharingMode& sharingMode() const { return reinterpret_cast( m_imageCreateInfo.sharingMode ); } ImageCreateInfo& sharingMode( SharingMode sharingMode ) { m_imageCreateInfo.sharingMode = static_cast( sharingMode ); return *this; } const uint32_t& queueFamilyIndexCount() const { return m_imageCreateInfo.queueFamilyIndexCount; } ImageCreateInfo& queueFamilyIndexCount( uint32_t queueFamilyIndexCount ) { m_imageCreateInfo.queueFamilyIndexCount = queueFamilyIndexCount; return *this; } const uint32_t* pQueueFamilyIndices() const { return reinterpret_cast( m_imageCreateInfo.pQueueFamilyIndices ); } ImageCreateInfo& pQueueFamilyIndices( const uint32_t* pQueueFamilyIndices ) { m_imageCreateInfo.pQueueFamilyIndices = pQueueFamilyIndices; return *this; } const ImageLayout& initialLayout() const { return reinterpret_cast( m_imageCreateInfo.initialLayout ); } ImageCreateInfo& initialLayout( ImageLayout initialLayout ) { m_imageCreateInfo.initialLayout = static_cast( initialLayout ); return *this; } operator const VkImageCreateInfo&() const { return m_imageCreateInfo; } private: VkImageCreateInfo m_imageCreateInfo; }; class PipelineMultisampleStateCreateInfo { public: PipelineMultisampleStateCreateInfo() : PipelineMultisampleStateCreateInfo( 0, SampleCountFlagBits::e1, 0, 0, nullptr, 0, 0 ) {} PipelineMultisampleStateCreateInfo( PipelineMultisampleStateCreateFlags flags, SampleCountFlagBits rasterizationSamples, Bool32 sampleShadingEnable, float minSampleShading, const SampleMask* pSampleMask, Bool32 alphaToCoverageEnable, Bool32 alphaToOneEnable) { m_pipelineMultisampleStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; m_pipelineMultisampleStateCreateInfo.pNext = nullptr; m_pipelineMultisampleStateCreateInfo.flags = flags; m_pipelineMultisampleStateCreateInfo.rasterizationSamples = static_cast( rasterizationSamples ); m_pipelineMultisampleStateCreateInfo.sampleShadingEnable = sampleShadingEnable; m_pipelineMultisampleStateCreateInfo.minSampleShading = minSampleShading; m_pipelineMultisampleStateCreateInfo.pSampleMask = pSampleMask; m_pipelineMultisampleStateCreateInfo.alphaToCoverageEnable = alphaToCoverageEnable; m_pipelineMultisampleStateCreateInfo.alphaToOneEnable = alphaToOneEnable; } const StructureType& sType() const { return reinterpret_cast( m_pipelineMultisampleStateCreateInfo.sType ); } PipelineMultisampleStateCreateInfo& sType( StructureType sType ) { m_pipelineMultisampleStateCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_pipelineMultisampleStateCreateInfo.pNext ); } PipelineMultisampleStateCreateInfo& pNext( const void* pNext ) { m_pipelineMultisampleStateCreateInfo.pNext = pNext; return *this; } const PipelineMultisampleStateCreateFlags& flags() const { return m_pipelineMultisampleStateCreateInfo.flags; } PipelineMultisampleStateCreateInfo& flags( PipelineMultisampleStateCreateFlags flags ) { m_pipelineMultisampleStateCreateInfo.flags = flags; return *this; } const SampleCountFlagBits& rasterizationSamples() const { return reinterpret_cast( m_pipelineMultisampleStateCreateInfo.rasterizationSamples ); } PipelineMultisampleStateCreateInfo& rasterizationSamples( SampleCountFlagBits rasterizationSamples ) { m_pipelineMultisampleStateCreateInfo.rasterizationSamples = static_cast( rasterizationSamples ); return *this; } const Bool32& sampleShadingEnable() const { return m_pipelineMultisampleStateCreateInfo.sampleShadingEnable; } PipelineMultisampleStateCreateInfo& sampleShadingEnable( Bool32 sampleShadingEnable ) { m_pipelineMultisampleStateCreateInfo.sampleShadingEnable = sampleShadingEnable; return *this; } const float& minSampleShading() const { return m_pipelineMultisampleStateCreateInfo.minSampleShading; } PipelineMultisampleStateCreateInfo& minSampleShading( float minSampleShading ) { m_pipelineMultisampleStateCreateInfo.minSampleShading = minSampleShading; return *this; } const SampleMask* pSampleMask() const { return reinterpret_cast( m_pipelineMultisampleStateCreateInfo.pSampleMask ); } PipelineMultisampleStateCreateInfo& pSampleMask( const SampleMask* pSampleMask ) { m_pipelineMultisampleStateCreateInfo.pSampleMask = pSampleMask; return *this; } const Bool32& alphaToCoverageEnable() const { return m_pipelineMultisampleStateCreateInfo.alphaToCoverageEnable; } PipelineMultisampleStateCreateInfo& alphaToCoverageEnable( Bool32 alphaToCoverageEnable ) { m_pipelineMultisampleStateCreateInfo.alphaToCoverageEnable = alphaToCoverageEnable; return *this; } const Bool32& alphaToOneEnable() const { return m_pipelineMultisampleStateCreateInfo.alphaToOneEnable; } PipelineMultisampleStateCreateInfo& alphaToOneEnable( Bool32 alphaToOneEnable ) { m_pipelineMultisampleStateCreateInfo.alphaToOneEnable = alphaToOneEnable; return *this; } operator const VkPipelineMultisampleStateCreateInfo&() const { return m_pipelineMultisampleStateCreateInfo; } private: VkPipelineMultisampleStateCreateInfo m_pipelineMultisampleStateCreateInfo; }; class GraphicsPipelineCreateInfo { public: GraphicsPipelineCreateInfo() : GraphicsPipelineCreateInfo( PipelineCreateFlags(), 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, nullptr, 0 ) {} GraphicsPipelineCreateInfo( PipelineCreateFlags flags, uint32_t stageCount, const PipelineShaderStageCreateInfo* pStages, const PipelineVertexInputStateCreateInfo* pVertexInputState, const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState, const PipelineTessellationStateCreateInfo* pTessellationState, const PipelineViewportStateCreateInfo* pViewportState, const PipelineRasterizationStateCreateInfo* pRasterizationState, const PipelineMultisampleStateCreateInfo* pMultisampleState, const PipelineDepthStencilStateCreateInfo* pDepthStencilState, const PipelineColorBlendStateCreateInfo* pColorBlendState, const PipelineDynamicStateCreateInfo* pDynamicState, PipelineLayout layout, RenderPass renderPass, uint32_t subpass, Pipeline basePipelineHandle, int32_t basePipelineIndex) { m_graphicsPipelineCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; m_graphicsPipelineCreateInfo.pNext = nullptr; m_graphicsPipelineCreateInfo.flags = static_cast( flags ); m_graphicsPipelineCreateInfo.stageCount = stageCount; m_graphicsPipelineCreateInfo.pStages = reinterpret_cast( pStages ); m_graphicsPipelineCreateInfo.pVertexInputState = reinterpret_cast( pVertexInputState ); m_graphicsPipelineCreateInfo.pInputAssemblyState = reinterpret_cast( pInputAssemblyState ); m_graphicsPipelineCreateInfo.pTessellationState = reinterpret_cast( pTessellationState ); m_graphicsPipelineCreateInfo.pViewportState = reinterpret_cast( pViewportState ); m_graphicsPipelineCreateInfo.pRasterizationState = reinterpret_cast( pRasterizationState ); m_graphicsPipelineCreateInfo.pMultisampleState = reinterpret_cast( pMultisampleState ); m_graphicsPipelineCreateInfo.pDepthStencilState = reinterpret_cast( pDepthStencilState ); m_graphicsPipelineCreateInfo.pColorBlendState = reinterpret_cast( pColorBlendState ); m_graphicsPipelineCreateInfo.pDynamicState = reinterpret_cast( pDynamicState ); m_graphicsPipelineCreateInfo.layout = layout; m_graphicsPipelineCreateInfo.renderPass = renderPass; m_graphicsPipelineCreateInfo.subpass = subpass; m_graphicsPipelineCreateInfo.basePipelineHandle = basePipelineHandle; m_graphicsPipelineCreateInfo.basePipelineIndex = basePipelineIndex; } const StructureType& sType() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.sType ); } GraphicsPipelineCreateInfo& sType( StructureType sType ) { m_graphicsPipelineCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pNext ); } GraphicsPipelineCreateInfo& pNext( const void* pNext ) { m_graphicsPipelineCreateInfo.pNext = pNext; return *this; } const PipelineCreateFlags& flags() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.flags ); } GraphicsPipelineCreateInfo& flags( PipelineCreateFlags flags ) { m_graphicsPipelineCreateInfo.flags = static_cast( flags ); return *this; } const uint32_t& stageCount() const { return m_graphicsPipelineCreateInfo.stageCount; } GraphicsPipelineCreateInfo& stageCount( uint32_t stageCount ) { m_graphicsPipelineCreateInfo.stageCount = stageCount; return *this; } const PipelineShaderStageCreateInfo* pStages() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pStages ); } GraphicsPipelineCreateInfo& pStages( const PipelineShaderStageCreateInfo* pStages ) { m_graphicsPipelineCreateInfo.pStages = reinterpret_cast( pStages ); return *this; } const PipelineVertexInputStateCreateInfo* pVertexInputState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pVertexInputState ); } GraphicsPipelineCreateInfo& pVertexInputState( const PipelineVertexInputStateCreateInfo* pVertexInputState ) { m_graphicsPipelineCreateInfo.pVertexInputState = reinterpret_cast( pVertexInputState ); return *this; } const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pInputAssemblyState ); } GraphicsPipelineCreateInfo& pInputAssemblyState( const PipelineInputAssemblyStateCreateInfo* pInputAssemblyState ) { m_graphicsPipelineCreateInfo.pInputAssemblyState = reinterpret_cast( pInputAssemblyState ); return *this; } const PipelineTessellationStateCreateInfo* pTessellationState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pTessellationState ); } GraphicsPipelineCreateInfo& pTessellationState( const PipelineTessellationStateCreateInfo* pTessellationState ) { m_graphicsPipelineCreateInfo.pTessellationState = reinterpret_cast( pTessellationState ); return *this; } const PipelineViewportStateCreateInfo* pViewportState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pViewportState ); } GraphicsPipelineCreateInfo& pViewportState( const PipelineViewportStateCreateInfo* pViewportState ) { m_graphicsPipelineCreateInfo.pViewportState = reinterpret_cast( pViewportState ); return *this; } const PipelineRasterizationStateCreateInfo* pRasterizationState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pRasterizationState ); } GraphicsPipelineCreateInfo& pRasterizationState( const PipelineRasterizationStateCreateInfo* pRasterizationState ) { m_graphicsPipelineCreateInfo.pRasterizationState = reinterpret_cast( pRasterizationState ); return *this; } const PipelineMultisampleStateCreateInfo* pMultisampleState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pMultisampleState ); } GraphicsPipelineCreateInfo& pMultisampleState( const PipelineMultisampleStateCreateInfo* pMultisampleState ) { m_graphicsPipelineCreateInfo.pMultisampleState = reinterpret_cast( pMultisampleState ); return *this; } const PipelineDepthStencilStateCreateInfo* pDepthStencilState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pDepthStencilState ); } GraphicsPipelineCreateInfo& pDepthStencilState( const PipelineDepthStencilStateCreateInfo* pDepthStencilState ) { m_graphicsPipelineCreateInfo.pDepthStencilState = reinterpret_cast( pDepthStencilState ); return *this; } const PipelineColorBlendStateCreateInfo* pColorBlendState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pColorBlendState ); } GraphicsPipelineCreateInfo& pColorBlendState( const PipelineColorBlendStateCreateInfo* pColorBlendState ) { m_graphicsPipelineCreateInfo.pColorBlendState = reinterpret_cast( pColorBlendState ); return *this; } const PipelineDynamicStateCreateInfo* pDynamicState() const { return reinterpret_cast( m_graphicsPipelineCreateInfo.pDynamicState ); } GraphicsPipelineCreateInfo& pDynamicState( const PipelineDynamicStateCreateInfo* pDynamicState ) { m_graphicsPipelineCreateInfo.pDynamicState = reinterpret_cast( pDynamicState ); return *this; } const PipelineLayout& layout() const { return m_graphicsPipelineCreateInfo.layout; } GraphicsPipelineCreateInfo& layout( PipelineLayout layout ) { m_graphicsPipelineCreateInfo.layout = layout; return *this; } const RenderPass& renderPass() const { return m_graphicsPipelineCreateInfo.renderPass; } GraphicsPipelineCreateInfo& renderPass( RenderPass renderPass ) { m_graphicsPipelineCreateInfo.renderPass = renderPass; return *this; } const uint32_t& subpass() const { return m_graphicsPipelineCreateInfo.subpass; } GraphicsPipelineCreateInfo& subpass( uint32_t subpass ) { m_graphicsPipelineCreateInfo.subpass = subpass; return *this; } const Pipeline& basePipelineHandle() const { return m_graphicsPipelineCreateInfo.basePipelineHandle; } GraphicsPipelineCreateInfo& basePipelineHandle( Pipeline basePipelineHandle ) { m_graphicsPipelineCreateInfo.basePipelineHandle = basePipelineHandle; return *this; } const int32_t& basePipelineIndex() const { return m_graphicsPipelineCreateInfo.basePipelineIndex; } GraphicsPipelineCreateInfo& basePipelineIndex( int32_t basePipelineIndex ) { m_graphicsPipelineCreateInfo.basePipelineIndex = basePipelineIndex; return *this; } operator const VkGraphicsPipelineCreateInfo&() const { return m_graphicsPipelineCreateInfo; } private: VkGraphicsPipelineCreateInfo m_graphicsPipelineCreateInfo; }; class PhysicalDeviceLimits { public: const uint32_t& maxImageDimension1D() const { return m_physicalDeviceLimits.maxImageDimension1D; } const uint32_t& maxImageDimension2D() const { return m_physicalDeviceLimits.maxImageDimension2D; } const uint32_t& maxImageDimension3D() const { return m_physicalDeviceLimits.maxImageDimension3D; } const uint32_t& maxImageDimensionCube() const { return m_physicalDeviceLimits.maxImageDimensionCube; } const uint32_t& maxImageArrayLayers() const { return m_physicalDeviceLimits.maxImageArrayLayers; } const uint32_t& maxTexelBufferElements() const { return m_physicalDeviceLimits.maxTexelBufferElements; } const uint32_t& maxUniformBufferRange() const { return m_physicalDeviceLimits.maxUniformBufferRange; } const uint32_t& maxStorageBufferRange() const { return m_physicalDeviceLimits.maxStorageBufferRange; } const uint32_t& maxPushConstantsSize() const { return m_physicalDeviceLimits.maxPushConstantsSize; } const uint32_t& maxMemoryAllocationCount() const { return m_physicalDeviceLimits.maxMemoryAllocationCount; } const uint32_t& maxSamplerAllocationCount() const { return m_physicalDeviceLimits.maxSamplerAllocationCount; } const DeviceSize& bufferImageGranularity() const { return m_physicalDeviceLimits.bufferImageGranularity; } const DeviceSize& sparseAddressSpaceSize() const { return m_physicalDeviceLimits.sparseAddressSpaceSize; } const uint32_t& maxBoundDescriptorSets() const { return m_physicalDeviceLimits.maxBoundDescriptorSets; } const uint32_t& maxPerStageDescriptorSamplers() const { return m_physicalDeviceLimits.maxPerStageDescriptorSamplers; } const uint32_t& maxPerStageDescriptorUniformBuffers() const { return m_physicalDeviceLimits.maxPerStageDescriptorUniformBuffers; } const uint32_t& maxPerStageDescriptorStorageBuffers() const { return m_physicalDeviceLimits.maxPerStageDescriptorStorageBuffers; } const uint32_t& maxPerStageDescriptorSampledImages() const { return m_physicalDeviceLimits.maxPerStageDescriptorSampledImages; } const uint32_t& maxPerStageDescriptorStorageImages() const { return m_physicalDeviceLimits.maxPerStageDescriptorStorageImages; } const uint32_t& maxPerStageDescriptorInputAttachments() const { return m_physicalDeviceLimits.maxPerStageDescriptorInputAttachments; } const uint32_t& maxPerStageResources() const { return m_physicalDeviceLimits.maxPerStageResources; } const uint32_t& maxDescriptorSetSamplers() const { return m_physicalDeviceLimits.maxDescriptorSetSamplers; } const uint32_t& maxDescriptorSetUniformBuffers() const { return m_physicalDeviceLimits.maxDescriptorSetUniformBuffers; } const uint32_t& maxDescriptorSetUniformBuffersDynamic() const { return m_physicalDeviceLimits.maxDescriptorSetUniformBuffersDynamic; } const uint32_t& maxDescriptorSetStorageBuffers() const { return m_physicalDeviceLimits.maxDescriptorSetStorageBuffers; } const uint32_t& maxDescriptorSetStorageBuffersDynamic() const { return m_physicalDeviceLimits.maxDescriptorSetStorageBuffersDynamic; } const uint32_t& maxDescriptorSetSampledImages() const { return m_physicalDeviceLimits.maxDescriptorSetSampledImages; } const uint32_t& maxDescriptorSetStorageImages() const { return m_physicalDeviceLimits.maxDescriptorSetStorageImages; } const uint32_t& maxDescriptorSetInputAttachments() const { return m_physicalDeviceLimits.maxDescriptorSetInputAttachments; } const uint32_t& maxVertexInputAttributes() const { return m_physicalDeviceLimits.maxVertexInputAttributes; } const uint32_t& maxVertexInputBindings() const { return m_physicalDeviceLimits.maxVertexInputBindings; } const uint32_t& maxVertexInputAttributeOffset() const { return m_physicalDeviceLimits.maxVertexInputAttributeOffset; } const uint32_t& maxVertexInputBindingStride() const { return m_physicalDeviceLimits.maxVertexInputBindingStride; } const uint32_t& maxVertexOutputComponents() const { return m_physicalDeviceLimits.maxVertexOutputComponents; } const uint32_t& maxTessellationGenerationLevel() const { return m_physicalDeviceLimits.maxTessellationGenerationLevel; } const uint32_t& maxTessellationPatchSize() const { return m_physicalDeviceLimits.maxTessellationPatchSize; } const uint32_t& maxTessellationControlPerVertexInputComponents() const { return m_physicalDeviceLimits.maxTessellationControlPerVertexInputComponents; } const uint32_t& maxTessellationControlPerVertexOutputComponents() const { return m_physicalDeviceLimits.maxTessellationControlPerVertexOutputComponents; } const uint32_t& maxTessellationControlPerPatchOutputComponents() const { return m_physicalDeviceLimits.maxTessellationControlPerPatchOutputComponents; } const uint32_t& maxTessellationControlTotalOutputComponents() const { return m_physicalDeviceLimits.maxTessellationControlTotalOutputComponents; } const uint32_t& maxTessellationEvaluationInputComponents() const { return m_physicalDeviceLimits.maxTessellationEvaluationInputComponents; } const uint32_t& maxTessellationEvaluationOutputComponents() const { return m_physicalDeviceLimits.maxTessellationEvaluationOutputComponents; } const uint32_t& maxGeometryShaderInvocations() const { return m_physicalDeviceLimits.maxGeometryShaderInvocations; } const uint32_t& maxGeometryInputComponents() const { return m_physicalDeviceLimits.maxGeometryInputComponents; } const uint32_t& maxGeometryOutputComponents() const { return m_physicalDeviceLimits.maxGeometryOutputComponents; } const uint32_t& maxGeometryOutputVertices() const { return m_physicalDeviceLimits.maxGeometryOutputVertices; } const uint32_t& maxGeometryTotalOutputComponents() const { return m_physicalDeviceLimits.maxGeometryTotalOutputComponents; } const uint32_t& maxFragmentInputComponents() const { return m_physicalDeviceLimits.maxFragmentInputComponents; } const uint32_t& maxFragmentOutputAttachments() const { return m_physicalDeviceLimits.maxFragmentOutputAttachments; } const uint32_t& maxFragmentDualSrcAttachments() const { return m_physicalDeviceLimits.maxFragmentDualSrcAttachments; } const uint32_t& maxFragmentCombinedOutputResources() const { return m_physicalDeviceLimits.maxFragmentCombinedOutputResources; } const uint32_t& maxComputeSharedMemorySize() const { return m_physicalDeviceLimits.maxComputeSharedMemorySize; } const uint32_t* maxComputeWorkGroupCount() const { return reinterpret_cast( m_physicalDeviceLimits.maxComputeWorkGroupCount ); } const uint32_t& maxComputeWorkGroupInvocations() const { return m_physicalDeviceLimits.maxComputeWorkGroupInvocations; } const uint32_t* maxComputeWorkGroupSize() const { return reinterpret_cast( m_physicalDeviceLimits.maxComputeWorkGroupSize ); } const uint32_t& subPixelPrecisionBits() const { return m_physicalDeviceLimits.subPixelPrecisionBits; } const uint32_t& subTexelPrecisionBits() const { return m_physicalDeviceLimits.subTexelPrecisionBits; } const uint32_t& mipmapPrecisionBits() const { return m_physicalDeviceLimits.mipmapPrecisionBits; } const uint32_t& maxDrawIndexedIndexValue() const { return m_physicalDeviceLimits.maxDrawIndexedIndexValue; } const uint32_t& maxDrawIndirectCount() const { return m_physicalDeviceLimits.maxDrawIndirectCount; } const float& maxSamplerLodBias() const { return m_physicalDeviceLimits.maxSamplerLodBias; } const float& maxSamplerAnisotropy() const { return m_physicalDeviceLimits.maxSamplerAnisotropy; } const uint32_t& maxViewports() const { return m_physicalDeviceLimits.maxViewports; } const uint32_t* maxViewportDimensions() const { return reinterpret_cast( m_physicalDeviceLimits.maxViewportDimensions ); } const float* viewportBoundsRange() const { return reinterpret_cast( m_physicalDeviceLimits.viewportBoundsRange ); } const uint32_t& viewportSubPixelBits() const { return m_physicalDeviceLimits.viewportSubPixelBits; } const size_t& minMemoryMapAlignment() const { return m_physicalDeviceLimits.minMemoryMapAlignment; } const DeviceSize& minTexelBufferOffsetAlignment() const { return m_physicalDeviceLimits.minTexelBufferOffsetAlignment; } const DeviceSize& minUniformBufferOffsetAlignment() const { return m_physicalDeviceLimits.minUniformBufferOffsetAlignment; } const DeviceSize& minStorageBufferOffsetAlignment() const { return m_physicalDeviceLimits.minStorageBufferOffsetAlignment; } const int32_t& minTexelOffset() const { return m_physicalDeviceLimits.minTexelOffset; } const uint32_t& maxTexelOffset() const { return m_physicalDeviceLimits.maxTexelOffset; } const int32_t& minTexelGatherOffset() const { return m_physicalDeviceLimits.minTexelGatherOffset; } const uint32_t& maxTexelGatherOffset() const { return m_physicalDeviceLimits.maxTexelGatherOffset; } const float& minInterpolationOffset() const { return m_physicalDeviceLimits.minInterpolationOffset; } const float& maxInterpolationOffset() const { return m_physicalDeviceLimits.maxInterpolationOffset; } const uint32_t& subPixelInterpolationOffsetBits() const { return m_physicalDeviceLimits.subPixelInterpolationOffsetBits; } const uint32_t& maxFramebufferWidth() const { return m_physicalDeviceLimits.maxFramebufferWidth; } const uint32_t& maxFramebufferHeight() const { return m_physicalDeviceLimits.maxFramebufferHeight; } const uint32_t& maxFramebufferLayers() const { return m_physicalDeviceLimits.maxFramebufferLayers; } const SampleCountFlags& framebufferColorSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.framebufferColorSampleCounts ); } const SampleCountFlags& framebufferDepthSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.framebufferDepthSampleCounts ); } const SampleCountFlags& framebufferStencilSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.framebufferStencilSampleCounts ); } const SampleCountFlags& framebufferNoAttachmentsSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.framebufferNoAttachmentsSampleCounts ); } const uint32_t& maxColorAttachments() const { return m_physicalDeviceLimits.maxColorAttachments; } const SampleCountFlags& sampledImageColorSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.sampledImageColorSampleCounts ); } const SampleCountFlags& sampledImageIntegerSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.sampledImageIntegerSampleCounts ); } const SampleCountFlags& sampledImageDepthSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.sampledImageDepthSampleCounts ); } const SampleCountFlags& sampledImageStencilSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.sampledImageStencilSampleCounts ); } const SampleCountFlags& storageImageSampleCounts() const { return reinterpret_cast( m_physicalDeviceLimits.storageImageSampleCounts ); } const uint32_t& maxSampleMaskWords() const { return m_physicalDeviceLimits.maxSampleMaskWords; } const Bool32& timestampComputeAndGraphics() const { return m_physicalDeviceLimits.timestampComputeAndGraphics; } const float& timestampPeriod() const { return m_physicalDeviceLimits.timestampPeriod; } const uint32_t& maxClipDistances() const { return m_physicalDeviceLimits.maxClipDistances; } const uint32_t& maxCullDistances() const { return m_physicalDeviceLimits.maxCullDistances; } const uint32_t& maxCombinedClipAndCullDistances() const { return m_physicalDeviceLimits.maxCombinedClipAndCullDistances; } const uint32_t& discreteQueuePriorities() const { return m_physicalDeviceLimits.discreteQueuePriorities; } const float* pointSizeRange() const { return reinterpret_cast( m_physicalDeviceLimits.pointSizeRange ); } const float* lineWidthRange() const { return reinterpret_cast( m_physicalDeviceLimits.lineWidthRange ); } const float& pointSizeGranularity() const { return m_physicalDeviceLimits.pointSizeGranularity; } const float& lineWidthGranularity() const { return m_physicalDeviceLimits.lineWidthGranularity; } const Bool32& strictLines() const { return m_physicalDeviceLimits.strictLines; } const Bool32& standardSampleLocations() const { return m_physicalDeviceLimits.standardSampleLocations; } const DeviceSize& optimalBufferCopyOffsetAlignment() const { return m_physicalDeviceLimits.optimalBufferCopyOffsetAlignment; } const DeviceSize& optimalBufferCopyRowPitchAlignment() const { return m_physicalDeviceLimits.optimalBufferCopyRowPitchAlignment; } const DeviceSize& nonCoherentAtomSize() const { return m_physicalDeviceLimits.nonCoherentAtomSize; } operator const VkPhysicalDeviceLimits&() const { return m_physicalDeviceLimits; } private: VkPhysicalDeviceLimits m_physicalDeviceLimits; }; class PhysicalDeviceProperties { public: const uint32_t& apiVersion() const { return m_physicalDeviceProperties.apiVersion; } const uint32_t& driverVersion() const { return m_physicalDeviceProperties.driverVersion; } const uint32_t& vendorID() const { return m_physicalDeviceProperties.vendorID; } const uint32_t& deviceID() const { return m_physicalDeviceProperties.deviceID; } const PhysicalDeviceType& deviceType() const { return reinterpret_cast( m_physicalDeviceProperties.deviceType ); } const char* deviceName() const { return reinterpret_cast( m_physicalDeviceProperties.deviceName ); } const uint8_t* pipelineCacheUUID() const { return reinterpret_cast( m_physicalDeviceProperties.pipelineCacheUUID ); } const PhysicalDeviceLimits& limits() const { return reinterpret_cast( m_physicalDeviceProperties.limits ); } const PhysicalDeviceSparseProperties& sparseProperties() const { return reinterpret_cast( m_physicalDeviceProperties.sparseProperties ); } operator const VkPhysicalDeviceProperties&() const { return m_physicalDeviceProperties; } private: VkPhysicalDeviceProperties m_physicalDeviceProperties; }; enum class AttachmentDescriptionFlagBits { eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT }; typedef Flags AttachmentDescriptionFlags; inline AttachmentDescriptionFlags operator|( AttachmentDescriptionFlagBits bit0, AttachmentDescriptionFlagBits bit1 ) { return AttachmentDescriptionFlags( bit0 ) | bit1; } class AttachmentDescription { public: AttachmentDescription() : AttachmentDescription( AttachmentDescriptionFlags(), Format::eUndefined, SampleCountFlagBits::e1, AttachmentLoadOp::eLoad, AttachmentStoreOp::eStore, AttachmentLoadOp::eLoad, AttachmentStoreOp::eStore, ImageLayout::eUndefined, ImageLayout::eUndefined ) {} AttachmentDescription( AttachmentDescriptionFlags flags, Format format, SampleCountFlagBits samples, AttachmentLoadOp loadOp, AttachmentStoreOp storeOp, AttachmentLoadOp stencilLoadOp, AttachmentStoreOp stencilStoreOp, ImageLayout initialLayout, ImageLayout finalLayout) { m_attachmentDescription.flags = static_cast( flags ); m_attachmentDescription.format = static_cast( format ); m_attachmentDescription.samples = static_cast( samples ); m_attachmentDescription.loadOp = static_cast( loadOp ); m_attachmentDescription.storeOp = static_cast( storeOp ); m_attachmentDescription.stencilLoadOp = static_cast( stencilLoadOp ); m_attachmentDescription.stencilStoreOp = static_cast( stencilStoreOp ); m_attachmentDescription.initialLayout = static_cast( initialLayout ); m_attachmentDescription.finalLayout = static_cast( finalLayout ); } const AttachmentDescriptionFlags& flags() const { return reinterpret_cast( m_attachmentDescription.flags ); } AttachmentDescription& flags( AttachmentDescriptionFlags flags ) { m_attachmentDescription.flags = static_cast( flags ); return *this; } const Format& format() const { return reinterpret_cast( m_attachmentDescription.format ); } AttachmentDescription& format( Format format ) { m_attachmentDescription.format = static_cast( format ); return *this; } const SampleCountFlagBits& samples() const { return reinterpret_cast( m_attachmentDescription.samples ); } AttachmentDescription& samples( SampleCountFlagBits samples ) { m_attachmentDescription.samples = static_cast( samples ); return *this; } const AttachmentLoadOp& loadOp() const { return reinterpret_cast( m_attachmentDescription.loadOp ); } AttachmentDescription& loadOp( AttachmentLoadOp loadOp ) { m_attachmentDescription.loadOp = static_cast( loadOp ); return *this; } const AttachmentStoreOp& storeOp() const { return reinterpret_cast( m_attachmentDescription.storeOp ); } AttachmentDescription& storeOp( AttachmentStoreOp storeOp ) { m_attachmentDescription.storeOp = static_cast( storeOp ); return *this; } const AttachmentLoadOp& stencilLoadOp() const { return reinterpret_cast( m_attachmentDescription.stencilLoadOp ); } AttachmentDescription& stencilLoadOp( AttachmentLoadOp stencilLoadOp ) { m_attachmentDescription.stencilLoadOp = static_cast( stencilLoadOp ); return *this; } const AttachmentStoreOp& stencilStoreOp() const { return reinterpret_cast( m_attachmentDescription.stencilStoreOp ); } AttachmentDescription& stencilStoreOp( AttachmentStoreOp stencilStoreOp ) { m_attachmentDescription.stencilStoreOp = static_cast( stencilStoreOp ); return *this; } const ImageLayout& initialLayout() const { return reinterpret_cast( m_attachmentDescription.initialLayout ); } AttachmentDescription& initialLayout( ImageLayout initialLayout ) { m_attachmentDescription.initialLayout = static_cast( initialLayout ); return *this; } const ImageLayout& finalLayout() const { return reinterpret_cast( m_attachmentDescription.finalLayout ); } AttachmentDescription& finalLayout( ImageLayout finalLayout ) { m_attachmentDescription.finalLayout = static_cast( finalLayout ); return *this; } operator const VkAttachmentDescription&() const { return m_attachmentDescription; } private: VkAttachmentDescription m_attachmentDescription; }; enum class StencilFaceFlagBits { eFront = VK_STENCIL_FACE_FRONT_BIT, eBack = VK_STENCIL_FACE_BACK_BIT, eVkStencilFrontAndBack = VK_STENCIL_FRONT_AND_BACK }; typedef Flags StencilFaceFlags; inline StencilFaceFlags operator|( StencilFaceFlagBits bit0, StencilFaceFlagBits bit1 ) { return StencilFaceFlags( bit0 ) | bit1; } enum class DescriptorPoolCreateFlagBits { eFreeDescriptorSet = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT }; typedef Flags DescriptorPoolCreateFlags; inline DescriptorPoolCreateFlags operator|( DescriptorPoolCreateFlagBits bit0, DescriptorPoolCreateFlagBits bit1 ) { return DescriptorPoolCreateFlags( bit0 ) | bit1; } class DescriptorPoolCreateInfo { public: DescriptorPoolCreateInfo() : DescriptorPoolCreateInfo( DescriptorPoolCreateFlags(), 0, 0, nullptr ) {} DescriptorPoolCreateInfo( DescriptorPoolCreateFlags flags, uint32_t maxSets, uint32_t poolSizeCount, const DescriptorPoolSize* pPoolSizes) { m_descriptorPoolCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; m_descriptorPoolCreateInfo.pNext = nullptr; m_descriptorPoolCreateInfo.flags = static_cast( flags ); m_descriptorPoolCreateInfo.maxSets = maxSets; m_descriptorPoolCreateInfo.poolSizeCount = poolSizeCount; m_descriptorPoolCreateInfo.pPoolSizes = reinterpret_cast( pPoolSizes ); } const StructureType& sType() const { return reinterpret_cast( m_descriptorPoolCreateInfo.sType ); } DescriptorPoolCreateInfo& sType( StructureType sType ) { m_descriptorPoolCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_descriptorPoolCreateInfo.pNext ); } DescriptorPoolCreateInfo& pNext( const void* pNext ) { m_descriptorPoolCreateInfo.pNext = pNext; return *this; } const DescriptorPoolCreateFlags& flags() const { return reinterpret_cast( m_descriptorPoolCreateInfo.flags ); } DescriptorPoolCreateInfo& flags( DescriptorPoolCreateFlags flags ) { m_descriptorPoolCreateInfo.flags = static_cast( flags ); return *this; } const uint32_t& maxSets() const { return m_descriptorPoolCreateInfo.maxSets; } DescriptorPoolCreateInfo& maxSets( uint32_t maxSets ) { m_descriptorPoolCreateInfo.maxSets = maxSets; return *this; } const uint32_t& poolSizeCount() const { return m_descriptorPoolCreateInfo.poolSizeCount; } DescriptorPoolCreateInfo& poolSizeCount( uint32_t poolSizeCount ) { m_descriptorPoolCreateInfo.poolSizeCount = poolSizeCount; return *this; } const DescriptorPoolSize* pPoolSizes() const { return reinterpret_cast( m_descriptorPoolCreateInfo.pPoolSizes ); } DescriptorPoolCreateInfo& pPoolSizes( const DescriptorPoolSize* pPoolSizes ) { m_descriptorPoolCreateInfo.pPoolSizes = reinterpret_cast( pPoolSizes ); return *this; } operator const VkDescriptorPoolCreateInfo&() const { return m_descriptorPoolCreateInfo; } private: VkDescriptorPoolCreateInfo m_descriptorPoolCreateInfo; }; enum class DependencyFlagBits { eByRegion = VK_DEPENDENCY_BY_REGION_BIT }; typedef Flags DependencyFlags; inline DependencyFlags operator|( DependencyFlagBits bit0, DependencyFlagBits bit1 ) { return DependencyFlags( bit0 ) | bit1; } class SubpassDependency { public: SubpassDependency() : SubpassDependency( 0, 0, PipelineStageFlags(), PipelineStageFlags(), AccessFlags(), AccessFlags(), DependencyFlags() ) {} SubpassDependency( uint32_t srcSubpass, uint32_t dstSubpass, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, AccessFlags srcAccessMask, AccessFlags dstAccessMask, DependencyFlags dependencyFlags) { m_subpassDependency.srcSubpass = srcSubpass; m_subpassDependency.dstSubpass = dstSubpass; m_subpassDependency.srcStageMask = static_cast( srcStageMask ); m_subpassDependency.dstStageMask = static_cast( dstStageMask ); m_subpassDependency.srcAccessMask = static_cast( srcAccessMask ); m_subpassDependency.dstAccessMask = static_cast( dstAccessMask ); m_subpassDependency.dependencyFlags = static_cast( dependencyFlags ); } const uint32_t& srcSubpass() const { return m_subpassDependency.srcSubpass; } SubpassDependency& srcSubpass( uint32_t srcSubpass ) { m_subpassDependency.srcSubpass = srcSubpass; return *this; } const uint32_t& dstSubpass() const { return m_subpassDependency.dstSubpass; } SubpassDependency& dstSubpass( uint32_t dstSubpass ) { m_subpassDependency.dstSubpass = dstSubpass; return *this; } const PipelineStageFlags& srcStageMask() const { return reinterpret_cast( m_subpassDependency.srcStageMask ); } SubpassDependency& srcStageMask( PipelineStageFlags srcStageMask ) { m_subpassDependency.srcStageMask = static_cast( srcStageMask ); return *this; } const PipelineStageFlags& dstStageMask() const { return reinterpret_cast( m_subpassDependency.dstStageMask ); } SubpassDependency& dstStageMask( PipelineStageFlags dstStageMask ) { m_subpassDependency.dstStageMask = static_cast( dstStageMask ); return *this; } const AccessFlags& srcAccessMask() const { return reinterpret_cast( m_subpassDependency.srcAccessMask ); } SubpassDependency& srcAccessMask( AccessFlags srcAccessMask ) { m_subpassDependency.srcAccessMask = static_cast( srcAccessMask ); return *this; } const AccessFlags& dstAccessMask() const { return reinterpret_cast( m_subpassDependency.dstAccessMask ); } SubpassDependency& dstAccessMask( AccessFlags dstAccessMask ) { m_subpassDependency.dstAccessMask = static_cast( dstAccessMask ); return *this; } const DependencyFlags& dependencyFlags() const { return reinterpret_cast( m_subpassDependency.dependencyFlags ); } SubpassDependency& dependencyFlags( DependencyFlags dependencyFlags ) { m_subpassDependency.dependencyFlags = static_cast( dependencyFlags ); return *this; } operator const VkSubpassDependency&() const { return m_subpassDependency; } private: VkSubpassDependency m_subpassDependency; }; class RenderPassCreateInfo { public: RenderPassCreateInfo() : RenderPassCreateInfo( 0, 0, nullptr, 0, nullptr, 0, nullptr ) {} RenderPassCreateInfo( RenderPassCreateFlags flags, uint32_t attachmentCount, const AttachmentDescription* pAttachments, uint32_t subpassCount, const SubpassDescription* pSubpasses, uint32_t dependencyCount, const SubpassDependency* pDependencies) { m_renderPassCreateInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; m_renderPassCreateInfo.pNext = nullptr; m_renderPassCreateInfo.flags = flags; m_renderPassCreateInfo.attachmentCount = attachmentCount; m_renderPassCreateInfo.pAttachments = reinterpret_cast( pAttachments ); m_renderPassCreateInfo.subpassCount = subpassCount; m_renderPassCreateInfo.pSubpasses = reinterpret_cast( pSubpasses ); m_renderPassCreateInfo.dependencyCount = dependencyCount; m_renderPassCreateInfo.pDependencies = reinterpret_cast( pDependencies ); } const StructureType& sType() const { return reinterpret_cast( m_renderPassCreateInfo.sType ); } RenderPassCreateInfo& sType( StructureType sType ) { m_renderPassCreateInfo.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_renderPassCreateInfo.pNext ); } RenderPassCreateInfo& pNext( const void* pNext ) { m_renderPassCreateInfo.pNext = pNext; return *this; } const RenderPassCreateFlags& flags() const { return m_renderPassCreateInfo.flags; } RenderPassCreateInfo& flags( RenderPassCreateFlags flags ) { m_renderPassCreateInfo.flags = flags; return *this; } const uint32_t& attachmentCount() const { return m_renderPassCreateInfo.attachmentCount; } RenderPassCreateInfo& attachmentCount( uint32_t attachmentCount ) { m_renderPassCreateInfo.attachmentCount = attachmentCount; return *this; } const AttachmentDescription* pAttachments() const { return reinterpret_cast( m_renderPassCreateInfo.pAttachments ); } RenderPassCreateInfo& pAttachments( const AttachmentDescription* pAttachments ) { m_renderPassCreateInfo.pAttachments = reinterpret_cast( pAttachments ); return *this; } const uint32_t& subpassCount() const { return m_renderPassCreateInfo.subpassCount; } RenderPassCreateInfo& subpassCount( uint32_t subpassCount ) { m_renderPassCreateInfo.subpassCount = subpassCount; return *this; } const SubpassDescription* pSubpasses() const { return reinterpret_cast( m_renderPassCreateInfo.pSubpasses ); } RenderPassCreateInfo& pSubpasses( const SubpassDescription* pSubpasses ) { m_renderPassCreateInfo.pSubpasses = reinterpret_cast( pSubpasses ); return *this; } const uint32_t& dependencyCount() const { return m_renderPassCreateInfo.dependencyCount; } RenderPassCreateInfo& dependencyCount( uint32_t dependencyCount ) { m_renderPassCreateInfo.dependencyCount = dependencyCount; return *this; } const SubpassDependency* pDependencies() const { return reinterpret_cast( m_renderPassCreateInfo.pDependencies ); } RenderPassCreateInfo& pDependencies( const SubpassDependency* pDependencies ) { m_renderPassCreateInfo.pDependencies = reinterpret_cast( pDependencies ); return *this; } operator const VkRenderPassCreateInfo&() const { return m_renderPassCreateInfo; } private: VkRenderPassCreateInfo m_renderPassCreateInfo; }; enum class PresentModeKHR { eVkPresentModeImmediateKhr = VK_PRESENT_MODE_IMMEDIATE_KHR, eVkPresentModeMailboxKhr = VK_PRESENT_MODE_MAILBOX_KHR, eVkPresentModeFifoKhr = VK_PRESENT_MODE_FIFO_KHR, eVkPresentModeFifoRelaxedKhr = VK_PRESENT_MODE_FIFO_RELAXED_KHR }; enum class ColorSpaceKHR { eVkColorspaceSrgbNonlinearKhr = VK_COLORSPACE_SRGB_NONLINEAR_KHR }; class SurfaceFormatKHR { public: SurfaceFormatKHR() : SurfaceFormatKHR( Format::eUndefined, ColorSpaceKHR::eVkColorspaceSrgbNonlinearKhr ) {} SurfaceFormatKHR( Format format, ColorSpaceKHR colorSpace) { m_surfaceFormatKHR.format = static_cast( format ); m_surfaceFormatKHR.colorSpace = static_cast( colorSpace ); } const Format& format() const { return reinterpret_cast( m_surfaceFormatKHR.format ); } SurfaceFormatKHR& format( Format format ) { m_surfaceFormatKHR.format = static_cast( format ); return *this; } const ColorSpaceKHR& colorSpace() const { return reinterpret_cast( m_surfaceFormatKHR.colorSpace ); } SurfaceFormatKHR& colorSpace( ColorSpaceKHR colorSpace ) { m_surfaceFormatKHR.colorSpace = static_cast( colorSpace ); return *this; } operator const VkSurfaceFormatKHR&() const { return m_surfaceFormatKHR; } private: VkSurfaceFormatKHR m_surfaceFormatKHR; }; enum class CompositeAlphaFlagBitsKHR { eOpaque = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, ePreMultiplied = VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR, ePostMultiplied = VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR, eInherit = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR }; typedef Flags CompositeAlphaFlagsKHR; inline CompositeAlphaFlagsKHR operator|( CompositeAlphaFlagBitsKHR bit0, CompositeAlphaFlagBitsKHR bit1 ) { return CompositeAlphaFlagsKHR( bit0 ) | bit1; } enum class SurfaceTransformFlagBitsKHR { eIdentity = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, eRotate90 = VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, eRotate180 = VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, eRotate270 = VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, eHorizontalMirror = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR, eHorizontalMirrorRotate90 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR, eHorizontalMirrorRotate180 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR, eHorizontalMirrorRotate270 = VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR, eInherit = VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR }; typedef Flags SurfaceTransformFlagsKHR; inline SurfaceTransformFlagsKHR operator|( SurfaceTransformFlagBitsKHR bit0, SurfaceTransformFlagBitsKHR bit1 ) { return SurfaceTransformFlagsKHR( bit0 ) | bit1; } class SurfaceCapabilitiesKHR { public: SurfaceCapabilitiesKHR() : SurfaceCapabilitiesKHR( 0, 0, Extent2D(), Extent2D(), Extent2D(), 0, SurfaceTransformFlagsKHR(), SurfaceTransformFlagBitsKHR::eIdentity, CompositeAlphaFlagsKHR(), ImageUsageFlags() ) {} SurfaceCapabilitiesKHR( uint32_t minImageCount, uint32_t maxImageCount, Extent2D currentExtent, Extent2D minImageExtent, Extent2D maxImageExtent, uint32_t maxImageArrayLayers, SurfaceTransformFlagsKHR supportedTransforms, SurfaceTransformFlagBitsKHR currentTransform, CompositeAlphaFlagsKHR supportedCompositeAlpha, ImageUsageFlags supportedUsageFlags) { m_surfaceCapabilitiesKHR.minImageCount = minImageCount; m_surfaceCapabilitiesKHR.maxImageCount = maxImageCount; m_surfaceCapabilitiesKHR.currentExtent = static_cast( currentExtent ); m_surfaceCapabilitiesKHR.minImageExtent = static_cast( minImageExtent ); m_surfaceCapabilitiesKHR.maxImageExtent = static_cast( maxImageExtent ); m_surfaceCapabilitiesKHR.maxImageArrayLayers = maxImageArrayLayers; m_surfaceCapabilitiesKHR.supportedTransforms = static_cast( supportedTransforms ); m_surfaceCapabilitiesKHR.currentTransform = static_cast( currentTransform ); m_surfaceCapabilitiesKHR.supportedCompositeAlpha = static_cast( supportedCompositeAlpha ); m_surfaceCapabilitiesKHR.supportedUsageFlags = static_cast( supportedUsageFlags ); } const uint32_t& minImageCount() const { return m_surfaceCapabilitiesKHR.minImageCount; } SurfaceCapabilitiesKHR& minImageCount( uint32_t minImageCount ) { m_surfaceCapabilitiesKHR.minImageCount = minImageCount; return *this; } const uint32_t& maxImageCount() const { return m_surfaceCapabilitiesKHR.maxImageCount; } SurfaceCapabilitiesKHR& maxImageCount( uint32_t maxImageCount ) { m_surfaceCapabilitiesKHR.maxImageCount = maxImageCount; return *this; } const Extent2D& currentExtent() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.currentExtent ); } SurfaceCapabilitiesKHR& currentExtent( Extent2D currentExtent ) { m_surfaceCapabilitiesKHR.currentExtent = static_cast( currentExtent ); return *this; } const Extent2D& minImageExtent() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.minImageExtent ); } SurfaceCapabilitiesKHR& minImageExtent( Extent2D minImageExtent ) { m_surfaceCapabilitiesKHR.minImageExtent = static_cast( minImageExtent ); return *this; } const Extent2D& maxImageExtent() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.maxImageExtent ); } SurfaceCapabilitiesKHR& maxImageExtent( Extent2D maxImageExtent ) { m_surfaceCapabilitiesKHR.maxImageExtent = static_cast( maxImageExtent ); return *this; } const uint32_t& maxImageArrayLayers() const { return m_surfaceCapabilitiesKHR.maxImageArrayLayers; } SurfaceCapabilitiesKHR& maxImageArrayLayers( uint32_t maxImageArrayLayers ) { m_surfaceCapabilitiesKHR.maxImageArrayLayers = maxImageArrayLayers; return *this; } const SurfaceTransformFlagsKHR& supportedTransforms() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.supportedTransforms ); } SurfaceCapabilitiesKHR& supportedTransforms( SurfaceTransformFlagsKHR supportedTransforms ) { m_surfaceCapabilitiesKHR.supportedTransforms = static_cast( supportedTransforms ); return *this; } const SurfaceTransformFlagBitsKHR& currentTransform() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.currentTransform ); } SurfaceCapabilitiesKHR& currentTransform( SurfaceTransformFlagBitsKHR currentTransform ) { m_surfaceCapabilitiesKHR.currentTransform = static_cast( currentTransform ); return *this; } const CompositeAlphaFlagsKHR& supportedCompositeAlpha() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.supportedCompositeAlpha ); } SurfaceCapabilitiesKHR& supportedCompositeAlpha( CompositeAlphaFlagsKHR supportedCompositeAlpha ) { m_surfaceCapabilitiesKHR.supportedCompositeAlpha = static_cast( supportedCompositeAlpha ); return *this; } const ImageUsageFlags& supportedUsageFlags() const { return reinterpret_cast( m_surfaceCapabilitiesKHR.supportedUsageFlags ); } SurfaceCapabilitiesKHR& supportedUsageFlags( ImageUsageFlags supportedUsageFlags ) { m_surfaceCapabilitiesKHR.supportedUsageFlags = static_cast( supportedUsageFlags ); return *this; } operator const VkSurfaceCapabilitiesKHR&() const { return m_surfaceCapabilitiesKHR; } private: VkSurfaceCapabilitiesKHR m_surfaceCapabilitiesKHR; }; class SwapchainCreateInfoKHR { public: SwapchainCreateInfoKHR() : SwapchainCreateInfoKHR( 0, nullptr, 0, Format::eUndefined, ColorSpaceKHR::eVkColorspaceSrgbNonlinearKhr, Extent2D(), 0, ImageUsageFlags(), SharingMode::eExclusive, 0, nullptr, SurfaceTransformFlagBitsKHR::eIdentity, CompositeAlphaFlagBitsKHR::eOpaque, PresentModeKHR::eVkPresentModeImmediateKhr, 0, nullptr ) {} SwapchainCreateInfoKHR( SwapchainCreateFlagsKHR flags, SurfaceKHR surface, uint32_t minImageCount, Format imageFormat, ColorSpaceKHR imageColorSpace, Extent2D imageExtent, uint32_t imageArrayLayers, ImageUsageFlags imageUsage, SharingMode imageSharingMode, uint32_t queueFamilyIndexCount, const uint32_t* pQueueFamilyIndices, SurfaceTransformFlagBitsKHR preTransform, CompositeAlphaFlagBitsKHR compositeAlpha, PresentModeKHR presentMode, Bool32 clipped, SwapchainKHR oldSwapchain) { m_swapchainCreateInfoKHR.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; m_swapchainCreateInfoKHR.pNext = nullptr; m_swapchainCreateInfoKHR.flags = flags; m_swapchainCreateInfoKHR.surface = surface; m_swapchainCreateInfoKHR.minImageCount = minImageCount; m_swapchainCreateInfoKHR.imageFormat = static_cast( imageFormat ); m_swapchainCreateInfoKHR.imageColorSpace = static_cast( imageColorSpace ); m_swapchainCreateInfoKHR.imageExtent = static_cast( imageExtent ); m_swapchainCreateInfoKHR.imageArrayLayers = imageArrayLayers; m_swapchainCreateInfoKHR.imageUsage = static_cast( imageUsage ); m_swapchainCreateInfoKHR.imageSharingMode = static_cast( imageSharingMode ); m_swapchainCreateInfoKHR.queueFamilyIndexCount = queueFamilyIndexCount; m_swapchainCreateInfoKHR.pQueueFamilyIndices = pQueueFamilyIndices; m_swapchainCreateInfoKHR.preTransform = static_cast( preTransform ); m_swapchainCreateInfoKHR.compositeAlpha = static_cast( compositeAlpha ); m_swapchainCreateInfoKHR.presentMode = static_cast( presentMode ); m_swapchainCreateInfoKHR.clipped = clipped; m_swapchainCreateInfoKHR.oldSwapchain = oldSwapchain; } const StructureType& sType() const { return reinterpret_cast( m_swapchainCreateInfoKHR.sType ); } SwapchainCreateInfoKHR& sType( StructureType sType ) { m_swapchainCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_swapchainCreateInfoKHR.pNext ); } SwapchainCreateInfoKHR& pNext( const void* pNext ) { m_swapchainCreateInfoKHR.pNext = pNext; return *this; } const SwapchainCreateFlagsKHR& flags() const { return m_swapchainCreateInfoKHR.flags; } SwapchainCreateInfoKHR& flags( SwapchainCreateFlagsKHR flags ) { m_swapchainCreateInfoKHR.flags = flags; return *this; } const SurfaceKHR& surface() const { return m_swapchainCreateInfoKHR.surface; } SwapchainCreateInfoKHR& surface( SurfaceKHR surface ) { m_swapchainCreateInfoKHR.surface = surface; return *this; } const uint32_t& minImageCount() const { return m_swapchainCreateInfoKHR.minImageCount; } SwapchainCreateInfoKHR& minImageCount( uint32_t minImageCount ) { m_swapchainCreateInfoKHR.minImageCount = minImageCount; return *this; } const Format& imageFormat() const { return reinterpret_cast( m_swapchainCreateInfoKHR.imageFormat ); } SwapchainCreateInfoKHR& imageFormat( Format imageFormat ) { m_swapchainCreateInfoKHR.imageFormat = static_cast( imageFormat ); return *this; } const ColorSpaceKHR& imageColorSpace() const { return reinterpret_cast( m_swapchainCreateInfoKHR.imageColorSpace ); } SwapchainCreateInfoKHR& imageColorSpace( ColorSpaceKHR imageColorSpace ) { m_swapchainCreateInfoKHR.imageColorSpace = static_cast( imageColorSpace ); return *this; } const Extent2D& imageExtent() const { return reinterpret_cast( m_swapchainCreateInfoKHR.imageExtent ); } SwapchainCreateInfoKHR& imageExtent( Extent2D imageExtent ) { m_swapchainCreateInfoKHR.imageExtent = static_cast( imageExtent ); return *this; } const uint32_t& imageArrayLayers() const { return m_swapchainCreateInfoKHR.imageArrayLayers; } SwapchainCreateInfoKHR& imageArrayLayers( uint32_t imageArrayLayers ) { m_swapchainCreateInfoKHR.imageArrayLayers = imageArrayLayers; return *this; } const ImageUsageFlags& imageUsage() const { return reinterpret_cast( m_swapchainCreateInfoKHR.imageUsage ); } SwapchainCreateInfoKHR& imageUsage( ImageUsageFlags imageUsage ) { m_swapchainCreateInfoKHR.imageUsage = static_cast( imageUsage ); return *this; } const SharingMode& imageSharingMode() const { return reinterpret_cast( m_swapchainCreateInfoKHR.imageSharingMode ); } SwapchainCreateInfoKHR& imageSharingMode( SharingMode imageSharingMode ) { m_swapchainCreateInfoKHR.imageSharingMode = static_cast( imageSharingMode ); return *this; } const uint32_t& queueFamilyIndexCount() const { return m_swapchainCreateInfoKHR.queueFamilyIndexCount; } SwapchainCreateInfoKHR& queueFamilyIndexCount( uint32_t queueFamilyIndexCount ) { m_swapchainCreateInfoKHR.queueFamilyIndexCount = queueFamilyIndexCount; return *this; } const uint32_t* pQueueFamilyIndices() const { return reinterpret_cast( m_swapchainCreateInfoKHR.pQueueFamilyIndices ); } SwapchainCreateInfoKHR& pQueueFamilyIndices( const uint32_t* pQueueFamilyIndices ) { m_swapchainCreateInfoKHR.pQueueFamilyIndices = pQueueFamilyIndices; return *this; } const SurfaceTransformFlagBitsKHR& preTransform() const { return reinterpret_cast( m_swapchainCreateInfoKHR.preTransform ); } SwapchainCreateInfoKHR& preTransform( SurfaceTransformFlagBitsKHR preTransform ) { m_swapchainCreateInfoKHR.preTransform = static_cast( preTransform ); return *this; } const CompositeAlphaFlagBitsKHR& compositeAlpha() const { return reinterpret_cast( m_swapchainCreateInfoKHR.compositeAlpha ); } SwapchainCreateInfoKHR& compositeAlpha( CompositeAlphaFlagBitsKHR compositeAlpha ) { m_swapchainCreateInfoKHR.compositeAlpha = static_cast( compositeAlpha ); return *this; } const PresentModeKHR& presentMode() const { return reinterpret_cast( m_swapchainCreateInfoKHR.presentMode ); } SwapchainCreateInfoKHR& presentMode( PresentModeKHR presentMode ) { m_swapchainCreateInfoKHR.presentMode = static_cast( presentMode ); return *this; } const Bool32& clipped() const { return m_swapchainCreateInfoKHR.clipped; } SwapchainCreateInfoKHR& clipped( Bool32 clipped ) { m_swapchainCreateInfoKHR.clipped = clipped; return *this; } const SwapchainKHR& oldSwapchain() const { return m_swapchainCreateInfoKHR.oldSwapchain; } SwapchainCreateInfoKHR& oldSwapchain( SwapchainKHR oldSwapchain ) { m_swapchainCreateInfoKHR.oldSwapchain = oldSwapchain; return *this; } operator const VkSwapchainCreateInfoKHR&() const { return m_swapchainCreateInfoKHR; } private: VkSwapchainCreateInfoKHR m_swapchainCreateInfoKHR; }; enum class DebugReportFlagBitsEXT { eInformation = VK_DEBUG_REPORT_INFORMATION_BIT_EXT, eWarning = VK_DEBUG_REPORT_WARNING_BIT_EXT, ePerformanceWarning = VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, eError = VK_DEBUG_REPORT_ERROR_BIT_EXT, eDebug = VK_DEBUG_REPORT_DEBUG_BIT_EXT }; typedef Flags DebugReportFlagsEXT; inline DebugReportFlagsEXT operator|( DebugReportFlagBitsEXT bit0, DebugReportFlagBitsEXT bit1 ) { return DebugReportFlagsEXT( bit0 ) | bit1; } class DebugReportCallbackCreateInfoEXT { public: DebugReportCallbackCreateInfoEXT( DebugReportFlagsEXT flags, PFN_vkDebugReportCallbackEXT pfnCallback, void* pUserData) { m_debugReportCallbackCreateInfoEXT.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT; m_debugReportCallbackCreateInfoEXT.pNext = nullptr; m_debugReportCallbackCreateInfoEXT.flags = static_cast( flags ); m_debugReportCallbackCreateInfoEXT.pfnCallback = pfnCallback; m_debugReportCallbackCreateInfoEXT.pUserData = pUserData; } const StructureType& sType() const { return reinterpret_cast( m_debugReportCallbackCreateInfoEXT.sType ); } DebugReportCallbackCreateInfoEXT& sType( StructureType sType ) { m_debugReportCallbackCreateInfoEXT.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_debugReportCallbackCreateInfoEXT.pNext ); } DebugReportCallbackCreateInfoEXT& pNext( const void* pNext ) { m_debugReportCallbackCreateInfoEXT.pNext = pNext; return *this; } const DebugReportFlagsEXT& flags() const { return reinterpret_cast( m_debugReportCallbackCreateInfoEXT.flags ); } DebugReportCallbackCreateInfoEXT& flags( DebugReportFlagsEXT flags ) { m_debugReportCallbackCreateInfoEXT.flags = static_cast( flags ); return *this; } const PFN_vkDebugReportCallbackEXT& pfnCallback() const { return m_debugReportCallbackCreateInfoEXT.pfnCallback; } DebugReportCallbackCreateInfoEXT& pfnCallback( PFN_vkDebugReportCallbackEXT pfnCallback ) { m_debugReportCallbackCreateInfoEXT.pfnCallback = pfnCallback; return *this; } const void* pUserData() const { return reinterpret_cast( m_debugReportCallbackCreateInfoEXT.pUserData ); } DebugReportCallbackCreateInfoEXT& pUserData( void* pUserData ) { m_debugReportCallbackCreateInfoEXT.pUserData = pUserData; return *this; } operator const VkDebugReportCallbackCreateInfoEXT&() const { return m_debugReportCallbackCreateInfoEXT; } private: VkDebugReportCallbackCreateInfoEXT m_debugReportCallbackCreateInfoEXT; }; inline Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ) { return static_cast( vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pInstance ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createInstance( const InstanceCreateInfo& createInfo, const AllocationCallbacks& allocator, Instance& instance ) { return createInstance( &createInfo, &allocator, &instance ); } #endif // VKCPP_ENHANCED_MODE inline void destroyInstance( Instance instance, const AllocationCallbacks* pAllocator ) { vkDestroyInstance( instance, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyInstance( Instance instance, const AllocationCallbacks& allocator ) { destroyInstance( instance, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result enumeratePhysicalDevices( Instance instance, uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) { return static_cast( vkEnumeratePhysicalDevices( instance, pPhysicalDeviceCount, pPhysicalDevices ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result enumeratePhysicalDevices( Instance instance, std::vector & physicalDevices ) { uint32_t pPhysicalDeviceCount = 0; Result result = enumeratePhysicalDevices( instance, &pPhysicalDeviceCount, nullptr ); if ( result == Result::eVkSuccess ) { physicalDevices.resize( pPhysicalDeviceCount ); result = enumeratePhysicalDevices( instance, &pPhysicalDeviceCount, physicalDevices.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline PFN_vkVoidFunction getDeviceProcAddr( Device device, const char* pName ) { return vkGetDeviceProcAddr( device, pName ); } #ifdef VKCPP_ENHANCED_MODE inline PFN_vkVoidFunction getDeviceProcAddr( Device device, std::string const& name ) { return getDeviceProcAddr( device, name.data() ); } #endif // VKCPP_ENHANCED_MODE inline PFN_vkVoidFunction getInstanceProcAddr( Instance instance, const char* pName ) { return vkGetInstanceProcAddr( instance, pName ); } #ifdef VKCPP_ENHANCED_MODE inline PFN_vkVoidFunction getInstanceProcAddr( Instance instance, std::string const& name ) { return getInstanceProcAddr( instance, name.data() ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceProperties( PhysicalDevice physicalDevice, PhysicalDeviceProperties* pProperties ) { vkGetPhysicalDeviceProperties( physicalDevice, reinterpret_cast( pProperties ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getPhysicalDeviceProperties( PhysicalDevice physicalDevice, PhysicalDeviceProperties& properties ) { getPhysicalDeviceProperties( physicalDevice, &properties ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceQueueFamilyProperties( PhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) { vkGetPhysicalDeviceQueueFamilyProperties( physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); } #ifdef VKCPP_ENHANCED_MODE inline std::vector getPhysicalDeviceQueueFamilyProperties( PhysicalDevice physicalDevice ) { uint32_t pQueueFamilyPropertyCount = 0; getPhysicalDeviceQueueFamilyProperties( physicalDevice, &pQueueFamilyPropertyCount, nullptr ); std::vector pQueueFamilyProperties( pQueueFamilyPropertyCount ); getPhysicalDeviceQueueFamilyProperties( physicalDevice, &pQueueFamilyPropertyCount, pQueueFamilyProperties.data() ); return std::move( pQueueFamilyProperties ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceMemoryProperties( PhysicalDevice physicalDevice, PhysicalDeviceMemoryProperties* pMemoryProperties ) { vkGetPhysicalDeviceMemoryProperties( physicalDevice, reinterpret_cast( pMemoryProperties ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getPhysicalDeviceMemoryProperties( PhysicalDevice physicalDevice, PhysicalDeviceMemoryProperties& memoryProperties ) { getPhysicalDeviceMemoryProperties( physicalDevice, &memoryProperties ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceFeatures( PhysicalDevice physicalDevice, PhysicalDeviceFeatures* pFeatures ) { vkGetPhysicalDeviceFeatures( physicalDevice, reinterpret_cast( pFeatures ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getPhysicalDeviceFeatures( PhysicalDevice physicalDevice, PhysicalDeviceFeatures& features ) { getPhysicalDeviceFeatures( physicalDevice, &features ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceFormatProperties( PhysicalDevice physicalDevice, Format format, FormatProperties* pFormatProperties ) { vkGetPhysicalDeviceFormatProperties( physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getPhysicalDeviceFormatProperties( PhysicalDevice physicalDevice, Format format, FormatProperties& formatProperties ) { getPhysicalDeviceFormatProperties( physicalDevice, format, &formatProperties ); } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceImageFormatProperties( PhysicalDevice physicalDevice, Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) { return static_cast( vkGetPhysicalDeviceImageFormatProperties( physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceImageFormatProperties( PhysicalDevice physicalDevice, Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties& imageFormatProperties ) { return getPhysicalDeviceImageFormatProperties( physicalDevice, format, type, tiling, usage, flags, &imageFormatProperties ); } #endif // VKCPP_ENHANCED_MODE inline Result createDevice( PhysicalDevice physicalDevice, const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) { return static_cast( vkCreateDevice( physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pDevice ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDevice( PhysicalDevice physicalDevice, const DeviceCreateInfo& createInfo, const AllocationCallbacks& allocator, Device& device ) { return createDevice( physicalDevice, &createInfo, &allocator, &device ); } #endif // VKCPP_ENHANCED_MODE inline void destroyDevice( Device device, const AllocationCallbacks* pAllocator ) { vkDestroyDevice( device, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyDevice( Device device, const AllocationCallbacks& allocator ) { destroyDevice( device, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) { return static_cast( vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result enumerateInstanceLayerProperties( std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = enumerateInstanceLayerProperties( &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = enumerateInstanceLayerProperties( &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) { return static_cast( vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result enumerateInstanceExtensionProperties( std::string const& layerName, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = enumerateInstanceExtensionProperties( layerName.data(), &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = enumerateInstanceExtensionProperties( layerName.data(), &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result enumerateDeviceLayerProperties( PhysicalDevice physicalDevice, uint32_t* pPropertyCount, LayerProperties* pProperties ) { return static_cast( vkEnumerateDeviceLayerProperties( physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result enumerateDeviceLayerProperties( PhysicalDevice physicalDevice, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = enumerateDeviceLayerProperties( physicalDevice, &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = enumerateDeviceLayerProperties( physicalDevice, &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result enumerateDeviceExtensionProperties( PhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) { return static_cast( vkEnumerateDeviceExtensionProperties( physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result enumerateDeviceExtensionProperties( PhysicalDevice physicalDevice, std::string const& layerName, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = enumerateDeviceExtensionProperties( physicalDevice, layerName.data(), &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = enumerateDeviceExtensionProperties( physicalDevice, layerName.data(), &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline void getDeviceQueue( Device device, uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) { vkGetDeviceQueue( device, queueFamilyIndex, queueIndex, pQueue ); } #ifdef VKCPP_ENHANCED_MODE inline void getDeviceQueue( Device device, uint32_t queueFamilyIndex, uint32_t queueIndex, Queue& queue ) { getDeviceQueue( device, queueFamilyIndex, queueIndex, &queue ); } #endif // VKCPP_ENHANCED_MODE inline Result queueSubmit( Queue queue, uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) { return static_cast( vkQueueSubmit( queue, submitCount, reinterpret_cast( pSubmits ), fence ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result queueSubmit( Queue queue, std::vector const& submits, Fence fence ) { return queueSubmit( queue, static_cast( submits.size() ), submits.data(), fence ); } #endif // VKCPP_ENHANCED_MODE inline Result queueWaitIdle( Queue queue ) { return static_cast( vkQueueWaitIdle( queue ) ); } inline Result deviceWaitIdle( Device device ) { return static_cast( vkDeviceWaitIdle( device ) ); } inline Result allocateMemory( Device device, const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) { return static_cast( vkAllocateMemory( device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), pMemory ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result allocateMemory( Device device, const MemoryAllocateInfo& allocateInfo, const AllocationCallbacks& allocator, DeviceMemory& memory ) { return allocateMemory( device, &allocateInfo, &allocator, &memory ); } #endif // VKCPP_ENHANCED_MODE inline void freeMemory( Device device, DeviceMemory memory, const AllocationCallbacks* pAllocator ) { vkFreeMemory( device, memory, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void freeMemory( Device device, DeviceMemory memory, const AllocationCallbacks& allocator ) { freeMemory( device, memory, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result mapMemory( Device device, DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) { return static_cast( vkMapMemory( device, memory, offset, size, flags, ppData ) ); } inline void unmapMemory( Device device, DeviceMemory memory ) { vkUnmapMemory( device, memory ); } inline Result flushMappedMemoryRanges( Device device, uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) { return static_cast( vkFlushMappedMemoryRanges( device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result flushMappedMemoryRanges( Device device, std::vector const& memoryRanges ) { return flushMappedMemoryRanges( device, static_cast( memoryRanges.size() ), memoryRanges.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result invalidateMappedMemoryRanges( Device device, uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) { return static_cast( vkInvalidateMappedMemoryRanges( device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result invalidateMappedMemoryRanges( Device device, std::vector const& memoryRanges ) { return invalidateMappedMemoryRanges( device, static_cast( memoryRanges.size() ), memoryRanges.data() ); } #endif // VKCPP_ENHANCED_MODE inline void getDeviceMemoryCommitment( Device device, DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) { vkGetDeviceMemoryCommitment( device, memory, pCommittedMemoryInBytes ); } #ifdef VKCPP_ENHANCED_MODE inline void getDeviceMemoryCommitment( Device device, DeviceMemory memory, DeviceSize& committedMemoryInBytes ) { getDeviceMemoryCommitment( device, memory, &committedMemoryInBytes ); } #endif // VKCPP_ENHANCED_MODE inline void getBufferMemoryRequirements( Device device, Buffer buffer, MemoryRequirements* pMemoryRequirements ) { vkGetBufferMemoryRequirements( device, buffer, reinterpret_cast( pMemoryRequirements ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getBufferMemoryRequirements( Device device, Buffer buffer, MemoryRequirements& memoryRequirements ) { getBufferMemoryRequirements( device, buffer, &memoryRequirements ); } #endif // VKCPP_ENHANCED_MODE inline Result bindBufferMemory( Device device, Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) { return static_cast( vkBindBufferMemory( device, buffer, memory, memoryOffset ) ); } inline void getImageMemoryRequirements( Device device, Image image, MemoryRequirements* pMemoryRequirements ) { vkGetImageMemoryRequirements( device, image, reinterpret_cast( pMemoryRequirements ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getImageMemoryRequirements( Device device, Image image, MemoryRequirements& memoryRequirements ) { getImageMemoryRequirements( device, image, &memoryRequirements ); } #endif // VKCPP_ENHANCED_MODE inline Result bindImageMemory( Device device, Image image, DeviceMemory memory, DeviceSize memoryOffset ) { return static_cast( vkBindImageMemory( device, image, memory, memoryOffset ) ); } inline void getImageSparseMemoryRequirements( Device device, Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) { vkGetImageSparseMemoryRequirements( device, image, pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); } #ifdef VKCPP_ENHANCED_MODE inline std::vector getImageSparseMemoryRequirements( Device device, Image image ) { uint32_t pSparseMemoryRequirementCount = 0; getImageSparseMemoryRequirements( device, image, &pSparseMemoryRequirementCount, nullptr ); std::vector pSparseMemoryRequirements( pSparseMemoryRequirementCount ); getImageSparseMemoryRequirements( device, image, &pSparseMemoryRequirementCount, pSparseMemoryRequirements.data() ); return std::move( pSparseMemoryRequirements ); } #endif // VKCPP_ENHANCED_MODE inline void getPhysicalDeviceSparseImageFormatProperties( PhysicalDevice physicalDevice, Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) { vkGetPhysicalDeviceSparseImageFormatProperties( physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); } #ifdef VKCPP_ENHANCED_MODE inline std::vector getPhysicalDeviceSparseImageFormatProperties( PhysicalDevice physicalDevice, Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) { uint32_t pPropertyCount = 0; getPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, &pPropertyCount, nullptr ); std::vector pProperties( pPropertyCount ); getPhysicalDeviceSparseImageFormatProperties( physicalDevice, format, type, samples, usage, tiling, &pPropertyCount, pProperties.data() ); return std::move( pProperties ); } #endif // VKCPP_ENHANCED_MODE inline Result queueBindSparse( Queue queue, uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) { return static_cast( vkQueueBindSparse( queue, bindInfoCount, reinterpret_cast( pBindInfo ), fence ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result queueBindSparse( Queue queue, std::vector const& bindInfo, Fence fence ) { return queueBindSparse( queue, static_cast( bindInfo.size() ), bindInfo.data(), fence ); } #endif // VKCPP_ENHANCED_MODE inline Result createFence( Device device, const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) { return static_cast( vkCreateFence( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pFence ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createFence( Device device, const FenceCreateInfo& createInfo, const AllocationCallbacks& allocator, Fence& fence ) { return createFence( device, &createInfo, &allocator, &fence ); } #endif // VKCPP_ENHANCED_MODE inline void destroyFence( Device device, Fence fence, const AllocationCallbacks* pAllocator ) { vkDestroyFence( device, fence, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyFence( Device device, Fence fence, const AllocationCallbacks& allocator ) { destroyFence( device, fence, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result resetFences( Device device, uint32_t fenceCount, const Fence* pFences ) { return static_cast( vkResetFences( device, fenceCount, pFences ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result resetFences( Device device, std::vector const& fences ) { return resetFences( device, static_cast( fences.size() ), fences.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result getFenceStatus( Device device, Fence fence ) { return static_cast( vkGetFenceStatus( device, fence ) ); } inline Result waitForFences( Device device, uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) { return static_cast( vkWaitForFences( device, fenceCount, pFences, waitAll, timeout ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result waitForFences( Device device, std::vector const& fences, Bool32 waitAll, uint64_t timeout ) { return waitForFences( device, static_cast( fences.size() ), fences.data(), waitAll, timeout ); } #endif // VKCPP_ENHANCED_MODE inline Result createSemaphore( Device device, const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) { return static_cast( vkCreateSemaphore( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSemaphore ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createSemaphore( Device device, const SemaphoreCreateInfo& createInfo, const AllocationCallbacks& allocator, Semaphore& semaphore ) { return createSemaphore( device, &createInfo, &allocator, &semaphore ); } #endif // VKCPP_ENHANCED_MODE inline void destroySemaphore( Device device, Semaphore semaphore, const AllocationCallbacks* pAllocator ) { vkDestroySemaphore( device, semaphore, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroySemaphore( Device device, Semaphore semaphore, const AllocationCallbacks& allocator ) { destroySemaphore( device, semaphore, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createEvent( Device device, const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) { return static_cast( vkCreateEvent( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pEvent ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createEvent( Device device, const EventCreateInfo& createInfo, const AllocationCallbacks& allocator, Event& event ) { return createEvent( device, &createInfo, &allocator, &event ); } #endif // VKCPP_ENHANCED_MODE inline void destroyEvent( Device device, Event event, const AllocationCallbacks* pAllocator ) { vkDestroyEvent( device, event, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyEvent( Device device, Event event, const AllocationCallbacks& allocator ) { destroyEvent( device, event, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result getEventStatus( Device device, Event event ) { return static_cast( vkGetEventStatus( device, event ) ); } inline Result setEvent( Device device, Event event ) { return static_cast( vkSetEvent( device, event ) ); } inline Result resetEvent( Device device, Event event ) { return static_cast( vkResetEvent( device, event ) ); } inline Result createQueryPool( Device device, const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) { return static_cast( vkCreateQueryPool( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pQueryPool ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createQueryPool( Device device, const QueryPoolCreateInfo& createInfo, const AllocationCallbacks& allocator, QueryPool& queryPool ) { return createQueryPool( device, &createInfo, &allocator, &queryPool ); } #endif // VKCPP_ENHANCED_MODE inline void destroyQueryPool( Device device, QueryPool queryPool, const AllocationCallbacks* pAllocator ) { vkDestroyQueryPool( device, queryPool, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyQueryPool( Device device, QueryPool queryPool, const AllocationCallbacks& allocator ) { destroyQueryPool( device, queryPool, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result getQueryPoolResults( Device device, QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) { return static_cast( vkGetQueryPoolResults( device, queryPool, firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getQueryPoolResults( Device device, QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, std::vector & data, DeviceSize stride, QueryResultFlags flags ) { return getQueryPoolResults( device, queryPool, firstQuery, queryCount, static_cast( data.size() ), data.data(), stride, flags ); } #endif // VKCPP_ENHANCED_MODE inline Result createBuffer( Device device, const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) { return static_cast( vkCreateBuffer( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pBuffer ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createBuffer( Device device, const BufferCreateInfo& createInfo, const AllocationCallbacks& allocator, Buffer& buffer ) { return createBuffer( device, &createInfo, &allocator, &buffer ); } #endif // VKCPP_ENHANCED_MODE inline void destroyBuffer( Device device, Buffer buffer, const AllocationCallbacks* pAllocator ) { vkDestroyBuffer( device, buffer, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyBuffer( Device device, Buffer buffer, const AllocationCallbacks& allocator ) { destroyBuffer( device, buffer, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createBufferView( Device device, const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) { return static_cast( vkCreateBufferView( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pView ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createBufferView( Device device, const BufferViewCreateInfo& createInfo, const AllocationCallbacks& allocator, BufferView& view ) { return createBufferView( device, &createInfo, &allocator, &view ); } #endif // VKCPP_ENHANCED_MODE inline void destroyBufferView( Device device, BufferView bufferView, const AllocationCallbacks* pAllocator ) { vkDestroyBufferView( device, bufferView, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyBufferView( Device device, BufferView bufferView, const AllocationCallbacks& allocator ) { destroyBufferView( device, bufferView, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createImage( Device device, const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) { return static_cast( vkCreateImage( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pImage ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createImage( Device device, const ImageCreateInfo& createInfo, const AllocationCallbacks& allocator, Image& image ) { return createImage( device, &createInfo, &allocator, &image ); } #endif // VKCPP_ENHANCED_MODE inline void destroyImage( Device device, Image image, const AllocationCallbacks* pAllocator ) { vkDestroyImage( device, image, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyImage( Device device, Image image, const AllocationCallbacks& allocator ) { destroyImage( device, image, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline void getImageSubresourceLayout( Device device, Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) { vkGetImageSubresourceLayout( device, image, reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getImageSubresourceLayout( Device device, Image image, const ImageSubresource& subresource, SubresourceLayout& layout ) { getImageSubresourceLayout( device, image, &subresource, &layout ); } #endif // VKCPP_ENHANCED_MODE inline Result createImageView( Device device, const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) { return static_cast( vkCreateImageView( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pView ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createImageView( Device device, const ImageViewCreateInfo& createInfo, const AllocationCallbacks& allocator, ImageView& view ) { return createImageView( device, &createInfo, &allocator, &view ); } #endif // VKCPP_ENHANCED_MODE inline void destroyImageView( Device device, ImageView imageView, const AllocationCallbacks* pAllocator ) { vkDestroyImageView( device, imageView, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyImageView( Device device, ImageView imageView, const AllocationCallbacks& allocator ) { destroyImageView( device, imageView, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createShaderModule( Device device, const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) { return static_cast( vkCreateShaderModule( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pShaderModule ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createShaderModule( Device device, const ShaderModuleCreateInfo& createInfo, const AllocationCallbacks& allocator, ShaderModule& shaderModule ) { return createShaderModule( device, &createInfo, &allocator, &shaderModule ); } #endif // VKCPP_ENHANCED_MODE inline void destroyShaderModule( Device device, ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) { vkDestroyShaderModule( device, shaderModule, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyShaderModule( Device device, ShaderModule shaderModule, const AllocationCallbacks& allocator ) { destroyShaderModule( device, shaderModule, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createPipelineCache( Device device, const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) { return static_cast( vkCreatePipelineCache( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pPipelineCache ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createPipelineCache( Device device, const PipelineCacheCreateInfo& createInfo, const AllocationCallbacks& allocator, PipelineCache& pipelineCache ) { return createPipelineCache( device, &createInfo, &allocator, &pipelineCache ); } #endif // VKCPP_ENHANCED_MODE inline void destroyPipelineCache( Device device, PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) { vkDestroyPipelineCache( device, pipelineCache, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyPipelineCache( Device device, PipelineCache pipelineCache, const AllocationCallbacks& allocator ) { destroyPipelineCache( device, pipelineCache, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result getPipelineCacheData( Device device, PipelineCache pipelineCache, size_t* pDataSize, void* pData ) { return static_cast( vkGetPipelineCacheData( device, pipelineCache, pDataSize, pData ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPipelineCacheData( Device device, PipelineCache pipelineCache, std::vector & data ) { size_t pDataSize = 0; Result result = getPipelineCacheData( device, pipelineCache, &pDataSize, nullptr ); if ( result == Result::eVkSuccess ) { data.resize( pDataSize ); result = getPipelineCacheData( device, pipelineCache, &pDataSize, data.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result mergePipelineCaches( Device device, PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) { return static_cast( vkMergePipelineCaches( device, dstCache, srcCacheCount, pSrcCaches ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result mergePipelineCaches( Device device, PipelineCache dstCache, std::vector const& srcCaches ) { return mergePipelineCaches( device, dstCache, static_cast( srcCaches.size() ), srcCaches.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result createGraphicsPipelines( Device device, PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) { return static_cast( vkCreateGraphicsPipelines( device, pipelineCache, createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), pPipelines ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createGraphicsPipelines( Device device, PipelineCache pipelineCache, std::vector const& createInfos, const AllocationCallbacks& allocator, std::vector & pipelines ) { assert( createInfos.size() <= pipelines.size() ); return createGraphicsPipelines( device, pipelineCache, static_cast( createInfos.size() ), createInfos.data(), &allocator, pipelines.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result createComputePipelines( Device device, PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) { return static_cast( vkCreateComputePipelines( device, pipelineCache, createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), pPipelines ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createComputePipelines( Device device, PipelineCache pipelineCache, std::vector const& createInfos, const AllocationCallbacks& allocator, std::vector & pipelines ) { assert( createInfos.size() <= pipelines.size() ); return createComputePipelines( device, pipelineCache, static_cast( createInfos.size() ), createInfos.data(), &allocator, pipelines.data() ); } #endif // VKCPP_ENHANCED_MODE inline void destroyPipeline( Device device, Pipeline pipeline, const AllocationCallbacks* pAllocator ) { vkDestroyPipeline( device, pipeline, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyPipeline( Device device, Pipeline pipeline, const AllocationCallbacks& allocator ) { destroyPipeline( device, pipeline, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createPipelineLayout( Device device, const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) { return static_cast( vkCreatePipelineLayout( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pPipelineLayout ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createPipelineLayout( Device device, const PipelineLayoutCreateInfo& createInfo, const AllocationCallbacks& allocator, PipelineLayout& pipelineLayout ) { return createPipelineLayout( device, &createInfo, &allocator, &pipelineLayout ); } #endif // VKCPP_ENHANCED_MODE inline void destroyPipelineLayout( Device device, PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) { vkDestroyPipelineLayout( device, pipelineLayout, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyPipelineLayout( Device device, PipelineLayout pipelineLayout, const AllocationCallbacks& allocator ) { destroyPipelineLayout( device, pipelineLayout, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createSampler( Device device, const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) { return static_cast( vkCreateSampler( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSampler ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createSampler( Device device, const SamplerCreateInfo& createInfo, const AllocationCallbacks& allocator, Sampler& sampler ) { return createSampler( device, &createInfo, &allocator, &sampler ); } #endif // VKCPP_ENHANCED_MODE inline void destroySampler( Device device, Sampler sampler, const AllocationCallbacks* pAllocator ) { vkDestroySampler( device, sampler, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroySampler( Device device, Sampler sampler, const AllocationCallbacks& allocator ) { destroySampler( device, sampler, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createDescriptorSetLayout( Device device, const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) { return static_cast( vkCreateDescriptorSetLayout( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSetLayout ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDescriptorSetLayout( Device device, const DescriptorSetLayoutCreateInfo& createInfo, const AllocationCallbacks& allocator, DescriptorSetLayout& setLayout ) { return createDescriptorSetLayout( device, &createInfo, &allocator, &setLayout ); } #endif // VKCPP_ENHANCED_MODE inline void destroyDescriptorSetLayout( Device device, DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) { vkDestroyDescriptorSetLayout( device, descriptorSetLayout, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyDescriptorSetLayout( Device device, DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks& allocator ) { destroyDescriptorSetLayout( device, descriptorSetLayout, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createDescriptorPool( Device device, const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) { return static_cast( vkCreateDescriptorPool( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pDescriptorPool ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDescriptorPool( Device device, const DescriptorPoolCreateInfo& createInfo, const AllocationCallbacks& allocator, DescriptorPool& descriptorPool ) { return createDescriptorPool( device, &createInfo, &allocator, &descriptorPool ); } #endif // VKCPP_ENHANCED_MODE inline void destroyDescriptorPool( Device device, DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) { vkDestroyDescriptorPool( device, descriptorPool, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyDescriptorPool( Device device, DescriptorPool descriptorPool, const AllocationCallbacks& allocator ) { destroyDescriptorPool( device, descriptorPool, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result resetDescriptorPool( Device device, DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) { return static_cast( vkResetDescriptorPool( device, descriptorPool, flags ) ); } inline Result allocateDescriptorSets( Device device, const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) { return static_cast( vkAllocateDescriptorSets( device, reinterpret_cast( pAllocateInfo ), pDescriptorSets ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result allocateDescriptorSets( Device device, const DescriptorSetAllocateInfo& allocateInfo, std::vector & descriptorSets ) { return allocateDescriptorSets( device, &allocateInfo, descriptorSets.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result freeDescriptorSets( Device device, DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) { return static_cast( vkFreeDescriptorSets( device, descriptorPool, descriptorSetCount, pDescriptorSets ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result freeDescriptorSets( Device device, DescriptorPool descriptorPool, std::vector const& descriptorSets ) { return freeDescriptorSets( device, descriptorPool, static_cast( descriptorSets.size() ), descriptorSets.data() ); } #endif // VKCPP_ENHANCED_MODE inline void updateDescriptorSets( Device device, uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) { vkUpdateDescriptorSets( device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); } #ifdef VKCPP_ENHANCED_MODE inline void updateDescriptorSets( Device device, std::vector const& descriptorWrites, std::vector const& descriptorCopies ) { updateDescriptorSets( device, static_cast( descriptorWrites.size() ), descriptorWrites.data(), static_cast( descriptorCopies.size() ), descriptorCopies.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result createFramebuffer( Device device, const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) { return static_cast( vkCreateFramebuffer( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pFramebuffer ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createFramebuffer( Device device, const FramebufferCreateInfo& createInfo, const AllocationCallbacks& allocator, Framebuffer& framebuffer ) { return createFramebuffer( device, &createInfo, &allocator, &framebuffer ); } #endif // VKCPP_ENHANCED_MODE inline void destroyFramebuffer( Device device, Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) { vkDestroyFramebuffer( device, framebuffer, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyFramebuffer( Device device, Framebuffer framebuffer, const AllocationCallbacks& allocator ) { destroyFramebuffer( device, framebuffer, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result createRenderPass( Device device, const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) { return static_cast( vkCreateRenderPass( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pRenderPass ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createRenderPass( Device device, const RenderPassCreateInfo& createInfo, const AllocationCallbacks& allocator, RenderPass& renderPass ) { return createRenderPass( device, &createInfo, &allocator, &renderPass ); } #endif // VKCPP_ENHANCED_MODE inline void destroyRenderPass( Device device, RenderPass renderPass, const AllocationCallbacks* pAllocator ) { vkDestroyRenderPass( device, renderPass, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyRenderPass( Device device, RenderPass renderPass, const AllocationCallbacks& allocator ) { destroyRenderPass( device, renderPass, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline void getRenderAreaGranularity( Device device, RenderPass renderPass, Extent2D* pGranularity ) { vkGetRenderAreaGranularity( device, renderPass, reinterpret_cast( pGranularity ) ); } #ifdef VKCPP_ENHANCED_MODE inline void getRenderAreaGranularity( Device device, RenderPass renderPass, Extent2D& granularity ) { getRenderAreaGranularity( device, renderPass, &granularity ); } #endif // VKCPP_ENHANCED_MODE inline Result createCommandPool( Device device, const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) { return static_cast( vkCreateCommandPool( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pCommandPool ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createCommandPool( Device device, const CommandPoolCreateInfo& createInfo, const AllocationCallbacks& allocator, CommandPool& commandPool ) { return createCommandPool( device, &createInfo, &allocator, &commandPool ); } #endif // VKCPP_ENHANCED_MODE inline void destroyCommandPool( Device device, CommandPool commandPool, const AllocationCallbacks* pAllocator ) { vkDestroyCommandPool( device, commandPool, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyCommandPool( Device device, CommandPool commandPool, const AllocationCallbacks& allocator ) { destroyCommandPool( device, commandPool, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result resetCommandPool( Device device, CommandPool commandPool, CommandPoolResetFlags flags ) { return static_cast( vkResetCommandPool( device, commandPool, static_cast( flags ) ) ); } inline Result allocateCommandBuffers( Device device, const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) { return static_cast( vkAllocateCommandBuffers( device, reinterpret_cast( pAllocateInfo ), pCommandBuffers ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result allocateCommandBuffers( Device device, const CommandBufferAllocateInfo& allocateInfo, std::vector & commandBuffers ) { return allocateCommandBuffers( device, &allocateInfo, commandBuffers.data() ); } #endif // VKCPP_ENHANCED_MODE inline void freeCommandBuffers( Device device, CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) { vkFreeCommandBuffers( device, commandPool, commandBufferCount, pCommandBuffers ); } #ifdef VKCPP_ENHANCED_MODE inline void freeCommandBuffers( Device device, CommandPool commandPool, std::vector const& commandBuffers ) { freeCommandBuffers( device, commandPool, static_cast( commandBuffers.size() ), commandBuffers.data() ); } #endif // VKCPP_ENHANCED_MODE inline Result beginCommandBuffer( CommandBuffer commandBuffer, const CommandBufferBeginInfo* pBeginInfo ) { return static_cast( vkBeginCommandBuffer( commandBuffer, reinterpret_cast( pBeginInfo ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result beginCommandBuffer( CommandBuffer commandBuffer, const CommandBufferBeginInfo& beginInfo ) { return beginCommandBuffer( commandBuffer, &beginInfo ); } #endif // VKCPP_ENHANCED_MODE inline Result endCommandBuffer( CommandBuffer commandBuffer ) { return static_cast( vkEndCommandBuffer( commandBuffer ) ); } inline Result resetCommandBuffer( CommandBuffer commandBuffer, CommandBufferResetFlags flags ) { return static_cast( vkResetCommandBuffer( commandBuffer, static_cast( flags ) ) ); } inline void cmdBindPipeline( CommandBuffer commandBuffer, PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) { vkCmdBindPipeline( commandBuffer, static_cast( pipelineBindPoint ), pipeline ); } inline void cmdSetViewport( CommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) { vkCmdSetViewport( commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdSetViewport( CommandBuffer commandBuffer, uint32_t firstViewport, std::vector const& viewports ) { cmdSetViewport( commandBuffer, firstViewport, static_cast( viewports.size() ), viewports.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdSetScissor( CommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) { vkCmdSetScissor( commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdSetScissor( CommandBuffer commandBuffer, uint32_t firstScissor, std::vector const& scissors ) { cmdSetScissor( commandBuffer, firstScissor, static_cast( scissors.size() ), scissors.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdSetLineWidth( CommandBuffer commandBuffer, float lineWidth ) { vkCmdSetLineWidth( commandBuffer, lineWidth ); } inline void cmdSetDepthBias( CommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) { vkCmdSetDepthBias( commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } inline void cmdSetBlendConstants( CommandBuffer commandBuffer, const float blendConstants[4] ) { vkCmdSetBlendConstants( commandBuffer, blendConstants ); } inline void cmdSetDepthBounds( CommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds ) { vkCmdSetDepthBounds( commandBuffer, minDepthBounds, maxDepthBounds ); } inline void cmdSetStencilCompareMask( CommandBuffer commandBuffer, StencilFaceFlags faceMask, uint32_t compareMask ) { vkCmdSetStencilCompareMask( commandBuffer, static_cast( faceMask ), compareMask ); } inline void cmdSetStencilWriteMask( CommandBuffer commandBuffer, StencilFaceFlags faceMask, uint32_t writeMask ) { vkCmdSetStencilWriteMask( commandBuffer, static_cast( faceMask ), writeMask ); } inline void cmdSetStencilReference( CommandBuffer commandBuffer, StencilFaceFlags faceMask, uint32_t reference ) { vkCmdSetStencilReference( commandBuffer, static_cast( faceMask ), reference ); } inline void cmdBindDescriptorSets( CommandBuffer commandBuffer, PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) { vkCmdBindDescriptorSets( commandBuffer, static_cast( pipelineBindPoint ), layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdBindDescriptorSets( CommandBuffer commandBuffer, PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, std::vector const& descriptorSets, std::vector const& dynamicOffsets ) { cmdBindDescriptorSets( commandBuffer, pipelineBindPoint, layout, firstSet, static_cast( descriptorSets.size() ), descriptorSets.data(), static_cast( dynamicOffsets.size() ), dynamicOffsets.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdBindIndexBuffer( CommandBuffer commandBuffer, Buffer buffer, DeviceSize offset, IndexType indexType ) { vkCmdBindIndexBuffer( commandBuffer, buffer, offset, static_cast( indexType ) ); } inline void cmdBindVertexBuffers( CommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) { vkCmdBindVertexBuffers( commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdBindVertexBuffers( CommandBuffer commandBuffer, uint32_t firstBinding, std::vector const& buffers, std::vector const& offsets ) { assert( buffers.size() <= offsets.size() ); cmdBindVertexBuffers( commandBuffer, firstBinding, static_cast( buffers.size() ), buffers.data(), offsets.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdDraw( CommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) { vkCmdDraw( commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); } inline void cmdDrawIndexed( CommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) { vkCmdDrawIndexed( commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } inline void cmdDrawIndirect( CommandBuffer commandBuffer, Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) { vkCmdDrawIndirect( commandBuffer, buffer, offset, drawCount, stride ); } inline void cmdDrawIndexedIndirect( CommandBuffer commandBuffer, Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) { vkCmdDrawIndexedIndirect( commandBuffer, buffer, offset, drawCount, stride ); } inline void cmdDispatch( CommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z ) { vkCmdDispatch( commandBuffer, x, y, z ); } inline void cmdDispatchIndirect( CommandBuffer commandBuffer, Buffer buffer, DeviceSize offset ) { vkCmdDispatchIndirect( commandBuffer, buffer, offset ); } inline void cmdCopyBuffer( CommandBuffer commandBuffer, Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) { vkCmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, regionCount, reinterpret_cast( pRegions ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdCopyBuffer( CommandBuffer commandBuffer, Buffer srcBuffer, Buffer dstBuffer, std::vector const& regions ) { cmdCopyBuffer( commandBuffer, srcBuffer, dstBuffer, static_cast( regions.size() ), regions.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdCopyImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) { vkCmdCopyImage( commandBuffer, srcImage, static_cast( srcImageLayout ), dstImage, static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdCopyImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const& regions ) { cmdCopyImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, static_cast( regions.size() ), regions.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdBlitImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) { vkCmdBlitImage( commandBuffer, srcImage, static_cast( srcImageLayout ), dstImage, static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdBlitImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const& regions, Filter filter ) { cmdBlitImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, static_cast( regions.size() ), regions.data(), filter ); } #endif // VKCPP_ENHANCED_MODE inline void cmdCopyBufferToImage( CommandBuffer commandBuffer, Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) { vkCmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdCopyBufferToImage( CommandBuffer commandBuffer, Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, std::vector const& regions ) { cmdCopyBufferToImage( commandBuffer, srcBuffer, dstImage, dstImageLayout, static_cast( regions.size() ), regions.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdCopyImageToBuffer( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) { vkCmdCopyImageToBuffer( commandBuffer, srcImage, static_cast( srcImageLayout ), dstBuffer, regionCount, reinterpret_cast( pRegions ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdCopyImageToBuffer( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, std::vector const& regions ) { cmdCopyImageToBuffer( commandBuffer, srcImage, srcImageLayout, dstBuffer, static_cast( regions.size() ), regions.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdUpdateBuffer( CommandBuffer commandBuffer, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const uint32_t* pData ) { vkCmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, pData ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdUpdateBuffer( CommandBuffer commandBuffer, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, std::vector const& data ) { cmdUpdateBuffer( commandBuffer, dstBuffer, dstOffset, dataSize, data.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdFillBuffer( CommandBuffer commandBuffer, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) { vkCmdFillBuffer( commandBuffer, dstBuffer, dstOffset, size, data ); } inline void cmdClearColorImage( CommandBuffer commandBuffer, Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) { vkCmdClearColorImage( commandBuffer, image, static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdClearColorImage( CommandBuffer commandBuffer, Image image, ImageLayout imageLayout, const ClearColorValue& color, std::vector const& ranges ) { cmdClearColorImage( commandBuffer, image, imageLayout, &color, static_cast( ranges.size() ), ranges.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdClearDepthStencilImage( CommandBuffer commandBuffer, Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) { vkCmdClearDepthStencilImage( commandBuffer, image, static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdClearDepthStencilImage( CommandBuffer commandBuffer, Image image, ImageLayout imageLayout, const ClearDepthStencilValue& depthStencil, std::vector const& ranges ) { cmdClearDepthStencilImage( commandBuffer, image, imageLayout, &depthStencil, static_cast( ranges.size() ), ranges.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdClearAttachments( CommandBuffer commandBuffer, uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) { vkCmdClearAttachments( commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdClearAttachments( CommandBuffer commandBuffer, std::vector const& attachments, std::vector const& rects ) { cmdClearAttachments( commandBuffer, static_cast( attachments.size() ), attachments.data(), static_cast( rects.size() ), rects.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdResolveImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) { vkCmdResolveImage( commandBuffer, srcImage, static_cast( srcImageLayout ), dstImage, static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdResolveImage( CommandBuffer commandBuffer, Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const& regions ) { cmdResolveImage( commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, static_cast( regions.size() ), regions.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdSetEvent( CommandBuffer commandBuffer, Event event, PipelineStageFlags stageMask ) { vkCmdSetEvent( commandBuffer, event, static_cast( stageMask ) ); } inline void cmdResetEvent( CommandBuffer commandBuffer, Event event, PipelineStageFlags stageMask ) { vkCmdResetEvent( commandBuffer, event, static_cast( stageMask ) ); } inline void cmdWaitEvents( CommandBuffer commandBuffer, 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 ) { vkCmdWaitEvents( commandBuffer, eventCount, pEvents, static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdWaitEvents( CommandBuffer commandBuffer, std::vector const& events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, std::vector const& memoryBarriers, std::vector const& bufferMemoryBarriers, std::vector const& imageMemoryBarriers ) { cmdWaitEvents( commandBuffer, static_cast( events.size() ), events.data(), srcStageMask, dstStageMask, static_cast( memoryBarriers.size() ), memoryBarriers.data(), static_cast( bufferMemoryBarriers.size() ), bufferMemoryBarriers.data(), static_cast( imageMemoryBarriers.size() ), imageMemoryBarriers.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdPipelineBarrier( CommandBuffer commandBuffer, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) { vkCmdPipelineBarrier( commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdPipelineBarrier( CommandBuffer commandBuffer, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, std::vector const& memoryBarriers, std::vector const& bufferMemoryBarriers, std::vector const& imageMemoryBarriers ) { cmdPipelineBarrier( commandBuffer, srcStageMask, dstStageMask, dependencyFlags, static_cast( memoryBarriers.size() ), memoryBarriers.data(), static_cast( bufferMemoryBarriers.size() ), bufferMemoryBarriers.data(), static_cast( imageMemoryBarriers.size() ), imageMemoryBarriers.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdBeginQuery( CommandBuffer commandBuffer, QueryPool queryPool, uint32_t query, QueryControlFlags flags ) { vkCmdBeginQuery( commandBuffer, queryPool, query, static_cast( flags ) ); } inline void cmdEndQuery( CommandBuffer commandBuffer, QueryPool queryPool, uint32_t query ) { vkCmdEndQuery( commandBuffer, queryPool, query ); } inline void cmdResetQueryPool( CommandBuffer commandBuffer, QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) { vkCmdResetQueryPool( commandBuffer, queryPool, firstQuery, queryCount ); } inline void cmdWriteTimestamp( CommandBuffer commandBuffer, PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) { vkCmdWriteTimestamp( commandBuffer, static_cast( pipelineStage ), queryPool, query ); } inline void cmdCopyQueryPoolResults( CommandBuffer commandBuffer, QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) { vkCmdCopyQueryPoolResults( commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, static_cast( flags ) ); } inline void cmdPushConstants( CommandBuffer commandBuffer, PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) { vkCmdPushConstants( commandBuffer, layout, static_cast( stageFlags ), offset, size, pValues ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdPushConstants( CommandBuffer commandBuffer, PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, std::vector const& values ) { cmdPushConstants( commandBuffer, layout, stageFlags, offset, static_cast( values.size() ), values.data() ); } #endif // VKCPP_ENHANCED_MODE inline void cmdBeginRenderPass( CommandBuffer commandBuffer, const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) { vkCmdBeginRenderPass( commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdBeginRenderPass( CommandBuffer commandBuffer, const RenderPassBeginInfo& renderPassBegin, SubpassContents contents ) { cmdBeginRenderPass( commandBuffer, &renderPassBegin, contents ); } #endif // VKCPP_ENHANCED_MODE inline void cmdNextSubpass( CommandBuffer commandBuffer, SubpassContents contents ) { vkCmdNextSubpass( commandBuffer, static_cast( contents ) ); } inline void cmdEndRenderPass( CommandBuffer commandBuffer ) { vkCmdEndRenderPass( commandBuffer ); } inline void cmdExecuteCommands( CommandBuffer commandBuffer, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) { vkCmdExecuteCommands( commandBuffer, commandBufferCount, pCommandBuffers ); } #ifdef VKCPP_ENHANCED_MODE inline void cmdExecuteCommands( CommandBuffer commandBuffer, std::vector const& commandBuffers ) { cmdExecuteCommands( commandBuffer, static_cast( commandBuffers.size() ), commandBuffers.data() ); } #endif // VKCPP_ENHANCED_MODE inline void destroySurfaceKHR( Instance instance, SurfaceKHR surface, const AllocationCallbacks* pAllocator ) { vkDestroySurfaceKHR( instance, surface, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroySurfaceKHR( Instance instance, SurfaceKHR surface, const AllocationCallbacks& allocator ) { destroySurfaceKHR( instance, surface, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) { return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, pSupported ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32& supported ) { return getPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, &supported ); } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceCapabilitiesKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) { return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, reinterpret_cast( pSurfaceCapabilities ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceCapabilitiesKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, SurfaceCapabilitiesKHR& surfaceCapabilities ) { return getPhysicalDeviceSurfaceCapabilitiesKHR( physicalDevice, surface, &surfaceCapabilities ); } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceFormatsKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) { return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfaceFormatsKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, std::vector & surfaceFormats ) { uint32_t pSurfaceFormatCount = 0; Result result = getPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, &pSurfaceFormatCount, nullptr ); if ( result == Result::eVkSuccess ) { surfaceFormats.resize( pSurfaceFormatCount ); result = getPhysicalDeviceSurfaceFormatsKHR( physicalDevice, surface, &pSurfaceFormatCount, surfaceFormats.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfacePresentModesKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) { return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceSurfacePresentModesKHR( PhysicalDevice physicalDevice, SurfaceKHR surface, std::vector & presentModes ) { uint32_t pPresentModeCount = 0; Result result = getPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, &pPresentModeCount, nullptr ); if ( result == Result::eVkSuccess ) { presentModes.resize( pPresentModeCount ); result = getPhysicalDeviceSurfacePresentModesKHR( physicalDevice, surface, &pPresentModeCount, presentModes.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result createSwapchainKHR( Device device, const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) { return static_cast( vkCreateSwapchainKHR( device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSwapchain ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createSwapchainKHR( Device device, const SwapchainCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SwapchainKHR& swapchain ) { return createSwapchainKHR( device, &createInfo, &allocator, &swapchain ); } #endif // VKCPP_ENHANCED_MODE inline void destroySwapchainKHR( Device device, SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) { vkDestroySwapchainKHR( device, swapchain, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroySwapchainKHR( Device device, SwapchainKHR swapchain, const AllocationCallbacks& allocator ) { destroySwapchainKHR( device, swapchain, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline Result getSwapchainImagesKHR( Device device, SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) { return static_cast( vkGetSwapchainImagesKHR( device, swapchain, pSwapchainImageCount, pSwapchainImages ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getSwapchainImagesKHR( Device device, SwapchainKHR swapchain, std::vector & swapchainImages ) { uint32_t pSwapchainImageCount = 0; Result result = getSwapchainImagesKHR( device, swapchain, &pSwapchainImageCount, nullptr ); if ( result == Result::eVkSuccess ) { swapchainImages.resize( pSwapchainImageCount ); result = getSwapchainImagesKHR( device, swapchain, &pSwapchainImageCount, swapchainImages.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result acquireNextImageKHR( Device device, SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) { return static_cast( vkAcquireNextImageKHR( device, swapchain, timeout, semaphore, fence, pImageIndex ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result acquireNextImageKHR( Device device, SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t& imageIndex ) { return acquireNextImageKHR( device, swapchain, timeout, semaphore, fence, &imageIndex ); } #endif // VKCPP_ENHANCED_MODE inline Result queuePresentKHR( Queue queue, const PresentInfoKHR* pPresentInfo ) { return static_cast( vkQueuePresentKHR( queue, reinterpret_cast( pPresentInfo ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result queuePresentKHR( Queue queue, const PresentInfoKHR& presentInfo ) { return queuePresentKHR( queue, &presentInfo ); } #endif // VKCPP_ENHANCED_MODE class DisplayPlanePropertiesKHR { public: DisplayPlanePropertiesKHR() : DisplayPlanePropertiesKHR( nullptr, 0 ) {} DisplayPlanePropertiesKHR( DisplayKHR currentDisplay, uint32_t currentStackIndex) { m_displayPlanePropertiesKHR.currentDisplay = currentDisplay; m_displayPlanePropertiesKHR.currentStackIndex = currentStackIndex; } const DisplayKHR& currentDisplay() const { return m_displayPlanePropertiesKHR.currentDisplay; } DisplayPlanePropertiesKHR& currentDisplay( DisplayKHR currentDisplay ) { m_displayPlanePropertiesKHR.currentDisplay = currentDisplay; return *this; } const uint32_t& currentStackIndex() const { return m_displayPlanePropertiesKHR.currentStackIndex; } DisplayPlanePropertiesKHR& currentStackIndex( uint32_t currentStackIndex ) { m_displayPlanePropertiesKHR.currentStackIndex = currentStackIndex; return *this; } operator const VkDisplayPlanePropertiesKHR&() const { return m_displayPlanePropertiesKHR; } private: VkDisplayPlanePropertiesKHR m_displayPlanePropertiesKHR; }; class DisplayModeParametersKHR { public: DisplayModeParametersKHR() : DisplayModeParametersKHR( Extent2D(), 0 ) {} DisplayModeParametersKHR( Extent2D visibleRegion, uint32_t refreshRate) { m_displayModeParametersKHR.visibleRegion = static_cast( visibleRegion ); m_displayModeParametersKHR.refreshRate = refreshRate; } const Extent2D& visibleRegion() const { return reinterpret_cast( m_displayModeParametersKHR.visibleRegion ); } DisplayModeParametersKHR& visibleRegion( Extent2D visibleRegion ) { m_displayModeParametersKHR.visibleRegion = static_cast( visibleRegion ); return *this; } const uint32_t& refreshRate() const { return m_displayModeParametersKHR.refreshRate; } DisplayModeParametersKHR& refreshRate( uint32_t refreshRate ) { m_displayModeParametersKHR.refreshRate = refreshRate; return *this; } operator const VkDisplayModeParametersKHR&() const { return m_displayModeParametersKHR; } private: VkDisplayModeParametersKHR m_displayModeParametersKHR; }; class DisplayModePropertiesKHR { public: DisplayModePropertiesKHR() : DisplayModePropertiesKHR( nullptr, DisplayModeParametersKHR() ) {} DisplayModePropertiesKHR( DisplayModeKHR displayMode, DisplayModeParametersKHR parameters) { m_displayModePropertiesKHR.displayMode = displayMode; m_displayModePropertiesKHR.parameters = static_cast( parameters ); } const DisplayModeKHR& displayMode() const { return m_displayModePropertiesKHR.displayMode; } DisplayModePropertiesKHR& displayMode( DisplayModeKHR displayMode ) { m_displayModePropertiesKHR.displayMode = displayMode; return *this; } const DisplayModeParametersKHR& parameters() const { return reinterpret_cast( m_displayModePropertiesKHR.parameters ); } DisplayModePropertiesKHR& parameters( DisplayModeParametersKHR parameters ) { m_displayModePropertiesKHR.parameters = static_cast( parameters ); return *this; } operator const VkDisplayModePropertiesKHR&() const { return m_displayModePropertiesKHR; } private: VkDisplayModePropertiesKHR m_displayModePropertiesKHR; }; class DisplayModeCreateInfoKHR { public: DisplayModeCreateInfoKHR() : DisplayModeCreateInfoKHR( 0, DisplayModeParametersKHR() ) {} DisplayModeCreateInfoKHR( DisplayModeCreateFlagsKHR flags, DisplayModeParametersKHR parameters) { m_displayModeCreateInfoKHR.sType = VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR; m_displayModeCreateInfoKHR.pNext = nullptr; m_displayModeCreateInfoKHR.flags = flags; m_displayModeCreateInfoKHR.parameters = static_cast( parameters ); } const StructureType& sType() const { return reinterpret_cast( m_displayModeCreateInfoKHR.sType ); } DisplayModeCreateInfoKHR& sType( StructureType sType ) { m_displayModeCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_displayModeCreateInfoKHR.pNext ); } DisplayModeCreateInfoKHR& pNext( const void* pNext ) { m_displayModeCreateInfoKHR.pNext = pNext; return *this; } const DisplayModeCreateFlagsKHR& flags() const { return m_displayModeCreateInfoKHR.flags; } DisplayModeCreateInfoKHR& flags( DisplayModeCreateFlagsKHR flags ) { m_displayModeCreateInfoKHR.flags = flags; return *this; } const DisplayModeParametersKHR& parameters() const { return reinterpret_cast( m_displayModeCreateInfoKHR.parameters ); } DisplayModeCreateInfoKHR& parameters( DisplayModeParametersKHR parameters ) { m_displayModeCreateInfoKHR.parameters = static_cast( parameters ); return *this; } operator const VkDisplayModeCreateInfoKHR&() const { return m_displayModeCreateInfoKHR; } private: VkDisplayModeCreateInfoKHR m_displayModeCreateInfoKHR; }; enum class DisplayPlaneAlphaFlagBitsKHR { eOpaque = VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR, eGlobal = VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR, ePerPixel = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR, ePerPixelPremultiplied = VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR }; typedef Flags DisplayPlaneAlphaFlagsKHR; inline DisplayPlaneAlphaFlagsKHR operator|( DisplayPlaneAlphaFlagBitsKHR bit0, DisplayPlaneAlphaFlagBitsKHR bit1 ) { return DisplayPlaneAlphaFlagsKHR( bit0 ) | bit1; } class DisplayPlaneCapabilitiesKHR { public: DisplayPlaneCapabilitiesKHR() : DisplayPlaneCapabilitiesKHR( DisplayPlaneAlphaFlagsKHR(), Offset2D(), Offset2D(), Extent2D(), Extent2D(), Offset2D(), Offset2D(), Extent2D(), Extent2D() ) {} DisplayPlaneCapabilitiesKHR( DisplayPlaneAlphaFlagsKHR supportedAlpha, Offset2D minSrcPosition, Offset2D maxSrcPosition, Extent2D minSrcExtent, Extent2D maxSrcExtent, Offset2D minDstPosition, Offset2D maxDstPosition, Extent2D minDstExtent, Extent2D maxDstExtent) { m_displayPlaneCapabilitiesKHR.supportedAlpha = static_cast( supportedAlpha ); m_displayPlaneCapabilitiesKHR.minSrcPosition = static_cast( minSrcPosition ); m_displayPlaneCapabilitiesKHR.maxSrcPosition = static_cast( maxSrcPosition ); m_displayPlaneCapabilitiesKHR.minSrcExtent = static_cast( minSrcExtent ); m_displayPlaneCapabilitiesKHR.maxSrcExtent = static_cast( maxSrcExtent ); m_displayPlaneCapabilitiesKHR.minDstPosition = static_cast( minDstPosition ); m_displayPlaneCapabilitiesKHR.maxDstPosition = static_cast( maxDstPosition ); m_displayPlaneCapabilitiesKHR.minDstExtent = static_cast( minDstExtent ); m_displayPlaneCapabilitiesKHR.maxDstExtent = static_cast( maxDstExtent ); } const DisplayPlaneAlphaFlagsKHR& supportedAlpha() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.supportedAlpha ); } DisplayPlaneCapabilitiesKHR& supportedAlpha( DisplayPlaneAlphaFlagsKHR supportedAlpha ) { m_displayPlaneCapabilitiesKHR.supportedAlpha = static_cast( supportedAlpha ); return *this; } const Offset2D& minSrcPosition() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.minSrcPosition ); } DisplayPlaneCapabilitiesKHR& minSrcPosition( Offset2D minSrcPosition ) { m_displayPlaneCapabilitiesKHR.minSrcPosition = static_cast( minSrcPosition ); return *this; } const Offset2D& maxSrcPosition() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.maxSrcPosition ); } DisplayPlaneCapabilitiesKHR& maxSrcPosition( Offset2D maxSrcPosition ) { m_displayPlaneCapabilitiesKHR.maxSrcPosition = static_cast( maxSrcPosition ); return *this; } const Extent2D& minSrcExtent() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.minSrcExtent ); } DisplayPlaneCapabilitiesKHR& minSrcExtent( Extent2D minSrcExtent ) { m_displayPlaneCapabilitiesKHR.minSrcExtent = static_cast( minSrcExtent ); return *this; } const Extent2D& maxSrcExtent() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.maxSrcExtent ); } DisplayPlaneCapabilitiesKHR& maxSrcExtent( Extent2D maxSrcExtent ) { m_displayPlaneCapabilitiesKHR.maxSrcExtent = static_cast( maxSrcExtent ); return *this; } const Offset2D& minDstPosition() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.minDstPosition ); } DisplayPlaneCapabilitiesKHR& minDstPosition( Offset2D minDstPosition ) { m_displayPlaneCapabilitiesKHR.minDstPosition = static_cast( minDstPosition ); return *this; } const Offset2D& maxDstPosition() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.maxDstPosition ); } DisplayPlaneCapabilitiesKHR& maxDstPosition( Offset2D maxDstPosition ) { m_displayPlaneCapabilitiesKHR.maxDstPosition = static_cast( maxDstPosition ); return *this; } const Extent2D& minDstExtent() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.minDstExtent ); } DisplayPlaneCapabilitiesKHR& minDstExtent( Extent2D minDstExtent ) { m_displayPlaneCapabilitiesKHR.minDstExtent = static_cast( minDstExtent ); return *this; } const Extent2D& maxDstExtent() const { return reinterpret_cast( m_displayPlaneCapabilitiesKHR.maxDstExtent ); } DisplayPlaneCapabilitiesKHR& maxDstExtent( Extent2D maxDstExtent ) { m_displayPlaneCapabilitiesKHR.maxDstExtent = static_cast( maxDstExtent ); return *this; } operator const VkDisplayPlaneCapabilitiesKHR&() const { return m_displayPlaneCapabilitiesKHR; } private: VkDisplayPlaneCapabilitiesKHR m_displayPlaneCapabilitiesKHR; }; class DisplayPropertiesKHR { public: DisplayPropertiesKHR() : DisplayPropertiesKHR( nullptr, nullptr, Extent2D(), Extent2D(), SurfaceTransformFlagsKHR(), 0, 0 ) {} DisplayPropertiesKHR( DisplayKHR display, const char* displayName, Extent2D physicalDimensions, Extent2D physicalResolution, SurfaceTransformFlagsKHR supportedTransforms, Bool32 planeReorderPossible, Bool32 persistentContent) { m_displayPropertiesKHR.display = display; m_displayPropertiesKHR.displayName = displayName; m_displayPropertiesKHR.physicalDimensions = static_cast( physicalDimensions ); m_displayPropertiesKHR.physicalResolution = static_cast( physicalResolution ); m_displayPropertiesKHR.supportedTransforms = static_cast( supportedTransforms ); m_displayPropertiesKHR.planeReorderPossible = planeReorderPossible; m_displayPropertiesKHR.persistentContent = persistentContent; } const DisplayKHR& display() const { return m_displayPropertiesKHR.display; } DisplayPropertiesKHR& display( DisplayKHR display ) { m_displayPropertiesKHR.display = display; return *this; } const char* displayName() const { return reinterpret_cast( m_displayPropertiesKHR.displayName ); } DisplayPropertiesKHR& displayName( const char* displayName ) { m_displayPropertiesKHR.displayName = displayName; return *this; } const Extent2D& physicalDimensions() const { return reinterpret_cast( m_displayPropertiesKHR.physicalDimensions ); } DisplayPropertiesKHR& physicalDimensions( Extent2D physicalDimensions ) { m_displayPropertiesKHR.physicalDimensions = static_cast( physicalDimensions ); return *this; } const Extent2D& physicalResolution() const { return reinterpret_cast( m_displayPropertiesKHR.physicalResolution ); } DisplayPropertiesKHR& physicalResolution( Extent2D physicalResolution ) { m_displayPropertiesKHR.physicalResolution = static_cast( physicalResolution ); return *this; } const SurfaceTransformFlagsKHR& supportedTransforms() const { return reinterpret_cast( m_displayPropertiesKHR.supportedTransforms ); } DisplayPropertiesKHR& supportedTransforms( SurfaceTransformFlagsKHR supportedTransforms ) { m_displayPropertiesKHR.supportedTransforms = static_cast( supportedTransforms ); return *this; } const Bool32& planeReorderPossible() const { return m_displayPropertiesKHR.planeReorderPossible; } DisplayPropertiesKHR& planeReorderPossible( Bool32 planeReorderPossible ) { m_displayPropertiesKHR.planeReorderPossible = planeReorderPossible; return *this; } const Bool32& persistentContent() const { return m_displayPropertiesKHR.persistentContent; } DisplayPropertiesKHR& persistentContent( Bool32 persistentContent ) { m_displayPropertiesKHR.persistentContent = persistentContent; return *this; } operator const VkDisplayPropertiesKHR&() const { return m_displayPropertiesKHR; } private: VkDisplayPropertiesKHR m_displayPropertiesKHR; }; class DisplaySurfaceCreateInfoKHR { public: DisplaySurfaceCreateInfoKHR() : DisplaySurfaceCreateInfoKHR( 0, nullptr, 0, 0, SurfaceTransformFlagBitsKHR::eIdentity, 0, DisplayPlaneAlphaFlagBitsKHR::eOpaque, Extent2D() ) {} DisplaySurfaceCreateInfoKHR( DisplaySurfaceCreateFlagsKHR flags, DisplayModeKHR displayMode, uint32_t planeIndex, uint32_t planeStackIndex, SurfaceTransformFlagBitsKHR transform, float globalAlpha, DisplayPlaneAlphaFlagBitsKHR alphaMode, Extent2D imageExtent) { m_displaySurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR; m_displaySurfaceCreateInfoKHR.pNext = nullptr; m_displaySurfaceCreateInfoKHR.flags = flags; m_displaySurfaceCreateInfoKHR.displayMode = displayMode; m_displaySurfaceCreateInfoKHR.planeIndex = planeIndex; m_displaySurfaceCreateInfoKHR.planeStackIndex = planeStackIndex; m_displaySurfaceCreateInfoKHR.transform = static_cast( transform ); m_displaySurfaceCreateInfoKHR.globalAlpha = globalAlpha; m_displaySurfaceCreateInfoKHR.alphaMode = static_cast( alphaMode ); m_displaySurfaceCreateInfoKHR.imageExtent = static_cast( imageExtent ); } const StructureType& sType() const { return reinterpret_cast( m_displaySurfaceCreateInfoKHR.sType ); } DisplaySurfaceCreateInfoKHR& sType( StructureType sType ) { m_displaySurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_displaySurfaceCreateInfoKHR.pNext ); } DisplaySurfaceCreateInfoKHR& pNext( const void* pNext ) { m_displaySurfaceCreateInfoKHR.pNext = pNext; return *this; } const DisplaySurfaceCreateFlagsKHR& flags() const { return m_displaySurfaceCreateInfoKHR.flags; } DisplaySurfaceCreateInfoKHR& flags( DisplaySurfaceCreateFlagsKHR flags ) { m_displaySurfaceCreateInfoKHR.flags = flags; return *this; } const DisplayModeKHR& displayMode() const { return m_displaySurfaceCreateInfoKHR.displayMode; } DisplaySurfaceCreateInfoKHR& displayMode( DisplayModeKHR displayMode ) { m_displaySurfaceCreateInfoKHR.displayMode = displayMode; return *this; } const uint32_t& planeIndex() const { return m_displaySurfaceCreateInfoKHR.planeIndex; } DisplaySurfaceCreateInfoKHR& planeIndex( uint32_t planeIndex ) { m_displaySurfaceCreateInfoKHR.planeIndex = planeIndex; return *this; } const uint32_t& planeStackIndex() const { return m_displaySurfaceCreateInfoKHR.planeStackIndex; } DisplaySurfaceCreateInfoKHR& planeStackIndex( uint32_t planeStackIndex ) { m_displaySurfaceCreateInfoKHR.planeStackIndex = planeStackIndex; return *this; } const SurfaceTransformFlagBitsKHR& transform() const { return reinterpret_cast( m_displaySurfaceCreateInfoKHR.transform ); } DisplaySurfaceCreateInfoKHR& transform( SurfaceTransformFlagBitsKHR transform ) { m_displaySurfaceCreateInfoKHR.transform = static_cast( transform ); return *this; } const float& globalAlpha() const { return m_displaySurfaceCreateInfoKHR.globalAlpha; } DisplaySurfaceCreateInfoKHR& globalAlpha( float globalAlpha ) { m_displaySurfaceCreateInfoKHR.globalAlpha = globalAlpha; return *this; } const DisplayPlaneAlphaFlagBitsKHR& alphaMode() const { return reinterpret_cast( m_displaySurfaceCreateInfoKHR.alphaMode ); } DisplaySurfaceCreateInfoKHR& alphaMode( DisplayPlaneAlphaFlagBitsKHR alphaMode ) { m_displaySurfaceCreateInfoKHR.alphaMode = static_cast( alphaMode ); return *this; } const Extent2D& imageExtent() const { return reinterpret_cast( m_displaySurfaceCreateInfoKHR.imageExtent ); } DisplaySurfaceCreateInfoKHR& imageExtent( Extent2D imageExtent ) { m_displaySurfaceCreateInfoKHR.imageExtent = static_cast( imageExtent ); return *this; } operator const VkDisplaySurfaceCreateInfoKHR&() const { return m_displaySurfaceCreateInfoKHR; } private: VkDisplaySurfaceCreateInfoKHR m_displaySurfaceCreateInfoKHR; }; inline Result getPhysicalDeviceDisplayPropertiesKHR( PhysicalDevice physicalDevice, uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) { return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceDisplayPropertiesKHR( PhysicalDevice physicalDevice, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = getPhysicalDeviceDisplayPropertiesKHR( physicalDevice, &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = getPhysicalDeviceDisplayPropertiesKHR( physicalDevice, &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceDisplayPlanePropertiesKHR( PhysicalDevice physicalDevice, uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) { return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getPhysicalDeviceDisplayPlanePropertiesKHR( PhysicalDevice physicalDevice, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = getPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = getPhysicalDeviceDisplayPlanePropertiesKHR( physicalDevice, &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result getDisplayPlaneSupportedDisplaysKHR( PhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) { return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, pDisplayCount, pDisplays ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getDisplayPlaneSupportedDisplaysKHR( PhysicalDevice physicalDevice, uint32_t planeIndex, std::vector & displays ) { uint32_t pDisplayCount = 0; Result result = getDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, &pDisplayCount, nullptr ); if ( result == Result::eVkSuccess ) { displays.resize( pDisplayCount ); result = getDisplayPlaneSupportedDisplaysKHR( physicalDevice, planeIndex, &pDisplayCount, displays.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result getDisplayModePropertiesKHR( PhysicalDevice physicalDevice, DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) { return static_cast( vkGetDisplayModePropertiesKHR( physicalDevice, display, pPropertyCount, reinterpret_cast( pProperties ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getDisplayModePropertiesKHR( PhysicalDevice physicalDevice, DisplayKHR display, std::vector & properties ) { uint32_t pPropertyCount = 0; Result result = getDisplayModePropertiesKHR( physicalDevice, display, &pPropertyCount, nullptr ); if ( result == Result::eVkSuccess ) { properties.resize( pPropertyCount ); result = getDisplayModePropertiesKHR( physicalDevice, display, &pPropertyCount, properties.data() ); } return result; } #endif // VKCPP_ENHANCED_MODE inline Result createDisplayModeKHR( PhysicalDevice physicalDevice, DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) { return static_cast( vkCreateDisplayModeKHR( physicalDevice, display, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pMode ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDisplayModeKHR( PhysicalDevice physicalDevice, DisplayKHR display, const DisplayModeCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, DisplayModeKHR& mode ) { return createDisplayModeKHR( physicalDevice, display, &createInfo, &allocator, &mode ); } #endif // VKCPP_ENHANCED_MODE inline Result getDisplayPlaneCapabilitiesKHR( PhysicalDevice physicalDevice, DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) { return static_cast( vkGetDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, reinterpret_cast( pCapabilities ) ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result getDisplayPlaneCapabilitiesKHR( PhysicalDevice physicalDevice, DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR& capabilities ) { return getDisplayPlaneCapabilitiesKHR( physicalDevice, mode, planeIndex, &capabilities ); } #endif // VKCPP_ENHANCED_MODE inline Result createDisplayPlaneSurfaceKHR( Instance instance, const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateDisplayPlaneSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDisplayPlaneSurfaceKHR( Instance instance, const DisplaySurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createDisplayPlaneSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE class DisplayPresentInfoKHR { public: DisplayPresentInfoKHR() : DisplayPresentInfoKHR( Rect2D(), Rect2D(), 0 ) {} DisplayPresentInfoKHR( Rect2D srcRect, Rect2D dstRect, Bool32 persistent) { m_displayPresentInfoKHR.sType = VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR; m_displayPresentInfoKHR.pNext = nullptr; m_displayPresentInfoKHR.srcRect = static_cast( srcRect ); m_displayPresentInfoKHR.dstRect = static_cast( dstRect ); m_displayPresentInfoKHR.persistent = persistent; } const StructureType& sType() const { return reinterpret_cast( m_displayPresentInfoKHR.sType ); } DisplayPresentInfoKHR& sType( StructureType sType ) { m_displayPresentInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_displayPresentInfoKHR.pNext ); } DisplayPresentInfoKHR& pNext( const void* pNext ) { m_displayPresentInfoKHR.pNext = pNext; return *this; } const Rect2D& srcRect() const { return reinterpret_cast( m_displayPresentInfoKHR.srcRect ); } DisplayPresentInfoKHR& srcRect( Rect2D srcRect ) { m_displayPresentInfoKHR.srcRect = static_cast( srcRect ); return *this; } const Rect2D& dstRect() const { return reinterpret_cast( m_displayPresentInfoKHR.dstRect ); } DisplayPresentInfoKHR& dstRect( Rect2D dstRect ) { m_displayPresentInfoKHR.dstRect = static_cast( dstRect ); return *this; } const Bool32& persistent() const { return m_displayPresentInfoKHR.persistent; } DisplayPresentInfoKHR& persistent( Bool32 persistent ) { m_displayPresentInfoKHR.persistent = persistent; return *this; } operator const VkDisplayPresentInfoKHR&() const { return m_displayPresentInfoKHR; } private: VkDisplayPresentInfoKHR m_displayPresentInfoKHR; }; inline Result createSharedSwapchainsKHR( Device device, uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) { return static_cast( vkCreateSharedSwapchainsKHR( device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), pSwapchains ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createSharedSwapchainsKHR( Device device, std::vector const& createInfos, const AllocationCallbacks& allocator, std::vector & swapchains ) { assert( createInfos.size() <= swapchains.size() ); return createSharedSwapchainsKHR( device, static_cast( createInfos.size() ), createInfos.data(), &allocator, swapchains.data() ); } #endif // VKCPP_ENHANCED_MODE #ifdef VK_USE_PLATFORM_XLIB_KHR typedef VkFlags XlibSurfaceCreateFlagsKHR; class XlibSurfaceCreateInfoKHR { public: XlibSurfaceCreateInfoKHR() : XlibSurfaceCreateInfoKHR( 0, nullptr, 0 ) {} XlibSurfaceCreateInfoKHR( XlibSurfaceCreateFlagsKHR flags, Display* dpy, Window window) { m_xlibSurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR; m_xlibSurfaceCreateInfoKHR.pNext = nullptr; m_xlibSurfaceCreateInfoKHR.flags = flags; m_xlibSurfaceCreateInfoKHR.dpy = dpy; m_xlibSurfaceCreateInfoKHR.window = window; } const StructureType& sType() const { return reinterpret_cast( m_xlibSurfaceCreateInfoKHR.sType ); } XlibSurfaceCreateInfoKHR& sType( StructureType sType ) { m_xlibSurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_xlibSurfaceCreateInfoKHR.pNext ); } XlibSurfaceCreateInfoKHR& pNext( const void* pNext ) { m_xlibSurfaceCreateInfoKHR.pNext = pNext; return *this; } const XlibSurfaceCreateFlagsKHR& flags() const { return m_xlibSurfaceCreateInfoKHR.flags; } XlibSurfaceCreateInfoKHR& flags( XlibSurfaceCreateFlagsKHR flags ) { m_xlibSurfaceCreateInfoKHR.flags = flags; return *this; } const Display* dpy() const { return reinterpret_cast( m_xlibSurfaceCreateInfoKHR.dpy ); } XlibSurfaceCreateInfoKHR& dpy( Display* dpy ) { m_xlibSurfaceCreateInfoKHR.dpy = dpy; return *this; } const Window& window() const { return m_xlibSurfaceCreateInfoKHR.window; } XlibSurfaceCreateInfoKHR& window( Window window ) { m_xlibSurfaceCreateInfoKHR.window = window; return *this; } operator const VkXlibSurfaceCreateInfoKHR&() const { return m_xlibSurfaceCreateInfoKHR; } private: VkXlibSurfaceCreateInfoKHR m_xlibSurfaceCreateInfoKHR; }; inline Result createXlibSurfaceKHR( Instance instance, const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateXlibSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createXlibSurfaceKHR( Instance instance, const XlibSurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createXlibSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceXlibPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) { return vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID ); } #ifdef VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceXlibPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) { return getPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex, dpy, visualID ); } #endif // VKCPP_ENHANCED_MODE #endif /* VK_USE_PLATFORM_XLIB_KHR */ #ifdef VK_USE_PLATFORM_XCB_KHR typedef VkFlags XcbSurfaceCreateFlagsKHR; class XcbSurfaceCreateInfoKHR { public: XcbSurfaceCreateInfoKHR() : XcbSurfaceCreateInfoKHR( 0, nullptr, 0 ) {} XcbSurfaceCreateInfoKHR( XcbSurfaceCreateFlagsKHR flags, xcb_connection_t* connection, xcb_window_t window) { m_xcbSurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; m_xcbSurfaceCreateInfoKHR.pNext = nullptr; m_xcbSurfaceCreateInfoKHR.flags = flags; m_xcbSurfaceCreateInfoKHR.connection = connection; m_xcbSurfaceCreateInfoKHR.window = window; } const StructureType& sType() const { return reinterpret_cast( m_xcbSurfaceCreateInfoKHR.sType ); } XcbSurfaceCreateInfoKHR& sType( StructureType sType ) { m_xcbSurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_xcbSurfaceCreateInfoKHR.pNext ); } XcbSurfaceCreateInfoKHR& pNext( const void* pNext ) { m_xcbSurfaceCreateInfoKHR.pNext = pNext; return *this; } const XcbSurfaceCreateFlagsKHR& flags() const { return m_xcbSurfaceCreateInfoKHR.flags; } XcbSurfaceCreateInfoKHR& flags( XcbSurfaceCreateFlagsKHR flags ) { m_xcbSurfaceCreateInfoKHR.flags = flags; return *this; } const xcb_connection_t* connection() const { return reinterpret_cast( m_xcbSurfaceCreateInfoKHR.connection ); } XcbSurfaceCreateInfoKHR& connection( xcb_connection_t* connection ) { m_xcbSurfaceCreateInfoKHR.connection = connection; return *this; } const xcb_window_t& window() const { return m_xcbSurfaceCreateInfoKHR.window; } XcbSurfaceCreateInfoKHR& window( xcb_window_t window ) { m_xcbSurfaceCreateInfoKHR.window = window; return *this; } operator const VkXcbSurfaceCreateInfoKHR&() const { return m_xcbSurfaceCreateInfoKHR; } private: VkXcbSurfaceCreateInfoKHR m_xcbSurfaceCreateInfoKHR; }; inline Result createXcbSurfaceKHR( Instance instance, const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateXcbSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createXcbSurfaceKHR( Instance instance, const XcbSurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createXcbSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceXcbPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) { return vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id ); } #ifdef VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceXcbPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) { return getPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection, visual_id ); } #endif // VKCPP_ENHANCED_MODE #endif /* VK_USE_PLATFORM_XCB_KHR */ #ifdef VK_USE_PLATFORM_WAYLAND_KHR typedef VkFlags WaylandSurfaceCreateFlagsKHR; class WaylandSurfaceCreateInfoKHR { public: WaylandSurfaceCreateInfoKHR() : WaylandSurfaceCreateInfoKHR( 0, nullptr, nullptr ) {} WaylandSurfaceCreateInfoKHR( WaylandSurfaceCreateFlagsKHR flags, struct wl_display* display, struct wl_surface* surface) { m_waylandSurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR; m_waylandSurfaceCreateInfoKHR.pNext = nullptr; m_waylandSurfaceCreateInfoKHR.flags = flags; m_waylandSurfaceCreateInfoKHR.display = display; m_waylandSurfaceCreateInfoKHR.surface = surface; } const StructureType& sType() const { return reinterpret_cast( m_waylandSurfaceCreateInfoKHR.sType ); } WaylandSurfaceCreateInfoKHR& sType( StructureType sType ) { m_waylandSurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_waylandSurfaceCreateInfoKHR.pNext ); } WaylandSurfaceCreateInfoKHR& pNext( const void* pNext ) { m_waylandSurfaceCreateInfoKHR.pNext = pNext; return *this; } const WaylandSurfaceCreateFlagsKHR& flags() const { return m_waylandSurfaceCreateInfoKHR.flags; } WaylandSurfaceCreateInfoKHR& flags( WaylandSurfaceCreateFlagsKHR flags ) { m_waylandSurfaceCreateInfoKHR.flags = flags; return *this; } const struct wl_display* display() const { return reinterpret_cast( m_waylandSurfaceCreateInfoKHR.display ); } WaylandSurfaceCreateInfoKHR& display( struct wl_display* display ) { m_waylandSurfaceCreateInfoKHR.display = display; return *this; } const struct wl_surface* surface() const { return reinterpret_cast( m_waylandSurfaceCreateInfoKHR.surface ); } WaylandSurfaceCreateInfoKHR& surface( struct wl_surface* surface ) { m_waylandSurfaceCreateInfoKHR.surface = surface; return *this; } operator const VkWaylandSurfaceCreateInfoKHR&() const { return m_waylandSurfaceCreateInfoKHR; } private: VkWaylandSurfaceCreateInfoKHR m_waylandSurfaceCreateInfoKHR; }; inline Result createWaylandSurfaceKHR( Instance instance, const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateWaylandSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createWaylandSurfaceKHR( Instance instance, const WaylandSurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createWaylandSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceWaylandPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display ) { return vkGetPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display ); } #ifdef VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceWaylandPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display ) { return getPhysicalDeviceWaylandPresentationSupportKHR( physicalDevice, queueFamilyIndex, display ); } #endif // VKCPP_ENHANCED_MODE #endif /* VK_USE_PLATFORM_WAYLAND_KHR */ #ifdef VK_USE_PLATFORM_MIR_KHR typedef VkFlags MirSurfaceCreateFlagsKHR; class MirSurfaceCreateInfoKHR { public: MirSurfaceCreateInfoKHR() : MirSurfaceCreateInfoKHR( 0, nullptr, nullptr ) {} MirSurfaceCreateInfoKHR( MirSurfaceCreateFlagsKHR flags, MirConnection* connection, MirSurface* mirSurface) { m_mirSurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR; m_mirSurfaceCreateInfoKHR.pNext = nullptr; m_mirSurfaceCreateInfoKHR.flags = flags; m_mirSurfaceCreateInfoKHR.connection = connection; m_mirSurfaceCreateInfoKHR.mirSurface = mirSurface; } const StructureType& sType() const { return reinterpret_cast( m_mirSurfaceCreateInfoKHR.sType ); } MirSurfaceCreateInfoKHR& sType( StructureType sType ) { m_mirSurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_mirSurfaceCreateInfoKHR.pNext ); } MirSurfaceCreateInfoKHR& pNext( const void* pNext ) { m_mirSurfaceCreateInfoKHR.pNext = pNext; return *this; } const MirSurfaceCreateFlagsKHR& flags() const { return m_mirSurfaceCreateInfoKHR.flags; } MirSurfaceCreateInfoKHR& flags( MirSurfaceCreateFlagsKHR flags ) { m_mirSurfaceCreateInfoKHR.flags = flags; return *this; } const MirConnection* connection() const { return reinterpret_cast( m_mirSurfaceCreateInfoKHR.connection ); } MirSurfaceCreateInfoKHR& connection( MirConnection* connection ) { m_mirSurfaceCreateInfoKHR.connection = connection; return *this; } const MirSurface* mirSurface() const { return reinterpret_cast( m_mirSurfaceCreateInfoKHR.mirSurface ); } MirSurfaceCreateInfoKHR& mirSurface( MirSurface* mirSurface ) { m_mirSurfaceCreateInfoKHR.mirSurface = mirSurface; return *this; } operator const VkMirSurfaceCreateInfoKHR&() const { return m_mirSurfaceCreateInfoKHR; } private: VkMirSurfaceCreateInfoKHR m_mirSurfaceCreateInfoKHR; }; inline Result createMirSurfaceKHR( Instance instance, const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateMirSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createMirSurfaceKHR( Instance instance, const MirSurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createMirSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceMirPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection ) { return vkGetPhysicalDeviceMirPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection ); } #ifdef VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceMirPresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection ) { return getPhysicalDeviceMirPresentationSupportKHR( physicalDevice, queueFamilyIndex, connection ); } #endif // VKCPP_ENHANCED_MODE #endif /* VK_USE_PLATFORM_MIR_KHR */ #ifdef VK_USE_PLATFORM_ANDROID_KHR typedef VkFlags AndroidSurfaceCreateFlagsKHR; class AndroidSurfaceCreateInfoKHR { public: AndroidSurfaceCreateInfoKHR() : AndroidSurfaceCreateInfoKHR( 0, nullptr ) {} AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateFlagsKHR flags, ANativeWindow* window) { m_androidSurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; m_androidSurfaceCreateInfoKHR.pNext = nullptr; m_androidSurfaceCreateInfoKHR.flags = flags; m_androidSurfaceCreateInfoKHR.window = window; } const StructureType& sType() const { return reinterpret_cast( m_androidSurfaceCreateInfoKHR.sType ); } AndroidSurfaceCreateInfoKHR& sType( StructureType sType ) { m_androidSurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_androidSurfaceCreateInfoKHR.pNext ); } AndroidSurfaceCreateInfoKHR& pNext( const void* pNext ) { m_androidSurfaceCreateInfoKHR.pNext = pNext; return *this; } const AndroidSurfaceCreateFlagsKHR& flags() const { return m_androidSurfaceCreateInfoKHR.flags; } AndroidSurfaceCreateInfoKHR& flags( AndroidSurfaceCreateFlagsKHR flags ) { m_androidSurfaceCreateInfoKHR.flags = flags; return *this; } const ANativeWindow* window() const { return reinterpret_cast( m_androidSurfaceCreateInfoKHR.window ); } AndroidSurfaceCreateInfoKHR& window( ANativeWindow* window ) { m_androidSurfaceCreateInfoKHR.window = window; return *this; } operator const VkAndroidSurfaceCreateInfoKHR&() const { return m_androidSurfaceCreateInfoKHR; } private: VkAndroidSurfaceCreateInfoKHR m_androidSurfaceCreateInfoKHR; }; inline Result createAndroidSurfaceKHR( Instance instance, const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateAndroidSurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createAndroidSurfaceKHR( Instance instance, const AndroidSurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createAndroidSurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE #endif /* VK_USE_PLATFORM_ANDROID_KHR */ #ifdef VK_USE_PLATFORM_WIN32_KHR typedef VkFlags Win32SurfaceCreateFlagsKHR; class Win32SurfaceCreateInfoKHR { public: Win32SurfaceCreateInfoKHR() : Win32SurfaceCreateInfoKHR( 0, 0, 0 ) {} Win32SurfaceCreateInfoKHR( Win32SurfaceCreateFlagsKHR flags, HINSTANCE hinstance, HWND hwnd) { m_win32SurfaceCreateInfoKHR.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; m_win32SurfaceCreateInfoKHR.pNext = nullptr; m_win32SurfaceCreateInfoKHR.flags = flags; m_win32SurfaceCreateInfoKHR.hinstance = hinstance; m_win32SurfaceCreateInfoKHR.hwnd = hwnd; } const StructureType& sType() const { return reinterpret_cast( m_win32SurfaceCreateInfoKHR.sType ); } Win32SurfaceCreateInfoKHR& sType( StructureType sType ) { m_win32SurfaceCreateInfoKHR.sType = static_cast( sType ); return *this; } const void* pNext() const { return reinterpret_cast( m_win32SurfaceCreateInfoKHR.pNext ); } Win32SurfaceCreateInfoKHR& pNext( const void* pNext ) { m_win32SurfaceCreateInfoKHR.pNext = pNext; return *this; } const Win32SurfaceCreateFlagsKHR& flags() const { return m_win32SurfaceCreateInfoKHR.flags; } Win32SurfaceCreateInfoKHR& flags( Win32SurfaceCreateFlagsKHR flags ) { m_win32SurfaceCreateInfoKHR.flags = flags; return *this; } const HINSTANCE& hinstance() const { return m_win32SurfaceCreateInfoKHR.hinstance; } Win32SurfaceCreateInfoKHR& hinstance( HINSTANCE hinstance ) { m_win32SurfaceCreateInfoKHR.hinstance = hinstance; return *this; } const HWND& hwnd() const { return m_win32SurfaceCreateInfoKHR.hwnd; } Win32SurfaceCreateInfoKHR& hwnd( HWND hwnd ) { m_win32SurfaceCreateInfoKHR.hwnd = hwnd; return *this; } operator const VkWin32SurfaceCreateInfoKHR&() const { return m_win32SurfaceCreateInfoKHR; } private: VkWin32SurfaceCreateInfoKHR m_win32SurfaceCreateInfoKHR; }; inline Result createWin32SurfaceKHR( Instance instance, const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) { return static_cast( vkCreateWin32SurfaceKHR( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pSurface ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createWin32SurfaceKHR( Instance instance, const Win32SurfaceCreateInfoKHR& createInfo, const AllocationCallbacks& allocator, SurfaceKHR& surface ) { return createWin32SurfaceKHR( instance, &createInfo, &allocator, &surface ); } #endif // VKCPP_ENHANCED_MODE inline Bool32 getPhysicalDeviceWin32PresentationSupportKHR( PhysicalDevice physicalDevice, uint32_t queueFamilyIndex ) { return vkGetPhysicalDeviceWin32PresentationSupportKHR( physicalDevice, queueFamilyIndex ); } #endif /* VK_USE_PLATFORM_WIN32_KHR */ enum class DebugReportObjectTypeEXT { eVkDebugReportObjectTypeUnknownExt = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, eVkDebugReportObjectTypeInstanceExt = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT, eVkDebugReportObjectTypePhysicalDeviceExt = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT, eVkDebugReportObjectTypeDeviceExt = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, eVkDebugReportObjectTypeQueueExt = VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, eVkDebugReportObjectTypeSemaphoreExt = VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT, eVkDebugReportObjectTypeCommandBufferExt = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, eVkDebugReportObjectTypeFenceExt = VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, eVkDebugReportObjectTypeDeviceMemoryExt = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, eVkDebugReportObjectTypeBufferExt = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT, eVkDebugReportObjectTypeImageExt = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, eVkDebugReportObjectTypeEventExt = VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT, eVkDebugReportObjectTypeQueryPoolExt = VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT, eVkDebugReportObjectTypeBufferViewExt = VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT, eVkDebugReportObjectTypeImageViewExt = VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT, eVkDebugReportObjectTypeShaderModuleExt = VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, eVkDebugReportObjectTypePipelineCacheExt = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, eVkDebugReportObjectTypePipelineLayoutExt = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT, eVkDebugReportObjectTypeRenderPassExt = VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT, eVkDebugReportObjectTypePipelineExt = VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, eVkDebugReportObjectTypeDescriptorSetLayoutExt = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT, eVkDebugReportObjectTypeSamplerExt = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT, eVkDebugReportObjectTypeDescriptorPoolExt = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT, eVkDebugReportObjectTypeDescriptorSetExt = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, eVkDebugReportObjectTypeFramebufferExt = VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT, eVkDebugReportObjectTypeCommandPoolExt = VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT, eVkDebugReportObjectTypeSurfaceKhrExt = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT, eVkDebugReportObjectTypeSwapchainKhrExt = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, eVkDebugReportObjectTypeDebugReportExt = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT }; enum class DebugReportErrorEXT { eVkDebugReportErrorNoneExt = VK_DEBUG_REPORT_ERROR_NONE_EXT, eVkDebugReportErrorCallbackRefExt = VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT }; inline Result createDebugReportCallbackEXT( Instance instance, const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) { return static_cast( vkCreateDebugReportCallbackEXT( instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), pCallback ) ); } #ifdef VKCPP_ENHANCED_MODE inline Result createDebugReportCallbackEXT( Instance instance, const DebugReportCallbackCreateInfoEXT& createInfo, const AllocationCallbacks& allocator, DebugReportCallbackEXT& callback ) { return createDebugReportCallbackEXT( instance, &createInfo, &allocator, &callback ); } #endif // VKCPP_ENHANCED_MODE inline void destroyDebugReportCallbackEXT( Instance instance, DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) { vkDestroyDebugReportCallbackEXT( instance, callback, reinterpret_cast( pAllocator ) ); } #ifdef VKCPP_ENHANCED_MODE inline void destroyDebugReportCallbackEXT( Instance instance, DebugReportCallbackEXT callback, const AllocationCallbacks& allocator ) { destroyDebugReportCallbackEXT( instance, callback, &allocator ); } #endif // VKCPP_ENHANCED_MODE inline void debugReportMessageEXT( Instance instance, DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) { vkDebugReportMessageEXT( instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); } #ifdef VKCPP_ENHANCED_MODE inline void debugReportMessageEXT( Instance instance, DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char& layerPrefix, const char& message ) { debugReportMessageEXT( instance, flags, objectType, object, location, messageCode, &layerPrefix, &message ); } #endif // VKCPP_ENHANCED_MODE }