Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VkSurfacePresentModeCompatibilityEXT passed without VkSurfacePresentModeEXT #846

Closed
emersion opened this issue Aug 25, 2023 · 5 comments · Fixed by #857
Closed

VkSurfacePresentModeCompatibilityEXT passed without VkSurfacePresentModeEXT #846

emersion opened this issue Aug 25, 2023 · 5 comments · Fixed by #857
Labels
bug Something isn't working vulkaninfo

Comments

@emersion
Copy link

emersion commented Aug 25, 2023

If a VkSurfacePresentScalingCapabilitiesEXT structure is included in the pNext chain of pSurfaceCapabilities, a VkSurfacePresentModeEXT structure must be included in the pNext chain of pSurfaceInfo

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPhysicalDeviceSurfaceCapabilities2KHR.html#VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-07776

However, vulkaninfo passes VkSurfacePresentModeCompatibilityEXT without a VkSurfacePresentModeEXT chained up.

This makes Mesa crash.

@charles-lunarg charles-lunarg added bug Something isn't working vulkaninfo labels Aug 25, 2023
@charles-lunarg
Copy link
Contributor

So looking at this VUID, its clear that I need to supply a VkPresentModeKHR for the VUID to be satisfied (through VkSurfacePresentModeEXT). The hangup is "which" mode to use. Because now I think its necessary to call the function multiple times, one for each present mode, and print the surface_maintenance1 capabilities for each present mode. Does that seem reasonable?

@emersion
Copy link
Author

Yeah, I think it would make sense to query the present mode compatibility for each present mode supported by the Vulkan implementation.

Chaotic-Temeraire pushed a commit to chaotic-cx/mesa-mirror that referenced this issue Aug 30, 2023
A bug in vulkan tools, KhronosGroup/Vulkan-Tools#846
causes vulkaninfo to crash in Mesa under wayland since the changes
in 5ceba97

Handle the crashing case on wayland similarly to how other WSIs
do (nonsensically claiming a single compatible mode), and log
the condition once for all WSIs.

Fixes 5ceba97

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24888>
@charles-lunarg
Copy link
Contributor

I started to work on this issue but got distracted by other repo's (loader & vulkan-utility-library).

I hope to have a fix for this up by the end of the week, its not great to be shipping vulkaninfo with such a bug in it.

@charles-lunarg
Copy link
Contributor

@emersion I added sample output in the PR I just linked. This is what it'll look like in the text output of vulkaninfo. Let me know if it makes sense or needs tweaking.

@emersion
Copy link
Author

emersion commented Oct 5, 2023

Yes, that makes sense to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vulkaninfo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants