mirror of https://github.com/mosra/magnum.git
Browse Source
Also provide compile-time info with them, a runtime list and everything else similar to what's done for GL.pull/234/head
19 changed files with 1887 additions and 157 deletions
@ -0,0 +1,299 @@ |
|||||||
|
/* |
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
/** @page vulkan-mapping Command mapping |
||||||
|
@brief List of Vulkan commands corresponding to particular Magnum API. |
||||||
|
|
||||||
|
@tableofcontents |
||||||
|
@m_footernavigation |
||||||
|
|
||||||
|
Legend: |
||||||
|
|
||||||
|
- @m_class{m-label m-flat m-success} **X.Y** --- given feature is new in |
||||||
|
Vulkan version X.Y |
||||||
|
- @m_class{m-label m-flat m-success} **ABC, X.Y** --- given feature is |
||||||
|
exposed though an ABC extension and then promoted to Vulkan version X.Y; |
||||||
|
both the extension and the core entrypoints are available |
||||||
|
- @m_class{m-label m-flat m-warning} **ABC** --- given feature is |
||||||
|
exposed though an ABC extension |
||||||
|
- @m_class{m-label m-danger} **deprecated** --- given feature is deprecated |
||||||
|
in newer versions of Vulkan and replaced by different functionality |
||||||
|
|
||||||
|
@section vulkan-mapping-functions Functions |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-a A |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{AllocateCommandBuffers}, \n @fn_vk{FreeCommandBuffers} | | |
||||||
|
@fn_vk{AllocateDescriptorSets}, \n @fn_vk{FreeDescriptorSets} | | |
||||||
|
@fn_vk{AllocateMemory}, \n @fn_vk{FreeMemory} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-b B |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{BeginCommandBuffer}, \n \fn_vk{EndCommandBuffer} | | |
||||||
|
@fn_vk{BindBufferMemory}, \n @fn_vk{BindBufferMemory2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{BindImageMemory}, \n @fn_vk{BindImageMemory2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-c C |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{CmdBeginQuery}, \n @fn_vk{CmdEndQuery} | | |
||||||
|
@fn_vk{CmdBeginDebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT**, \n @fn_vk{CmdEndebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CmdBeginRenderPass}, \n @fn_vk{CmdBeginRenderPass2} @m_class{m-label m-flat m-success} **KHR, 1.2**, \n @fn_vk{CmdEndRenderpass}, \n @fn_vk{CmdEndRenderpass2} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{CmdBindDescriptorSets} | | |
||||||
|
@fn_vk{CmdBindIndexBuffer} | | |
||||||
|
@fn_vk{CmdBindPipeline} | | |
||||||
|
@fn_vk{CmdBindVertexBuffers} | | |
||||||
|
@fn_vk{CmdBlitImage} | | |
||||||
|
@fn_vk{CmdClearAttachments} | | |
||||||
|
@fn_vk{CmdClearColorImage} | | |
||||||
|
@fn_vk{CmdClearDepthStencilImage} | | |
||||||
|
@fn_vk{CmdCopyBuffer} | | |
||||||
|
@fn_vk{CmdCopyBufferToImage} | | |
||||||
|
@fn_vk{CmdCopyImage} | | |
||||||
|
@fn_vk{CmdCopyImageToBuffer} | | |
||||||
|
@fn_vk{CmdCopyQueryPoolResults} | | |
||||||
|
@fn_vk{CmdDebugMarkerBeginEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT**, \n @fn_vk{CmdDebugMarkerEndEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CmdDebugMarkerInsertEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CmdDispatch} | | |
||||||
|
@fn_vk{CmdDispatchBase} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{CmdDispatchIndirect} | | |
||||||
|
@fn_vk{CmdDraw} | | |
||||||
|
@fn_vk{CmdDrawIndexed} | | |
||||||
|
@fn_vk{CmdDrawIndexedIndirect} | | |
||||||
|
@fn_vk{CmdDrawIndexedIndirectCount} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{CmdDrawIndirect} | | |
||||||
|
@fn_vk{CmdDrawIndirectCount} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{CmdExecuteCommands} | | |
||||||
|
@fn_vk{CmdFillBuffer} | | |
||||||
|
@fn_vk{CmdInsertDebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CmdNextSubpass}, \n @fn_vk{CmdNextSubpass2} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{CmdPipelineBarrier} | | |
||||||
|
@fn_vk{CmdPushConstants} | | |
||||||
|
@fn_vk{CmdResetEvent} | | |
||||||
|
@fn_vk{CmdResetQueryPool} | | |
||||||
|
@fn_vk{CmdResolveImage} | | |
||||||
|
@fn_vk{CmdSetBlendConstants} | | |
||||||
|
@fn_vk{CmdSetDepthBias} | | |
||||||
|
@fn_vk{CmdSetDeviceMask} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{CmdSetDepthBounds} | | |
||||||
|
@fn_vk{CmdSetEvent} | | |
||||||
|
@fn_vk{CmdSetLineWidth} | | |
||||||
|
@fn_vk{CmdSetScissor} | | |
||||||
|
@fn_vk{CmdSetStencilCompareMask} | | |
||||||
|
@fn_vk{CmdSetStencilReference} | | |
||||||
|
@fn_vk{CmdSetStencilWriteMask} | | |
||||||
|
@fn_vk{CmdSetViewport} | | |
||||||
|
@fn_vk{CmdUpdateBuffer} | | |
||||||
|
@fn_vk{CmdWaitEvents} | | |
||||||
|
@fn_vk{CmdWriteTimestamp} | | |
||||||
|
@fn_vk{CreateBuffer}, \n @fn_vk{DestroyBuffer} | | |
||||||
|
@fn_vk{CreateBufferView}, \n @fn_vk{DestroyBufferView} | | |
||||||
|
@fn_vk{CreateCommandPool}, \n @fn_vk{DestroyCommandPool} | | |
||||||
|
@fn_vk{CreateComputePipelines}, \n @fn_vk{DestroyComputePipelines} | | |
||||||
|
@fn_vk{CreateDebugReportCallbackEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT**, \n @fn_vk{DestroyDebugReportCallbackEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CreateDebugUtilsMessengerEXT} @m_class{m-label m-flat m-warning} **EXT**, \n @fn_vk{DestroyDebugUtilsMessengerEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{CreateDescriptorPool}, \n @fn_vk{DestroyDescriptorPool} | | |
||||||
|
@fn_vk{CreateDescriptorSetLayout}, \n @fn_vk{DestroyDescriptorSetLayout} | | |
||||||
|
@fn_vk{CreateDescriptorUpdateTemplate} @m_class{m-label m-flat m-success} **KHR, 1.1**, \n @fn_vk{DestroyDescriptorUpdateTemplate} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{CreateDevice}, \n @fn_vk{DestroyDevice} | | |
||||||
|
@fn_vk{CreateEvent}, \n @fn_vk{DestroyEvent} | | |
||||||
|
@fn_vk{CreateFence}, \n @fn_vk{DestroyFence} | | |
||||||
|
@fn_vk{CreateFramebuffer}, \n @fn_vk{DestroyFramebuffer} | | |
||||||
|
@fn_vk{CreateImage}, \n @fn_vk{DestroyImage} | | |
||||||
|
@fn_vk{CreateImageView}, \n @fn_vk{DestroyImageView} | | |
||||||
|
@fn_vk{CreateInstance}, \n @fn_vk{DestroyInstance} | | |
||||||
|
@fn_vk{CreatePipeline}, \n @fn_vk{DestroyPipeline} | | |
||||||
|
@fn_vk{CreatePipelineCache}, \n @fn_vk{DestroyPipelineCache} | | |
||||||
|
@fn_vk{CreatePipelineLayout}, \n @fn_vk{DestroyPipelineLayout} | | |
||||||
|
@fn_vk{CreateQueryPool}, \n @fn_vk{DestroyQueryPool} | | |
||||||
|
@fn_vk{CreateRenderPass}, \n @fn_vk{CreateRenderPass2} @m_class{m-label m-flat m-success} **KHR, 1.2**, \n @fn_vk{DestroyRenderPass} | | |
||||||
|
@fn_vk{CreateSampler}, \n @fn_vk{DestroySampler} | | |
||||||
|
@fn_vk{CreateSamplerYcbcrConversion} @m_class{m-label m-flat m-success} **KHR, 1.1** , \n @fn_vk{DestroySamplerYcbcrConversion} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{CreateSemaphore}, \n @fn_vk{DestroySemaphore} | | |
||||||
|
@fn_vk{CreateShaderModule}, \n @fn_vk{DestroyShaderModule} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-d D |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{DeviceWaitIdle} | | |
||||||
|
@fn_vk{DebugMarkerSetObjectNameEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{DebugMarkerSetObjectTagEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{DebugReportMessageEXT} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-e E |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{EnumerateDeviceLayerProperties} @m_class{m-label m-danger} **deprecated in 1.0.13** | not exposed, [spec commit](https://github.com/KhronosGroup/Vulkan-Docs/commit/2656f459333b3a1dc63619a9ebd83490eea22e93) |
||||||
|
@fn_vk{EnumerateDeviceExtensionProperties} | | |
||||||
|
@fn_vk{EnumerateInstanceExtensionProperties} | | |
||||||
|
@fn_vk{EnumerateInstanceLayerProperties} | | |
||||||
|
@fn_vk{EnumerateInstanceVersion} @m_class{m-label m-flat m-success} **1.1** | | |
||||||
|
@fn_vk{EnumeratePhysicalDevices} | | |
||||||
|
@fn_vk{EnumeratePhysicalDeviceGroups} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-f F |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{FlushMappedMemoryRanges} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-g G |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{GetBufferDeviceAddress} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{GetBufferOpaqueCaptureAddress} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{GetDeviceMemoryOpaqueCaptureAddress} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{GetBufferMemoryRequirements}, \n @fn_vk{GetBufferMemoryRequirements2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetDescriptorSetLayoutSupport} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetDeviceGroupPeerMemoryFeatures} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetDeviceMemoryCommitment} | | |
||||||
|
@fn_vk{GetDeviceProcAddr} | | |
||||||
|
@fn_vk{GetDeviceQueue}, \n @fn_vk{GetDeviceQueue2} @m_class{m-label m-flat m-success} **1.1** | | |
||||||
|
@fn_vk{GetEventStatus} | | |
||||||
|
@fn_vk{GetFenceStatus} | | |
||||||
|
@fn_vk{GetImageMemoryRequirements}, \n @fn_vk{GetImageMemoryRequirements2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetImageSparseMemoryRequirements}, \n @fn_vk{GetImageSparseMemoryRequirements2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetImageSubresourceLayout} | | |
||||||
|
@fn_vk{GetInstanceProcAddr} | | |
||||||
|
@fn_vk{GetPhysicalDeviceExternalBufferProperties} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceExternalFenceProperties} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceExternalSemaphoreProperties} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceFeatures}, \n @fn_vk{GetPhysicalDeviceFeatures2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceFormatProperties}, \n @fn_vk{GetPhysicalDeviceFormatProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceImageFormatProperties}, \n @fn_vk{GetPhysicalDeviceImageFormatProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceMemoryProperties}, \n @fn_vk{GetPhysicalDeviceMemoryProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceProperties}, \n @fn_vk{GetPhysicalDeviceProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceQueueFamilyProperties}, \n @fn_vk{GetPhysicalDeviceQueueFamilyProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPhysicalDeviceSparseImageFormatProperties}, \n @fn_vk{GetPhysicalDeviceSparseImageFormatProperties2} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
@fn_vk{GetPipelineCacheData} | | |
||||||
|
@fn_vk{GetQueryPoolResults} | | |
||||||
|
@fn_vk{GetRenderAreaGranularity} | | |
||||||
|
@fn_vk{GetSemaphoreCounterValue} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-i I |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{InvalidateMappedMemoryRanges} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-m M |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{MapMemory}, \n @fn_vk{UnmapMemory} | | |
||||||
|
@fn_vk{MergePipelineCaches} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-q Q |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{QueueBeginDebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT**, \n @fn_vk{QueueEndDebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{QueueBindSparse} | | |
||||||
|
@fn_vk{QueueInsertDebugUtilsLabelEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{QueueSubmit} | | |
||||||
|
@fn_vk{QueueWaitIdle} | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-r R |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{ResetCommandBuffer} | | |
||||||
|
@fn_vk{ResetCommandPool} | | |
||||||
|
@fn_vk{ResetDescriptorPool} | | |
||||||
|
@fn_vk{ResetFences} | | |
||||||
|
@fn_vk{ResetQueryPool} @m_class{m-label m-flat m-success} **EXT, 1.2** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-s S |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{SetDebugUtilsObjectNameEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{SetDebugUtilsObjectTagEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
@fn_vk{SetEvent}, \n @fn_vk{ResetEvent} | | |
||||||
|
@fn_vk{SignalSemaphore} @m_class{m-label m-flat m-success} **KHR, 1.2**, \n @fn_vk{WaitSemaphores} @m_class{m-label m-flat m-success} **KHR, 1.2** | | |
||||||
|
@fn_vk{SubmitDebugUtilsMessageEXT} @m_class{m-label m-flat m-warning} **EXT** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-t T |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{TrimCommandPool} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-u U |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{UpdateDescriptorSets} | | |
||||||
|
@fn_vk{UpdateDescriptorSetWithTemplate} @m_class{m-label m-flat m-success} **KHR, 1.1** | | |
||||||
|
|
||||||
|
@subsection vulkan-mapping-functions-w W |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Vulkan function | Matching API |
||||||
|
--------------------------------------- | ------------ |
||||||
|
@fn_vk{WaitForFences} | | |
||||||
|
|
||||||
|
*/ |
||||||
|
|
||||||
|
}} |
||||||
@ -0,0 +1,128 @@ |
|||||||
|
/* |
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
namespace Magnum { |
||||||
|
|
||||||
|
/** @page vulkan-support Support state |
||||||
|
@brief List of (un)supported Vulkan features and extensions. |
||||||
|
@m_since_latest |
||||||
|
|
||||||
|
@tableofcontents |
||||||
|
@m_footernavigation |
||||||
|
|
||||||
|
@section vulkan-support-state Vulkan implementation state |
||||||
|
|
||||||
|
The extension implementation is considered complete if all its defined types, |
||||||
|
functions and enum values are exposed through the API. |
||||||
|
|
||||||
|
All extensions from the below lists are available in the @ref Vk::Extensions |
||||||
|
namespace. Extensions marked with @m_class{m-label m-info} **instance** are |
||||||
|
instance extensions, unmarked ones are device extensions. Extensions marked |
||||||
|
with @m_class{m-label m-danger} **deprecated** are superseded by other |
||||||
|
extensions, but still included for compatibility with drivers that don't |
||||||
|
provide support for the replacement extensions. |
||||||
|
|
||||||
|
@subsection vulkan-support-10 Vulkan 1.0 |
||||||
|
|
||||||
|
TBD |
||||||
|
|
||||||
|
@subsection vulkan-support-11 Vulkan 1.1 |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Extension | Status |
||||||
|
--------------------------------------------------- | ------ |
||||||
|
@vk_extension{KHR,multiview} | | |
||||||
|
@vk_extension{KHR,get_physical_device_properties2} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{KHR,device_group} | | |
||||||
|
@vk_extension{KHR,shader_draw_parameters} | | |
||||||
|
@vk_extension{KHR,maintenance1} | | |
||||||
|
@vk_extension{KHR,device_group_creation} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{KHR,external_memory_capabilities} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{KHR,external_memory} | | |
||||||
|
@vk_extension{KHR,external_semaphore_capabilities} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{KHR,external_semaphore} | | |
||||||
|
@vk_extension{KHR,16bit_storage} | | |
||||||
|
@vk_extension{KHR,descriptor_update_template} | | |
||||||
|
@vk_extension{KHR,external_fence_capabilities} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{KHR,external_fence} | | |
||||||
|
@vk_extension{KHR,maintenance2} | | |
||||||
|
@vk_extension{KHR,variable_pointers} | | |
||||||
|
@vk_extension{KHR,dedicated_allocation} | | |
||||||
|
@vk_extension{KHR,storage_buffer_storage_class} | | |
||||||
|
@vk_extension{KHR,relaxed_block_layout} | | |
||||||
|
@vk_extension{KHR,get_memory_requirements2} | | |
||||||
|
@vk_extension{KHR,sampler_ycbcr_conversion} | | |
||||||
|
@vk_extension{KHR,bind_memory2} | | |
||||||
|
@vk_extension{KHR,maintenance3} | | |
||||||
|
|
||||||
|
@subsection vulkan-support-12 Vulkan 1.2 |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Extension | Status |
||||||
|
--------------------------------------------------- | ------ |
||||||
|
@vk_extension{KHR,sampler_mirror_clamp_to_edge} | | |
||||||
|
@vk_extension{KHR,shader_float16_int8} | | |
||||||
|
@vk_extension{KHR,imageless_framebuffer} | | |
||||||
|
@vk_extension{KHR,create_renderpass2} | | |
||||||
|
@vk_extension{EXT,sampler_filter_minmax} | | |
||||||
|
@vk_extension{KHR,image_format_list} | | |
||||||
|
@vk_extension{EXT,descriptor_indexing} | | |
||||||
|
@vk_extension{EXT,shader_viewport_index_layer} | | |
||||||
|
@vk_extension{KHR,draw_indirect_count} | | |
||||||
|
@vk_extension{KHR,shader_subgroup_extended_types} | | |
||||||
|
@vk_extension{KHR,8bit_storage} | | |
||||||
|
@vk_extension{KHR,shader_atomic_int64} | | |
||||||
|
@vk_extension{KHR,driver_properties} | | |
||||||
|
@vk_extension{KHR,shader_float_controls} | | |
||||||
|
@vk_extension{KHR,depth_stencil_resolve} | | |
||||||
|
@vk_extension{KHR,timeline_semaphore} | | |
||||||
|
@vk_extension{KHR,vulkan_memory_model} | | |
||||||
|
@vk_extension{KHR,spirv_1_4} | | |
||||||
|
@vk_extension{EXT,scalar_block_layout} | | |
||||||
|
@vk_extension{KHR,separate_depth_stencil_layouts} | | |
||||||
|
@vk_extension{EXT,separate_stencil_usage} | | |
||||||
|
@vk_extension{KHR,uniform_buffer_standard_layout} | | |
||||||
|
@vk_extension{KHR,buffer_device_address} | | |
||||||
|
@vk_extension{EXT,host_query_reset} | | |
||||||
|
|
||||||
|
@section vulkan-support-extensions-vendor Vendor Vulkan extensions |
||||||
|
|
||||||
|
@m_class{m-fullwidth} |
||||||
|
|
||||||
|
Extension | Status |
||||||
|
--------------------------------------------------- | ------ |
||||||
|
@vk_extension{EXT,debug_report} @m_class{m-label m-danger} **deprecated** @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{EXT,debug_marker} @m_class{m-label m-danger} **deprecated** | | |
||||||
|
@vk_extension{EXT,texture_compression_astc_hdr} | | |
||||||
|
@vk_extension{EXT,debug_utils} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{EXT,validation_features} @m_class{m-label m-info} **instance** | | |
||||||
|
@vk_extension{EXT,index_type_uint8} | | |
||||||
|
@vk_extension{IMG,format_pvrtc} | | |
||||||
|
|
||||||
|
*/ |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,43 @@ |
|||||||
|
#ifndef Magnum_Vk_Device_h |
||||||
|
#define Magnum_Vk_Device_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Nothing, haha |
||||||
|
* @m_since_latest |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <cstddef> |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
namespace Implementation { |
||||||
|
enum: std::size_t { ExtensionCount = 72 }; |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,135 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "Extensions.h" |
||||||
|
|
||||||
|
#include <Corrade/Containers/ArrayView.h> |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
namespace { |
||||||
|
|
||||||
|
/* When adding a new list, InstanceExtension::extensions() needs to be adapted.
|
||||||
|
Binary search is performed on the extensions, thus they have to be sorted |
||||||
|
alphabetically. */ |
||||||
|
constexpr InstanceExtension InstanceExtensions[] { |
||||||
|
Extensions::EXT::debug_report{}, |
||||||
|
Extensions::EXT::debug_utils{}, |
||||||
|
Extensions::EXT::validation_features{}, |
||||||
|
}; |
||||||
|
constexpr InstanceExtension InstanceExtensions11[] { |
||||||
|
Extensions::KHR::device_group_creation{}, |
||||||
|
Extensions::KHR::external_fence_capabilities{}, |
||||||
|
Extensions::KHR::external_memory_capabilities{}, |
||||||
|
Extensions::KHR::external_semaphore_capabilities{}, |
||||||
|
Extensions::KHR::get_physical_device_properties2{}, |
||||||
|
}; |
||||||
|
/* No Vulkan 1.2 instance extensions */ |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
Containers::ArrayView<const InstanceExtension> InstanceExtension::extensions(const Version version) { |
||||||
|
switch(version) { |
||||||
|
case Version::None: return Containers::arrayView(InstanceExtensions); |
||||||
|
case Version::Vk10: return nullptr; |
||||||
|
case Version::Vk11: return Containers::arrayView(InstanceExtensions11); |
||||||
|
case Version::Vk12: return nullptr; |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ |
||||||
|
} |
||||||
|
|
||||||
|
namespace { |
||||||
|
|
||||||
|
/* When adding a new list, Extension::extensions() needs to be adapted. Binary
|
||||||
|
search is performed on the extensions, thus they have to be sorted |
||||||
|
alphabetically. */ |
||||||
|
constexpr Extension DeviceExtensions[] { |
||||||
|
Extensions::EXT::debug_marker{}, |
||||||
|
Extensions::EXT::index_type_uint8{}, |
||||||
|
Extensions::EXT::texture_compression_astc_hdr{}, |
||||||
|
Extensions::IMG::format_pvrtc{}, |
||||||
|
}; |
||||||
|
constexpr Extension DeviceExtensions11[] { |
||||||
|
//Extensions::KHR::16bit_storage{},
|
||||||
|
Extensions::KHR::bind_memory2{}, |
||||||
|
Extensions::KHR::dedicated_allocation{}, |
||||||
|
Extensions::KHR::descriptor_update_template{}, |
||||||
|
Extensions::KHR::device_group{}, |
||||||
|
Extensions::KHR::external_fence{}, |
||||||
|
Extensions::KHR::external_memory{}, |
||||||
|
Extensions::KHR::external_semaphore{}, |
||||||
|
Extensions::KHR::get_memory_requirements2{}, |
||||||
|
Extensions::KHR::maintenance1{}, |
||||||
|
Extensions::KHR::maintenance2{}, |
||||||
|
Extensions::KHR::maintenance3{}, |
||||||
|
Extensions::KHR::multiview{}, |
||||||
|
Extensions::KHR::relaxed_block_layout{}, |
||||||
|
Extensions::KHR::sampler_ycbcr_conversion{}, |
||||||
|
Extensions::KHR::shader_draw_parameters{}, |
||||||
|
Extensions::KHR::storage_buffer_storage_class{}, |
||||||
|
Extensions::KHR::variable_pointers{}, |
||||||
|
}; |
||||||
|
constexpr Extension DeviceExtensions12[] { |
||||||
|
Extensions::EXT::descriptor_indexing{}, |
||||||
|
Extensions::EXT::host_query_reset{}, |
||||||
|
Extensions::EXT::sampler_filter_minmax{}, |
||||||
|
Extensions::EXT::scalar_block_layout{}, |
||||||
|
Extensions::EXT::separate_stencil_usage{}, |
||||||
|
Extensions::EXT::shader_viewport_index_layer{}, |
||||||
|
//Extensions::KHR::8bit_storage{},
|
||||||
|
Extensions::KHR::buffer_device_address{}, |
||||||
|
Extensions::KHR::create_renderpass2{}, |
||||||
|
Extensions::KHR::depth_stencil_resolve{}, |
||||||
|
Extensions::KHR::draw_indirect_count{}, |
||||||
|
Extensions::KHR::driver_properties{}, |
||||||
|
Extensions::KHR::image_format_list{}, |
||||||
|
Extensions::KHR::imageless_framebuffer{}, |
||||||
|
Extensions::KHR::sampler_mirror_clamp_to_edge{}, |
||||||
|
Extensions::KHR::separate_depth_stencil_layouts{}, |
||||||
|
Extensions::KHR::shader_atomic_int64{}, |
||||||
|
Extensions::KHR::shader_float16_int8{}, |
||||||
|
Extensions::KHR::shader_float_controls{}, |
||||||
|
Extensions::KHR::shader_subgroup_extended_types{}, |
||||||
|
Extensions::KHR::spirv_1_4{}, |
||||||
|
Extensions::KHR::timeline_semaphore{}, |
||||||
|
Extensions::KHR::uniform_buffer_standard_layout{}, |
||||||
|
Extensions::KHR::vulkan_memory_model{}, |
||||||
|
}; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
Containers::ArrayView<const Extension> Extension::extensions(const Version version) { |
||||||
|
switch(version) { |
||||||
|
case Version::None: return Containers::arrayView(DeviceExtensions); |
||||||
|
case Version::Vk10: return nullptr; |
||||||
|
case Version::Vk11: return Containers::arrayView(DeviceExtensions11); |
||||||
|
case Version::Vk12: return Containers::arrayView(DeviceExtensions12); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
@ -0,0 +1,248 @@ |
|||||||
|
#ifndef Magnum_Vk_Extensions_h |
||||||
|
#define Magnum_Vk_Extensions_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Namespace @ref Magnum::Vk::Extensions, class @ref Magnum::Vk::InstanceExtension, @ref Magnum::Vk::Extension |
||||||
|
* @m_since_latest |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/Containers/StringView.h> |
||||||
|
|
||||||
|
#include "Magnum/Magnum.h" |
||||||
|
#include "Magnum/Vk/TypeTraits.h" |
||||||
|
#include "Magnum/Vk/Version.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Compile-time information about Vulkan instance and device extensions |
||||||
|
@m_since_latest |
||||||
|
|
||||||
|
Each extension is a @cpp struct @ce named hierarchically by prefix, vendor and |
||||||
|
extension name taken from list at @ref vulkan-support, for example |
||||||
|
@cpp Vk::Extensions::EXT::debug_report @ce. |
||||||
|
|
||||||
|
Each struct has the same public methods as the @ref InstanceExtension / |
||||||
|
@ref Extension class (@ref Extension::requiredVersion() "requiredVersion()", |
||||||
|
@ref Extension::coreVersion() "coreVersion()" and @ref Extension::string() "string()"), |
||||||
|
but these structs are better suited for compile-time decisions rather than |
||||||
|
@ref Extension instances. |
||||||
|
|
||||||
|
This library is built if `WITH_VK` is enabled when building Magnum. To use this |
||||||
|
library with CMake, you need to request the `Vk` component of the `Magnum` |
||||||
|
package and link to the `Magnum::Vk` target: |
||||||
|
|
||||||
|
@code{.cmake} |
||||||
|
find_package(Magnum REQUIRED Vk) |
||||||
|
|
||||||
|
# ... |
||||||
|
target_link_libraries(your-app Magnum::Vk) |
||||||
|
@endcode |
||||||
|
|
||||||
|
See @ref building, @ref cmake and @ref vulkan for more information. |
||||||
|
*/ |
||||||
|
namespace Extensions { |
||||||
|
|
||||||
|
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||||
|
|
||||||
|
#define _extension(index, vendor, extension, _requiredVersion, _coreVersion) \ |
||||||
|
struct extension { \
|
||||||
|
enum: std::size_t { InstanceIndex = index }; \
|
||||||
|
constexpr static Version requiredVersion() { return Version::_requiredVersion; } \
|
||||||
|
constexpr static Version coreVersion() { return Version::_coreVersion; } \
|
||||||
|
constexpr static Containers::StringView string() { \
|
||||||
|
using namespace Containers::Literals; \
|
||||||
|
return "VK_" #vendor "_" #extension ""_s; \
|
||||||
|
} \
|
||||||
|
}; |
||||||
|
namespace EXT { |
||||||
|
/** @todo remove EXT_debug_report when all platforms have EXT_debug_utils
|
||||||
|
(my Huawei P10 doesn't have it) */ |
||||||
|
_extension(0, EXT,debug_report, Vk10, None) // #12
|
||||||
|
_extension(1, EXT,debug_utils, Vk10, None) // #129
|
||||||
|
_extension(2, EXT,validation_features, Vk10, None) // #248
|
||||||
|
} namespace KHR { |
||||||
|
_extension(10, KHR,get_physical_device_properties2, Vk10, Vk11) // #60
|
||||||
|
_extension(11, KHR,device_group_creation, Vk10, Vk11) // #71
|
||||||
|
_extension(12, KHR,external_memory_capabilities, Vk10, Vk11) // #72
|
||||||
|
_extension(13, KHR,external_semaphore_capabilities, Vk10, Vk11) // #77
|
||||||
|
_extension(14, KHR,external_fence_capabilities, Vk10, Vk11) // #113
|
||||||
|
} |
||||||
|
#undef _extension |
||||||
|
|
||||||
|
#define _extension(index, vendor, extension, _requiredVersion, _coreVersion) \ |
||||||
|
struct extension { \
|
||||||
|
enum: std::size_t { Index = index }; \
|
||||||
|
constexpr static Version requiredVersion() { return Version::_requiredVersion; } \
|
||||||
|
constexpr static Version coreVersion() { return Version::_coreVersion; } \
|
||||||
|
constexpr static Containers::StringView string() { \
|
||||||
|
using namespace Containers::Literals; \
|
||||||
|
return "VK_" #vendor "_" #extension ""_s; \
|
||||||
|
} \
|
||||||
|
}; |
||||||
|
namespace EXT { |
||||||
|
/** @todo remove EXT_debug_marker when all platforms have EXT_debug_utils
|
||||||
|
(my Huawei P10 doesn't have it) */ |
||||||
|
_extension(0, EXT,debug_marker, Vk10, None) // #23
|
||||||
|
_extension(1, EXT,texture_compression_astc_hdr, Vk10, None) // #67
|
||||||
|
_extension(2, EXT,sampler_filter_minmax, Vk10, Vk12) // #131
|
||||||
|
_extension(3, EXT,descriptor_indexing, Vk10, Vk12) // #162
|
||||||
|
_extension(4, EXT,shader_viewport_index_layer, Vk10, Vk12) // #163
|
||||||
|
_extension(5, EXT,scalar_block_layout, Vk10, Vk12) // #222
|
||||||
|
_extension(6, EXT,separate_stencil_usage, Vk10, Vk12) // #247
|
||||||
|
_extension(7, EXT,host_query_reset, Vk10, Vk12) // #262
|
||||||
|
_extension(8, EXT,index_type_uint8, Vk10, None) // #266
|
||||||
|
} namespace IMG { |
||||||
|
_extension(20, IMG,format_pvrtc, Vk10, None) // #55
|
||||||
|
} namespace KHR { |
||||||
|
_extension(30, KHR,sampler_mirror_clamp_to_edge, Vk10, Vk12) // #15
|
||||||
|
_extension(31, KHR,multiview, Vk10, Vk11) // #54
|
||||||
|
_extension(32, KHR,device_group, Vk10, Vk11) // #61
|
||||||
|
_extension(33, KHR,shader_draw_parameters, Vk10, Vk11) // #64
|
||||||
|
_extension(34, KHR,maintenance1, Vk10, Vk11) // #70
|
||||||
|
_extension(35, KHR,external_semaphore, Vk10, Vk11) // #78
|
||||||
|
_extension(36, KHR,shader_float16_int8, Vk10, Vk12) // #83
|
||||||
|
//_extension(37, KHR,16bit_storage, VK10, Vk11) // #84
|
||||||
|
_extension(38, KHR,descriptor_update_template, Vk10, Vk11) // #86
|
||||||
|
_extension(39, KHR,external_memory, Vk10, Vk11) // #73
|
||||||
|
_extension(40, KHR,imageless_framebuffer, Vk10, Vk12) // #109
|
||||||
|
_extension(41, KHR,create_renderpass2, Vk10, Vk12) // #110
|
||||||
|
_extension(42, KHR,external_fence, Vk10, Vk11) // #114
|
||||||
|
_extension(43, KHR,maintenance2, Vk10, Vk11) // #118
|
||||||
|
_extension(44, KHR,variable_pointers, Vk10, Vk11) // #121
|
||||||
|
_extension(45, KHR,dedicated_allocation, Vk10, Vk11) // #128
|
||||||
|
_extension(46, KHR,storage_buffer_storage_class, Vk10, Vk11) // #142
|
||||||
|
_extension(47, KHR,relaxed_block_layout, Vk10, Vk11) // #145
|
||||||
|
_extension(48, KHR,get_memory_requirements2, Vk10, Vk11) // #147
|
||||||
|
_extension(49, KHR,image_format_list, Vk10, Vk12) // #148
|
||||||
|
_extension(50, KHR,sampler_ycbcr_conversion, Vk10, Vk11) // #157
|
||||||
|
_extension(51, KHR,bind_memory2, Vk10, Vk11) // #158
|
||||||
|
_extension(52, KHR,maintenance3, Vk10, Vk11) // #169
|
||||||
|
_extension(53, KHR,draw_indirect_count, Vk10, Vk12) // #170
|
||||||
|
_extension(54, KHR,shader_subgroup_extended_types, Vk11, Vk12) // #176
|
||||||
|
//_extension(55, KHR,8bit_storage, Vk10, Vk12) // #178
|
||||||
|
_extension(56, KHR,shader_atomic_int64, Vk10, Vk12) // #181
|
||||||
|
_extension(57, KHR,driver_properties, Vk10, Vk12) // #197
|
||||||
|
_extension(58, KHR,shader_float_controls, Vk10, Vk12) // #198
|
||||||
|
_extension(59, KHR,depth_stencil_resolve, Vk10, Vk12) // #200
|
||||||
|
_extension(60, KHR,timeline_semaphore, Vk10, Vk12) // #208
|
||||||
|
_extension(61, KHR,vulkan_memory_model, Vk10, Vk12) // #212
|
||||||
|
_extension(62, KHR,spirv_1_4, Vk11, Vk12) // #237
|
||||||
|
_extension(63, KHR,separate_depth_stencil_layouts, Vk10, Vk12) // #242
|
||||||
|
_extension(64, KHR,uniform_buffer_standard_layout, Vk10, Vk12) // #254
|
||||||
|
_extension(65, KHR,buffer_device_address, Vk10, Vk12) // #258
|
||||||
|
} |
||||||
|
#undef _extension |
||||||
|
|
||||||
|
#endif |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Run-time information about a Vulkan instance extension |
||||||
|
@m_since_latest |
||||||
|
|
||||||
|
Encapsulates runtime information about a Vulkan extension, such as name string, |
||||||
|
minimal required Vulkan version and version in which the extension was adopted |
||||||
|
to core. |
||||||
|
|
||||||
|
See also the @ref Extensions namespace, which contain compile-time information |
||||||
|
about Vulkan extensions. |
||||||
|
*/ |
||||||
|
class MAGNUM_VK_EXPORT InstanceExtension { |
||||||
|
public: |
||||||
|
/** @brief All known instance extensions for given Vulkan version */ |
||||||
|
static Containers::ArrayView<const InstanceExtension> extensions(Version version); |
||||||
|
|
||||||
|
/** @brief Internal unique extension index */ |
||||||
|
constexpr std::size_t index() const { return _index; } |
||||||
|
|
||||||
|
/** @brief Minimal version required by this extension */ |
||||||
|
constexpr Version requiredVersion() const { return _requiredVersion; } |
||||||
|
|
||||||
|
/** @brief Version in which this extension was adopted to core */ |
||||||
|
constexpr Version coreVersion() const { return _coreVersion; } |
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Extension string |
||||||
|
* |
||||||
|
* The returned view is a global memory. |
||||||
|
*/ |
||||||
|
constexpr Containers::StringView string() const { return _string; } |
||||||
|
|
||||||
|
/** @brief Construct from a compile-time instance extension */ |
||||||
|
template<class E, class = typename std::enable_if<Implementation::IsInstanceExtension<E>::value>::type> constexpr /*implicit*/ InstanceExtension(const E&): _index{E::InstanceIndex}, _requiredVersion{E::requiredVersion()}, _coreVersion{E::coreVersion()}, _string{E::string()} {} |
||||||
|
|
||||||
|
private: |
||||||
|
std::size_t _index; |
||||||
|
Version _requiredVersion; |
||||||
|
Version _coreVersion; |
||||||
|
Containers::StringView _string; |
||||||
|
}; |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Run-time information about a Vulkan device extension |
||||||
|
@m_since_latest |
||||||
|
|
||||||
|
Encapsulates runtime information about a Vulkan extension, such as name string, |
||||||
|
minimal required Vulkan version and version in which the extension was adopted |
||||||
|
to core. |
||||||
|
|
||||||
|
See also the @ref Extensions namespace, which contain compile-time information |
||||||
|
about Vulkan extensions. |
||||||
|
*/ |
||||||
|
class MAGNUM_VK_EXPORT Extension { |
||||||
|
public: |
||||||
|
/** @brief All known device extensions for given Vulkan version */ |
||||||
|
static Containers::ArrayView<const Extension> extensions(Version version); |
||||||
|
|
||||||
|
/** @brief Internal unique extension index */ |
||||||
|
constexpr std::size_t index() const { return _index; } |
||||||
|
|
||||||
|
/** @brief Minimal version required by this extension */ |
||||||
|
constexpr Version requiredVersion() const { return _requiredVersion; } |
||||||
|
|
||||||
|
/** @brief Version in which this extension was adopted to core */ |
||||||
|
constexpr Version coreVersion() const { return _coreVersion; } |
||||||
|
|
||||||
|
/** @brief Extension string */ |
||||||
|
constexpr Containers::StringView string() const { return _string; } |
||||||
|
|
||||||
|
/** @brief Construct from a compile-time device extension */ |
||||||
|
/** @todo prohibit conversion from GL/AL extensions also? */ |
||||||
|
template<class E, class = typename std::enable_if<Implementation::IsExtension<E>::value>::type> constexpr /*implicit*/ Extension(const E&): _index{E::Index}, _requiredVersion{E::requiredVersion()}, _coreVersion{E::coreVersion()}, _string{E::string()} {} |
||||||
|
|
||||||
|
private: |
||||||
|
std::size_t _index; |
||||||
|
Version _requiredVersion; |
||||||
|
Version _coreVersion; |
||||||
|
Containers::StringView _string; |
||||||
|
}; |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,43 @@ |
|||||||
|
#ifndef Magnum_Vk_Instance_h |
||||||
|
#define Magnum_Vk_Instance_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Nothing, haha |
||||||
|
* @m_since_latest |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <cstddef> |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
namespace Implementation { |
||||||
|
enum: std::size_t { InstanceExtensionCount = 16 }; |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,229 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <set> |
||||||
|
#include <Corrade/Containers/ArrayView.h> |
||||||
|
#include <Corrade/TestSuite/Tester.h> |
||||||
|
#include <Corrade/TestSuite/Compare/Numeric.h> |
||||||
|
|
||||||
|
#include "Magnum/Vk/Extensions.h" |
||||||
|
#include "Magnum/Vk/Device.h" |
||||||
|
#include "Magnum/Vk/Instance.h" |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { namespace Test { namespace { |
||||||
|
|
||||||
|
struct ExtensionsTest: TestSuite::Tester { |
||||||
|
explicit ExtensionsTest(); |
||||||
|
|
||||||
|
void isInstanceExtension(); |
||||||
|
void isExtension(); |
||||||
|
|
||||||
|
void constructInstanceExtensionFromCompileTimeExtension(); |
||||||
|
void constructExtensionFromCompileTimeExtension(); |
||||||
|
|
||||||
|
void instanceExtensions(); |
||||||
|
void extensions(); |
||||||
|
}; |
||||||
|
|
||||||
|
ExtensionsTest::ExtensionsTest() { |
||||||
|
addTests({&ExtensionsTest::isInstanceExtension, |
||||||
|
&ExtensionsTest::isExtension, |
||||||
|
|
||||||
|
&ExtensionsTest::constructInstanceExtensionFromCompileTimeExtension, |
||||||
|
&ExtensionsTest::constructExtensionFromCompileTimeExtension, |
||||||
|
|
||||||
|
&ExtensionsTest::instanceExtensions, |
||||||
|
&ExtensionsTest::extensions}); |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::isInstanceExtension() { |
||||||
|
CORRADE_VERIFY(Implementation::IsInstanceExtension<Extensions::KHR::get_physical_device_properties2>::value); |
||||||
|
CORRADE_VERIFY(!Implementation::IsInstanceExtension<Extensions::KHR::external_memory>::value); |
||||||
|
CORRADE_VERIFY(!Implementation::IsInstanceExtension<int>::value); |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::isExtension() { |
||||||
|
CORRADE_VERIFY(Implementation::IsExtension<Extensions::KHR::external_memory>::value); |
||||||
|
CORRADE_VERIFY(!Implementation::IsExtension<Extensions::KHR::external_memory_capabilities>::value); |
||||||
|
CORRADE_VERIFY(!Implementation::IsExtension<int>::value); |
||||||
|
|
||||||
|
{ |
||||||
|
/* Not really a problem right now, but once people hit this we might
|
||||||
|
want to guard against this (especially because the Index might be |
||||||
|
out of bounds) */ |
||||||
|
struct GLExtension { |
||||||
|
enum: std::size_t { Index }; |
||||||
|
}; |
||||||
|
CORRADE_EXPECT_FAIL("GL/AL extensions are not rejected right now."); |
||||||
|
CORRADE_VERIFY(!Implementation::IsExtension<GLExtension>::value); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::constructInstanceExtensionFromCompileTimeExtension() { |
||||||
|
InstanceExtension a{Extensions::KHR::get_physical_device_properties2{}}; |
||||||
|
CORRADE_COMPARE(a.index(), Extensions::KHR::get_physical_device_properties2::InstanceIndex); |
||||||
|
CORRADE_COMPARE(a.requiredVersion(), Extensions::KHR::get_physical_device_properties2::requiredVersion()); |
||||||
|
CORRADE_COMPARE(a.coreVersion(), Extensions::KHR::get_physical_device_properties2::coreVersion()); |
||||||
|
CORRADE_COMPARE(a.string(), Extensions::KHR::get_physical_device_properties2::string()); |
||||||
|
|
||||||
|
/* Should be convertible from device extensions, but not instance exts */ |
||||||
|
CORRADE_VERIFY((std::is_convertible<Extensions::KHR::get_physical_device_properties2, InstanceExtension>::value)); |
||||||
|
CORRADE_VERIFY(!(std::is_convertible<Extensions::KHR::external_memory, InstanceExtension>::value)); |
||||||
|
|
||||||
|
/* Shouldn't be convertible from strings to avoid ambiguity in APIs that
|
||||||
|
have string/extension overloads */ |
||||||
|
CORRADE_VERIFY(!(std::is_convertible<Containers::StringView, InstanceExtension>::value)); |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::constructExtensionFromCompileTimeExtension() { |
||||||
|
Extension a{Extensions::KHR::external_memory{}}; |
||||||
|
CORRADE_COMPARE(a.index(), Extensions::KHR::external_memory::Index); |
||||||
|
CORRADE_COMPARE(a.requiredVersion(), Extensions::KHR::external_memory::requiredVersion()); |
||||||
|
CORRADE_COMPARE(a.coreVersion(), Extensions::KHR::external_memory::coreVersion()); |
||||||
|
CORRADE_COMPARE(a.string(), Extensions::KHR::external_memory::string()); |
||||||
|
|
||||||
|
/* Should be convertible from device extensions, but not instance exts */ |
||||||
|
CORRADE_VERIFY((std::is_convertible<Extensions::KHR::external_memory, Extension>::value)); |
||||||
|
CORRADE_VERIFY(!(std::is_convertible<Extensions::KHR::get_physical_device_properties2, Extension>::value)); |
||||||
|
|
||||||
|
/* Shouldn't be convertible from strings to avoid ambiguity in APIs that
|
||||||
|
have string/extension overloads */ |
||||||
|
CORRADE_VERIFY(!(std::is_convertible<Containers::StringView, Extension>::value)); |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::instanceExtensions() { |
||||||
|
Containers::StringView used[Implementation::InstanceExtensionCount]{}; |
||||||
|
|
||||||
|
std::set<Containers::StringView> unique; |
||||||
|
|
||||||
|
/* Check that all extension indices are unique, are in correct lists, are
|
||||||
|
listed just once etc. */ |
||||||
|
for(Version version: { |
||||||
|
Version::Vk10, |
||||||
|
Version::Vk11, |
||||||
|
Version::Vk12, |
||||||
|
Version::None}) |
||||||
|
{ |
||||||
|
Containers::StringView previous; |
||||||
|
for(const InstanceExtension& e: InstanceExtension::extensions(version)) { |
||||||
|
CORRADE_ITERATION(e.string()); |
||||||
|
|
||||||
|
/** @todo convert to CORRADE_ERROR() when that's done */ |
||||||
|
|
||||||
|
/* Binary search is performed on each list to find known
|
||||||
|
extensions, so the exts have to be sorted */ |
||||||
|
if(!previous.isEmpty() && previous >= e.string()) { |
||||||
|
Error{} << "Extension not sorted after" << previous; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
if(e.index() >= Implementation::InstanceExtensionCount) { |
||||||
|
Error{} << "Index" << e.index() << "larger than" << Implementation::InstanceExtensionCount; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
if(used[e.index()] != nullptr) { |
||||||
|
Error{} << "Index" << e.index() << "already used by" << used[e.index()]; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
used[e.index()] = e.string(); |
||||||
|
if(!unique.insert(e.string()).second) { |
||||||
|
Error{} << "Extension listed more than once"; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_COMPARE_AS(e.coreVersion(), e.requiredVersion(), TestSuite::Compare::GreaterOrEqual); |
||||||
|
if(e.coreVersion() != version) { |
||||||
|
Error{} << "Extension should have core version" << version << "but has" << e.coreVersion(); |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
previous = e.string(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
void ExtensionsTest::extensions() { |
||||||
|
Containers::StringView used[Implementation::ExtensionCount]{}; |
||||||
|
|
||||||
|
std::set<Containers::StringView> unique; |
||||||
|
|
||||||
|
/* Check that all extension indices are unique, are in correct lists, are
|
||||||
|
not compiled on versions that shouldn't have them, are listed just once |
||||||
|
etc. */ |
||||||
|
for(Version version: { |
||||||
|
Version::Vk10, |
||||||
|
Version::Vk11, |
||||||
|
Version::Vk12, |
||||||
|
Version::None}) |
||||||
|
{ |
||||||
|
Containers::StringView previous; |
||||||
|
for(const Extension& e: Extension::extensions(version)) { |
||||||
|
CORRADE_ITERATION(e.string()); |
||||||
|
|
||||||
|
/** @todo convert to CORRADE_ERROR() when that's done */ |
||||||
|
|
||||||
|
/* Binary search is performed on each list to find known
|
||||||
|
extensions, so the exts have to be sorted */ |
||||||
|
if(!previous.isEmpty() && previous >= e.string()) { |
||||||
|
Error{} << "Extension not sorted after" << previous; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
if(e.index() >= Implementation::ExtensionCount) { |
||||||
|
Error{} << "Index" << e.index() << "larger than" << Implementation::ExtensionCount; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
if(used[e.index()] != nullptr) { |
||||||
|
Error{} << "Index" << e.index() << "already used by" << used[e.index()]; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
used[e.index()] = e.string(); |
||||||
|
if(!unique.insert(e.string()).second) { |
||||||
|
Error{} << "Extension listed more than once"; |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_COMPARE_AS(e.coreVersion(), e.requiredVersion(), TestSuite::Compare::GreaterOrEqual); |
||||||
|
if(e.coreVersion() != version) { |
||||||
|
Error{} << "Extensio should have core version" << version << "but has" << e.coreVersion(); |
||||||
|
CORRADE_VERIFY(false); |
||||||
|
} |
||||||
|
|
||||||
|
previous = e.string(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
CORRADE_VERIFY(true); |
||||||
|
} |
||||||
|
|
||||||
|
}}}} |
||||||
|
|
||||||
|
CORRADE_TEST_MAIN(Magnum::Vk::Test::ExtensionsTest) |
||||||
@ -0,0 +1,47 @@ |
|||||||
|
#ifndef Magnum_Vk_TypeTraits_h |
||||||
|
#define Magnum_Vk_TypeTraits_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, |
||||||
|
2020 Vladimír Vondruš <mosra@centrum.cz> |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a |
||||||
|
copy of this software and associated documentation files (the "Software"), |
||||||
|
to deal in the Software without restriction, including without limitation |
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||||||
|
and/or sell copies of the Software, and to permit persons to whom the |
||||||
|
Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included |
||||||
|
in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
||||||
|
DEALINGS IN THE SOFTWARE. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Vulkan type traits |
||||||
|
* @m_since_latest |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <Corrade/Utility/TypeTraits.h> |
||||||
|
|
||||||
|
namespace Magnum { namespace Vk { |
||||||
|
|
||||||
|
namespace Implementation { |
||||||
|
/* Put into a separate header so APIs that need it don't need to pull in
|
||||||
|
the whole Extensions.h. Tested in ExtensionsTest also. */ |
||||||
|
/** @todo filter out GL/AL extensions also */ |
||||||
|
CORRADE_HAS_TYPE(IsInstanceExtension, decltype(T::InstanceIndex)); |
||||||
|
CORRADE_HAS_TYPE(IsExtension, decltype(T::Index)); |
||||||
|
} |
||||||
|
|
||||||
|
}} |
||||||
|
|
||||||
|
#endif |
||||||
@ -1,32 +1,72 @@ |
|||||||
version 1.2 vulkan |
version 1.2 vulkan |
||||||
|
|
||||||
extension KHR_16bit_storage optional |
# For core extensions, only ones that introduce suffixed function pointers are |
||||||
extension KHR_bind_memory2 optional |
# enabled, as structures, types and enums are already present. |
||||||
extension KHR_dedicated_allocation optional |
# TODO: extend flextGL to include only function pointers from these |
||||||
extension KHR_descriptor_update_template optional |
|
||||||
extension KHR_device_group optional |
# Instance extensions |
||||||
|
extension KHR_get_physical_device_properties2 optional |
||||||
extension KHR_device_group_creation optional |
extension KHR_device_group_creation optional |
||||||
extension KHR_external_memory optional |
|
||||||
extension KHR_external_memory_capabilities optional |
extension KHR_external_memory_capabilities optional |
||||||
extension KHR_external_semaphore optional |
|
||||||
extension KHR_external_semaphore_capabilities optional |
extension KHR_external_semaphore_capabilities optional |
||||||
extension KHR_external_fence optional |
|
||||||
extension KHR_external_fence_capabilities optional |
extension KHR_external_fence_capabilities optional |
||||||
extension KHR_get_memory_requirements2 optional |
|
||||||
extension KHR_get_physical_device_properties2 optional |
# Device extensions |
||||||
|
#extension EXT_sampler_filter_minmax optional |
||||||
|
#extension EXT_descriptor_indexing optional |
||||||
|
#extension EXT_shader_viewport_index_layer optional |
||||||
|
#extension EXT_scalar_block_layout optional |
||||||
|
#extension EXT_separate_stencil_usage optional |
||||||
|
extension EXT_host_query_reset optional |
||||||
|
#extension KHR_sampler_mirror_clamp_to_edge optional |
||||||
|
#extension KHR_multiview optional |
||||||
|
extension KHR_device_group optional |
||||||
|
#extension KHR_shader_draw_parameters optional |
||||||
extension KHR_maintenance1 optional |
extension KHR_maintenance1 optional |
||||||
extension KHR_maintenance2 optional |
#extension KHR_external_semaphore optional |
||||||
extension KHR_maintenance3 optional |
#extension KHR_shader_float16_int8 optional |
||||||
extension KHR_multiview optional |
#extension KHR_16bit_storage optional |
||||||
extension KHR_relaxed_block_layout optional |
extension KHR_descriptor_update_template optional |
||||||
|
#extension KHR_external_memory optional |
||||||
|
#extension KHR_imageless_framebuffer optional |
||||||
|
extension KHR_create_renderpass2 optional |
||||||
|
#extension KHR_external_fence optional |
||||||
|
#extension KHR_maintenance2 optional |
||||||
|
#extension KHR_variable_pointers optional |
||||||
|
#extension KHR_dedicated_allocation optional |
||||||
|
#extension KHR_storage_buffer_storage_class optional |
||||||
|
#extension KHR_relaxed_block_layout optional |
||||||
|
extension KHR_get_memory_requirements2 optional |
||||||
|
#extension KHR_image_format_list optional |
||||||
extension KHR_sampler_ycbcr_conversion optional |
extension KHR_sampler_ycbcr_conversion optional |
||||||
extension KHR_shader_draw_parameters optional |
extension KHR_bind_memory2 optional |
||||||
extension KHR_storage_buffer_storage_class optional |
extension KHR_maintenance3 optional |
||||||
extension KHR_variable_pointers optional |
extension KHR_draw_indirect_count optional |
||||||
|
#extension KHR_shader_subgroup_extended_types optional |
||||||
|
#extension KHR_8bit_storage optional |
||||||
|
#extension KHR_shader_atomic_int64 optional |
||||||
|
#extension KHR_driver_properties optional |
||||||
|
#extension KHR_shader_float_controls optional |
||||||
|
#extension KHR_depth_stencil_resolve optional |
||||||
|
extension KHR_timeline_semaphore optional |
||||||
|
#extension KHR_vulkan_memory_model optional |
||||||
|
#extension KHR_spirv_1_4 optional |
||||||
|
#extension KHR_separate_depth_stencil_layouts optional |
||||||
|
#extension KHR_uniform_buffer_standard_layout optional |
||||||
|
extension KHR_buffer_device_address optional |
||||||
|
|
||||||
|
# Non-core / vendor extensions |
||||||
|
extension EXT_debug_report optional |
||||||
|
extension EXT_debug_marker optional |
||||||
|
extension EXT_debug_utils optional |
||||||
|
extension EXT_validation_features optional |
||||||
extension EXT_texture_compression_astc_hdr optional |
extension EXT_texture_compression_astc_hdr optional |
||||||
extension EXT_index_type_uint8 optional |
extension EXT_index_type_uint8 optional |
||||||
|
|
||||||
extension IMG_format_pvrtc optional |
extension IMG_format_pvrtc optional |
||||||
|
|
||||||
|
begin functions blacklist |
||||||
|
# Deprecated since 1.0.13, not used |
||||||
|
EnumerateDeviceLayerProperties |
||||||
|
end functions blacklist |
||||||
|
|
||||||
# kate: hl python |
# kate: hl python |
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue