diff options
Diffstat (limited to 'layers/threading.cpp')
| -rw-r--r-- | layers/threading.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/layers/threading.cpp b/layers/threading.cpp index c5242c73..4bdc9644 100644 --- a/layers/threading.cpp +++ b/layers/threading.cpp @@ -178,14 +178,15 @@ static inline PFN_vkVoidFunction layer_intercept_proc(const char *name) { VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { - if (pLayerName == NULL) { - dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); - return my_data->instance_dispatch_table->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); - } else { - // Threading layer does not have any device extensions + // Threading layer does not have any device extensions + if (pLayerName && !strcmp(pLayerName, layerProps.layerName)) return util_GetExtensionProperties(0, nullptr, pCount, pProperties); - } + + assert(physicalDevice); + + dispatch_key key = get_dispatch_key(physicalDevice); + layer_data *my_data = get_my_data_ptr(key, layer_data_map); + return my_data->instance_dispatch_table->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } static inline PFN_vkVoidFunction layer_intercept_instance_proc(const char *name) { @@ -370,7 +371,8 @@ vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pCou VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { - return threading::EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); + // the layer command handles VK_NULL_HANDLE just fine + return threading::EnumerateDeviceExtensionProperties(VK_NULL_HANDLE, pLayerName, pCount, pProperties); } VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev, const char *funcName) { |
