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

Vulkan: Retry instance creation if validation layer is not present #909

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

ColinKinloch
Copy link
Contributor

@ColinKinloch ColinKinloch commented Jul 22, 2023

When running the flatpak if the vulkan validation layer is enabled Cemu crashes with an error box that says "Error when initializing Vulkan renderer: Unable to create a Vulkan instance: -6"

an error box that says "Error when initializing Vulkan renderer: Unable to create a Vulkan instance: -6"

For some reason this goes away when running with the --devel option.

This MR adds a second attempt at creating a instance disabling all vulkan layers.

This is what Q2RTX does.

I initially tried checking against the list returned by vkEnumerateInstanceLayerProperties but it reports that VK_LAYER_KHRONOS_validation is present.

@Exzap
Copy link
Member

Exzap commented Jul 27, 2023

It is by design that Cemu refuses to start with validation layer enabled but not present. Granted, we could display a better error message. But I believe that just silently ignoring the error will lead only to confusion on the users side, especially since the validation layer needs to be turned on explicitly.

@ColinKinloch
Copy link
Contributor Author

The fact the debug options are in the menu bar rather than the settings also complicated debugging this.

@Exzap
Copy link
Member

Exzap commented Aug 3, 2023

I'll merge this as-is and add error logging
ah nvm I'm blind. It's already there.

@Exzap Exzap merged commit 1d1e1e7 into cemu-project:main Aug 3, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants