diff options
| author | Chia-I Wu <olv@google.com> | 2016-05-16 08:58:07 +0800 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-24 06:29:13 -0600 |
| commit | 1cdb908074c4f2b28aff578f8b170a194a748c90 (patch) | |
| tree | 6eca911fc80364809974ac99753524df4d2dac5f /layers/threading.cpp | |
| parent | 3a47bcd51ee269a8526edc70a53c28eee18be831 (diff) | |
| download | usermoji-1cdb908074c4f2b28aff578f8b170a194a748c90.tar.xz | |
threading: move vkEnumerate*Properties around
Move them toward the end of the file.
Diffstat (limited to 'layers/threading.cpp')
| -rw-r--r-- | layers/threading.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/layers/threading.cpp b/layers/threading.cpp index 4d9fca0d..454b9c43 100644 --- a/layers/threading.cpp +++ b/layers/threading.cpp @@ -159,27 +159,26 @@ VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, cons static const VkExtensionProperties threading_extensions[] = { {VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}}; -VK_LAYER_EXPORT VkResult VKAPI_CALL -vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { - return util_GetExtensionProperties(ARRAY_SIZE(threading_extensions), threading_extensions, pCount, pProperties); -} - static const VkLayerProperties globalLayerProps[] = {{ "VK_LAYER_GOOGLE_threading", VK_LAYER_API_VERSION, // specVersion 1, "Google Validation Layer", }}; -VK_LAYER_EXPORT VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pCount, VkLayerProperties *pProperties) { - return util_GetLayerProperties(ARRAY_SIZE(globalLayerProps), globalLayerProps, pCount, pProperties); -} - static const VkLayerProperties deviceLayerProps[] = {{ "VK_LAYER_GOOGLE_threading", VK_LAYER_API_VERSION, // specVersion 1, "Google Validation Layer", }}; +static inline PFN_vkVoidFunction layer_intercept_proc(const char *name) { + for (int i = 0; i < sizeof(procmap) / sizeof(procmap[0]); i++) { + if (!strcmp(name, procmap[i].name)) + return procmap[i].pFunc; + } + return NULL; +} + VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { @@ -193,19 +192,6 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionPropert } } -VK_LAYER_EXPORT VkResult VKAPI_CALL -vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties *pProperties) { - return util_GetLayerProperties(ARRAY_SIZE(deviceLayerProps), deviceLayerProps, pCount, pProperties); -} - -static inline PFN_vkVoidFunction layer_intercept_proc(const char *name) { - for (int i = 0; i < sizeof(procmap) / sizeof(procmap[0]); i++) { - if (!strcmp(name, procmap[i].name)) - return procmap[i].pFunc; - } - return NULL; -} - static inline PFN_vkVoidFunction layer_intercept_instance_proc(const char *name) { if (!name || name[0] != 'v' || name[1] != 'k') return NULL; @@ -346,3 +332,17 @@ void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, command_pool_map.erase(pCommandBuffers[index]); } } + +VK_LAYER_EXPORT VkResult VKAPI_CALL +vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, VkExtensionProperties *pProperties) { + return util_GetExtensionProperties(ARRAY_SIZE(threading_extensions), threading_extensions, pCount, pProperties); +} + +VK_LAYER_EXPORT VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pCount, VkLayerProperties *pProperties) { + return util_GetLayerProperties(ARRAY_SIZE(globalLayerProps), globalLayerProps, pCount, pProperties); +} + +VK_LAYER_EXPORT VkResult VKAPI_CALL +vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties *pProperties) { + return util_GetLayerProperties(ARRAY_SIZE(deviceLayerProps), deviceLayerProps, pCount, pProperties); +} |
