Stage 1 of rename

TODO: re-enable glave build, advance API for glave

v2: get rid of outdated code in tri introduced by rebase
    rename wsi_null.c (olv)
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
index 2319511..ef8907b 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -21,7 +21,7 @@
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
 
 if (WIN32)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS -DXCB_NVIDIA")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS -DXCB_NVIDIA")
 
     add_library(XGL SHARED loader.c loader.h dirent_on_windows.c dispatch.c table_ops.h XGL.def)
     set_target_properties(XGL PROPERTIES LINK_FLAGS "/DEF:${PROJECT_SOURCE_DIR}/loader/XGL.def")
@@ -30,7 +30,7 @@
     target_link_libraries(XGL)
 endif()
 if (NOT WIN32)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES -Wpointer-arith")
 
     add_library(XGL SHARED loader.c dispatch.c table_ops.h)
     set_target_properties(XGL PROPERTIES SOVERSION 0)
diff --git a/loader/README.md b/loader/README.md
index b3b9fdf..a647928 100644
--- a/loader/README.md
+++ b/loader/README.md
@@ -1,8 +1,8 @@
 # Loader Description 
 
 ## Overview
-The Loader implements the main XGL library (e.g. "XGL.dll" on Windows and
-"libXGL.so" on Linux).  It handles layer management and driver management.  The
+The Loader implements the main VK library (e.g. "VK.dll" on Windows and
+"libVK.so" on Linux).  It handles layer management and driver management.  The
 loader fully supports multi-gpu operation.  As part of this, it dispatches API
 calls to the correct driver, and to the correct layers, based on the GPU object
 selected by the application.
@@ -20,43 +20,43 @@
 loader supports layers that operate on multiple GPUs.
 
 ## Environment Variables
-**LIBXGL\_DRIVERS\_PATH**  directory for loader to search for ICD driver libraries to open
+**LIBVK\_DRIVERS\_PATH**  directory for loader to search for ICD driver libraries to open
 
-**LIBXGL\_LAYERS\_PATH**   directory for loader to search for layer libraries that may get activated  and used at xglCreateDevice() time.
+**LIBVK\_LAYERS\_PATH**   directory for loader to search for layer libraries that may get activated  and used at vkCreateDevice() time.
 
-**LIBXGL\_LAYER\_NAMES**   colon-separated list of layer names to be activated (e.g., LIBXGL\_LAYER\_NAMES=MemTracker:DrawState).
+**LIBVK\_LAYER\_NAMES**   colon-separated list of layer names to be activated (e.g., LIBVK\_LAYER\_NAMES=MemTracker:DrawState).
 
-Note: Both of the LIBXGL\_*\_PATH variables may contain more than one directory.  Each directory must be separated by one of the following characters, depending on your OS:
+Note: Both of the LIBVK\_*\_PATH variables may contain more than one directory.  Each directory must be separated by one of the following characters, depending on your OS:
 
 - ";" on Windows
 - ":" on Linux
 
 ## Interface to driver (ICD)
-- xglEnumerateGpus exported
-- xglCreateInstance exported
-- xglDestroyInstance exported
-- xglGetProcAddr exported and returns valid function pointers for all the XGL API entrypoints
-- all objects created by ICD can be cast to (XGL\_LAYER\_DISPATCH\_TABLE \*\*)
+- vkEnumerateGpus exported
+- vkCreateInstance exported
+- vkDestroyInstance exported
+- vkGetProcAddr exported and returns valid function pointers for all the VK API entrypoints
+- all objects created by ICD can be cast to (VK\_LAYER\_DISPATCH\_TABLE \*\*)
  where the loader will replace the first entry with a pointer to the dispatch table which is
  owned by the loader. This implies three things for ICD drivers:
   1. The ICD must return a pointer for the opaque object handle
   2. This pointer points to a regular C structure with the first entry being a pointer.
-  Note: for any C++ ICD's that implement XGL objects directly as C++ classes.
+  Note: for any C++ ICD's that implement VK objects directly as C++ classes.
   The C++ compiler may put a vtable at offset zero, if your class is virtual.
   In this case use a regular C structure (see below).
   3. The reservedForLoader.loaderMagic member must be initialized with ICD\_LOADER\_MAGIC, as follows:
 
 ```
-  #include "xglIcd.h"
+  #include "vkIcd.h"
 
   struct {
-        XGL_LOADER_DATA reservedForLoader; // Reserve space for pointer to loader's dispatch table
+        VK_LOADER_DATA reservedForLoader; // Reserve space for pointer to loader's dispatch table
         myObjectClass myObj;               // Your driver's C++ class
-  } xglObj;
+  } vkObj;
 
-  xglObj alloc_icd_obj()
+  vkObj alloc_icd_obj()
   {
-      xglObj *newObj = alloc_obj();
+      vkObj *newObj = alloc_obj();
       ...
       // Initialize pointer to loader's dispatch table with ICD_LOADER_MAGIC
       set_loader_magic_value(newObj);
@@ -68,5 +68,5 @@
 Additional Notes:
 
 - The ICD may or may not implement a dispatch table.
-- ICD entrypoints can be named anything including the offcial xgl name such as xglCreateDevice().  However, beware of interposing by dynamic OS library loaders if the offical names are used.  On Linux, if offical names are used, the ICD library must be linked with -Bsymbolic.
+- ICD entrypoints can be named anything including the offcial vk name such as vkCreateDevice().  However, beware of interposing by dynamic OS library loaders if the offical names are used.  On Linux, if offical names are used, the ICD library must be linked with -Bsymbolic.
 
diff --git a/loader/loader.c b/loader/loader.c
index 7ea486a..60c5f21 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1,5 +1,5 @@
 /*
- * XGL
+ * Vulkan
  *
  * Copyright (C) 2014 LunarG, Inc.
  *
@@ -43,7 +43,7 @@
 #include "loader_platform.h"
 #include "table_ops.h"
 #include "loader.h"
-#include "xglIcd.h"
+#include "vkIcd.h"
 // The following is #included again to catch certain OS-specific functions
 // being used:
 #include "loader_platform.h"
@@ -66,12 +66,12 @@
 struct loader_icd {
     const struct loader_scanned_icds *scanned_icds;
 
-    XGL_LAYER_DISPATCH_TABLE *loader_dispatch;
-    uint32_t layer_count[XGL_MAX_PHYSICAL_GPUS];
-    struct loader_layers layer_libs[XGL_MAX_PHYSICAL_GPUS][MAX_LAYER_LIBRARIES];
-    XGL_BASE_LAYER_OBJECT *wrappedGpus[XGL_MAX_PHYSICAL_GPUS];
+    VK_LAYER_DISPATCH_TABLE *loader_dispatch;
+    uint32_t layer_count[VK_MAX_PHYSICAL_GPUS];
+    struct loader_layers layer_libs[VK_MAX_PHYSICAL_GPUS][MAX_LAYER_LIBRARIES];
+    VK_BASE_LAYER_OBJECT *wrappedGpus[VK_MAX_PHYSICAL_GPUS];
     uint32_t gpu_count;
-    XGL_BASE_LAYER_OBJECT *gpus;
+    VK_BASE_LAYER_OBJECT *gpus;
 
     struct loader_icd *next;
 };
@@ -79,12 +79,12 @@
 
 struct loader_scanned_icds {
     loader_platform_dl_handle handle;
-    xglGetProcAddrType GetProcAddr;
-    xglCreateInstanceType CreateInstance;
-    xglDestroyInstanceType DestroyInstance;
-    xglEnumerateGpusType EnumerateGpus;
-    xglGetExtensionSupportType GetExtensionSupport;
-    XGL_INSTANCE instance;
+    vkGetProcAddrType GetProcAddr;
+    vkCreateInstanceType CreateInstance;
+    vkDestroyInstanceType DestroyInstance;
+    vkEnumerateGpusType EnumerateGpus;
+    vkGetExtensionSupportType GetExtensionSupport;
+    VK_INSTANCE instance;
     struct loader_scanned_icds *next;
 };
 
@@ -166,7 +166,7 @@
     size_t rtn_len;
 
     registry_str = loader_get_registry_string(HKEY_LOCAL_MACHINE,
-                                              "Software\\XGL",
+                                              "Software\\VK",
                                               registry_value);
     registry_len = (registry_str) ? strlen(registry_str) : 0;
 
@@ -203,7 +203,7 @@
 #endif // WIN32
 
 
-static void loader_log(XGL_DBG_MSG_TYPE msg_type, int32_t msg_code,
+static void loader_log(VK_DBG_MSG_TYPE msg_type, int32_t msg_code,
                        const char *format, ...)
 {
     char msg[256];
@@ -269,14 +269,14 @@
     // Used to call: dlopen(filename, RTLD_LAZY);
     handle = loader_platform_open_library(filename);
     if (!handle) {
-        loader_log(XGL_DBG_MSG_WARNING, 0, loader_platform_open_library_error(filename));
+        loader_log(VK_DBG_MSG_WARNING, 0, loader_platform_open_library_error(filename));
         return;
     }
 
 #define LOOKUP(func_ptr, func) do {                            \
-    func_ptr = (xgl ##func## Type) loader_platform_get_proc_address(handle, "xgl" #func); \
+    func_ptr = (vk ##func## Type) loader_platform_get_proc_address(handle, "vk" #func); \
     if (!func_ptr) {                                           \
-        loader_log(XGL_DBG_MSG_WARNING, 0, loader_platform_get_proc_address_error("xgl" #func)); \
+        loader_log(VK_DBG_MSG_WARNING, 0, loader_platform_get_proc_address_error("vk" #func)); \
         return;                                                \
     }                                                          \
 } while (0)
@@ -290,7 +290,7 @@
 
     new_node = (struct loader_scanned_icds *) malloc(sizeof(struct loader_scanned_icds));
     if (!new_node) {
-        loader_log(XGL_DBG_MSG_WARNING, 0, "Out of memory can't add icd");
+        loader_log(VK_DBG_MSG_WARNING, 0, "Out of memory can't add icd");
         return;
     }
 
@@ -306,11 +306,11 @@
 
 
 /**
- * Try to \c loader_icd_scan XGL driver(s).
+ * Try to \c loader_icd_scan VK driver(s).
  *
  * This function scans the default system path or path
- * specified by the \c LIBXGL_DRIVERS_PATH environment variable in
- * order to find loadable XGL ICDs with the name of libXGL_*.
+ * specified by the \c LIBVK_DRIVERS_PATH environment variable in
+ * order to find loadable VK ICDs with the name of libVK_*.
  *
  * \returns
  * void; but side effect is to set loader_icd_scanned to true
@@ -332,7 +332,7 @@
         must_free_libPaths = true;
     } else {
         must_free_libPaths = false;
-        libPaths = DEFAULT_XGL_DRIVERS_PATH;
+        libPaths = DEFAULT_VK_DRIVERS_PATH;
     }
 #else  // WIN32
     if (geteuid() == getuid()) {
@@ -340,7 +340,7 @@
         libPaths = getenv(DRIVER_PATH_ENV);
     }
     if (libPaths == NULL) {
-        libPaths = DEFAULT_XGL_DRIVERS_PATH;
+        libPaths = DEFAULT_VK_DRIVERS_PATH;
     }
 #endif // WIN32
 
@@ -363,18 +363,18 @@
        if (sysdir) {
           dent = readdir(sysdir);
           while (dent) {
-             /* Look for ICDs starting with XGL_DRIVER_LIBRARY_PREFIX and
-              * ending with XGL_LIBRARY_SUFFIX
+             /* Look for ICDs starting with VK_DRIVER_LIBRARY_PREFIX and
+              * ending with VK_LIBRARY_SUFFIX
               */
               if (!strncmp(dent->d_name,
-                          XGL_DRIVER_LIBRARY_PREFIX,
-                          XGL_DRIVER_LIBRARY_PREFIX_LEN)) {
+                          VK_DRIVER_LIBRARY_PREFIX,
+                          VK_DRIVER_LIBRARY_PREFIX_LEN)) {
                  uint32_t nlen = (uint32_t) strlen(dent->d_name);
-                 const char *suf = dent->d_name + nlen - XGL_LIBRARY_SUFFIX_LEN;
-                 if ((nlen > XGL_LIBRARY_SUFFIX_LEN) &&
+                 const char *suf = dent->d_name + nlen - VK_LIBRARY_SUFFIX_LEN;
+                 if ((nlen > VK_LIBRARY_SUFFIX_LEN) &&
                      !strncmp(suf,
-                              XGL_LIBRARY_SUFFIX,
-                              XGL_LIBRARY_SUFFIX_LEN)) {
+                              VK_LIBRARY_SUFFIX,
+                              VK_LIBRARY_SUFFIX_LEN)) {
                     snprintf(icd_library, 1024, "%s" DIRECTORY_SYMBOL "%s", p,dent->d_name);
                     loader_scanned_icd_add(icd_library);
                  }
@@ -415,7 +415,7 @@
         must_free_libPaths = true;
     } else {
         must_free_libPaths = false;
-        libPaths = DEFAULT_XGL_LAYERS_PATH;
+        libPaths = DEFAULT_VK_LAYERS_PATH;
     }
 #else  // WIN32
     if (geteuid() == getuid()) {
@@ -423,7 +423,7 @@
         libPaths = getenv(LAYERS_PATH_ENV);
     }
     if (libPaths == NULL) {
-        libPaths = DEFAULT_XGL_LAYERS_PATH;
+        libPaths = DEFAULT_VK_LAYERS_PATH;
     }
 #endif // WIN32
 
@@ -473,18 +473,18 @@
        if (curdir) {
           dent = readdir(curdir);
           while (dent) {
-             /* Look for layers starting with XGL_LAYER_LIBRARY_PREFIX and
-              * ending with XGL_LIBRARY_SUFFIX
+             /* Look for layers starting with VK_LAYER_LIBRARY_PREFIX and
+              * ending with VK_LIBRARY_SUFFIX
               */
               if (!strncmp(dent->d_name,
-                          XGL_LAYER_LIBRARY_PREFIX,
-                          XGL_LAYER_LIBRARY_PREFIX_LEN)) {
+                          VK_LAYER_LIBRARY_PREFIX,
+                          VK_LAYER_LIBRARY_PREFIX_LEN)) {
                  uint32_t nlen = (uint32_t) strlen(dent->d_name);
-                 const char *suf = dent->d_name + nlen - XGL_LIBRARY_SUFFIX_LEN;
-                 if ((nlen > XGL_LIBRARY_SUFFIX_LEN) &&
+                 const char *suf = dent->d_name + nlen - VK_LIBRARY_SUFFIX_LEN;
+                 if ((nlen > VK_LIBRARY_SUFFIX_LEN) &&
                      !strncmp(suf,
-                              XGL_LIBRARY_SUFFIX,
-                              XGL_LIBRARY_SUFFIX_LEN)) {
+                              VK_LIBRARY_SUFFIX,
+                              VK_LIBRARY_SUFFIX_LEN)) {
                      loader_platform_dl_handle handle;
                      snprintf(temp_str, sizeof(temp_str), "%s" DIRECTORY_SYMBOL "%s",p,dent->d_name);
                      // Used to call: dlopen(temp_str, RTLD_LAZY)
@@ -493,11 +493,11 @@
                          continue;
                      }
                      if (loader.scanned_layer_count == MAX_LAYER_LIBRARIES) {
-                         loader_log(XGL_DBG_MSG_ERROR, 0, "%s ignored: max layer libraries exceed", temp_str);
+                         loader_log(VK_DBG_MSG_ERROR, 0, "%s ignored: max layer libraries exceed", temp_str);
                          break;
                      }
                      if ((loader.scanned_layer_names[loader.scanned_layer_count] = malloc(strlen(temp_str) + 1)) == NULL) {
-                         loader_log(XGL_DBG_MSG_ERROR, 0, "%s ignored: out of memory", temp_str);
+                         loader_log(VK_DBG_MSG_ERROR, 0, "%s ignored: out of memory", temp_str);
                          break;
                      }
                      strcpy(loader.scanned_layer_names[loader.scanned_layer_count], temp_str);
@@ -515,15 +515,15 @@
     loader.layer_scanned = true;
 }
 
-static void loader_init_dispatch_table(XGL_LAYER_DISPATCH_TABLE *tab, xglGetProcAddrType fpGPA, XGL_PHYSICAL_GPU gpu)
+static void loader_init_dispatch_table(VK_LAYER_DISPATCH_TABLE *tab, vkGetProcAddrType fpGPA, VK_PHYSICAL_GPU gpu)
 {
     loader_initialize_dispatch_table(tab, fpGPA, gpu);
 
     if (tab->EnumerateLayers == NULL)
-        tab->EnumerateLayers = xglEnumerateLayers;
+        tab->EnumerateLayers = vkEnumerateLayers;
 }
 
-static struct loader_icd * loader_get_icd(const XGL_BASE_LAYER_OBJECT *gpu, uint32_t *gpu_index)
+static struct loader_icd * loader_get_icd(const VK_BASE_LAYER_OBJECT *gpu, uint32_t *gpu_index)
 {
     for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) {
         for (struct loader_icd *icd = inst->icds; icd; icd = icd->next) {
@@ -567,10 +567,10 @@
             obj->name[sizeof(obj->name) - 1] = '\0';
             // Used to call: dlopen(pLayerNames[i].lib_name, RTLD_LAZY | RTLD_DEEPBIND)
             if ((obj->lib_handle = loader_platform_open_library(pLayerNames[i].lib_name)) == NULL) {
-                loader_log(XGL_DBG_MSG_ERROR, 0, loader_platform_open_library_error(pLayerNames[i].lib_name));
+                loader_log(VK_DBG_MSG_ERROR, 0, loader_platform_open_library_error(pLayerNames[i].lib_name));
                 continue;
             } else {
-                loader_log(XGL_DBG_MSG_UNKNOWN, 0, "Inserting layer %s from library %s", pLayerNames[i].layer_name, pLayerNames[i].lib_name);
+                loader_log(VK_DBG_MSG_UNKNOWN, 0, "Inserting layer %s from library %s", pLayerNames[i].layer_name, pLayerNames[i].lib_name);
             }
             free(pLayerNames[i].layer_name);
             icd->layer_count[gpu_index]++;
@@ -578,30 +578,30 @@
     }
 }
 
-static XGL_RESULT find_layer_extension(struct loader_icd *icd, uint32_t gpu_index, const char *pExtName, const char **lib_name)
+static VK_RESULT find_layer_extension(struct loader_icd *icd, uint32_t gpu_index, const char *pExtName, const char **lib_name)
 {
-    XGL_RESULT err;
+    VK_RESULT err;
     char *search_name;
     loader_platform_dl_handle handle;
-    xglGetExtensionSupportType fpGetExtensionSupport;
+    vkGetExtensionSupportType fpGetExtensionSupport;
 
     /*
      * The loader provides the abstraction that make layers and extensions work via
      * the currently defined extension mechanism. That is, when app queries for an extension
-     * via xglGetExtensionSupport, the loader will call both the driver as well as any layers
+     * via vkGetExtensionSupport, the loader will call both the driver as well as any layers
      * to see who implements that extension. Then, if the app enables the extension during
-     * xglCreateDevice the loader will find and load any layers that implement that extension.
+     * vkCreateDevice the loader will find and load any layers that implement that extension.
      */
 
     // TODO: What if extension is in multiple places?
 
     // TODO: Who should we ask first? Driver or layers? Do driver for now.
-    err = icd->scanned_icds[gpu_index].GetExtensionSupport((XGL_PHYSICAL_GPU) (icd->gpus[gpu_index].nextObject), pExtName);
-    if (err == XGL_SUCCESS) {
+    err = icd->scanned_icds[gpu_index].GetExtensionSupport((VK_PHYSICAL_GPU) (icd->gpus[gpu_index].nextObject), pExtName);
+    if (err == VK_SUCCESS) {
         if (lib_name) {
             *lib_name = NULL;
         }
-        return XGL_SUCCESS;
+        return VK_SUCCESS;
     }
 
     for (unsigned int j = 0; j < loader.scanned_layer_count; j++) {
@@ -610,19 +610,19 @@
         if ((handle = loader_platform_open_library(search_name)) == NULL)
             continue;
 
-        fpGetExtensionSupport = loader_platform_get_proc_address(handle, "xglGetExtensionSupport");
+        fpGetExtensionSupport = loader_platform_get_proc_address(handle, "vkGetExtensionSupport");
 
         if (fpGetExtensionSupport != NULL) {
             // Found layer's GetExtensionSupport call
-            err = fpGetExtensionSupport((XGL_PHYSICAL_GPU) (icd->gpus + gpu_index), pExtName);
+            err = fpGetExtensionSupport((VK_PHYSICAL_GPU) (icd->gpus + gpu_index), pExtName);
 
             loader_platform_close_library(handle);
 
-            if (err == XGL_SUCCESS) {
+            if (err == VK_SUCCESS) {
                 if (lib_name) {
                     *lib_name = loader.scanned_layer_names[j];
                 }
-                return XGL_SUCCESS;
+                return VK_SUCCESS;
             }
         } else {
             loader_platform_close_library(handle);
@@ -630,12 +630,12 @@
 
         // No GetExtensionSupport or GetExtensionSupport returned invalid extension
         // for the layer, so test the layer name as if it is an extension name
-        // use default layer name based on library name XGL_LAYER_LIBRARY_PREFIX<name>.XGL_LIBRARY_SUFFIX
+        // use default layer name based on library name VK_LAYER_LIBRARY_PREFIX<name>.VK_LIBRARY_SUFFIX
         char *pEnd;
         size_t siz;
 
         search_name = basename(search_name);
-        search_name += strlen(XGL_LAYER_LIBRARY_PREFIX);
+        search_name += strlen(VK_LAYER_LIBRARY_PREFIX);
         pEnd = strrchr(search_name, '.');
         siz = (int) (pEnd - search_name);
         if (siz != strlen(pExtName))
@@ -645,10 +645,10 @@
             if (lib_name) {
                 *lib_name = loader.scanned_layer_names[j];
             }
-            return XGL_SUCCESS;
+            return VK_SUCCESS;
         }
     }
-    return XGL_ERROR_INVALID_EXTENSION;
+    return VK_ERROR_INVALID_EXTENSION;
 }
 
 static uint32_t loader_get_layer_env(struct loader_icd *icd, uint32_t gpu_index, struct layer_name_pair *pLayerNames)
@@ -691,7 +691,7 @@
             next++;
         }
         name = basename(p);
-        if (find_layer_extension(icd, gpu_index, name, &lib_name) != XGL_SUCCESS) {
+        if (find_layer_extension(icd, gpu_index, name, &lib_name) != VK_SUCCESS) {
             p = next;
             continue;
         }
@@ -714,7 +714,7 @@
     return count;
 }
 
-static uint32_t loader_get_layer_libs(struct loader_icd *icd, uint32_t gpu_index, const XGL_DEVICE_CREATE_INFO* pCreateInfo, struct layer_name_pair **ppLayerNames)
+static uint32_t loader_get_layer_libs(struct loader_icd *icd, uint32_t gpu_index, const VK_DEVICE_CREATE_INFO* pCreateInfo, struct layer_name_pair **ppLayerNames)
 {
     static struct layer_name_pair layerNames[MAX_LAYER_LIBRARIES];
     const char *lib_name = NULL;
@@ -727,7 +727,7 @@
     for (uint32_t i = 0; i < pCreateInfo->extensionCount; i++) {
         const char *pExtName = pCreateInfo->ppEnabledExtensionNames[i];
 
-        if (find_layer_extension(icd, gpu_index, pExtName, &lib_name) == XGL_SUCCESS) {
+        if (find_layer_extension(icd, gpu_index, pExtName, &lib_name) == VK_SUCCESS) {
             uint32_t len;
 
             /*
@@ -788,31 +788,31 @@
     }
 }
 
-extern uint32_t loader_activate_layers(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo)
+extern uint32_t loader_activate_layers(VK_PHYSICAL_GPU gpu, const VK_DEVICE_CREATE_INFO* pCreateInfo)
 {
     uint32_t gpu_index;
     uint32_t count;
     struct layer_name_pair *pLayerNames;
-    struct loader_icd *icd = loader_get_icd((const XGL_BASE_LAYER_OBJECT *) gpu, &gpu_index);
+    struct loader_icd *icd = loader_get_icd((const VK_BASE_LAYER_OBJECT *) gpu, &gpu_index);
 
     if (!icd)
         return 0;
-    assert(gpu_index < XGL_MAX_PHYSICAL_GPUS);
+    assert(gpu_index < VK_MAX_PHYSICAL_GPUS);
 
     /* activate any layer libraries */
     if (!loader_layers_activated(icd, gpu_index)) {
-        XGL_BASE_LAYER_OBJECT *gpuObj = (XGL_BASE_LAYER_OBJECT *) gpu;
-        XGL_BASE_LAYER_OBJECT *nextGpuObj, *baseObj = gpuObj->baseObject;
-        xglGetProcAddrType nextGPA = xglGetProcAddr;
+        VK_BASE_LAYER_OBJECT *gpuObj = (VK_BASE_LAYER_OBJECT *) gpu;
+        VK_BASE_LAYER_OBJECT *nextGpuObj, *baseObj = gpuObj->baseObject;
+        vkGetProcAddrType nextGPA = vkGetProcAddr;
 
         count = loader_get_layer_libs(icd, gpu_index, pCreateInfo, &pLayerNames);
         if (!count)
             return 0;
         loader_init_layer_libs(icd, gpu_index, pLayerNames, count);
 
-        icd->wrappedGpus[gpu_index] = malloc(sizeof(XGL_BASE_LAYER_OBJECT) * icd->layer_count[gpu_index]);
+        icd->wrappedGpus[gpu_index] = malloc(sizeof(VK_BASE_LAYER_OBJECT) * icd->layer_count[gpu_index]);
         if (! icd->wrappedGpus[gpu_index])
-                loader_log(XGL_DBG_MSG_ERROR, 0, "Failed to malloc Gpu objects for layer");
+                loader_log(VK_DBG_MSG_ERROR, 0, "Failed to malloc Gpu objects for layer");
         for (int32_t i = icd->layer_count[gpu_index] - 1; i >= 0; i--) {
             nextGpuObj = (icd->wrappedGpus[gpu_index] + i);
             nextGpuObj->pGPA = nextGPA;
@@ -822,18 +822,18 @@
 
             char funcStr[256];
             snprintf(funcStr, 256, "%sGetProcAddr",icd->layer_libs[gpu_index][i].name);
-            if ((nextGPA = (xglGetProcAddrType) loader_platform_get_proc_address(icd->layer_libs[gpu_index][i].lib_handle, funcStr)) == NULL)
-                nextGPA = (xglGetProcAddrType) loader_platform_get_proc_address(icd->layer_libs[gpu_index][i].lib_handle, "xglGetProcAddr");
+            if ((nextGPA = (vkGetProcAddrType) loader_platform_get_proc_address(icd->layer_libs[gpu_index][i].lib_handle, funcStr)) == NULL)
+                nextGPA = (vkGetProcAddrType) loader_platform_get_proc_address(icd->layer_libs[gpu_index][i].lib_handle, "vkGetProcAddr");
             if (!nextGPA) {
-                loader_log(XGL_DBG_MSG_ERROR, 0, "Failed to find xglGetProcAddr in layer %s", icd->layer_libs[gpu_index][i].name);
+                loader_log(VK_DBG_MSG_ERROR, 0, "Failed to find vkGetProcAddr in layer %s", icd->layer_libs[gpu_index][i].name);
                 continue;
             }
 
             if (i == 0) {
                 loader_init_dispatch_table(icd->loader_dispatch + gpu_index, nextGPA, gpuObj);
                 //Insert the new wrapped objects into the list with loader object at head
-                ((XGL_BASE_LAYER_OBJECT *) gpu)->nextObject = gpuObj;
-                ((XGL_BASE_LAYER_OBJECT *) gpu)->pGPA = nextGPA;
+                ((VK_BASE_LAYER_OBJECT *) gpu)->nextObject = gpuObj;
+                ((VK_BASE_LAYER_OBJECT *) gpu)->pGPA = nextGPA;
                 gpuObj = icd->wrappedGpus[gpu_index] + icd->layer_count[gpu_index] - 1;
                 gpuObj->nextObject = baseObj;
                 gpuObj->pGPA = icd->scanned_icds->GetProcAddr;
@@ -846,27 +846,27 @@
         count = loader_get_layer_libs(icd, gpu_index, pCreateInfo, &pLayerNames);
         for (uint32_t i = 0; i < count; i++) {
             if (strcmp(icd->layer_libs[gpu_index][i].name, pLayerNames[i].layer_name)) {
-                loader_log(XGL_DBG_MSG_ERROR, 0, "Layers activated != Layers requested");
+                loader_log(VK_DBG_MSG_ERROR, 0, "Layers activated != Layers requested");
                 break;
             }
         }
         if (count != icd->layer_count[gpu_index]) {
-            loader_log(XGL_DBG_MSG_ERROR, 0, "Number of Layers activated != number requested");
+            loader_log(VK_DBG_MSG_ERROR, 0, "Number of Layers activated != number requested");
         }
     }
     return icd->layer_count[gpu_index];
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglCreateInstance(
-        const XGL_INSTANCE_CREATE_INFO*         pCreateInfo,
-        XGL_INSTANCE*                           pInstance)
+LOADER_EXPORT VK_RESULT VKAPI vkCreateInstance(
+        const VK_INSTANCE_CREATE_INFO*         pCreateInfo,
+        VK_INSTANCE*                           pInstance)
 {
     static LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_icd);
     static LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_layer);
     struct loader_instance *ptr_instance = NULL;
     struct loader_scanned_icds *scanned_icds;
     struct loader_icd *icd;
-    XGL_RESULT res = XGL_ERROR_INITIALIZATION_FAILED;
+    VK_RESULT res = VK_ERROR_INITIALIZATION_FAILED;
 
     /* Scan/discover all ICD libraries in a single-threaded manner */
     loader_platform_thread_once(&once_icd, loader_icd_scan);
@@ -876,7 +876,7 @@
 
     ptr_instance = (struct loader_instance*) malloc(sizeof(struct loader_instance));
     if (ptr_instance == NULL) {
-        return XGL_ERROR_OUT_OF_MEMORY;
+        return VK_ERROR_OUT_OF_MEMORY;
     }
     memset(ptr_instance, 0, sizeof(struct loader_instance));
 
@@ -889,12 +889,12 @@
         if (icd) {
             res = scanned_icds->CreateInstance(pCreateInfo,
                                            &(scanned_icds->instance));
-            if (res != XGL_SUCCESS)
+            if (res != VK_SUCCESS)
             {
                 ptr_instance->icds = ptr_instance->icds->next;
                 loader_icd_destroy(icd);
                 scanned_icds->instance = NULL;
-                loader_log(XGL_DBG_MSG_WARNING, 0,
+                loader_log(VK_DBG_MSG_WARNING, 0,
                         "ICD ignored: failed to CreateInstance on device");
             }
         }
@@ -902,19 +902,19 @@
     }
 
     if (ptr_instance->icds == NULL) {
-        return XGL_ERROR_INCOMPATIBLE_DRIVER;
+        return VK_ERROR_INCOMPATIBLE_DRIVER;
     }
 
-    *pInstance = (XGL_INSTANCE) ptr_instance;
-    return XGL_SUCCESS;
+    *pInstance = (VK_INSTANCE) ptr_instance;
+    return VK_SUCCESS;
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglDestroyInstance(
-        XGL_INSTANCE                                instance)
+LOADER_EXPORT VK_RESULT VKAPI vkDestroyInstance(
+        VK_INSTANCE                                instance)
 {
     struct loader_instance *ptr_instance = (struct loader_instance *) instance;
     struct loader_scanned_icds *scanned_icds;
-    XGL_RESULT res;
+    VK_RESULT res;
 
     // Remove this instance from the list of instances:
     struct loader_instance *prev = NULL;
@@ -933,7 +933,7 @@
     }
     if (next  == NULL) {
         // This must be an invalid instance handle or empty list
-        return XGL_ERROR_INVALID_HANDLE;
+        return VK_ERROR_INVALID_HANDLE;
     }
 
     // cleanup any prior layer initializations
@@ -943,8 +943,8 @@
     while (scanned_icds) {
         if (scanned_icds->instance)
             res = scanned_icds->DestroyInstance(scanned_icds->instance);
-        if (res != XGL_SUCCESS)
-            loader_log(XGL_DBG_MSG_WARNING, 0,
+        if (res != VK_SUCCESS)
+            loader_log(VK_DBG_MSG_WARNING, 0,
                         "ICD ignored: failed to DestroyInstance on device");
         scanned_icds->instance = NULL;
         scanned_icds = scanned_icds->next;
@@ -952,43 +952,43 @@
 
     free(ptr_instance);
 
-    return XGL_SUCCESS;
+    return VK_SUCCESS;
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglEnumerateGpus(
+LOADER_EXPORT VK_RESULT VKAPI vkEnumerateGpus(
 
-        XGL_INSTANCE                                instance,
+        VK_INSTANCE                                instance,
         uint32_t                                    maxGpus,
         uint32_t*                                   pGpuCount,
-        XGL_PHYSICAL_GPU*                           pGpus)
+        VK_PHYSICAL_GPU*                           pGpus)
 {
     struct loader_instance *ptr_instance = (struct loader_instance *) instance;
     struct loader_icd *icd;
     uint32_t count = 0;
-    XGL_RESULT res;
+    VK_RESULT res;
 
-    //in spirit of XGL don't error check on the instance parameter
+    //in spirit of VK don't error check on the instance parameter
     icd = ptr_instance->icds;
     while (icd) {
-        XGL_PHYSICAL_GPU gpus[XGL_MAX_PHYSICAL_GPUS];
-        XGL_BASE_LAYER_OBJECT * wrapped_gpus;
-        xglGetProcAddrType get_proc_addr = icd->scanned_icds->GetProcAddr;
+        VK_PHYSICAL_GPU gpus[VK_MAX_PHYSICAL_GPUS];
+        VK_BASE_LAYER_OBJECT * wrapped_gpus;
+        vkGetProcAddrType get_proc_addr = icd->scanned_icds->GetProcAddr;
         uint32_t n, max = maxGpus - count;
 
-        if (max > XGL_MAX_PHYSICAL_GPUS) {
-            max = XGL_MAX_PHYSICAL_GPUS;
+        if (max > VK_MAX_PHYSICAL_GPUS) {
+            max = VK_MAX_PHYSICAL_GPUS;
         }
 
         res = icd->scanned_icds->EnumerateGpus(icd->scanned_icds->instance,
                                                max, &n,
                                                gpus);
-        if (res == XGL_SUCCESS && n) {
-            wrapped_gpus = (XGL_BASE_LAYER_OBJECT*) malloc(n *
-                                        sizeof(XGL_BASE_LAYER_OBJECT));
+        if (res == VK_SUCCESS && n) {
+            wrapped_gpus = (VK_BASE_LAYER_OBJECT*) malloc(n *
+                                        sizeof(VK_BASE_LAYER_OBJECT));
             icd->gpus = wrapped_gpus;
             icd->gpu_count = n;
-            icd->loader_dispatch = (XGL_LAYER_DISPATCH_TABLE *) malloc(n *
-                                        sizeof(XGL_LAYER_DISPATCH_TABLE));
+            icd->loader_dispatch = (VK_LAYER_DISPATCH_TABLE *) malloc(n *
+                                        sizeof(VK_LAYER_DISPATCH_TABLE));
             for (unsigned int i = 0; i < n; i++) {
                 (wrapped_gpus + i)->baseObject = gpus[i];
                 (wrapped_gpus + i)->pGPA = get_proc_addr;
@@ -999,13 +999,13 @@
 
                 /* Verify ICD compatibility */
                 if (!valid_loader_magic_value(gpus[i])) {
-                    loader_log(XGL_DBG_MSG_WARNING, 0,
+                    loader_log(VK_DBG_MSG_WARNING, 0,
                             "Loader: Incompatible ICD, first dword must be initialized to ICD_LOADER_MAGIC. See loader/README.md for details.\n");
                     assert(0);
                 }
 
-                const XGL_LAYER_DISPATCH_TABLE **disp;
-                disp = (const XGL_LAYER_DISPATCH_TABLE **) gpus[i];
+                const VK_LAYER_DISPATCH_TABLE **disp;
+                disp = (const VK_LAYER_DISPATCH_TABLE **) gpus[i];
                 *disp = icd->loader_dispatch + i;
             }
 
@@ -1021,16 +1021,16 @@
 
     *pGpuCount = count;
 
-    return (count > 0) ? XGL_SUCCESS : res;
+    return (count > 0) ? VK_SUCCESS : res;
 }
 
-LOADER_EXPORT void * XGLAPI xglGetProcAddr(XGL_PHYSICAL_GPU gpu, const char * pName)
+LOADER_EXPORT void * VKAPI vkGetProcAddr(VK_PHYSICAL_GPU gpu, const char * pName)
 {
     if (gpu == NULL) {
         return NULL;
     }
-    XGL_BASE_LAYER_OBJECT* gpuw = (XGL_BASE_LAYER_OBJECT *) gpu;
-    XGL_LAYER_DISPATCH_TABLE * disp_table = * (XGL_LAYER_DISPATCH_TABLE **) gpuw->baseObject;
+    VK_BASE_LAYER_OBJECT* gpuw = (VK_BASE_LAYER_OBJECT *) gpu;
+    VK_LAYER_DISPATCH_TABLE * disp_table = * (VK_LAYER_DISPATCH_TABLE **) gpuw->baseObject;
     void *addr;
 
     if (disp_table == NULL)
@@ -1046,33 +1046,33 @@
     }
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglGetExtensionSupport(XGL_PHYSICAL_GPU gpu, const char *pExtName)
+LOADER_EXPORT VK_RESULT VKAPI vkGetExtensionSupport(VK_PHYSICAL_GPU gpu, const char *pExtName)
 {
     uint32_t gpu_index;
-    struct loader_icd *icd = loader_get_icd((const XGL_BASE_LAYER_OBJECT *) gpu, &gpu_index);
+    struct loader_icd *icd = loader_get_icd((const VK_BASE_LAYER_OBJECT *) gpu, &gpu_index);
 
     if (!icd)
-        return XGL_ERROR_UNAVAILABLE;
+        return VK_ERROR_UNAVAILABLE;
 
     return find_layer_extension(icd, gpu_index, pExtName, NULL);
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglEnumerateLayers(XGL_PHYSICAL_GPU gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved)
+LOADER_EXPORT VK_RESULT VKAPI vkEnumerateLayers(VK_PHYSICAL_GPU gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved)
 {
     uint32_t gpu_index;
     size_t count = 0;
     char *lib_name;
-    struct loader_icd *icd = loader_get_icd((const XGL_BASE_LAYER_OBJECT *) gpu, &gpu_index);
+    struct loader_icd *icd = loader_get_icd((const VK_BASE_LAYER_OBJECT *) gpu, &gpu_index);
     loader_platform_dl_handle handle;
-    xglEnumerateLayersType fpEnumerateLayers;
+    vkEnumerateLayersType fpEnumerateLayers;
     char layer_buf[16][256];
     char * layers[16];
 
     if (pOutLayerCount == NULL || pOutLayers == NULL)
-        return XGL_ERROR_INVALID_POINTER;
+        return VK_ERROR_INVALID_POINTER;
 
     if (!icd)
-        return XGL_ERROR_UNAVAILABLE;
+        return VK_ERROR_UNAVAILABLE;
 
     for (int i = 0; i < 16; i++)
          layers[i] = &layer_buf[i][0];
@@ -1082,14 +1082,14 @@
         // Used to call: dlopen(*lib_name, RTLD_LAZY)
         if ((handle = loader_platform_open_library(lib_name)) == NULL)
             continue;
-        if ((fpEnumerateLayers = loader_platform_get_proc_address(handle, "xglEnumerateLayers")) == NULL) {
-            //use default layer name based on library name XGL_LAYER_LIBRARY_PREFIX<name>.XGL_LIBRARY_SUFFIX
+        if ((fpEnumerateLayers = loader_platform_get_proc_address(handle, "vkEnumerateLayers")) == NULL) {
+            //use default layer name based on library name VK_LAYER_LIBRARY_PREFIX<name>.VK_LIBRARY_SUFFIX
             char *pEnd, *cpyStr;
             size_t siz;
             loader_platform_close_library(handle);
             lib_name = basename(lib_name);
             pEnd = strrchr(lib_name, '.');
-            siz = (int) (pEnd - lib_name - strlen(XGL_LAYER_LIBRARY_PREFIX) + 1);
+            siz = (int) (pEnd - lib_name - strlen(VK_LAYER_LIBRARY_PREFIX) + 1);
             if (pEnd == NULL || siz <= 0)
                 continue;
             cpyStr = malloc(siz);
@@ -1097,7 +1097,7 @@
                 free(cpyStr);
                 continue;
             }
-            strncpy(cpyStr, lib_name + strlen(XGL_LAYER_LIBRARY_PREFIX), siz);
+            strncpy(cpyStr, lib_name + strlen(VK_LAYER_LIBRARY_PREFIX), siz);
             cpyStr[siz - 1] = '\0';
             if (siz > maxStringSize)
                 siz = (int) maxStringSize;
@@ -1108,11 +1108,11 @@
         } else {
             size_t cnt;
             uint32_t n;
-            XGL_RESULT res;
+            VK_RESULT res;
             n = (uint32_t) ((maxStringSize < 256) ? maxStringSize : 256);
             res = fpEnumerateLayers(NULL, 16, n, &cnt, layers, (char *) icd->gpus + gpu_index);
             loader_platform_close_library(handle);
-            if (res != XGL_SUCCESS)
+            if (res != VK_SUCCESS)
                 continue;
             if (cnt + count > maxLayerCount)
                 cnt = maxLayerCount - count;
@@ -1127,18 +1127,18 @@
 
     *pOutLayerCount = count;
 
-    return XGL_SUCCESS;
+    return VK_SUCCESS;
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglDbgRegisterMsgCallback(XGL_INSTANCE instance, XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, void* pUserData)
+LOADER_EXPORT VK_RESULT VKAPI vkDbgRegisterMsgCallback(VK_INSTANCE instance, VK_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback, void* pUserData)
 {
     const struct loader_icd *icd;
     struct loader_instance *inst;
-    XGL_RESULT res;
+    VK_RESULT res;
     uint32_t gpu_idx;
 
-    if (instance == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (instance == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
 
     assert(loader.icds_scanned);
 
@@ -1147,19 +1147,19 @@
             break;
     }
 
-    if (inst == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (inst == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
 
     for (icd = inst->icds; icd; icd = icd->next) {
         for (uint32_t i = 0; i < icd->gpu_count; i++) {
             res = (icd->loader_dispatch + i)->DbgRegisterMsgCallback(icd->scanned_icds->instance,
                                                    pfnMsgCallback, pUserData);
-            if (res != XGL_SUCCESS) {
+            if (res != VK_SUCCESS) {
                 gpu_idx = i;
                 break;
             }
         }
-        if (res != XGL_SUCCESS)
+        if (res != VK_SUCCESS)
             break;
     }
 
@@ -1178,15 +1178,15 @@
         return res;
     }
 
-    return XGL_SUCCESS;
+    return VK_SUCCESS;
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglDbgUnregisterMsgCallback(XGL_INSTANCE instance, XGL_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
+LOADER_EXPORT VK_RESULT VKAPI vkDbgUnregisterMsgCallback(VK_INSTANCE instance, VK_DBG_MSG_CALLBACK_FUNCTION pfnMsgCallback)
 {
-    XGL_RESULT res = XGL_SUCCESS;
+    VK_RESULT res = VK_SUCCESS;
     struct loader_instance *inst;
-    if (instance == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (instance == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
 
     assert(loader.icds_scanned);
 
@@ -1195,14 +1195,14 @@
             break;
     }
 
-    if (inst == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (inst == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
 
     for (const struct loader_icd * icd = inst->icds; icd; icd = icd->next) {
         for (uint32_t i = 0; i < icd->gpu_count; i++) {
-            XGL_RESULT r;
+            VK_RESULT r;
             r = (icd->loader_dispatch + i)->DbgUnregisterMsgCallback(icd->scanned_icds->instance, pfnMsgCallback);
-            if (r != XGL_SUCCESS) {
+            if (r != VK_SUCCESS) {
                 res = r;
             }
         }
@@ -1210,12 +1210,12 @@
     return res;
 }
 
-LOADER_EXPORT XGL_RESULT XGLAPI xglDbgSetGlobalOption(XGL_INSTANCE instance, XGL_DBG_GLOBAL_OPTION dbgOption, size_t dataSize, const void* pData)
+LOADER_EXPORT VK_RESULT VKAPI vkDbgSetGlobalOption(VK_INSTANCE instance, VK_DBG_GLOBAL_OPTION dbgOption, size_t dataSize, const void* pData)
 {
-    XGL_RESULT res = XGL_SUCCESS;
+    VK_RESULT res = VK_SUCCESS;
     struct loader_instance *inst;
-    if (instance == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (instance == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
 
     assert(loader.icds_scanned);
 
@@ -1224,15 +1224,15 @@
             break;
     }
 
-    if (inst == XGL_NULL_HANDLE)
-        return XGL_ERROR_INVALID_HANDLE;
+    if (inst == VK_NULL_HANDLE)
+        return VK_ERROR_INVALID_HANDLE;
     for (const struct loader_icd * icd = inst->icds; icd; icd = icd->next) {
         for (uint32_t i = 0; i < icd->gpu_count; i++) {
-            XGL_RESULT r;
+            VK_RESULT r;
             r = (icd->loader_dispatch + i)->DbgSetGlobalOption(icd->scanned_icds->instance, dbgOption,
                                                            dataSize, pData);
             /* unfortunately we cannot roll back */
-            if (r != XGL_SUCCESS) {
+            if (r != VK_SUCCESS) {
                res = r;
             }
         }
diff --git a/loader/loader.h b/loader/loader.h
index d307c53..1817386 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -1,5 +1,5 @@
 /*
- * XGL
+ * Vulkan
  *
  * Copyright (C) 2014 LunarG, Inc.
  *
@@ -28,15 +28,15 @@
 #ifndef LOADER_H
 #define LOADER_H
 
-#include <xgl.h>
-#include <xglDbg.h>
+#include <vulkan.h>
+#include <vkDbg.h>
 #if defined(WIN32)
 // FIXME: NEED WINDOWS EQUIVALENT
 #else // WIN32
-#include <xglWsiX11Ext.h>
+#include <vkWsiX11Ext.h>
 #endif // WIN32
-#include <xglLayer.h>
-#include <xglIcd.h>
+#include <vkLayer.h>
+#include <vkIcd.h>
 #include <assert.h>
 
 #if defined(__GNUC__) && __GNUC__ >= 4
@@ -65,16 +65,16 @@
     loader_set_data(obj, data);
 }
 
-static inline void *loader_unwrap_gpu(XGL_PHYSICAL_GPU *gpu)
+static inline void *loader_unwrap_gpu(VK_PHYSICAL_GPU *gpu)
 {
-    const XGL_BASE_LAYER_OBJECT *wrap = (const XGL_BASE_LAYER_OBJECT *) *gpu;
+    const VK_BASE_LAYER_OBJECT *wrap = (const VK_BASE_LAYER_OBJECT *) *gpu;
 
-    *gpu = (XGL_PHYSICAL_GPU) wrap->nextObject;
+    *gpu = (VK_PHYSICAL_GPU) wrap->nextObject;
 
     return loader_get_data(wrap->baseObject);
 }
 
-extern uint32_t loader_activate_layers(XGL_PHYSICAL_GPU gpu, const XGL_DEVICE_CREATE_INFO* pCreateInfo);
+extern uint32_t loader_activate_layers(VK_PHYSICAL_GPU gpu, const VK_DEVICE_CREATE_INFO* pCreateInfo);
 #define MAX_LAYER_LIBRARIES 64
 
 #endif /* LOADER_H */
diff --git a/loader/loader_platform.h b/loader/loader_platform.h
index d2299e3..230ee5d 100644
--- a/loader/loader_platform.h
+++ b/loader/loader_platform.h
@@ -1,5 +1,5 @@
 /*
- * XGL
+ * Vulkan
  *
  * Copyright (C) 2015 LunarG, Inc.
  * Copyright 2014 Valve Software
@@ -42,26 +42,26 @@
 #include <pthread.h>
 #include <assert.h>
 
-// XGL Library Filenames, Paths, etc.:
+// VK Library Filenames, Paths, etc.:
 #define PATH_SEPERATOR ':'
 #define DIRECTORY_SYMBOL "/"
-#define DRIVER_PATH_ENV "LIBXGL_DRIVERS_PATH"
-#define LAYERS_PATH_ENV "LIBXGL_LAYERS_PATH"
-#define LAYER_NAMES_ENV "LIBXGL_LAYER_NAMES"
-#ifndef DEFAULT_XGL_DRIVERS_PATH
+#define DRIVER_PATH_ENV "LIBVK_DRIVERS_PATH"
+#define LAYERS_PATH_ENV "LIBVK_LAYERS_PATH"
+#define LAYER_NAMES_ENV "LIBVK_LAYER_NAMES"
+#ifndef DEFAULT_VK_DRIVERS_PATH
 // TODO: Is this a good default location?
 // Need to search for both 32bit and 64bit ICDs
-#define DEFAULT_XGL_DRIVERS_PATH "/usr/lib/i386-linux-gnu/xgl:/usr/lib/x86_64-linux-gnu/xgl"
-#define XGL_DRIVER_LIBRARY_PREFIX "libXGL_"
-#define XGL_DRIVER_LIBRARY_PREFIX_LEN 7
-#define XGL_LAYER_LIBRARY_PREFIX "libXGLLayer"
-#define XGL_LAYER_LIBRARY_PREFIX_LEN 11
-#define XGL_LIBRARY_SUFFIX ".so"
-#define XGL_LIBRARY_SUFFIX_LEN 3
-#endif //  DEFAULT_XGL_DRIVERS_PATH
-#ifndef DEFAULT_XGL_LAYERS_PATH
+#define DEFAULT_VK_DRIVERS_PATH "/usr/lib/i386-linux-gnu/vk:/usr/lib/x86_64-linux-gnu/vk"
+#define VK_DRIVER_LIBRARY_PREFIX "libVK_"
+#define VK_DRIVER_LIBRARY_PREFIX_LEN 6
+#define VK_LAYER_LIBRARY_PREFIX "libVKLayer"
+#define VK_LAYER_LIBRARY_PREFIX_LEN 10
+#define VK_LIBRARY_SUFFIX ".so"
+#define VK_LIBRARY_SUFFIX_LEN 3
+#endif //  DEFAULT_VK_DRIVERS_PATH
+#ifndef DEFAULT_VK_LAYERS_PATH
 // TODO: Are these good default locations?
-#define DEFAULT_XGL_LAYERS_PATH ".:/usr/lib/i386-linux-gnu/xgl:/usr/lib/x86_64-linux-gnu/xgl"
+#define DEFAULT_VK_LAYERS_PATH ".:/usr/lib/i386-linux-gnu/vk:/usr/lib/x86_64-linux-gnu/vk"
 #endif
 
 // C99:
@@ -144,32 +144,32 @@
 using namespace std;
 #endif // __cplusplus
 
-// XGL Library Filenames, Paths, etc.:
+// VK Library Filenames, Paths, etc.:
 #define PATH_SEPERATOR ';'
 #define DIRECTORY_SYMBOL "\\"
-#define DRIVER_PATH_REGISTRY_VALUE "XGL_DRIVERS_PATH"
-#define LAYERS_PATH_REGISTRY_VALUE "XGL_LAYERS_PATH"
-#define LAYER_NAMES_REGISTRY_VALUE "XGL_LAYER_NAMES"
-#define DRIVER_PATH_ENV "XGL_DRIVERS_PATH"
-#define LAYERS_PATH_ENV "XGL_LAYERS_PATH"
-#define LAYER_NAMES_ENV "XGL_LAYER_NAMES"
-#ifndef DEFAULT_XGL_DRIVERS_PATH
+#define DRIVER_PATH_REGISTRY_VALUE "VK_DRIVERS_PATH"
+#define LAYERS_PATH_REGISTRY_VALUE "VK_LAYERS_PATH"
+#define LAYER_NAMES_REGISTRY_VALUE "VK_LAYER_NAMES"
+#define DRIVER_PATH_ENV "VK_DRIVERS_PATH"
+#define LAYERS_PATH_ENV "VK_LAYERS_PATH"
+#define LAYER_NAMES_ENV "VK_LAYER_NAMES"
+#ifndef DEFAULT_VK_DRIVERS_PATH
 // TODO: Is this a good default location?
 // Need to search for both 32bit and 64bit ICDs
-#define DEFAULT_XGL_DRIVERS_PATH "C:\\Windows\\System32"
+#define DEFAULT_VK_DRIVERS_PATH "C:\\Windows\\System32"
 // TODO/TBD: Is this an appropriate prefix for Windows?
-#define XGL_DRIVER_LIBRARY_PREFIX "XGL_"
-#define XGL_DRIVER_LIBRARY_PREFIX_LEN 4
+#define VK_DRIVER_LIBRARY_PREFIX "VK_"
+#define VK_DRIVER_LIBRARY_PREFIX_LEN 4
 // TODO/TBD: Is this an appropriate suffix for Windows?
-#define XGL_LAYER_LIBRARY_PREFIX "XGLLayer"
-#define XGL_LAYER_LIBRARY_PREFIX_LEN 8
-#define XGL_LIBRARY_SUFFIX ".dll"
-#define XGL_LIBRARY_SUFFIX_LEN 4
-#endif //  DEFAULT_XGL_DRIVERS_PATH
-#ifndef DEFAULT_XGL_LAYERS_PATH
+#define VK_LAYER_LIBRARY_PREFIX "VKLayer"
+#define VK_LAYER_LIBRARY_PREFIX_LEN 8
+#define VK_LIBRARY_SUFFIX ".dll"
+#define VK_LIBRARY_SUFFIX_LEN 4
+#endif //  DEFAULT_VK_DRIVERS_PATH
+#ifndef DEFAULT_VK_LAYERS_PATH
 // TODO: Is this a good default location?
-#define DEFAULT_XGL_LAYERS_PATH "C:\\Windows\\System32"
-#endif //  DEFAULT_XGL_LAYERS_PATH
+#define DEFAULT_VK_LAYERS_PATH "C:\\Windows\\System32"
+#endif //  DEFAULT_VK_LAYERS_PATH
 
 // C99:
 // Microsoft didn't implement C99 in Visual Studio; but started adding it with