loader: bug 12992: extension and layer support

Much of layers and loader updated to work with
final extension and layer mechanism.
Not everything is working here.
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 8f521d6..5cb1057 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -83,28 +83,28 @@
 	vk_struct_graphviz_helper.h
 )
 
-run_vk_layer_generate(Generic generic_layer.cpp)
+#run_vk_layer_generate(Generic generic_layer.cpp)
 run_vk_layer_generate(APIDump api_dump.cpp)
-run_vk_layer_generate(ObjectTracker object_track.cpp)
-run_vk_layer_generate(Threading threading.cpp)
+#run_vk_layer_generate(ObjectTracker object_track.cpp)
+#run_vk_layer_generate(Threading threading.cpp)
 
-add_library(layer_utils SHARED vk_layer_config.cpp)
+add_library(layer_utils SHARED vk_layer_config.cpp vk_layer_extension_utils.cpp)
 if (WIN32)
-    add_library(layer_utils_static STATIC vk_layer_config.cpp)
+    add_library(layer_utils_static STATIC vk_layer_config.cpp vk_layer_extension_utils.cpp)
     set_target_properties(layer_utils_static PROPERTIES OUTPUT_NAME layer_utils)
     target_link_libraries(layer_utils)
 endif()
 
-add_vk_layer(Basic basic.cpp vk_layer_table.cpp)
-add_vk_layer(Multi multi.cpp)
-add_vk_layer(DrawState draw_state.cpp vk_layer_debug_marker_table.cpp vk_layer_table.cpp)
+#add_vk_layer(Basic basic.cpp vk_layer_table.cpp)
+#add_vk_layer(Multi multi.cpp)
+#add_vk_layer(DrawState draw_state.cpp vk_layer_debug_marker_table.cpp vk_layer_table.cpp)
 add_vk_layer(MemTracker mem_tracker.cpp vk_layer_table.cpp)
-add_vk_layer(ShaderChecker shader_checker.cpp vk_layer_table.cpp)
-add_vk_layer(Image image.cpp vk_layer_table.cpp)
+#add_vk_layer(ShaderChecker shader_checker.cpp vk_layer_table.cpp)
+#add_vk_layer(Image image.cpp vk_layer_table.cpp)
 # generated
-add_vk_layer(Generic generic_layer.cpp vk_layer_table.cpp)
+#add_vk_layer(Generic generic_layer.cpp vk_layer_table.cpp)
 add_vk_layer(APIDump api_dump.cpp vk_layer_table.cpp)
