diff options
| author | Chia-I Wu <olv@google.com> | 2016-04-28 14:21:13 +0800 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-05 06:42:18 -0600 |
| commit | 238e332d5ebd89130dec404148e2356e557e3f28 (patch) | |
| tree | 2feff5d6407a15ce248297e085e3e1114a3abda5 /layers/image.cpp | |
| parent | e7770364fe4a5ca1f5c4745656532c0758ad0c67 (diff) | |
| download | usermoji-238e332d5ebd89130dec404148e2356e557e3f28.tar.xz | |
image: improve EnumerateDeviceExtensionProperties
Call down the next layer unless pLayerName is image.
Diffstat (limited to 'layers/image.cpp')
| -rw-r--r-- | layers/image.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/layers/image.cpp b/layers/image.cpp index 3b019bf3..10bc65e1 100644 --- a/layers/image.cpp +++ b/layers/image.cpp @@ -1246,14 +1246,15 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevi const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { // Image does not have any physical device extensions - if (pLayerName == NULL) { - dispatch_key key = get_dispatch_key(physicalDevice); - layer_data *my_data = get_my_data_ptr(key, layer_data_map); - VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; - return pTable->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); - } else { + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) return util_GetExtensionProperties(0, NULL, pCount, pProperties); - } + + assert(physicalDevice); + + dispatch_key key = get_dispatch_key(physicalDevice); + layer_data *my_data = get_my_data_ptr(key, layer_data_map); + VkLayerInstanceDispatchTable *pTable = my_data->instance_dispatch_table; + return pTable->EnumerateDeviceExtensionProperties(physicalDevice, NULL, pCount, pProperties); } VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char *funcName) { @@ -1383,7 +1384,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 image::EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); + // the layer command handles VK_NULL_HANDLE just fine + return image::EnumerateDeviceExtensionProperties(VK_NULL_HANDLE, pLayerName, pCount, pProperties); } VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev, const char *funcName) { |
