loader: Fixed some types and comments

Change-Id: I66a5745a948c6677895950fdd48395afd5152ad7
diff --git a/loader/loader.h b/loader/loader.h
index ce78d4d..7485654 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -217,7 +217,7 @@
 #endif
 #ifdef VK_USE_PLATFORM_MIR_KHR
     PFN_vkGetPhysicalDeviceMirPresentationSupportKHR
-        GetPhysicalDeviceMirPresentvationSupportKHR;
+        GetPhysicalDeviceMirPresentationSupportKHR;
 #endif
 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
     PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
diff --git a/loader/wsi.c b/loader/wsi.c
index 9bac94b..539dbac 100644
--- a/loader/wsi.c
+++ b/loader/wsi.c
@@ -21,7 +21,6 @@
  * Author: Mark Lobodzinski <mark@lunarg.com>
  */
 
-//#define _ISOC11_SOURCE /* for aligned_alloc() */
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
@@ -158,16 +157,16 @@
         }
     }
 }
-/*
- * Linux WSI surface extensions are not always compiled into the loader. (Assume
- * for Windows the KHR_win32_surface is always compiled into loader). A given
- * Linux build environment might not have the headers required for building one
- * of the four extensions  (Xlib, Xcb, Mir, Wayland).  Thus, need to check if
- * the built loader actually supports the particular Linux surface extension.
- * If not supported by the built loader it will not be included in the list of
- * enumerated instance extensions.  This solves the issue where an ICD or layer
- * advertises support for a given Linux surface extension but the loader was not
- * built to support the extension. */
+
+// Linux WSI surface extensions are not always compiled into the loader. (Assume
+// for Windows the KHR_win32_surface is always compiled into loader). A given
+// Linux build environment might not have the headers required for building one
+// of the four extensions  (Xlib, Xcb, Mir, Wayland).  Thus, need to check if
+// the built loader actually supports the particular Linux surface extension.
+// If not supported by the built loader it will not be included in the list of
+// enumerated instance extensions.  This solves the issue where an ICD or layer
+// advertises support for a given Linux surface extension but the loader was not
+// built to support the extension.
 bool wsi_unsupported_instance_extension(const VkExtensionProperties *ext_prop) {
 #ifndef VK_USE_PLATFORM_MIR_KHR
     if (!strcmp(ext_prop->extensionName, "VK_KHR_mir_surface"))
@@ -188,14 +187,10 @@
 
     return false;
 }
-/*
- * Functions for the VK_KHR_surface extension:
- */
 
-/*
- * This is the trampoline entrypoint
- * for DestroySurfaceKHR
- */
+// Functions for the VK_KHR_surface extension:
+
+// This is the trampoline entrypoint for DestroySurfaceKHR
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL
 vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
                     const VkAllocationCallbacks *pAllocator) {
@@ -205,10 +200,8 @@
 }
 
 // TODO probably need to lock around all the loader_get_instance() calls.
-/*
- * This is the instance chain terminator function
- * for DestroySurfaceKHR
- */
+
+// This is the instance chain terminator function for DestroySurfaceKHR
 VKAPI_ATTR void VKAPI_CALL
 terminator_DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
                              const VkAllocationCallbacks *pAllocator) {
@@ -217,10 +210,7 @@
     loader_instance_heap_free(ptr_instance, (void *)surface);
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceSurfaceSupportKHR
- */
+// This is the trampoline entrypoint for GetPhysicalDeviceSurfaceSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
                                      uint32_t queueFamilyIndex,
@@ -235,15 +225,11 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceSurfaceSupportKHR
- */
-VKAPI_ATTR VkResult VKAPI_CALL
-terminator_GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
-                                              uint32_t queueFamilyIndex,
-                                              VkSurfaceKHR surface,
-                                              VkBool32 *pSupported) {
+// This is the instance chain terminator function for
+// GetPhysicalDeviceSurfaceSupportKHR
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceSupportKHR(
+    VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
+    VkSurfaceKHR surface, VkBool32 *pSupported) {
     // First, check to ensure the appropriate extension was enabled:
     struct loader_physical_device *phys_dev =
         (struct loader_physical_device *)physicalDevice;
@@ -270,10 +256,7 @@
         phys_dev->phys_dev, queueFamilyIndex, surface, pSupported);
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceSurfaceCapabilitiesKHR
- */
+// This is the trampoline entrypoint for GetPhysicalDeviceSurfaceCapabilitiesKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
@@ -288,10 +271,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceSurfaceCapabilitiesKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceSurfaceCapabilitiesKHR
 VKAPI_ATTR VkResult VKAPI_CALL
 terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR(
     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
@@ -321,10 +302,8 @@
         phys_dev->phys_dev, surface, pSurfaceCapabilities);
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceSurfaceFormatsKHR
- */
+
+// This is the trampoline entrypoint for GetPhysicalDeviceSurfaceFormatsKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice,
                                      VkSurfaceKHR surface,
@@ -339,10 +318,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceSurfaceFormatsKHR
- */
+
+// This is the instance chain terminator function for GetPhysicalDeviceSurfaceFormatsKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceFormatsKHR(
     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
     uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) {
@@ -372,10 +349,7 @@
         phys_dev->phys_dev, surface, pSurfaceFormatCount, pSurfaceFormats);
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceSurfacePresentModesKHR
- */
+// This is the trampoline entrypoint for GetPhysicalDeviceSurfacePresentModesKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice,
                                           VkSurfaceKHR surface,
@@ -390,10 +364,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceSurfacePresentModesKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceSurfacePresentModesKHR
 VKAPI_ATTR VkResult VKAPI_CALL
 terminator_GetPhysicalDeviceSurfacePresentModesKHR(
     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
@@ -423,14 +395,9 @@
         phys_dev->phys_dev, surface, pPresentModeCount, pPresentModes);
 }
 
-/*
- * Functions for the VK_KHR_swapchain extension:
- */
+// Functions for the VK_KHR_swapchain extension:
 
-/*
- * This is the trampoline entrypoint
- * for CreateSwapchainKHR
- */
+// This is the trampoline entrypoint for CreateSwapchainKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
     VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) {
@@ -441,10 +408,7 @@
     return res;
 }
 
-/*
- * This is the trampoline entrypoint
- * for DestroySwapchainKHR
- */
+// This is the trampoline entrypoint for DestroySwapchainKHR
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL
 vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain,
                       const VkAllocationCallbacks *pAllocator) {
@@ -453,10 +417,7 @@
     disp->DestroySwapchainKHR(device, swapchain, pAllocator);
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetSwapchainImagesKHR
- */
+// This is the trampoline entrypoint for GetSwapchainImagesKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain,
                         uint32_t *pSwapchainImageCount,
@@ -468,10 +429,7 @@
     return res;
 }
 
-/*
- * This is the trampoline entrypoint
- * for AcquireNextImageKHR
- */
+// This is the trampoline entrypoint for AcquireNextImageKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain,
                       uint64_t timeout, VkSemaphore semaphore, VkFence fence,
@@ -483,10 +441,7 @@
     return res;
 }
 
-/*
- * This is the trampoline entrypoint
- * for QueuePresentKHR
- */
+// This is the trampoline entrypoint for QueuePresentKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) {
     const VkLayerDispatchTable *disp;
@@ -497,14 +452,10 @@
 
 #ifdef VK_USE_PLATFORM_WIN32_KHR
 
-/*
- * Functions for the VK_KHR_win32_surface extension:
- */
 
-/*
- * This is the trampoline entrypoint
- * for CreateWin32SurfaceKHR
- */
+// Functions for the VK_KHR_win32_surface extension:
+
+// This is the trampoline entrypoint for CreateWin32SurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
     VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -517,10 +468,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateWin32SurfaceKHR
- */
+// This is the instance chain terminator function for CreateWin32SurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWin32SurfaceKHR(
     VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -552,10 +500,8 @@
     return VK_SUCCESS;
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceWin32PresentationSupportKHR
- */
+// This is the trampoline entrypoint for
+// GetPhysicalDeviceWin32PresentationSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL
 vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                                uint32_t queueFamilyIndex) {
@@ -568,10 +514,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceWin32PresentationSupportKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceWin32PresentationSupportKHR
 VKAPI_ATTR VkBool32 VKAPI_CALL
 terminator_GetPhysicalDeviceWin32PresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) {
@@ -602,14 +546,9 @@
 
 #ifdef VK_USE_PLATFORM_MIR_KHR
 
-/*
- * Functions for the VK_KHR_mir_surface extension:
- */
+// Functions for the VK_KHR_mir_surface extension:
 
-/*
- * This is the trampoline entrypoint
- * for CreateMirSurfaceKHR
- */
+// This is the trampoline entrypoint for CreateMirSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
     VkInstance instance, const VkMirSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -622,10 +561,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateMirSurfaceKHR
- */
+// This is the instance chain terminator function for CreateMirSurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMirSurfaceKHR(
     VkInstance instance, const VkMirSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -657,10 +593,8 @@
     return VK_SUCCESS;
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceMirPresentationSupportKHR
- */
+// This is the trampoline entrypoint for
+// GetPhysicalDeviceMirPresentationSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL
 vkGetPhysicalDeviceMirPresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                              uint32_t queueFamilyIndex,
@@ -674,10 +608,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceMirPresentationSupportKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceMirPresentationSupportKHR
 VKAPI_ATTR VkBool32 VKAPI_CALL
 terminator_GetPhysicalDeviceMirPresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
@@ -709,14 +641,10 @@
 
 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
 
-/*
- * Functions for the VK_KHR_wayland_surface extension:
- */
 
-/*
- * This is the trampoline entrypoint
- * for CreateWaylandSurfaceKHR
- */
+// Functions for the VK_KHR_wayland_surface extension:
+
+// This is the trampoline entrypoint for CreateWaylandSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkCreateWaylandSurfaceKHR(VkInstance instance,
                           const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
@@ -731,10 +659,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateWaylandSurfaceKHR
- */
+// This is the instance chain terminator function for CreateWaylandSurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWaylandSurfaceKHR(
     VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -766,10 +691,9 @@
     return VK_SUCCESS;
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceWaylandPresentationSupportKHR
- */
+
+// This is the trampoline entrypoint for
+// GetPhysicalDeviceWaylandPresentationSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL
 vkGetPhysicalDeviceWaylandPresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
@@ -783,10 +707,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceWaylandPresentationSupportKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceWaylandPresentationSupportKHR
 VKAPI_ATTR VkBool32 VKAPI_CALL
 terminator_GetPhysicalDeviceWaylandPresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
@@ -818,14 +740,10 @@
 
 #ifdef VK_USE_PLATFORM_XCB_KHR
 
-/*
- * Functions for the VK_KHR_xcb_surface extension:
- */
 
-/*
- * This is the trampoline entrypoint
- * for CreateXcbSurfaceKHR
- */
+// Functions for the VK_KHR_xcb_surface extension:
+
+// This is the trampoline entrypoint for CreateXcbSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
     VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -838,10 +756,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateXcbSurfaceKHR
- */
+// This is the instance chain terminator function for CreateXcbSurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXcbSurfaceKHR(
     VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -873,10 +788,8 @@
     return VK_SUCCESS;
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceXcbPresentationSupportKHR
- */
+// This is the trampoline entrypoint for
+// GetPhysicalDeviceXcbPresentationSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL
 vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                              uint32_t queueFamilyIndex,
@@ -891,10 +804,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceXcbPresentationSupportKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceXcbPresentationSupportKHR
 VKAPI_ATTR VkBool32 VKAPI_CALL
 terminator_GetPhysicalDeviceXcbPresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
@@ -926,14 +837,9 @@
 
 #ifdef VK_USE_PLATFORM_XLIB_KHR
 
-/*
- * Functions for the VK_KHR_xlib_surface extension:
- */
+// Functions for the VK_KHR_xlib_surface extension:
 
-/*
- * This is the trampoline entrypoint
- * for CreateXlibSurfaceKHR
- */
+// This is the trampoline entrypoint for CreateXlibSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
     VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -946,10 +852,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateXlibSurfaceKHR
- */
+// This is the instance chain terminator function for CreateXlibSurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXlibSurfaceKHR(
     VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -981,10 +884,7 @@
     return VK_SUCCESS;
 }
 
-/*
- * This is the trampoline entrypoint
- * for GetPhysicalDeviceXlibPresentationSupportKHR
- */
+// This is the trampoline entrypoint for GetPhysicalDeviceXlibPresentationSupportKHR
 LOADER_EXPORT VKAPI_ATTR VkBool32 VKAPI_CALL
 vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                               uint32_t queueFamilyIndex,
@@ -998,10 +898,8 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for GetPhysicalDeviceXlibPresentationSupportKHR
- */
+// This is the instance chain terminator function for
+// GetPhysicalDeviceXlibPresentationSupportKHR
 VKAPI_ATTR VkBool32 VKAPI_CALL
 terminator_GetPhysicalDeviceXlibPresentationSupportKHR(
     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display *dpy,
@@ -1033,14 +931,10 @@
 
 #ifdef VK_USE_PLATFORM_ANDROID_KHR
 
-/*
- * Functions for the VK_KHR_android_surface extension:
- */
 
-/*
- * This is the trampoline entrypoint
- * for CreateAndroidSurfaceKHR
- */
+// Functions for the VK_KHR_android_surface extension:
+
+// This is the trampoline entrypoint for CreateAndroidSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
     VkInstance instance, ANativeWindow *window,
     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -1052,10 +946,7 @@
     return res;
 }
 
-/*
- * This is the instance chain terminator function
- * for CreateAndroidSurfaceKHR
- */
+// This is the instance chain terminator function for CreateAndroidSurfaceKHR
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateAndroidSurfaceKHR(
     VkInstance instance, Window window, const VkAllocationCallbacks *pAllocator,
     VkSurfaceKHR *pSurface) {
@@ -1089,9 +980,8 @@
 
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
-/*
- * Functions for the VK_KHR_display instance extension:
- */
+
+// Functions for the VK_KHR_display instance extension:
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
 vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice,
                                         uint32_t *pPropertyCount,
@@ -1376,9 +1266,7 @@
                                 const char *name, void **addr) {
     *addr = NULL;
 
-    /*
-     * Functions for the VK_KHR_surface extension:
-     */
+    // Functions for the VK_KHR_surface extension:
     if (!strcmp("vkDestroySurfaceKHR", name)) {
         *addr = ptr_instance->wsi_surface_enabled ? (void *)vkDestroySurfaceKHR
                                                   : NULL;
@@ -1409,14 +1297,12 @@
         return true;
     }
 
-    /*
-     * Functions for the VK_KHR_swapchain extension:
-     *
-     * Note: This is a device extension, and its functions are statically
-     * exported from the loader.  Per Khronos decisions, the the loader's GIPA
-     * function will return the trampoline function for such device-extension
-     * functions, regardless of whether the extension has been enabled.
-     */
+    // Functions for the VK_KHR_swapchain extension:
+
+    // Note: This is a device extension, and its functions are statically
+    // exported from the loader.  Per Khronos decisions, the loader's GIPA
+    // function will return the trampoline function for such device-extension
+    // functions, regardless of whether the extension has been enabled.
     if (!strcmp("vkCreateSwapchainKHR", name)) {
         *addr = (void *)vkCreateSwapchainKHR;
         return true;
@@ -1439,9 +1325,8 @@
     }
 
 #ifdef VK_USE_PLATFORM_WIN32_KHR
-    /*
-     * Functions for the VK_KHR_win32_surface extension:
-     */
+
+    // Functions for the VK_KHR_win32_surface extension:
     if (!strcmp("vkCreateWin32SurfaceKHR", name)) {
         *addr = ptr_instance->wsi_win32_surface_enabled
                     ? (void *)vkCreateWin32SurfaceKHR
@@ -1456,9 +1341,8 @@
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
 #ifdef VK_USE_PLATFORM_MIR_KHR
-    /*
-     * Functions for the VK_KHR_mir_surface extension:
-     */
+
+    // Functions for the VK_KHR_mir_surface extension:
     if (!strcmp("vkCreateMirSurfaceKHR", name)) {
         *addr = ptr_instance->wsi_mir_surface_enabled
                     ? (void *)vkCreateMirSurfaceKHR
@@ -1473,9 +1357,8 @@
     }
 #endif // VK_USE_PLATFORM_MIR_KHR
 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
-    /*
-     * Functions for the VK_KHR_wayland_surface extension:
-     */
+
+    // Functions for the VK_KHR_wayland_surface extension:
     if (!strcmp("vkCreateWaylandSurfaceKHR", name)) {
         *addr = ptr_instance->wsi_wayland_surface_enabled
                     ? (void *)vkCreateWaylandSurfaceKHR
@@ -1490,9 +1373,8 @@
     }
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 #ifdef VK_USE_PLATFORM_XCB_KHR
-    /*
-     * Functions for the VK_KHR_xcb_surface extension:
-     */
+
+    // Functions for the VK_KHR_xcb_surface extension:
     if (!strcmp("vkCreateXcbSurfaceKHR", name)) {
         *addr = ptr_instance->wsi_xcb_surface_enabled
                     ? (void *)vkCreateXcbSurfaceKHR
@@ -1507,9 +1389,8 @@
     }
 #endif // VK_USE_PLATFORM_XCB_KHR
 #ifdef VK_USE_PLATFORM_XLIB_KHR
-    /*
-     * Functions for the VK_KHR_xlib_surface extension:
-     */
+
+    // Functions for the VK_KHR_xlib_surface extension:
     if (!strcmp("vkCreateXlibSurfaceKHR", name)) {
         *addr = ptr_instance->wsi_xlib_surface_enabled
                     ? (void *)vkCreateXlibSurfaceKHR
@@ -1524,9 +1405,8 @@
     }
 #endif // VK_USE_PLATFORM_XLIB_KHR
 #ifdef VK_USE_PLATFORM_ANDROID_KHR
-    /*
-     * Functions for the VK_KHR_android_surface extension:
-     */
+
+    // Functions for the VK_KHR_android_surface extension:
     if (!strcmp("vkCreateAndroidSurfaceKHR", name)) {
         *addr = ptr_instance->wsi_xlib_surface_enabled
                     ? (void *)vkCreateAndroidSurfaceKHR
@@ -1535,9 +1415,7 @@
     }
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
-    /*
-     * Functions for VK_KHR_display extension:
-     */
+    // Functions for VK_KHR_display extension:
     if (!strcmp("vkGetPhysicalDeviceDisplayPropertiesKHR", name)) {
         *addr = ptr_instance->wsi_display_enabled
                     ? (void *)vkGetPhysicalDeviceDisplayPropertiesKHR