-add_vk_layer(ObjectTracker object_track.cpp vk_layer_table.cpp)
-add_vk_layer(ParamChecker param_checker.cpp vk_layer_debug_marker_table.cpp vk_layer_table.cpp)
-add_vk_layer(Threading threading.cpp vk_layer_table.cpp)
-add_vk_layer(ScreenShot screenshot.cpp vk_layer_table.cpp)
+#add_vk_layer(ObjectTracker object_track.cpp vk_layer_table.cpp)
+#add_vk_layer(ParamChecker param_checker.cpp vk_layer_debug_marker_table.cpp vk_layer_table.cpp)
+#add_vk_layer(Threading threading.cpp vk_layer_table.cpp)
+#add_vk_layer(ScreenShot screenshot.cpp vk_layer_table.cpp)
diff --git a/layers/apidump.h b/layers/apidump.h
new file mode 100644
index 0000000..d72ab31
--- /dev/null
+++ b/layers/apidump.h
@@ -0,0 +1,58 @@
+/*
+ * Vulkan
+ *
+ * Copyright (C) 2014 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Courtney Goeltzenleuchter <courtney@lunarg.com>
+ */
+
+#ifndef GENERIC_H
+#define GENERIC_H
+#include "vkLayer.h"
+
+/*
+ * This file contains static functions for the generated layer Generic
+ */
+
+#define LAYER_PROPS_ARRAY_SIZE 1
+static const VkLayerProperties layerProps[LAYER_PROPS_ARRAY_SIZE] = {
+    {
+        "Generic",
+        VK_API_VERSION,                 // specVersion
+        VK_MAKE_VERSION(0, 1, 0),       // implVersion
+        "layer: Generic",
+    }
+};
+
+#define LAYER_DEV_PROPS_ARRAY_SIZE 1
+static const VkLayerProperties layerDevProps[LAYER_DEV_PROPS_ARRAY_SIZE] = {
+    {
+        "Generic",
+        VK_API_VERSION,                 // specVersion
+        VK_MAKE_VERSION(0, 1, 0),       // implVersion
+        "layer: Generic",
+    }
+};
+
+
+#endif // GENERIC_H
+
diff --git a/layers/generic.h b/layers/generic.h
new file mode 100644
index 0000000..d72ab31
--- /dev/null
+++ b/layers/generic.h
@@ -0,0 +1,58 @@
+/*
+ * Vulkan
+ *
+ * Copyright (C) 2014 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Courtney Goeltzenleuchter <courtney@lunarg.com>
+ */
+
+#ifndef GENERIC_H
+#define GENERIC_H
+#include "vkLayer.h"
+
+/*
+ * This file contains static functions for the generated layer Generic
+ */
+
+#define LAYER_PROPS_ARRAY_SIZE 1
+static const VkLayerProperties layerProps[LAYER_PROPS_ARRAY_SIZE] = {
+    {
+        "Generic",
+        VK_API_VERSION,                 // specVersion
+        VK_MAKE_VERSION(0, 1, 0),       // implVersion
+        "layer: Generic",
+    }
+};
+
+#define LAYER_DEV_PROPS_ARRAY_SIZE 1
+static const VkLayerProperties layerDevProps[LAYER_DEV_PROPS_ARRAY_SIZE] = {
+    {
+        "Generic",
+        VK_API_VERSION,                 // specVersion
+        VK_MAKE_VERSION(0, 1, 0),       // implVersion
+        "layer: Generic",
+    }
+};
+
+
+#endif // GENERIC_H
+
diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp
index 7fe5e67..4a074cc 100644
--- a/layers/mem_tracker.cpp
+++ b/layers/mem_tracker.cpp
@@ -37,6 +37,7 @@
 #include "vk_struct_string_helper_cpp.h"
 #include "mem_tracker.h"
 #include "vk_layer_config.h"
+#include "vk_layer_extension_utils.h"
 // The following is #included again to catch certain OS-specific functions
 // being used:
 #include "vk_loader_platform.h"
@@ -869,7 +870,7 @@
                                    pTable,
                                    *pInstance,
                                    pCreateInfo->extensionCount,
-                                   pCreateInfo->pEnabledExtensions);
+                                   pCreateInfo->ppEnabledExtensionNames);
 
         init_mem_tracker(my_data);
     }
@@ -882,7 +883,7 @@
     VkLayerDispatchTable *pDisp  = get_dispatch_table(mem_tracker_device_table_map, device);
     deviceExtMap[pDisp].wsi_lunarg_enabled = false;
     for (i = 0; i < pCreateInfo->extensionCount; i++) {
-        if (strcmp(pCreateInfo->pEnabledExtensions[i].name, VK_WSI_LUNARG_EXTENSION_NAME) == 0)
+        if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_WSI_LUNARG_EXTENSION_NAME) == 0)
             deviceExtMap[pDisp].wsi_lunarg_enabled = true;
 
     }
@@ -965,77 +966,62 @@
 }
 
 
-#define MEM_TRACKER_LAYER_EXT_ARRAY_SIZE 2
-static const VkExtensionProperties mtExts[MEM_TRACKER_LAYER_EXT_ARRAY_SIZE] = {
+struct extProps {
+    uint32_t version;
+    const char * const name;
+};
+#define MEM_TRACKER_EXT_ARRAY_SIZE 0
+
+#define MEM_TRACKER_LAYER_ARRAY_SIZE 1
+static const VkLayerProperties mtGlobalLayers[MEM_TRACKER_LAYER_ARRAY_SIZE] = {
     {
-        VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES,
         "MemTracker",
-        0x10,
-        "Validation layer: MemTracker",
-    },
-    {
-        VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES,
-        "Validation",
-        0x10,
+        VK_API_VERSION,
+        VK_MAKE_VERSION(0, 1, 0),
         "Validation layer: MemTracker",
     }
 };
 
 VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalExtensionProperties(
-                                               uint32_t extensionIndex,
-                                               VkExtensionProperties*    pData)
+        const char *pLayerName,
+        uint32_t *pCount,
+        VkExtensionProperties* pProperties)
 {
-    /* This entrypoint is NOT going to init it's own dispatch table since loader calls here early */
-
-    if (extensionIndex >= MEM_TRACKER_LAYER_EXT_ARRAY_SIZE)
-        return VK_ERROR_INVALID_VALUE;
-    memcpy((VkExtensionProperties *) pData, &mtExts[extensionIndex], sizeof(VkExtensionProperties));
-
-    return VK_SUCCESS;
+    /* Mem tracker does not have any global extensions */
+    return util_GetExtensionProperties(MEM_TRACKER_EXT_ARRAY_SIZE, NULL,
+                                       pCount, pProperties);
 }
 
-VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalExtensionCount(uint32_t* pCount)
+VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalLayerProperties(
+        uint32_t *pCount,
+        VkLayerProperties*    pProperties)
 {
-    *pCount = MEM_TRACKER_LAYER_EXT_ARRAY_SIZE;
-
-    return VK_SUCCESS;
+    return util_GetLayerProperties(MEM_TRACKER_LAYER_ARRAY_SIZE,
+                                   (VkLayerProperties *) mtGlobalLayers,
+                                   pCount, pProperties);
 }
 
-#define MEM_TRACKER_LAYER_DEV_EXT_ARRAY_SIZE 3
-static const VkExtensionProperties mtDevExts[MEM_TRACKER_LAYER_DEV_EXT_ARRAY_SIZE] = {
-    {
-        VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES,
-        "MemTracker",
-        0x10,
-        "Validation layer: MemTracker",
-    },
-    {
-        VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES,
-        "Validation",
-        0x10,
-        "Validation layer: MemTracker",
-    }
-};
-
-
-VK_LAYER_EXPORT VkResult VKAPI vkGetPhysicalDeviceExtensionCount(
-                                               VkPhysicalDevice gpu,
-                                               uint32_t* pCount)
-{
-    *pCount = MEM_TRACKER_LAYER_DEV_EXT_ARRAY_SIZE;
-    return VK_SUCCESS;
-}
+#define MEM_TRACKER_DEV_EXT_ARRAY_SIZE 0
 
 VK_LAYER_EXPORT VkResult VKAPI vkGetPhysicalDeviceExtensionProperties(
-                                               VkPhysicalDevice gpu,
-                                               uint32_t extensionIndex,
-                                               VkExtensionProperties* pProperties)
+        VkPhysicalDevice                            physicalDevice,
+        const char*                                 pLayerName,
+        uint32_t*                                   pCount,
+        VkExtensionProperties*                      pProperties)
 {
-    if (extensionIndex >= MEM_TRACKER_LAYER_DEV_EXT_ARRAY_SIZE)
-        return VK_ERROR_INVALID_VALUE;
-    memcpy(pProperties, &mtDevExts[extensionIndex], sizeof(VkExtensionProperties));
+    /* Mem tracker does not have any physical device extensions */
+    return util_GetExtensionProperties(MEM_TRACKER_DEV_EXT_ARRAY_SIZE, NULL,
+                                       pCount, pProperties);
+}
 
-    return VK_SUCCESS;
+VK_LAYER_EXPORT VkResult VKAPI vkGetPhysicalDeviceLayerProperties(
+        VkPhysicalDevice                            physicalDevice,
+        uint32_t*                                   pCount,
+        VkLayerProperties*                          pProperties)
+{
+    /* Mem tracker's physical device layers are the same as global */
+    return util_GetLayerProperties(MEM_TRACKER_LAYER_ARRAY_SIZE, mtGlobalLayers,
+                                   pCount, pProperties);
 }
 
 VK_LAYER_EXPORT VkResult VKAPI vkGetDeviceQueue(
@@ -2278,10 +2264,6 @@
         return (void*) vkCmdResetQueryPool;
     if (!strcmp(funcName, "vkGetDeviceQueue"))
         return (void*) vkGetDeviceQueue;
-    if (!strcmp(funcName, "vkGetGlobalExtensionCount"))
-        return (void*) vkGetGlobalExtensionCount;
-    if (!strcmp(funcName, "vkGetGlobalExtensionProperties"))
-        return (void*) vkGetGlobalExtensionProperties;
 
     VkLayerDispatchTable *pDisp =  get_dispatch_table(mem_tracker_device_table_map, dev);
     if (deviceExtMap.size() == 0 || deviceExtMap[pDisp].wsi_lunarg_enabled)
@@ -2322,10 +2304,14 @@
         return (void*) vkCreateInstance;
     if (!strcmp(funcName, "vkGetPhysicalDeviceMemoryProperties"))
         return (void*) vkGetPhysicalDeviceMemoryProperties;
-    if (!strcmp(funcName, "vkGetPhysicalDeviceExtensionCount"))
-        return (void*) vkGetGlobalExtensionCount;
-    if (!strcmp(funcName, "vkGetPhysicalDeviceExtensionProperties"))
+    if (!strcmp(funcName, "vkGetGlobalLayerProperties"))
+        return (void*) vkGetGlobalLayerProperties;
+    if (!strcmp(funcName, "vkGetGlobalExtensionProperties"))
         return (void*) vkGetGlobalExtensionProperties;
+    if (!strcmp(funcName, "vkGetPhysicalDeviceLayerProperties"))
+        return (void*) vkGetPhysicalDeviceLayerProperties;
+    if (!strcmp(funcName, "vkGetPhysicalDeviceExtensionProperties"))
+        return (void*) vkGetPhysicalDeviceExtensionProperties;
 
     layer_data *my_data = get_my_data_ptr(get_dispatch_key(instance), layer_data_map);
     fptr = debug_report_get_instance_proc_addr(my_data->report_data, funcName);
diff --git a/layers/vk_layer_extension_utils.cpp b/layers/vk_layer_extension_utils.cpp
new file mode 100644
index 0000000..71c3cba
--- /dev/null
+++ b/layers/vk_layer_extension_utils.cpp
@@ -0,0 +1,87 @@
+/*
+ * Vulkan
+ *
+ * Copyright (C) 2015 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Courtney Goeltzenleuchter <courtney@lunarg.com>
+ */
+
+#include "string.h"
+#include "vk_layer_extension_utils.h"
+
+/*
+ * This file contains utility functions for layers
+ */
+
+VkResult util_GetExtensionProperties(
+        const uint32_t count,
+        const VkExtensionProperties *layer_extensions,
+        uint32_t* pCount,
+        VkExtensionProperties* pProperties)
+{
+    uint32_t copy_size;
+
+    if (pCount == NULL) {
+        return VK_ERROR_INVALID_POINTER;
+    }
+
+    if (pProperties == NULL || layer_extensions == NULL) {
+        *pCount = count;
+        return VK_SUCCESS;
+    }
+
+    copy_size = *pCount < count ? *pCount : count;
+    memcpy(pProperties, layer_extensions, copy_size * sizeof(VkExtensionProperties));
+    *pCount = copy_size;
+    if (copy_size < count) {
+        return VK_INCOMPLETE;
+    }
+
+    return VK_SUCCESS;
+}
+
+VkResult util_GetLayerProperties(
+        const uint32_t count,
+        const VkLayerProperties *layer_properties,
+        uint32_t* pCount,
+        VkLayerProperties* pProperties)
+{
+    uint32_t copy_size;
+
+    if (pCount == NULL) {
+        return VK_ERROR_INVALID_POINTER;
+    }
+
+    if (pProperties == NULL || layer_properties == NULL) {
+        *pCount = count;
+        return VK_SUCCESS;
+    }
+
+    copy_size = *pCount < count ? *pCount : count;
+    memcpy(pProperties, layer_properties, copy_size * sizeof(VkLayerProperties));
+    *pCount = copy_size;
+    if (copy_size < count) {
+        return VK_INCOMPLETE;
+    }
+
+    return VK_SUCCESS;
+}
diff --git a/layers/vk_layer_extension_utils.h b/layers/vk_layer_extension_utils.h
new file mode 100644
index 0000000..f05385a
--- /dev/null
+++ b/layers/vk_layer_extension_utils.h
@@ -0,0 +1,52 @@
+/*
+ * Vulkan
+ *
+ * Copyright (C) 2014 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *   Courtney Goeltzenleuchter <courtney@lunarg.com>
+ */
+
+#include "vk_layer.h"
+
+#ifndef LAYER_EXTENSION_UTILS_H
+#define LAYER_EXTENSION_UTILS_H
+
+/*
+ * This file contains static functions for the generated layers
+ */
+extern "C" {
+
+VkResult util_GetExtensionProperties(
+        const uint32_t count,
+        const VkExtensionProperties *layer_extensions,
+        uint32_t* pCount,
+        VkExtensionProperties* pProperties);
+
+VkResult util_GetLayerProperties(
+        const uint32_t count,
+        const VkLayerProperties *layer_properties,
+        uint32_t* pCount,
+        VkLayerProperties* pProperties);
+
+} // extern "C"
+#endif // LAYER_EXTENSION_UTILS_H
+
diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h
index 617c3b2..be0a09c 100644
--- a/layers/vk_layer_logging.h
+++ b/layers/vk_layer_logging.h
@@ -76,7 +76,7 @@
         VkLayerInstanceDispatchTable   *table,
         VkInstance                      inst,
         uint32_t                        extension_count,
-        const VkExtensionProperties*    pEnabledExtensions)    // layer or extension name to be enabled
+        const char*const*               ppEnabledExtensions)    // layer or extension name to be enabled
 {
     debug_report_data              *debug_data;
     PFN_vkGetInstanceProcAddr gpa = table->GetInstanceProcAddr;
@@ -90,7 +90,7 @@
     memset(debug_data, 0, sizeof(debug_report_data));
     for (uint32_t i = 0; i < extension_count; i++) {
         /* TODO: Check other property fields */
-        if (strcmp(pEnabledExtensions[i].name, DEBUG_REPORT_EXTENSION_NAME) == 0) {
+        if (strcmp(ppEnabledExtensions[i], DEBUG_REPORT_EXTENSION_NAME) == 0) {
             debug_data->g_DEBUG_REPORT = true;
         }
     }
diff --git a/layers/vk_layer_msg.h b/layers/vk_layer_msg.h
index 2d0e31d..1e6fe4c 100644
--- a/layers/vk_layer_msg.h
+++ b/layers/vk_layer_msg.h
@@ -33,12 +33,12 @@
 static FILE *g_logFile = NULL;
 
 static void enable_debug_report(
-        uint32_t                        extension_count,
-        const VkExtensionProperties*    pEnabledExtensions)    // layer or extension name to be enabled
+        uint32_t                extension_count,
+        const char * const *    ppEnabledExtensionNames)    // extension name to be enabled
 {
     for (uint32_t i = 0; i < extension_count; i++) {
         /* TODO: Check other property fields */
-        if (strcmp(pEnabledExtensions[i].name, DEBUG_REPORT_EXTENSION_NAME) == 0) {
+        if (strcmp(ppEnabledExtensionNames[i], DEBUG_REPORT_EXTENSION_NAME) == 0) {
             g_DEBUG_REPORT = true;
         }
     }