From d4c367287ea50e854205e27cf814abbb23615b8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 24 Jan 2022 21:47:39 +0100 Subject: [PATCH] add layer and instance ext check methods --- include/vkh.h | 12 ++++++++++++ src/vkhelpers.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/include/vkh.h b/include/vkh.h index 0a6eada..94a912a 100644 --- a/include/vkh.h +++ b/include/vkh.h @@ -312,6 +312,18 @@ void vkh_queue_destroy (VkhQueue queue); //VkhQueue vkh_queue_find (VkhDevice dev, VkQueueFlags flags); ///////////////////// +vkh_public +bool vkh_instance_extension_supported (const char* instanceName); +vkh_public +void vkh_instance_extensions_check_init (); +vkh_public +void vkh_instance_extensions_check_release (); +vkh_public +bool vkh_layer_is_present (const char* layerName); +vkh_public +void vkh_layers_check_init (); +vkh_public +void vkh_layers_check_release (); #ifdef __cplusplus } #endif diff --git a/src/vkhelpers.c b/src/vkhelpers.c index b457d69..03d32ff 100644 --- a/src/vkhelpers.c +++ b/src/vkhelpers.c @@ -287,3 +287,39 @@ void dumpLayerExts () { } free(vk_props); } + +static VkExtensionProperties* instExtProps; +static uint32_t instExtCount; +bool vkh_instance_extension_supported (const char* instanceName) { + for (uint32_t i=0; i