KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.7k stars 452 forks source link

VkSurfacePresentScalingCapabilitiesEXT incorrect usage description #2348

Open tim-rex opened 2 months ago

tim-rex commented 2 months ago

The documentation for VkSurfacePresentScalingCapabilitiesEXT indicates:

Before creating a swapchain whose scaling mode can be specified through the use of VkSwapchainPresentScalingCreateInfoEXT, obtain the set of supported scaling modes by including a VkSurfacePresentModeEXT structure in the pNext chain of VkPhysicalDeviceSurfaceInfo2KHR when calling vkGetPhysicalDeviceSurfaceCapabilities2KHR.

That seems incorrect. The set of supported scaling modes is not contained within a VkSurfacePresentModeEXT struct.

I couldn't find any reference that correctly defines how to achieve this, but after some spelunking it seem this should in fact be:

VkSurfacePresentScalingCapabilitiesEXT

Before creating a swapchain whose scaling mode can be specified through the use of VkSwapchainPresentScalingCreateInfoEXT, obtain the set of supported scaling modes by including a VkSurfacePresentScalingCapabilitiesEXT structure in the pNext chain of VkSurfaceCapabilities2KHR when calling vkGetPhysicalDeviceSurfaceCapabilities2KHR.

oddhack commented 2 months ago

@versalinyaa can you bring this up to SI TSG?

stonesthrow commented 2 months ago

We did not have time for triage on this new item today. The proposal in the description seems correct. A little verification is needed and text of spec updated to describe proper method is needed. Thanks for raising issue and suggested clarification.