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

VulkanContext: Ensure present queue family is valid before incrementing queueCreateInfoCount #10320

Merged
merged 1 commit into from Jan 1, 2022

Conversation

OatmealDome
Copy link
Member

@OatmealDome OatmealDome commented Dec 29, 2021

VulkanContext::CreateDevice() attempts to find appropriate graphics queue and present queue families. It will skip trying to find a present queue family if the surface is VK_NULL_HANDLE (headless mode). However, even if the present queue family isn't valid, queueCreateInfoCount will be set to 2 as long as the graphics queue family index isn't the same as the present queue family index (which it won't, as the default value is the number of queues).

This causes DolphinNoGUI in headless mode on macOS to crash, as MoltenVK would attempt to create an MVKQueue using an invalid configuration.

@leoetlino leoetlino merged commit 0a62ba9 into dolphin-emu:master Jan 1, 2022
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants