aux/vk: check EXT_debug_utils loaded function before enabling support

Co-authored-by: Rylie Pavlik <rylie.pavlik@collabora.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2332>
This commit is contained in:
Simon ZeniandRylie Pavlik authored and Rylie Pavlik committed 2024-11-04 13:08:18 -06:00
1 parent cef70d03ca
commit a944cfdcf4
1 file changed
+12 -6
+12 -6
View File
@@ -1446,12 +1446,6 @@ vk_init_from_given(struct vk_bundle *vk,
}
#endif
#ifdef VK_EXT_debug_utils
if (debug_utils_enabled) {
vk->has_EXT_debug_utils = true;
}
#endif
// Fill in the device features we are interested in.
fill_in_device_features(vk);
@@ -1466,6 +1460,18 @@ vk_init_from_given(struct vk_bundle *vk,
vk->vkGetDeviceQueue(vk->device, vk->queue_family_index, vk->queue_index, &vk->queue);
vk->has_EXT_debug_utils = false;
if (debug_utils_enabled) {
#ifdef VK_EXT_debug_utils
if (vk->vkSetDebugUtilsObjectNameEXT) {
vk->has_EXT_debug_utils = true;
} else {
VK_WARN(vk, "EXT_debug_utils requested but extension is not loaded");
}
#else
VK_WARN(vk, "EXT_debug_utils requested but extension was not available at compile time");
#endif
}
return VK_SUCCESS;