aboutsummaryrefslogtreecommitdiff
path: root/layers/image.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@google.com>2016-04-28 14:12:27 +0800
committerTobin Ehlis <tobine@google.com>2016-05-05 06:42:18 -0600
commite7770364fe4a5ca1f5c4745656532c0758ad0c67 (patch)
tree75d09de5a7a456f028f73f24e1e4d0ecd6db7137 /layers/image.cpp
parentd75defc8d84d84cb594c2eadf6312a0f4b21e9cc (diff)
downloadusermoji-e7770364fe4a5ca1f5c4745656532c0758ad0c67.tar.xz
image: add image::global_layer
Replace pc_global_layers with global_layer. There is no plan to define more than one layer in the same namespace.
Diffstat (limited to 'layers/image.cpp')
-rw-r--r--layers/image.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/layers/image.cpp b/layers/image.cpp
index 49fbdf33..3b019bf3 100644
--- a/layers/image.cpp
+++ b/layers/image.cpp
@@ -195,9 +195,9 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall
static const VkExtensionProperties instance_extensions[] = {{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}};
-static const VkLayerProperties pc_global_layers[] = {{
+static const VkLayerProperties global_layer = {
"VK_LAYER_LUNARG_image", VK_LAYER_API_VERSION, 1, "LunarG Validation Layer",
-}};
+};
// Start of the Image layer proper
@@ -1372,13 +1372,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(image::pc_global_layers), image::pc_global_layers, pCount, pProperties);
+ return util_GetLayerProperties(1, &image::global_layer, pCount, pProperties);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pCount, VkLayerProperties *pProperties) {
- // ParamChecker's physical device layers are the same as global
- return util_GetLayerProperties(ARRAY_SIZE(image::pc_global_layers), image::pc_global_layers, pCount, pProperties);
+ return util_GetLayerProperties(1, &image::global_layer, pCount, pProperties);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,