VulkanCore icon indicating copy to clipboard operation
VulkanCore copied to clipboard

Vulkan 1.1 support

Open discosultan opened this issue 7 years ago • 5 comments

This is a tracking issue to support latest Vulkan v1.1.79. Progress is measured in terms of new commands added or existing commands promoted from an extension namespace to core or some other namespace.

Any related changes should be made against the v1.1 branch.

New commands added

  • [x] vkEnumerateInstanceVersion (https://github.com/discosultan/VulkanCore/commit/89c3a56e2cd5018c2bf144d44a7717157db6e180)
  • [x] vkCreateDebugUtilsMessengerEXT (https://github.com/discosultan/VulkanCore/commit/ecdc7445ade614859f654f8bded963f1cbb5ea84)
  • [ ] vkSubmitDebugUtilsMessageEXT
  • [ ] vkGetDeviceQueue2
  • [ ] vkGetDescriptorSetLayoutSupport
  • [ ] vkGetPhysicalDeviceDisplayProperties2KHR
  • [ ] vkGetPhysicalDeviceDisplayPlaneProperties2KHR
  • [ ] vkGetDisplayPlaneCapabilities2KHR
  • [ ] vkQueueBeginDebugUtilsLabelEXT
  • [ ] vkQueueEndDebugUtilsLabelEXT
  • [ ] vkQueueInsertDebugUtilsLabelEXT
  • [ ] vkCmdDrawIndirectCountKHR
  • [ ] vkCmdDrawIndexedIndirectCountKHR
  • [ ] vkCmdBeginDebugUtilsLabelEXT
  • [ ] vkCmdEndDebugUtilsLabelEXT
  • [ ] vkCmdInsertDebugUtilsLabelEXT
  • [ ] vkGetDisplayModeProperties2KHR
  • [x] vkDestroyDebugUtilsMessengerEXT (https://github.com/discosultan/VulkanCore/commit/ecdc7445ade614859f654f8bded963f1cbb5ea84)

Existing commands promoted

  • [x] vkEnumeratePhysicalDeviceGroupsKHX -> vkEnumeratePhysicalDeviceGroups (https://github.com/discosultan/VulkanCore/commit/432f5b59eaf79fa244eb29aa5094eaa992882ede)
  • [ ] vkGetDeviceGroupPeerMemoryFeaturesKHX -> vkGetDeviceGroupPeerMemoryFeatures
  • [ ] vkBindBufferMemory2KHR -> vkBindBufferMemory2
  • [ ] vkBindImageMemory2KHR -> vkBindImageMemory2
  • [ ] vkGetDeviceGroupPresentCapabilitiesKHX -> vkGetDeviceGroupPresentCapabilitiesKHR
  • [ ] vkAcquireNextImage2KHX -> vkAcquireNextImage2KHR
  • [ ] vkCreateDescriptorUpdateTemplateKHR -> vkCreateDescriptorUpdateTemplate
  • [ ] vkGetBufferMemoryRequirements2KHR -> vkGetBufferMemoryRequirements2
  • [ ] vkGetImageMemoryRequirements2KHR -> vkGetImageMemoryRequirements2
  • [ ] vkGetImageSparseMemoryRequirements2KHR -> vkGetImageSparseMemoryRequirements2
  • [ ] vkCreateSamplerYcbcrConversionKHR -> vkCreateSamplerYcbcrConversion
  • [ ] vkGetPhysicalDeviceFeatures2KHR -> vkGetPhysicalDeviceFeatures2
  • [ ] vkGetPhysicalDeviceProperties2KHR -> vkGetPhysicalDeviceProperties2
  • [ ] vkGetPhysicalDeviceFormatProperties2KHR -> vkGetPhysicalDeviceFormatProperties2
  • [ ] vkGetPhysicalDeviceImageFormatProperties2KHR -> vkGetPhysicalDeviceImageFormatProperties2
  • [ ] vkGetPhysicalDeviceQueueFamilyProperties2KHR -> vkGetPhysicalDeviceQueueFamilyProperties2
  • [ ] vkGetPhysicalDeviceMemoryProperties2KHR -> vkGetPhysicalDeviceMemoryProperties2
  • [ ] vkGetPhysicalDeviceSparseImageFormatProperties2KHR -> vkGetPhysicalDeviceSparseImageFormatProperties2
  • [ ] vkGetPhysicalDeviceExternalBufferPropertiesKHR -> vkGetPhysicalDeviceExternalBufferProperties
  • [ ] vkGetPhysicalDeviceExternalSemaphorePropertiesKHR -> vkGetPhysicalDeviceExternalSemaphoreProperties
  • [ ] vkGetPhysicalDeviceExternalFencePropertiesKHR -> vkGetPhysicalDeviceExternalFenceProperties
  • [ ] vkTrimCommandPoolKHR -> vkTrimCommandPool
  • [ ] vkCmdSetDeviceMaskKHX -> vkCmdSetDeviceMask
  • [ ] vkCmdDispatchBaseKHX -> vkCmdDispatchBase
  • [ ] vkGetDeviceGroupSurfacePresentModesKHX -> vkGetDeviceGroupSurfacePresentModesKHR
  • [ ] vkGetPhysicalDevicePresentRectanglesKHX -> vkGetPhysicalDevicePresentRectanglesKHR
  • [ ] vkDestroyDescriptorUpdateTemplateKHR -> vkDestroyDescriptorUpdateTemplate
  • [ ] vkUpdateDescriptorSetWithTemplateKHR -> vkUpdateDescriptorSetWithTemplate
  • [ ] vkDestroySamplerYcbcrConversionKHR -> vkDestroySamplerYcbcrConversion

Design consideration when updating existing commands

The following are not set in stone but feel like a good approach:

  • Any existing command that is promoted from the KHX namespace should be moved and not copied: the old command should be deleted. We don't care much about backward compatibility here because this is an experimental namespace and the old variants of the commands were also removed from the official spec. For example, when promoting vkEnumeratePhysicalDeviceGroupsKHX, method EnumeratePhysicalDeviceGroups will be added and EnumeratePhysicalDeviceGroupsKHX removed.
  • Any existing command that is promoted from any other namespace than KHX should be copied: the old command should not be deleted. This is in order not to break compatibility against Vulkan runtime versions v1.0.X. The official spec also keeps them and simply aliases to their promoted variants. For example, when promoting vkBindBufferMemory2KHR, method BindBufferMemory2 will be added, BindBufferMemory2KHR will remain unchanged.
  • Any accompanying struct, enum or handle should be moved to new namespace regardless of previous namespace. We don't want to duplicate code for them, but just for commands for compatibility reasons.

discosultan avatar Jun 18 '18 10:06 discosultan

Just make sure that delegates are marked with: [UnmanagedFunctionPointer(CallingConvention.Cdecl)]

amerkoleci avatar Jun 18 '18 12:06 amerkoleci

Maybe make the 1.1 branch as master now? So we start creating nuget packages and PR there?

amerkoleci avatar Jun 21 '18 14:06 amerkoleci

It might be worth it to set it as the default branch on Github, but not as master - that should be the stable release version. However, I don't think we should release new Nuget packages from the v1.1 branch until it's feature-complete.

WardBenjamin avatar Jun 21 '18 14:06 WardBenjamin

I see, but still at the moment the 1.1 does not break nothing already existing, it just add new stuff.

amerkoleci avatar Jun 21 '18 14:06 amerkoleci

couple of doubts: is still worth to complete the 1.1 ? isn't the 1.2 already out ? vkGetDeviceGroupPeerMemoryFeaturesKHX -> vkGetDeviceGroupPeerMemoryFeatures https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkGetDeviceGroupPeerMemoryFeaturesKHR shouldn't this method be also aliased in the KHR namespace ? or it's useless ?

TrabacchinLuigi avatar Nov 29 '20 12:11 TrabacchinLuigi