diff options
| author | Chia-I Wu <olv@google.com> | 2016-05-16 10:13:45 +0800 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-05-24 06:29:14 -0600 |
| commit | 139ff88b3235317624a6ca2a1f5243ef798703c7 (patch) | |
| tree | c947bd99777f59b6389cbb6861887c6839e917ba /layers/threading.cpp | |
| parent | b68fd2709daf6c5b9276bc825d4f41d4631513ad (diff) | |
| download | usermoji-139ff88b3235317624a6ca2a1f5243ef798703c7.tar.xz | |
threading: add threading::layerProps
Replace globalLayerProps and deviceLayerProps with layerProps. There is
no plan to define more than one layer in the same namespace.
Diffstat (limited to 'layers/threading.cpp')
| -rw-r--r-- | layers/threading.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/layers/threading.cpp b/layers/threading.cpp index 0f8113f1..c5242c73 100644 --- a/layers/threading.cpp +++ b/layers/threading.cpp @@ -161,17 +161,11 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall static const VkExtensionProperties threading_extensions[] = { {VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}}; -static const VkLayerProperties globalLayerProps[] = {{ +static const VkLayerProperties layerProps = { "VK_LAYER_GOOGLE_threading", VK_LAYER_API_VERSION, // specVersion 1, "Google Validation Layer", -}}; - -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++) { @@ -365,12 +359,12 @@ vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pCount, VkLayerProperties *pProperties) { - return util_GetLayerProperties(ARRAY_SIZE(threading::globalLayerProps), threading::globalLayerProps, pCount, pProperties); + return util_GetLayerProperties(1, &threading::layerProps, pCount, pProperties); } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties *pProperties) { - return util_GetLayerProperties(ARRAY_SIZE(threading::deviceLayerProps), threading::deviceLayerProps, pCount, pProperties); + return util_GetLayerProperties(1, &threading::layerProps, pCount, pProperties); } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, |
