kondrak / vkQuake2

id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, macOS, FreeBSD, Raspberry Pi 4)
GNU General Public License v2.0
896 stars 91 forks source link

Make VK_EXT_debug_utils optional on debug builds #99

Closed infapi00 closed 4 years ago

infapi00 commented 4 years ago

Right now vkQuake2 enables unconditionally, and define debug labels and some functions related to the extension VK_EXT_debug_utils on debug builds.

If a Vulkan driver doesn't support that extension, it seems that vkQuake2 would fail.

But that extension is an EXT extension, meaning that it is not mandatory. So there are some conformant vulkan drivers, like Mesa intel vulkan driver (anvil), that doesn't support it.

Ideally VK_EXT_debug_utils would be a optional extension, that would be enabled, if available, on debug builds.

FWIW, I have a hack to workaround this issue here: https://github.com/infapi00/vkQuake2/commit/4997457a8234ae64bad714a93b7479a0c884c8f7, that just removes the references to that extension. But as mentioned it is just a hack.

kondrak commented 4 years ago

Is this something you ran into on rpi4?

infapi00 commented 4 years ago

Yes, we don't plan to support VK_EXT_debug_utils in the short/medium term, but specially when we were trying to get vkQuake2 (*) running, it was really useful to run debug builds. The hack I mentioned was a quick workaround to this. But perhaps there is an alternative workaround to get the debug builds run on a driver not supporting VK_EXT_debug_utils?

(*) : btw, vkQuake2 is basically the first real-vulkan-app that we used to test the ongoing driver. So far we were using CTS tests, and some months ago we started to use sascha willems demos. Running vkQuake2 allowed us to find and fix some bugs on the driver, so now that Im here, thanks for this project.

kondrak commented 4 years ago

Latest master branch now checks for extension support - please let me know if that works for you.

infapi00 commented 4 years ago

Yes, I have just checked on rpi4 and works fine. Closing the issue. Thanks!

kondrak commented 4 years ago

@infapi00 does the driver support VK_EXT_debug_report by any chance? I've been thinking if it might be worth to add an alternative path if debug_utils is not available.

infapi00 commented 4 years ago

@infapi00 does the driver support VK_EXT_debug_report by any chance? I've been thinking if it might be worth to add an alternative path if debug_utils is not available.

No sorry. As mentioned we are still not even implemented all the core features for vulkan 1.0. So right now our priority are those, and we would evaluate if we implement any EXT extension later.

kondrak commented 4 years ago

Thanks, I won't be spending my time on it then :)