mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
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:
parent
cef70d03ca
commit
a944cfdcf4
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue