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: Check for vkSetDebugUtilsObjectNameEXT before using it #10342

Merged
merged 1 commit into from Jan 4, 2022

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jan 3, 2022

Fixes a crash that has been present on Android (and probably also macOS) since the merge of PR #10269.

This is my first time touching Vulkan, and I don't know if this is a "proper" solution. (Should we check for the existence of VK_EXT_debug_utils rather than checking the vkSetDebugUtilsObjectNameEXT function pointer directly?)

Fixes a crash that has been present on Android (and probably also
macOS) since f6883a0.
@iwubcode
Copy link
Contributor

iwubcode commented Jan 3, 2022

Yeah, I believe the way we've done this in the past is to introduce a new backend variable (something like supports_debug_names) and then set to the true for all backends except Vulkan. Vulkan would then check for the existence of VK_EXT_debug. The places you outlined would then check that backend object variable.

It's a lot of overhead though. I'd be fine with your solution as a temporary fix or a permanent solution.

To be fair, I don't know the Vulkan code base that well either (just started learning it), so we might check pointers as a solution as well.

@JMC47
Copy link
Contributor

JMC47 commented Jan 4, 2022

This is a simple solution that is easy to revert if we need a more robust solution.

I don't want to leave master broken for obvious reasons.

@JMC47 JMC47 merged commit 3feea70 into dolphin-emu:master Jan 4, 2022
10 checks passed
@JosJuice JosJuice deleted the vulkan-shader-crash branch January 4, 2022 15:48
@chrisis123
Copy link

I can confirm this fixes the MacOS crash when starting a game for me (on an M1 Mac Book Pro) - I was just about to report this bug when I noticed this PR was merged

@brujo5
Copy link

brujo5 commented Jan 4, 2022

fixed crash android to. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants