Merge tag 'vulkan-sdk-1.3.268.0'

Bug:b/319117470

Change-Id: Iace0288ab6fdfc0d711f20f745122498de071452
diff --git a/.cmake-format.py b/.cmake-format.py
deleted file mode 100644
index 07d2f99..0000000
--- a/.cmake-format.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Configuration for cmake-format (v0.4.1, circa Jul 2018)
-# https://github.com/cheshirekow/cmake_format
-
-# How wide to allow formatted cmake files
-line_width = 132
-
-# How many spaces to tab for indent
-tab_size = 4
-
-# If arglists are longer than this, break them always
-max_subargs_per_line = 3
-
-# If true, separate flow control names from their parentheses with a space
-separate_ctrl_name_with_space = False
-
-# If true, separate function names from parentheses with a space
-separate_fn_name_with_space = False
-
-# If a statement is wrapped to more than one line, than dangle the closing
-# parenthesis on it's own line
-dangle_parens = False
-
-# What character to use for bulleted lists
-bullet_char = u'*'
-
-# What character to use as punctuation after numerals in an enumerated list
-enum_char = u'.'
-
-# What style line endings to use in the output.
-line_ending = u'unix'
-
-# Format command names consistently as 'lower' or 'upper' case
-command_case = u'lower'
-
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 85e0e25..ce4ba5c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,5 +1,5 @@
-# Copyright (c) 2021 Valve Corporation
-# Copyright (c) 2021 LunarG, Inc.
+# Copyright (c) 2021-2023 Valve Corporation
+# Copyright (c) 2021-2023 LunarG, Inc.
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,14 +14,24 @@
 # limitations under the License.
 #
 # Author: Lenny Komow <lenny@lunarg.com>
+# Author: Charles Giessen <charles@lunarg.com>
 
 name: CI Build
 
+# https://docs.github.com/en/actions/using-jobs/using-concurrency
+concurrency:
+  # github.head_ref is only defined on pull_request
+  # Fallback to the run ID, which is guaranteed to be both unique and defined for the run.
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id  }}
+  cancel-in-progress: true
+
 on:
     push:
     pull_request:
         branches:
-            - master
+            - main
+
+permissions: read-all
 
 jobs:
     linux:
@@ -32,7 +42,7 @@
                 cc: [ gcc, clang ]
                 cxx: [ g++, clang++ ]
                 config: [ Debug, Release ]
-                os: [ ubuntu-18.04, ubuntu-20.04 ]
+                os: [ ubuntu-20.04, ubuntu-22.04 ]
                 exclude:
                     - cc: gcc
                       cxx: clang++
@@ -40,29 +50,41 @@
                       cxx: g++
 
         steps:
-            - uses: actions/checkout@v2
-            - uses: actions/setup-python@v2
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
               with:
                 python-version: '3.7'
+            - uses: lukka/get-cmake@latest
+              with:
+                cmakeVersion: 3.17.2
             - run: sudo apt update
             - name: Install Dependencies
               run: sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev
 
             - name: Generate build files
-              run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON -DTEST_USE_ADDRESS_SANITIZER=ON
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=${{matrix.config}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D LOADER_ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_WERROR=ON
               env:
                 CC: ${{matrix.cc}}
                 CXX: ${{matrix.cxx}}
 
             - name: Build the loader
-              run: make -C build
+              run: cmake --build build
+
+            - name: Install the loader
+              run: cmake --install build --prefix build/install
+
+            - name: cat vulkan.pc
+              run: cat ./build/install/lib/pkgconfig/vulkan.pc
+
+            - name: Validate pkg-config
+              run: pkg-config --validate ./build/install/lib/pkgconfig/vulkan.pc
 
             - name: Run regression tests
               working-directory: ./build
               run: ctest --output-on-failure
 
             - name: Verify generated source files
-              run: python scripts/generate_source.py --verify external/Vulkan-Headers/registry
+              run: python scripts/generate_source.py --verify external/${{matrix.config}}/Vulkan-Headers/registry
 
             - name: Verify code formatting with clang-format
               run: ./scripts/check_code_format.sh
@@ -70,6 +92,34 @@
             - name: Verify commit message formatting
               run: ./scripts/check_commit_message_format.sh
 
+    linux-no-asm:
+        runs-on: ubuntu-22.04
+
+        steps:
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
+              with:
+                python-version: '3.7'
+            - uses: lukka/get-cmake@latest
+              with:
+                cmakeVersion: 3.17.2
+            - run: sudo apt update
+            - name: Install Dependencies
+              run: sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev
+
+            - name: Generate build files
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D USE_GAS=OFF
+              env:
+                CC: clang
+                CXX: clang++
+
+            - name: Build the loader
+              run: cmake --build build
+
+            - name: Run regression tests
+              working-directory: ./build
+              run: ctest --output-on-failure -E UnknownFunction
+
     linux-32:
         runs-on: ${{matrix.os}}
 
@@ -78,7 +128,7 @@
                 cc: [ gcc, clang ]
                 cxx: [ g++, clang++ ]
                 config: [ Debug, Release ]
-                os: [ ubuntu-18.04, ubuntu-20.04 ]
+                os: [ ubuntu-20.04, ubuntu-22.04 ]
                 exclude:
                     - cc: gcc
                       cxx: clang++
@@ -86,59 +136,192 @@
                       cxx: g++
 
         steps:
-            - uses: actions/checkout@v2
-            - uses: actions/setup-python@v2
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
               with:
                 python-version: '3.7'
-            - name: Install Dependencies
+            - uses: lukka/get-cmake@latest
+              with:
+                cmakeVersion: 3.17.2
+
+            - name: Enable 32 bit
               run: |-
                 sudo dpkg --add-architecture i386
+            - name: Update packages
+              run: |-
                 sudo apt-get update
-                sudo apt install --yes --no-install-recommends gcc-multilib g++-multilib libc6-dev-i386 pkg-config-i686-linux-gnu libwayland-dev:i386 libxrandr-dev:i386
+            - name: Install Dependencies
+              run: |-
+                sudo apt install --yes --no-install-recommends gcc-multilib g++-multilib libc6:i386 libc6-dev-i386 libgcc-s1:i386 libwayland-dev:i386 libxrandr-dev:i386
+
             - name: Generate build files
-              run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=${{matrix.config}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D SYSCONFDIR=/etc/not_vulkan
               env:
                 CFLAGS: -m32
                 CXXFLAGS: -m32
                 LDFLAGS: -m32
                 ASFLAGS: --32
-                PKG_CONFIG: i686-pc-linux-gnu-pkg-config
-
 
             - name: Build the loader
-              run: make -C build
+              run: cmake --build build
+
+            - name: Install the loader
+              run: cmake --install build --prefix build/install
+
+            - name: Validate pkg-config
+              run: pkg-config --validate ./build/install/lib/pkgconfig/vulkan.pc
 
             - name: Run regression tests
               working-directory: ./build
               run: ctest --output-on-failure
 
-    windows:
-        runs-on: ${{matrix.os}}
+    linux-32-no-asm:
+        runs-on: ubuntu-20.04
+        steps:
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
+              with:
+                python-version: '3.7'
+            - uses: lukka/get-cmake@latest
+              with:
+                cmakeVersion: 3.17.2
 
+            - name: Enable 32 bit
+              run: |-
+                sudo dpkg --add-architecture i386
+            - name: Update packages
+              run: |-
+                sudo apt-get update
+            - name: Install Dependencies
+              run: |-
+                sudo apt install --yes --no-install-recommends gcc-multilib g++-multilib libc6:i386 libc6-dev-i386 libgcc-s1:i386 libwayland-dev:i386 libxrandr-dev:i386
+
+            - name: Generate build files
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D USE_GAS=OFF
+              env:
+                CFLAGS: -m32
+                CXXFLAGS: -m32
+                LDFLAGS: -m32
+                ASFLAGS: --32
+
+            - name: Build the loader
+              run: cmake --build build
+
+            - name: Run regression tests
+              working-directory: ./build
+              run: ctest --output-on-failure -E UnknownFunction
+
+    windows_vs:
+        runs-on: windows-latest
         strategy:
             matrix:
                 arch: [ Win32, x64 ]
                 config: [ Debug, Release ]
-                os: [ windows-latest ]
 
         steps:
-            - uses: actions/checkout@v2
-            - uses: actions/setup-python@v2
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
               with:
                 python-version: '3.7'
 
             - name: Generate build files
-              run: cmake -S. -Bbuild -A${{matrix.arch}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON
+              run: cmake -S. -B build -DBUILD_TESTS=ON -DUPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -A ${{ matrix.arch }} -D ENABLE_WERROR=ON
 
             - name: Build the loader
               run: cmake --build ./build --config ${{matrix.config}}
 
+            - name: Install the loader
+              run: cmake --install build --prefix build/install --config ${{matrix.config}}
+
             - name: Run regression tests
               working-directory: ./build
-              run: ctest --output-on-failure
+              run: ctest --output-on-failure -C ${{matrix.config}}
 
-            - name: Verify generated source files
-              run: python scripts/generate_source.py --verify external/Vulkan-Headers/registry
+    windows_vs-no-asm:
+        runs-on: windows-latest
+        strategy:
+            matrix:
+                arch: [ Win32, x64 ]
+
+        steps:
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
+              with:
+                python-version: '3.7'
+
+            - name: Generate build files
+              run: cmake -S. -B build -DBUILD_TESTS=ON -DUPDATE_DEPS=ON -D USE_MASM=OFF -D CMAKE_BUILD_TYPE=Release -A ${{ matrix.arch }} -D ENABLE_WERROR=ON
+
+            - name: Build the loader
+              run: cmake --build ./build --config Release
+
+            - name: Run regression tests
+              working-directory: ./build
+              run: ctest --output-on-failure -C Release -E UnknownFunction
+
+    # Something about Github Actions + Windows + Ninja + Unicode doesn't play nicely together.
+    # https://github.com/KhronosGroup/Vulkan-Loader/pull/1188#issuecomment-1536659318
+    #
+    # Disable testing explicitly for Ninja. But still ensure it builds properly.
+    windows_ninja:
+      runs-on: windows-2019
+      strategy:
+        matrix:
+            arch: [ Win32, x64 ]
+            config: [ Debug, Release ]
+            exclude:
+              - arch: Win32
+                config: release
+              - arch: x64
+                config: debug
+
+      steps:
+          - uses: actions/checkout@v3
+          - uses: actions/setup-python@v3
+            with:
+              python-version: '3.7'
+          - uses: ilammy/msvc-dev-cmd@v1
+            with:
+              arch: ${{ matrix.arch }}
+
+          - name: Configure
+            run: cmake -S. -B build -DUPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -G "Ninja" -D ENABLE_WERROR=ON -D LOADER_USE_UNSAFE_FILE_SEARCH=ON
+
+          - name: Build
+            run: cmake --build ./build
+
+          - name: Install the loader
+            run: cmake --install build --prefix build/install
+
+    # Make sure clang-cl builds still succeed - used by the chromium project
+    windows_clang_cl:
+      runs-on: windows-2022
+      strategy:
+        matrix:
+            arch: [ x64 ]
+            config: [ Release ]
+
+      steps:
+          - uses: actions/checkout@v3
+          - uses: actions/setup-python@v3
+            with:
+              python-version: '3.7'
+          - uses: ilammy/msvc-dev-cmd@v1
+            with:
+              arch: ${{ matrix.arch }}
+
+          - name: Configure
+            run: cmake -S. -B build -D UPDATE_DEPS=ON -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -T "ClangCL" -D ENABLE_WERROR=ON
+
+          - name: Build
+            run: cmake --build ./build --config ${{matrix.config}}
+
+          - name: Install the loader
+            run: cmake --install build --prefix build/install --config ${{matrix.config}}
+
+          - name: Run regression tests
+            working-directory: ./build
+            run: ctest --output-on-failure -C ${{matrix.config}}
 
     mac:
         runs-on: ${{matrix.os}}
@@ -156,35 +339,65 @@
                     static_build: BUILD_STATIC_LOADER=ON
 
         steps:
-            - uses: actions/checkout@v2
-            - uses: actions/setup-python@v2
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
               with:
                 python-version: '3.7'
-
+            - uses: lukka/get-cmake@latest
             - name: Generate build files
-              run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -D${{matrix.static_build}} -DBUILD_TESTS=On -DUPDATE_DEPS=ON -DTEST_USE_ADDRESS_SANITIZER=ON
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=${{matrix.config}} -D ${{matrix.static_build}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D LOADER_ENABLE_ADDRESS_SANITIZER=ON -G "Ninja"
               env:
                 # Specify the minimum version of macOS on which the target binaries are to be deployed.
                 # https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
                 MACOSX_DEPLOYMENT_TARGET: 10.12
 
             - name: Build the loader
-              run: make -C build
+              run: cmake --build build
+
+            - name: Install the loader
+              run: cmake --install build --prefix build/install
 
             - name: Run regression tests
               working-directory: ./build
               run: ctest --output-on-failure
 
+    mac-no-asm:
+        runs-on: macos-latest
+
+        strategy:
+            matrix:
+                static_build: [ BUILD_STATIC_LOADER=ON, BUILD_STATIC_LOADER=OFF ]
+
+        steps:
+            - uses: actions/checkout@v3
+            - uses: actions/setup-python@v3
+              with:
+                python-version: '3.7'
+            - uses: lukka/get-cmake@latest
+            - name: Generate build files
+              run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D ${{matrix.static_build}} -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -D ENABLE_WERROR=ON -D USE_GAS=OFF -G "Ninja"
+              env:
+                # Specify the minimum version of macOS on which the target binaries are to be deployed.
+                # https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html
+                MACOSX_DEPLOYMENT_TARGET: 10.12
+
+            - name: Build the loader
+              run: cmake --build build
+
+            - name: Run regression tests
+              working-directory: ./build
+              run: ctest --output-on-failure -E UnknownFunction
+
+
     gn:
-        runs-on: ubuntu-18.04
+        runs-on: ubuntu-20.04
 
         strategy:
             matrix:
                 config: [ Debug, Release ]
 
         steps:
-            - uses: actions/checkout@v2
-
+            - uses: actions/checkout@v3
             - name: Get depot tools
               run: |
                 git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
@@ -203,3 +416,103 @@
 
             - name: Build the loader
               run: ninja -C out/${{matrix.config}}
+
+    mingw:
+      runs-on: windows-2022
+      defaults:
+        run:
+          shell: bash
+      steps:
+        - uses: actions/checkout@v3
+        - name: Setup ccache
+          uses: hendrikmuhs/ccache-action@v1.2
+          with:
+            key: mingw-ccache
+        - uses: actions/setup-python@v4
+          with:
+            python-version: '3.8'
+        - uses: lukka/get-cmake@latest
+        - name: GCC Version
+          run: gcc --version # If this fails MINGW is not setup correctly
+        - name: Setup uasm
+          run: |
+            C:/msys64/usr/bin/pacman -Sy --noconfirm --needed mingw-w64-x86_64-uasm
+            printf '%s\n' 'C:/msys64/mingw64/bin' >> $GITHUB_PATH
+        - name: UASM Check
+          run: uasm -?
+        - name: Configure
+          run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release
+          env:
+            LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
+            CMAKE_C_COMPILER_LAUNCHER: ccache
+            CMAKE_CXX_COMPILER_LAUNCHER: ccache
+            CMAKE_GENERATOR: Ninja
+        - name: Build
+          run: cmake --build build -- --quiet
+        - name: Install
+          run: cmake --install build --prefix build/install
+        - name: MinGW ccache stats # The Post Setup ccache doesn't work right on MinGW
+          run: ccache --show-stats
+
+    mingw-no-asm:
+      runs-on: windows-2022
+      defaults:
+        run:
+          shell: bash
+      steps:
+        - uses: actions/checkout@v3
+        - name: Setup ccache
+          uses: hendrikmuhs/ccache-action@v1.2
+          with:
+            key: mingw-ccache
+        - uses: actions/setup-python@v4
+          with:
+            python-version: '3.8'
+        - uses: lukka/get-cmake@latest
+        - name: GCC Version
+          run: gcc --version # If this fails MINGW is not setup correctly
+        - name: Configure
+          # Make sure this doesn't fail even without -D USE_MASM=OFF and without uasm
+          run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release
+          env:
+            LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
+            CMAKE_C_COMPILER_LAUNCHER: ccache
+            CMAKE_CXX_COMPILER_LAUNCHER: ccache
+            CMAKE_GENERATOR: Ninja
+        - name: Build
+          run: cmake --build build -- --quiet
+        - name: Install
+          run: cmake --install build --prefix build/install
+        - name: MinGW ccache stats # The Post Setup ccache doesn't work right on MinGW
+          run: ccache --show-stats
+
+    mingw-no-asm-explicit:
+      runs-on: windows-2022
+      defaults:
+        run:
+          shell: bash
+      steps:
+        - uses: actions/checkout@v3
+        - name: Setup ccache
+          uses: hendrikmuhs/ccache-action@v1.2
+          with:
+            key: mingw-ccache
+        - uses: actions/setup-python@v4
+          with:
+            python-version: '3.8'
+        - uses: lukka/get-cmake@latest
+        - name: GCC Version
+          run: gcc --version # If this fails MINGW is not setup correctly
+        - name: Configure
+          run: cmake -S. -B build -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D ENABLE_WERROR=ON -D USE_MASM=OFF
+          env:
+            LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead.
+            CMAKE_C_COMPILER_LAUNCHER: ccache
+            CMAKE_CXX_COMPILER_LAUNCHER: ccache
+            CMAKE_GENERATOR: Ninja
+        - name: Build
+          run: cmake --build build -- --quiet
+        - name: Install
+          run: cmake --install build --prefix build/install
+        - name: MinGW ccache stats # The Post Setup ccache doesn't work right on MinGW
+          run: ccache --show-stats
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..4f4d9c0
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,101 @@
+# Copyright 2023 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Author: Joyce Brum <joycebrum@google.com>
+
+name: "CodeQL"
+
+on:
+  push:
+    branches: [ "main" ]
+  pull_request:
+    # The branches below must be a subset of the branches above
+    branches: [ "main" ]
+  schedule:
+    - cron: '26 7 * * 1'
+
+permissions: {}
+
+jobs:
+  analyze:
+    name: Analyze
+    # Runner size impacts CodeQL analysis time. To learn more, please see:
+    #   - https://gh.io/recommended-hardware-resources-for-running-codeql
+    #   - https://gh.io/supported-runners-and-hardware-resources
+    #   - https://gh.io/using-larger-runners
+    # Consider using larger runners for possible analysis time improvements.
+    runs-on: 'ubuntu-latest'
+    timeout-minutes: 360
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'cpp', 'python' ]
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
+      with:
+        languages: ${{ matrix.language }}
+    #     If you wish to specify custom queries, you can do so here or in a config file.
+    #     By default, queries listed here will override any specified in a config file.
+    #     Prefix the list here with "+" to use these queries and those in the config file.
+
+    #     For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+    #     queries: security-extended,security-and-quality
+
+
+    # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
+    # If this step fails, then you should remove it and run the build manually
+    - name: Autobuild
+      if: matrix.language == 'python' 
+      uses: github/codeql-action/autobuild@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
+
+    - uses: actions/setup-python@v3
+      if: matrix.language == 'cpp'
+      with:
+        python-version: '3.7'
+    - uses: lukka/get-cmake@latest
+      if: matrix.language == 'cpp'
+      with:
+        cmakeVersion: 3.17.2
+    - name: Install Dependencies
+      if: matrix.language == 'cpp'
+      run: |
+        sudo apt update
+        sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev
+
+    - name: Generate build files
+      if: matrix.language == 'cpp'
+      run: cmake -S. -B build -D CMAKE_BUILD_TYPE=Release -D UPDATE_DEPS=ON -D LOADER_ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_WERROR=ON
+      env:
+        CC: gcc
+        CXX: g++
+
+    - name: Build the loader
+      if: matrix.language == 'cpp'
+      run: cmake --build build
+    
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
+      with:
+        category: "/language:${{matrix.language}}"
diff --git a/.gn b/.gn
index e190259..5ac6b83 100644
--- a/.gn
+++ b/.gn
@@ -15,6 +15,8 @@
 buildconfig = "//build/config/BUILDCONFIG.gn"
 secondary_source = "//build-gn/secondary/"
 
+script_executable = "python3"
+
 default_args = {
     clang_use_chrome_plugins = false
     use_custom_libcxx = false
diff --git a/BUILD.gn b/BUILD.gn
index 6bf72a9..c914caa 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1,5 +1,5 @@
 # Copyright (C) 2018-2019 The ANGLE Project Authors.
-# Copyright (C) 2019 LunarG, Inc.
+# Copyright (C) 2019-2023 LunarG, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -36,7 +36,9 @@
 }
 
 config("vulkan_internal_config") {
-  defines = [ "VK_ENABLE_BETA_EXTENSIONS" ]
+  defines = [
+    "VK_ENABLE_BETA_EXTENSIONS",
+  ]
   if (is_clang || !is_win) {
     cflags = [
       "-Wno-conversion",
@@ -47,7 +49,6 @@
       "-Wno-unused-function",
       "-Wno-unused-variable",
       "-Wno-write-strings",
-      "-Wno-newline-eof",
     ]
   }
   if (is_fuchsia) {
@@ -63,6 +64,9 @@
       "FALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\"",
     ]
   }
+  if (!vulkan_loader_shared) {
+    defines += [ "BUILD_STATIC_LOADER" ]
+  }
 }
 
 # Vulkan loader
@@ -75,7 +79,7 @@
   ]
   defines = [
     "API_NAME=\"Vulkan\"",
-    "USE_UNSAFE_FILE_SEARCH=1",
+    "LOADER_USE_UNSAFE_FILE_SEARCH=1",
   ]
 
   if (is_win) {
@@ -108,7 +112,6 @@
       "loader/adapters.h",
       "loader/allocation.c",
       "loader/allocation.h",
-      "loader/asm_offset.c",
       "loader/cJSON.c",
       "loader/cJSON.h",
       "loader/debug_utils.c",
@@ -119,8 +122,8 @@
       "loader/generated/vk_layer_dispatch_table.h",
       "loader/generated/vk_loader_extensions.h",
       "loader/generated/vk_object_types.h",
-      "loader/gpa_helper.c",
       "loader/gpa_helper.h",
+      "loader/gpa_helper.c",
       "loader/loader_common.h",
       "loader/loader_environment.c",
       "loader/loader_environment.h",
@@ -130,11 +133,13 @@
       "loader/log.c",
       "loader/log.h",
       "loader/phys_dev_ext.c",
+      "loader/settings.c",
+      "loader/settings.h",
       "loader/stack_allocation.h",
       "loader/terminator.c",
       "loader/trampoline.c",
-      "loader/unknown_function_handling.c",
       "loader/unknown_function_handling.h",
+      "loader/unknown_function_handling.c",
       "loader/vk_loader_layer.h",
 
       # TODO(jmadill): Use assembler where available.
diff --git a/BUILD.md b/BUILD.md
index 9b5a8f6..1c2f0c9 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -9,18 +9,18 @@
   - [Contributing to the Repository](#contributing-to-the-repository)
   - [Repository Content](#repository-content)
     - [Installed Files](#installed-files)
+  - [Build Requirements](#build-requirements)
+    - [Test Requirements](#test-requirements)
   - [Repository Set-Up](#repository-set-up)
     - [Display Drivers](#display-drivers)
-    - [Download the Repository](#download-the-repository)
     - [Repository Dependencies](#repository-dependencies)
       - [Vulkan-Headers](#vulkan-headers)
       - [Test Dependencies](#test-dependencies)
-    - [Build and Install Directories](#build-and-install-directories)
+    - [Build and Install Directory Locations](#build-and-install-directory-locations)
     - [Building Dependent Repositories with Known-Good Revisions](#building-dependent-repositories-with-known-good-revisions)
+      - [Automatically](#automatically)
       - [Manually](#manually)
         - [Notes About the Manual Option](#notes-about-the-manual-option)
-      - [Automatically](#automatically)
-        - [Notes About the Automatic Option](#notes-about-the-automatic-option)
     - [Generated source code](#generated-source-code)
     - [Build Options](#build-options)
   - [Building On Windows](#building-on-windows)
@@ -31,8 +31,6 @@
       - [Build the Solution From the Command Line](#build-the-solution-from-the-command-line)
       - [Build the Solution With Visual Studio](#build-the-solution-with-visual-studio)
       - [Windows Install Target](#windows-install-target)
-    - [Windows Notes](#windows-notes)
-      - [Using The Vulkan Loader Library in this Repository on Windows](#using-the-vulkan-loader-library-in-this-repository-on-windows)
   - [Building On Linux](#building-on-linux)
     - [Linux Development Environment Requirements](#linux-development-environment-requirements)
       - [Required Package List](#required-package-list)
@@ -41,22 +39,18 @@
       - [Use CMake to Create the Make Files](#use-cmake-to-create-the-make-files)
       - [Build the Project](#build-the-project)
     - [Linux Notes](#linux-notes)
-      - [Using The Vulkan Loader Library in this Repository on Linux](#using-the-vulkan-loader-library-in-this-repository-on-linux)
       - [WSI Support Build Options](#wsi-support-build-options)
       - [Linux Install to System Directories](#linux-install-to-system-directories)
-      - [Linux Uninstall](#linux-uninstall)
       - [Linux 32-bit support](#linux-32-bit-support)
   - [Building on MacOS](#building-on-macos)
     - [MacOS Development Environment Requirements](#macos-development-environment-requirements)
     - [Clone the Repository](#clone-the-repository)
     - [MacOS build](#macos-build)
-      - [CMake Generators](#cmake-generators)
       - [Building with the Unix Makefiles Generator](#building-with-the-unix-makefiles-generator)
       - [Building with the Xcode Generator](#building-with-the-xcode-generator)
-    - [Using the new macOS loader](#using-the-new-macos-loader)
   - [Building on Fuchsia](#building-on-fuchsia)
-  - [Building on QNX](#building-on-qnx)
     - [SDK Symbols](#sdk-symbols)
+  - [Building on QNX](#building-on-qnx)
   - [Cross Compilation](#cross-compilation)
     - [Unknown function handling which requires explicit assembly implementations](#unknown-function-handling-which-requires-explicit-assembly-implementations)
       - [Platforms which fully support unknown function handling](#platforms-which-fully-support-unknown-function-handling)
@@ -84,8 +78,15 @@
 - *install_dir*`/lib` : The Vulkan loader library
 - *install_dir*`/bin` : The Vulkan loader library DLL (Windows)
 
-The `uninstall` target can be used to remove the above files from the install
-directory.
+## Build Requirements
+
+1. `C99` capable compiler
+2. `CMake` version 3.17.2 or greater
+3. `Git`
+
+### Test Requirements
+
+1. `C++17` capable compiler
 
 ## Repository Set-Up
 
@@ -95,20 +96,14 @@
 obtain and install a Vulkan driver from your graphics hardware vendor or from
 some other suitable source if you intend to run Vulkan applications.
 
-### Download the Repository
-
-To create your local git repository:
-
-    git clone https://github.com/KhronosGroup/Vulkan-Loader.git
 
 ### Repository Dependencies
 
 This repository attempts to resolve some of its dependencies by using
 components found from the following places, in this order:
 
-1. CMake or Environment variable overrides (e.g., -DVULKAN_HEADERS_INSTALL_DIR)
-1. LunarG Vulkan SDK, located by the `VULKAN_SDK` environment variable
-1. System-installed packages, mostly applicable on Linux
+1. CMake or Environment variable overrides (e.g., -D VULKAN_HEADERS_INSTALL_DIR)
+2. System-installed packages, mostly applicable on Linux
 
 Dependencies that cannot be resolved by the SDK or installed packages must be
 resolved with the "install directory" override and are listed below. The
@@ -118,24 +113,21 @@
 #### Vulkan-Headers
 
 This repository has a required dependency on the [Vulkan Headers repository](https://github.com/KhronosGroup/Vulkan-Headers).
-You must clone the headers repository and build its `install` target before
-building this repository. The Vulkan-Headers repository is required because it
-contains the Vulkan API definition files (registry) that are required to build
-the loader. You must also take note of the headers install directory and pass
-it on the CMake command line for building this repository, as described below.
+The Vulkan-Headers repository contains the Vulkan API definition files that are
+required to build the loader.
 
 #### Test Dependencies
 
 The loader tests depend on the [Google Test](https://github.com/google/googletest) library and
 on Windows platforms depends on the [Microsoft Detours](https://github.com/microsoft/Detours) library.
 
-To build the tests, pass the `-DUPDATE_DEPS=ON` and `-DBUILD_TESTS=ON` options when generating the project:
+To build the tests, pass both `-D UPDATE_DEPS=ON` and `-D BUILD_TESTS=ON` options when generating the project:
 ```bash
-cmake ... -DUPDATE_DEPS=ON -DBUILD_TESTS=ON ...
+cmake ... -D UPDATE_DEPS=ON -D BUILD_TESTS=ON ...
 ```
 This will ensure googletest and detours is downloaded and the appropriate version is used.
 
-### Build and Install Directories
+### Build and Install Directory Locations
 
 A common convention is to place the `build` directory in the top directory of
 the repository and place the `install` directory as a child of the `build`
@@ -146,11 +138,11 @@
 
 There is a Python utility script, `scripts/update_deps.py`, that you can use
 to gather and build the dependent repositories mentioned above.
-This program also uses information stored in the `scripts/known-good.json` file
+This program uses information stored in the `scripts/known-good.json` file
 to checkout dependent repository revisions that are known to be compatible with
 the revision of this repository that you currently have checked out.
 
-You can choose to do this manually or automatically.
+You can choose to do this automatically or manually.
 The first step to either is cloning the Vulkan-Loader repo and stepping into
 that newly cloned folder:
 
@@ -159,6 +151,16 @@
   cd Vulkan-Loader
 ```
 
+#### Automatically
+
+On the other hand, if you choose to let the CMake scripts do all the
+heavy-lifting, you may just trigger the following CMake commands:
+
+```
+  cmake -S . -B build -D UPDATE_DEPS=On
+  cmake --build build
+```
+
 #### Manually
 
 To manually update the dependencies you now must create the build folder, and
@@ -167,7 +169,7 @@
 ```
   mkdir build
   cd build
-  ../scripts/update_deps.py
+  python ../scripts/update_deps.py
   cmake -C helper.cmake ..
   cmake --build .
 ```
@@ -177,22 +179,16 @@
 - You may need to adjust some of the CMake options based on your platform. See
   the platform-specific sections later in this document.
 - The `update_deps.py` script fetches and builds the dependent repositories in
-  the current directory when it is invoked. In this case, they are built in
-  the `build` directory.
-- The `build` directory is also being used to build this
-  (Vulkan-ValidationLayers) repository. But there shouldn't be any conflicts
-  inside the `build` directory between the dependent repositories and the
-  build files for this repository.
+  the current directory when it is invoked.
 - The `--dir` option for `update_deps.py` can be used to relocate the
   dependent repositories to another arbitrary directory using an absolute or
   relative path.
 - The `update_deps.py` script generates a file named `helper.cmake` and places
-  it in the same directory as the dependent repositories (`build` in this
-  case). This file contains CMake commands to set the CMake `*_INSTALL_DIR`
-  variables that are used to point to the install artifacts of the dependent
-  repositories. You can use this file with the `cmake -C` option to set these
-  variables when you generate your build files with CMake. This lets you avoid
-  entering several `*_INSTALL_DIR` variable settings on the CMake command line.
+  it in the same directory as the dependent repositories.
+  This file contains CMake commands to set the CMake `*_INSTALL_DIR` variables
+  that are used to point to the install artifacts of the dependent repositories.
+  The `-C helper.cmake` option is used to set these variables when you generate
+  the build files.
 - If using "MINGW" (Git For Windows), you may wish to run
   `winpty update_deps.py` in order to avoid buffering all of the script's
   "print" output until the end and to retain the ability to interrupt script
@@ -200,60 +196,50 @@
 - Please use `update_deps.py --help` to list additional options and read the
   internal documentation in `update_deps.py` for further information.
 
-
-#### Automatically
-
-On the other hand, if you choose to let the CMake scripts do all the
-heavy-lifting, you may just trigger the following CMake commands:
-
-```
-  cmake -S. -Bbuild -DUPDATE_DEPS=On
-  cmake --build build
-```
-
-##### Notes About the Automatic Option
-
-- You may need to adjust some of the CMake options based on your platform. See
-  the platform-specific sections later in this document.
-- The `build` directory is also being used to build this
-  (Vulkan-ValidationLayers) repository. But there shouldn't be any conflicts
-  inside the `build` directory between the dependent repositories and the
-  build files for this repository.
-
-
 ### Generated source code
 
 This repository contains generated source code in the `loader/generated`
-directory which is not intended to be modified directly. Instead, changes should be
-made to the corresponding generator in the `scripts` directory. The source files can
-then be regenerated using `scripts/generate_source.py`:
+directory which is not intended to be modified directly.
+Instead, changes should be made to the corresponding generator in the `scripts` directory.
+The source files can then be regenerated using `scripts/generate_source.py`.
 
-    python3 scripts/generate_source.py PATH_TO_VULKAN_HEADERS_REGISTRY_DIR
+Run `python scripts/generate_source.py --help` to see how to invoke it.
 
-A helper CMake target `VulkanLoader_generated_source` is also provided to simplify
-the invocation of `scripts/generate_source.py` from the build directory:
+A helper CMake target `loader_codegen` is also provided to simplify the invocation of `scripts/generate_source.py`.
 
-    cmake --build . --target VulkanLoader_generated_source
+Note: By default this helper target is disabled. To enable it, add `-D LOADER_CODEGEN=ON`
+to CMake, as shown below.
+
+```
+cmake -S . -B build -D LOADER_CODEGEN=ON
+cmake --build . --target loader_codegen
+```
 
 ### Build Options
 
-When generating native platform build files through CMake, several options can
-be specified to customize the build. Some of the options are binary on/off
-options, while others take a string as input. The following is a table of all
-on/off options currently supported by this repository:
+When generating build files through CMake, several options can be specified to
+customize the build.
+The following is a table of all on/off options currently supported by this repository:
 
-| Option                       | Platform | Default | Description                                                                                                                                                                       |
-| ---------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| BUILD_TESTS                  | All      | `OFF`   | Controls whether or not the loader tests are built.                                                                                                                               |
-| BUILD_WSI_XCB_SUPPORT        | Linux    | `ON`    | Build the loader with the XCB entry points enabled. Without this, the XCB headers should not be needed, but the extension `VK_KHR_xcb_surface` won't be available.                |
-| BUILD_WSI_XLIB_SUPPORT       | Linux    | `ON`    | Build the loader with the Xlib entry points enabled. Without this, the X11 headers should not be needed, but the extension `VK_KHR_xlib_surface` won't be available.              |
-| BUILD_WSI_WAYLAND_SUPPORT    | Linux    | `ON`    | Build the loader with the Wayland entry points enabled. Without this, the Wayland headers should not be needed, but the extension `VK_KHR_wayland_surface` won't be available.    |
-| BUILD_WSI_DIRECTFB_SUPPORT   | Linux    | `OFF`   | Build the loader with the DirectFB entry points enabled. Without this, the DirectFB headers should not be needed, but the extension `VK_EXT_directfb_surface` won't be available. |
-| BUILD_WSI_SCREEN_QNX_SUPPORT | QNX      | `OFF`   | Build the loader with the QNX Screen entry points enabled. Without this the extension `VK_QNX_screen_surface` won't be available.                                                 |
-| ENABLE_WIN10_ONECORE         | Windows  | `OFF`   | Link the loader to the [OneCore](https://msdn.microsoft.com/en-us/library/windows/desktop/mt654039.aspx) umbrella library, instead of the standard Win32 ones.                    |
-| USE_GAS                      | Linux    | `ON`    | Controls whether to build assembly files with the GNU assembler, else fallback to C code.                                                                                         |
-| USE_MASM                     | Windows  | `ON`    | Controls whether to build assembly files with MS assembler, else fallback to C code                                                                                               |
-| BUILD_STATIC_LOADER          | macOS    | `OFF`   | This allows the loader to be built as a static library on macOS. Not tested, use at your own risk.                                                                                |
+| Option                          | Platform      | Default | Description                                                                                                                                                                       |
+| ------------------------------- | ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| BUILD_TESTS                     | All           | `OFF`   | Controls whether or not the loader tests are built.                                                                                                                               |
+| BUILD_WSI_XCB_SUPPORT           | Linux         | `ON`    | Build the loader with the XCB entry points enabled. Without this, the XCB headers should not be needed, but the extension `VK_KHR_xcb_surface` won't be available.                |
+| BUILD_WSI_XLIB_SUPPORT          | Linux         | `ON`    | Build the loader with the Xlib entry points enabled. Without this, the X11 headers should not be needed, but the extension `VK_KHR_xlib_surface` won't be available.              |
+| BUILD_WSI_WAYLAND_SUPPORT       | Linux         | `ON`    | Build the loader with the Wayland entry points enabled. Without this, the Wayland headers should not be needed, but the extension `VK_KHR_wayland_surface` won't be available.    |
+| BUILD_WSI_DIRECTFB_SUPPORT      | Linux         | `OFF`   | Build the loader with the DirectFB entry points enabled. Without this, the DirectFB headers should not be needed, but the extension `VK_EXT_directfb_surface` won't be available. |
+| BUILD_WSI_SCREEN_QNX_SUPPORT    | QNX           | `OFF`   | Build the loader with the QNX Screen entry points enabled. Without this the extension `VK_QNX_screen_surface` won't be available.                                                 |
+| ENABLE_WIN10_ONECORE            | Windows       | `OFF`   | Link the loader to the [OneCore](https://msdn.microsoft.com/en-us/library/windows/desktop/mt654039.aspx) umbrella library, instead of the standard Win32 ones.                    |
+| USE_GAS                         | Linux         | `ON`    | Controls whether to build assembly files with the GNU assembler, else fallback to C code.                                                                                         |
+| USE_MASM                        | Windows       | `ON`    | Controls whether to build assembly files with MS assembler, else fallback to C code                                                                                               |
+| BUILD_STATIC_LOADER             | macOS         | `OFF`   | This allows the loader to be built as a static library on macOS. Not tested, use at your own risk.                                                                                |
+| LOADER_ENABLE_ADDRESS_SANITIZER | Linux & macOS | `OFF`   | Enables Address Sanitizer in the loader and tests.                                                                                                                                |
+| LOADER_ENABLE_THREAD_SANITIZER  | Linux & macOS | `OFF`   | Enables Thread Sanitizer in the loader and tests.                                                                                                                                 |
+| LOADER_USE_UNSAFE_FILE_SEARCH   | All           | `OFF`   | Disables security policies that prevent unsecure locations from being used when running with elevated permissions.                                                                |
+| LOADER_CODEGEN                  | All           | `OFF`   | Creates a helper CMake target to generate code.                                                                                                                                   |
+
+NOTE: `LOADER_USE_UNSAFE_FILE_SEARCH` should NOT be enabled except in very specific contexts (like isolated test environments)!
+
 The following is a table of all string options currently supported by this repository:
 
 | Option                | Platform    | Default                       | Description                                                                                                                                          |
@@ -264,26 +250,6 @@
 
 These variables should be set using the `-D` option when invoking CMake to generate the native platform files.
 
-### CCACHE
-
-There are 2 methods to enable CCACHE:
-
-1.) Set environment variables
-
-```bash
-# Requires CMake 3.17 (https://cmake.org/cmake/help/latest/envvar/CMAKE_LANG_COMPILER_LAUNCHER.html)
-export CMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache
-export CMAKE_C_COMPILER_LAUNCHER=/usr/bin/ccache
-```
-
-2.) Pass in cache variables
-
-```
-cmake ... -D CMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache -D CMAKE_C_COMPILER_LAUNCHER=/usr/bin/ccache
-```
-
-
-
 ## Building On Windows
 
 ### Windows Development Environment Requirements
@@ -293,10 +259,10 @@
 - Microsoft [Visual Studio](https://www.visualstudio.com/)
   - Versions
     - [2022](https://www.visualstudio.com/vs/downloads/)
-    - [2017 & 2019](https://www.visualstudio.com/vs/older-downloads/)
+    - [2019](https://www.visualstudio.com/vs/older-downloads/)
   - The Community Edition of each of the above versions is sufficient, as
     well as any more capable edition.
-- [CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-win64-x64.zip) is recommended.
+- [CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-win64-x64.zip) is recommended.
   - Use the installer option to add CMake to the system PATH
 - Git Client Support
   - [Git for Windows](http://git-scm.com/download/win) is a popular solution
@@ -319,7 +285,7 @@
     cd Vulkan-Loader
     mkdir build
     cd build
-    cmake -A x64 -DUPDATE_DEPS=ON ..
+    cmake -A x64 -D UPDATE_DEPS=ON ..
     cmake --build .
 
 The above commands instruct CMake to find and use the default Visual Studio
@@ -335,7 +301,7 @@
     cd Vulkan-Loader
     mkdir build
     cd build
-    cmake -DUPDATE_DEPS=ON -G "Visual Studio 16 2019" -A x64 ..
+    cmake -D UPDATE_DEPS=ON -G "Visual Studio 16 2019" -A x64 ..
 
 > Note: The `..` parameter tells `cmake` the location of the top of the
 > repository. If you place your build directory someplace else, you'll need to
@@ -346,13 +312,12 @@
 Supported Visual Studio generators:
 * `Visual Studio 17 2022`
 * `Visual Studio 16 2019`
-* `Visual Studio 15 2017`
 
 The `-A` option is used to select either the "Win32", "x64", or "ARM64 architecture.
 
 When generating the project files, the absolute path to a Vulkan-Headers
 install directory must be provided. This can be done automatically by the
-`-DUPDATE_DEPS=ON` option, by directly setting the
+`-D UPDATE_DEPS=ON` option, by directly setting the
 `VULKAN_HEADERS_INSTALL_DIR` environment variable, or by setting the
 `VULKAN_HEADERS_INSTALL_DIR` CMake variable with the `-D` CMake option. In
 either case, the variable should point to the installation directory of a
@@ -400,41 +365,15 @@
 
 or build the `INSTALL` target from the Visual Studio solution explorer.
 
-
-### Windows Notes
-
-#### Using The Vulkan Loader Library in this Repository on Windows
-
-Vulkan programs must be able to find and use the Vulkan loader
-(`vulkan-1.dll`) library as well as any other libraries the program requires.
-One convenient way to do this is to copy the required libraries into the same
-directory as the program. The projects in this solution copy the Vulkan loader
-library and the "googletest" libraries to the `build\tests\Debug` or the
-`build\tests\Release` directory, which is where the
-`vk_loader_validation_test.exe` executable is found, depending on what
-configuration you built.
-
-Other techniques include placing the library in a system folder
-(C:\Windows\System32) or in a directory that appears in the `PATH` environment
-variable.
-
-See the documentation in the `docs` folder in this
-repository for more information on how the loader finds driver libraries and
-layer libraries. The document also describes both how ICDs and layers should
-be packaged, and how developers can point to ICDs and layers within their
-builds.
-
 ## Building On Linux
 
 ### Linux Development Environment Requirements
 
 This repository has been built and tested on the two most recent Ubuntu LTS
-versions. Currently, the oldest supported version is Ubuntu 18.04, meaning
-that the minimum officially supported C++11 compiler version is GCC 5.4.0,
-although earlier versions may work. It should be straightforward to adapt this
-repository to other Linux distributions.
+versions, although earlier versions may work.
+It is be straightforward to adapt this repository to other Linux distributions.
 
-[CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz) is recommended.
+[CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-Linux-x86_64.tar.gz) is recommended.
 
 #### Required Package List
 
@@ -451,7 +390,7 @@
     cd Vulkan-Loader
     mkdir build
     cd build
-    cmake -DUPDATE_DEPS=ON ..
+    cmake -D UPDATE_DEPS=ON ..
     make
 
 See below for the details.
@@ -464,22 +403,22 @@
     cd Vulkan-Loader
     mkdir build
     cd build
-    cmake -DCMAKE_BUILD_TYPE=Debug \
-          -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
-          -DCMAKE_INSTALL_PREFIX=install ..
+    cmake -D CMAKE_BUILD_TYPE=Debug \
+          -D VULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
+          -D CMAKE_INSTALL_PREFIX=install ..
 
 > Note: The `..` parameter tells `cmake` the location of the top of the
 > repository. If you place your `build` directory someplace else, you'll need
 > to specify the location of the repository top differently.
 
-Use `-DCMAKE_BUILD_TYPE` to specify a Debug or Release build.
+Use `-D CMAKE_BUILD_TYPE` to specify a Debug or Release build.
 
 When generating the project files, the absolute path to a Vulkan-Headers
 install directory must be provided. This can be done automatically by the
-`-DUPDATE_DEPS=ON` option, by directly setting the
-`VULKAN_HEADERS_INSTALL_DIR` environment variable, or by setting the
-`VULKAN_HEADERS_INSTALL_DIR` CMake variable with the `-D` CMake option. In
-either case, the variable should point to the installation directory of a
+`-D UPDATE_DEPS=ON` option, by directly setting the `VULKAN_HEADERS_INSTALL_DIR`
+environment variable, or by setting the `VULKAN_HEADERS_INSTALL_DIR` CMake
+variable with the `-D` CMake option.
+In either case, the variable should point to the installation directory of a
 Vulkan-Headers repository built with the install target.
 
 > Note: For Linux, the default value for `CMAKE_INSTALL_PREFIX` is
@@ -502,14 +441,6 @@
 
 ### Linux Notes
 
-#### Using The Vulkan Loader Library in this Repository on Linux
-
-If you want to run a Vulkan application that is not built within this
-repository with the loader you just built from this repository, you can direct
-the application to load it from your build directory:
-
-    export LD_LIBRARY_PATH=<path to your repository root>/build/loader
-
 #### WSI Support Build Options
 
 By default, the Vulkan Loader is built with support for the Vulkan-defined WSI
@@ -545,7 +476,7 @@
 install to `/tmp/build` instead of `/usr/local`, on your CMake command line
 specify:
 
-    -DCMAKE_INSTALL_PREFIX=/tmp/build
+    -D CMAKE_INSTALL_PREFIX=/tmp/build
 
 Then run `make install` as before. The install step places the files in
 `/tmp/build`. This may be useful for collecting the artifacts and providing
@@ -568,49 +499,36 @@
 See the CMake documentation for more details on using these variables to
 further customize your installation.
 
-Also see the `LoaderAndLayerInterface` document in the `loader` folder in this
+Also see the `LoaderInterfaceArchitecture.md` document in the `docs` folder in this
 repository for more information about loader operation.
 
-Note that some executables in this repository (e.g.,
-`vk_loader_validation_tests`) use the RPATH linker directive to load the
-Vulkan loader from the build directory, `build` in this example. This means
-that even after installing the loader to the system directories, these
-executables still use the loader from the build directory.
-
-#### Linux Uninstall
-
-To uninstall the files from the system directories, you can execute:
-
-    sudo make uninstall
-
-
 #### Linux 32-bit support
 
-Usage of this repository's contents in 32-bit Linux environments is not
-officially supported. However, since this repository is supported on 32-bit
-Windows, these modules should generally work on 32-bit Linux.
-
-Here are some notes for building 32-bit targets on a 64-bit Ubuntu "reference"
-platform:
+The loader supports building in 32-bit Linux environments.
+However, it is not nearly as straightforward as it is for Windows.
+Here are some notes for building this repo as 32-bit on a 64-bit Ubuntu
+"reference" platform:
 
 If not already installed, install the following 32-bit development libraries:
 
-`gcc-multilib g++-multilib libx11-dev:i386`
+`gcc-multilib gcc-multilib g++-multilib libc6:i386 libc6-dev-i386 libgcc-s1:i386 libwayland-dev:i386 libxrandr-dev:i386`
 
 This list may vary depending on your distribution and which windowing systems
 you are building for.
 
 Set up your environment for building 32-bit targets:
 
-    export ASFLAGS=--32
     export CFLAGS=-m32
     export CXXFLAGS=-m32
-    export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu
+    export LDFLAGS=-m32
+    export ASFLAGS=--32
 
-Again, your PKG_CONFIG configuration may be different, depending on your
-distribution.
+Your PKG_CONFIG configuration may be different, depending on your distribution.
 
-Finally, rebuild the repository using `cmake` and `make`, as explained above.
+Finally, build the repository normally as explained above.
+
+These notes are taken from the Github Actions workflow `linux-32` which is run
+regularly as a part of CI.
 
 ## Building on MacOS
 
@@ -618,15 +536,10 @@
 
 Tested on OSX version 10.12
 
-NOTE: To force the OSX version set the environment variable [MACOSX_DEPLOYMENT_TARGET](https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html) when building VVL and it's dependencies.
+NOTE: To force the OSX version set the environment variable [MACOSX_DEPLOYMENT_TARGET](https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html) when building.
 
 Setup Homebrew and components
 
-- Follow instructions on [brew.sh](http://brew.sh) to get Homebrew installed.
-
-      /usr/bin/ruby -e "$(curl -fsSL \
-          https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
 - Ensure Homebrew is at the beginning of your PATH:
 
       export PATH=/usr/local/bin:$PATH
@@ -637,22 +550,13 @@
 
 ### Clone the Repository
 
-Clone the Vulkan-ValidationLayers repository:
+Clone the Vulkan-Loader repository:
 
-    git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
+    git clone https://github.com/KhronosGroup/Vulkan-Loader.git
 
 ### MacOS build
 
-[CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz) is recommended.
-
-#### CMake Generators
-
-This repository uses CMake to generate build or project files that are then
-used to build the repository. The CMake generators explicitly supported in
-this repository are:
-
-- Unix Makefiles
-- Xcode
+[CMake 3.17.2](https://cmake.org/files/v3.17/cmake-3.17.2-Darwin-x86_64.tar.gz) is recommended.
 
 #### Building with the Unix Makefiles Generator
 
@@ -660,7 +564,7 @@
 
 When generating the project files, the absolute path to a Vulkan-Headers
 install directory must be provided. This can be done automatically by the
-`-DUPDATE_DEPS=ON` option, by directly setting the
+`-D UPDATE_DEPS=ON` option, by directly setting the
 `VULKAN_HEADERS_INSTALL_DIR` environment variable, or by setting the
 `VULKAN_HEADERS_INSTALL_DIR` CMake variable with the `-D` CMake option. In
 either case, the variable should point to the installation directory of a
@@ -668,7 +572,7 @@
 
     mkdir build
     cd build
-    cmake -DUPDATE_DEPS=ON -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir -DCMAKE_BUILD_TYPE=Debug ..
+    cmake -D UPDATE_DEPS=ON -D VULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir -D CMAKE_BUILD_TYPE=Debug ..
     make
 
 To speed up the build on a multi-core machine, use the `-j` option for `make`
@@ -688,17 +592,15 @@
 Within Xcode, you can select Debug or Release builds in the project's Build
 Settings.
 
-### Using the new macOS loader
-
-If you want to test a Vulkan application with the loader you just built, you
-can direct the application to load it from your build directory:
-
-    export DYLD_LIBRARY_PATH=<path to your repository>/build/loader
-
 ## Building on Fuchsia
 
 Fuchsia uses the project's GN build system to integrate with the Fuchsia platform build.
 
+### SDK Symbols
+
+The Vulkan Loader is a component of the Fuchsia SDK, so it must explicitly declare its exported symbols in
+the file vulkan.symbols.api; see [SDK](https://fuchsia.dev/fuchsia-src/development/sdk).
+
 ## Building on QNX
 
 QNX is using its own build system. The proper build environment must be set
@@ -708,11 +610,6 @@
 Then change working directory to the "build-qnx" in this project and type "make".
 It will build the ICD loader for all CPU targets supported by QNX.
 
-### SDK Symbols
-
-The Vulkan Loader is a component of the Fuchsia SDK, so it must explicitly declare its exported symbols in
-the file vulkan.symbols.api; see [SDK](https://fuchsia.dev/fuchsia-src/development/sdk).
-
 ## Cross Compilation
 
 While this repo is capable of cross compilation, there are a handful of caveats.
@@ -720,8 +617,10 @@
 ### Unknown function handling which requires explicit assembly implementations
 
 Unknown function handling is only fully supported on select platforms due to the
-need for assembly in the implementation. Other platforms will need to disable
-assembly by setting `USE_GAS` or `USE_MASM` to `OFF`.
+need for assembly in the implementation.
+Platforms not fully supported will have assembly disabled automatically, or
+can be manually disabled by setting `USE_GAS` or `USE_MASM` to `OFF`.
+
 #### Platforms which fully support unknown function handling
 
 * 64 bit Windows (x64)
@@ -741,7 +640,7 @@
 ## Tests
 
 To build tests, make sure that the `BUILD_TESTS` option is set to true. Using
-the command line, this looks like `-DBUILD_TESTS=ON`.
+the command line, this looks like `-D BUILD_TESTS=ON`.
 
 This project is configured to run with `ctest`, which makes it easy to run the
 tests. To run the tests, change the directory to that of the build direction, and
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e71de78..273c09f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 # ~~~
-# Copyright (c) 2014-2022 Valve Corporation
-# Copyright (c) 2014-2022 LunarG, Inc.
+# Copyright (c) 2014-2023 Valve Corporation
+# Copyright (c) 2014-2023 LunarG, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,84 +14,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ~~~
-cmake_minimum_required(VERSION 3.10.2)
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+cmake_minimum_required(VERSION 3.17.2)
 
-# If we are building in Visual Studio 2015 and with a CMake version 3.19 or greater, we need to set this variable
-# so that CMake will choose a Windows SDK version higher than 10.0.14393.0, as dxgi1_6.h is only found in Windows SDK
-# 10.0.17763 and higher.
-set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM OFF)
+project(VULKAN_LOADER VERSION 1.3.268)
 
-project(Vulkan-Loader)
-
-if (UPDATE_DEPS)
-    find_package(PythonInterp 3 REQUIRED)
-
-    if (CMAKE_GENERATOR_PLATFORM)
-        set(_target_arch ${CMAKE_GENERATOR_PLATFORM})
-    else()
-        if (MSVC_IDE)
-            message(WARNING "CMAKE_GENERATOR_PLATFORM not set. Using x64 as target architecture.")
-        endif()
-        set(_target_arch x64)
-    endif()
-
-    if (NOT CMAKE_BUILD_TYPE)
-        message(WARNING "CMAKE_BUILD_TYPE not set. Using Debug for dependency build type")
-        set(_build_type Debug)
-    else()
-        set(_build_type ${CMAKE_BUILD_TYPE})
-    endif()
-
-    set(_build_tests_arg "")
-    if (NOT BUILD_TESTS)
-        set(_build_tests_arg "--optional=tests")
-    endif()
-
-    message("********************************************************************************")
-    message("* NOTE: Adding target vl_update_deps to run as needed for updating             *")
-    message("*       dependencies.                                                          *")
-    message("********************************************************************************")
-
-    # Add a target so that update_deps.py will run when necessary
-    # NOTE: This is triggered off of the timestamps of known_good.json and helper.cmake
-    add_custom_command(OUTPUT ${CMAKE_CURRENT_LIST_DIR}/external/helper.cmake
-                       COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scripts/update_deps.py --dir ${CMAKE_CURRENT_LIST_DIR}/external --arch ${_target_arch} --config ${_build_type} --generator "${CMAKE_GENERATOR}" ${_build_tests_arg}
-                       DEPENDS ${CMAKE_CURRENT_LIST_DIR}/scripts/known_good.json)
-
-    add_custom_target(vl_update_deps DEPENDS ${CMAKE_CURRENT_LIST_DIR}/external/helper.cmake)
-
-    # Check if update_deps.py needs to be run on first cmake run
-    if (${CMAKE_CURRENT_LIST_DIR}/scripts/known_good.json IS_NEWER_THAN ${CMAKE_CURRENT_LIST_DIR}/external/helper.cmake)
-        execute_process(
-            COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scripts/update_deps.py --dir ${CMAKE_CURRENT_LIST_DIR}/external --arch ${_target_arch} --config ${_build_type} --generator "${CMAKE_GENERATOR}" ${_build_tests_arg}
-            WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
-            RESULT_VARIABLE _update_deps_result
-        )
-        if (NOT (${_update_deps_result} EQUAL 0))
-            message(FATAL_ERROR "Could not run update_deps.py which is necessary to download dependencies.")
-        endif()
-    endif()
-    include(${CMAKE_CURRENT_LIST_DIR}/external/helper.cmake)
-else()
-    message("********************************************************************************")
-    message("* NOTE: Not adding target to run update_deps.py automatically.                 *")
-    message("********************************************************************************")
-    find_package(PythonInterp 3 QUIET)
-endif()
-if (VULKAN_HEADERS_INSTALL_DIR)
-    list(APPEND CMAKE_PREFIX_PATH ${VULKAN_HEADERS_INSTALL_DIR})
-endif()
-
-find_package(PythonInterp 3 QUIET)
+add_subdirectory(scripts)
 
 set(THREADS_PREFER_PTHREAD_FLAG ON)
 find_package(Threads REQUIRED)
 
-option(BUILD_TESTS "Build Tests" OFF)
-
-if(BUILD_TESTS)
-    enable_testing()
+# By default, loader & tests are built without sanitizers
+# Use these options to force a specific sanitizer on the loader and test executables
+if (UNIX)
+    option(LOADER_ENABLE_ADDRESS_SANITIZER "Linux & macOS only: Advanced memory checking" OFF)
+    option(LOADER_ENABLE_THREAD_SANITIZER "Linux & macOS only: Advanced thread checking" OFF)
 endif()
 
 if(APPLE)
@@ -109,14 +45,10 @@
         "or tested as part of the loader. Use it at your own risk.")
 endif()
 
-find_package(VulkanHeaders REQUIRED CONFIG QUIET)
+find_package(VulkanHeaders CONFIG QUIET)
 
 include(GNUInstallDirs)
 
-if(UNIX AND NOT APPLE) # i.e.: Linux
-    find_package(PkgConfig)
-endif()
-
 set(GIT_BRANCH_NAME "--unknown--")
 set(GIT_TAG_INFO "--unknown--")
 find_package (Git)
@@ -139,11 +71,6 @@
     endif()
 endif()
 
-if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    # Windows: if install locations not set by user, set install prefix to "<build_dir>\install".
-    set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
-endif()
-
 # Enable IDE GUI folders.  "Helper targets" that don't have interesting source code should set their FOLDER property to this
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 set(LOADER_HELPER_FOLDER "Helper Targets")
@@ -157,69 +84,52 @@
             "System-wide search directory. If not set or empty, CMAKE_INSTALL_FULL_SYSCONFDIR and /etc are used.")
 endif()
 
-# Because we use CMake 3.10.2, we can't use the policy which would disable adding /W3 by default. In the interim, replace the flags
-# When this project is updated to 3.15 and above, use the following line.
-#     cmake_policy(SET CMP0092 NEW)
-string(REGEX REPLACE "/W3" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-string(REGEX REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-
 # For MSVC/Windows, replace /GR with an empty string, this prevents warnings of /GR being overriden by /GR-
 # Newer CMake versions (3.20) have better solutions for this through policy - using the old
 # way while waiting for when updating can occur
 string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 
-if(UNIX AND NOT APPLE) # i.e.: Linux
+if(WIN32)
+    option(ENABLE_WIN10_ONECORE "Link the loader with OneCore umbrella libraries" OFF)
+endif()
+
+add_library(platform_wsi INTERFACE)
+if(WIN32)
+    target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_WIN32_KHR)
+elseif(ANDROID)
+    message(FATAL_ERROR "Android build not supported!")
+elseif(APPLE)
+    target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_MACOS_MVK VK_USE_PLATFORM_METAL_EXT)
+elseif(UNIX AND NOT APPLE) # i.e.: Linux
     option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
     option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
     option(BUILD_WSI_WAYLAND_SUPPORT "Build Wayland WSI support" ON)
     option(BUILD_WSI_DIRECTFB_SUPPORT "Build DirectFB WSI support" OFF)
     option(BUILD_WSI_SCREEN_QNX_SUPPORT "Build QNX Screen WSI support" OFF)
 
+    find_package(PkgConfig REQUIRED QUIET) # Use PkgConfig to find Linux system libraries
+
     if(BUILD_WSI_XCB_SUPPORT)
-        find_package(XCB REQUIRED)
-        include_directories(SYSTEM ${XCB_INCLUDE_DIR})
-    endif()
-
-    if(BUILD_WSI_XLIB_SUPPORT)
-        find_package(X11 REQUIRED)
-    endif()
-
-    if(BUILD_WSI_DIRECTFB_SUPPORT)
-        find_package(DirectFB REQUIRED)
-        include_directories(SYSTEM ${DIRECTFB_INCLUDE_DIR})
-    endif()
-
-    if(BUILD_WSI_SCREEN_QNX_SUPPORT)
-        # Part of OS, no additional include directories are required
-    endif()
-endif()
-
-if(WIN32)
-    option(ENABLE_WIN10_ONECORE "Link the loader with OneCore umbrella libraries" OFF)
-endif()
-
-add_library(platform_wsi_defines INTERFACE)
-if(WIN32)
-    target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_WIN32_KHR)
-elseif(ANDROID)
-    target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_ANDROID_KHR)
-elseif(APPLE)
-    target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_MACOS_MVK VK_USE_PLATFORM_METAL_EXT)
-elseif(UNIX AND NOT APPLE) # i.e.: Linux
-    if(BUILD_WSI_XCB_SUPPORT)
-        target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_XCB_KHR)
+        pkg_check_modules(XCB REQUIRED QUIET IMPORTED_TARGET xcb)
+        target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_XCB_KHR)
+        target_link_libraries(platform_wsi INTERFACE PkgConfig::XCB)
     endif()
     if(BUILD_WSI_XLIB_SUPPORT)
-        target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_XLIB_KHR VK_USE_PLATFORM_XLIB_XRANDR_EXT)
+        pkg_check_modules(X11 REQUIRED QUIET IMPORTED_TARGET x11)
+        target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_XLIB_KHR VK_USE_PLATFORM_XLIB_XRANDR_EXT)
+        target_link_libraries(platform_wsi INTERFACE PkgConfig::X11)
     endif()
     if(BUILD_WSI_WAYLAND_SUPPORT)
-        target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_WAYLAND_KHR)
+        target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_WAYLAND_KHR)
     endif()
     if(BUILD_WSI_DIRECTFB_SUPPORT)
-        target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_DIRECTFB_EXT)
+        pkg_check_modules(DirectFB QUIET REQUIRED IMPORTED_TARGET directfb)
+        target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_DIRECTFB_EXT)
+        target_link_libraries(platform_wsi INTERFACE PkgConfig::DirectFB)
     endif()
     if(BUILD_WSI_SCREEN_QNX_SUPPORT)
-        target_compile_definitions(platform_wsi_defines INTERFACE VK_USE_PLATFORM_SCREEN_QNX)
+        # Part of OS, no additional include directories are required
+        target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_SCREEN_QNX)
     endif()
 else()
     message(FATAL_ERROR "Unsupported Platform!")
@@ -227,15 +137,26 @@
 
 add_library(loader_common_options INTERFACE)
 target_compile_definitions(loader_common_options INTERFACE API_NAME="Vulkan")
-target_link_libraries(loader_common_options INTERFACE platform_wsi_defines)
+target_link_libraries(loader_common_options INTERFACE platform_wsi)
 
 # Enable beta Vulkan extensions
 target_compile_definitions(loader_common_options INTERFACE VK_ENABLE_BETA_EXTENSIONS)
 
 target_compile_features(loader_common_options INTERFACE c_std_99)
-target_compile_features(loader_common_options INTERFACE cxx_std_11)
-set(LOADER_STANDARD_C_PROPERTIES PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED YES C_EXTENSIONS OFF)
-set(LOADER_STANDARD_CXX_PROPERTIES PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS OFF)
+target_compile_features(loader_common_options INTERFACE cxx_std_17)
+set(LOADER_STANDARD_C_PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED YES C_EXTENSIONS OFF)
+set(LOADER_STANDARD_CXX_PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS OFF)
+
+set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
+
+# Build for iOS and tvOS
+option(APPLE_EMBEDDED "Apple non desktop devices" OFF)
+if (APPLE_EMBEDDED)
+    add_definitions(-D__APPLE_EMBEDDED__)
+endif()
+
+# Force the use of the multithreaded, static version of the C runtime.
+set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
 
 option(ENABLE_WERROR "Enable warnings as errors" ON)
 
@@ -247,7 +168,7 @@
         target_compile_options(loader_common_options INTERFACE /WX)
     endif()
     target_compile_options(loader_common_options INTERFACE /W4)
-elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
     # using GCC or Clang with the regular front end
     if (ENABLE_WERROR)
         target_compile_options(loader_common_options INTERFACE -Werror)
@@ -255,8 +176,8 @@
     target_compile_options(loader_common_options INTERFACE -Wall -Wextra)
 endif()
 
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    target_compile_options(loader_common_options INTERFACE -Wno-unused-parameter -Wno-unused-function -Wno-missing-field-initializers)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+    target_compile_options(loader_common_options INTERFACE -Wno-missing-field-initializers)
 
     # need to prepend /clang: to compiler arguments when using clang-cl
     if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC")
@@ -267,6 +188,9 @@
 
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
         target_compile_options(loader_common_options INTERFACE -Wno-stringop-truncation -Wno-stringop-overflow)
+        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.1)
+            target_compile_options(loader_common_options INTERFACE -Wshadow=local) #only added in GCC 7
+        endif()
     endif()
 
     if(UNIX)
@@ -279,18 +203,12 @@
 if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC"))
     # /GR-: Disable RTTI
     # /guard:cf: Enable control flow guard
-    # /wd4100: Disable warning on unreferenced formal parameter
     # /wd4152: Disable warning on conversion of a function pointer to a data pointer
     # /wd4201: Disable warning on anonymous struct/unions
-    target_compile_options(loader_common_options INTERFACE /GR- /guard:cf /wd4100 /wd4152 /wd4201)
+    target_compile_options(loader_common_options INTERFACE /GR- /guard:cf /wd4152 /wd4201)
 
     # Enable control flow guard
-    if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
-        target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf")
-    else()
-        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /guard:cf")
-        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf")
-    endif()
+    target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf")
 
     # Prevent <windows.h> from polluting the code. guards against things like MIN and MAX
     target_compile_definitions(loader_common_options INTERFACE WIN32_LEAN_AND_MEAN)
@@ -317,18 +235,16 @@
     message(WARNING "Using non-secure environmental lookups. This loader will not properly disable environent variables when run with elevated permissions.")
 endif()
 
-# Optional codegen target
-if(PYTHONINTERP_FOUND)
-    get_target_property(VulkanRegistry_DIR Vulkan::Registry INTERFACE_INCLUDE_DIRECTORIES)
-    add_custom_target(VulkanLoader_generated_source
-                      COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/generate_source.py
-                              ${VulkanRegistry_DIR} --incremental
-                      )
-else()
-    message("WARNING: VulkanLoader_generated_source target requires python 3")
+option(LOADER_CODEGEN "Enable vulkan loader code generation")
+if(LOADER_CODEGEN)
+    find_package(Python3 REQUIRED)
+    add_custom_target(loader_codegen
+        COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/scripts/generate_source.py
+            "${VULKAN_HEADERS_INSTALL_DIR}/${CMAKE_INSTALL_DATADIR}/vulkan/registry"
+            --generated-version ${VulkanHeaders_VERSION} --incremental
+    )
 endif()
 
-
 if(UNIX)
     target_compile_definitions(loader_common_options INTERFACE FALLBACK_CONFIG_DIRS="${FALLBACK_CONFIG_DIRS}" FALLBACK_DATA_DIRS="${FALLBACK_DATA_DIRS}")
 
@@ -345,18 +261,9 @@
     endif()
 endif()
 
-# uninstall target
-if(NOT TARGET uninstall)
-    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
-                   "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
-                   IMMEDIATE
-                   @ONLY)
-    add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-    set_target_properties(uninstall PROPERTIES FOLDER ${LOADER_HELPER_FOLDER})
-endif()
-
 add_subdirectory(loader)
 
+option(BUILD_TESTS "Build Tests")
 if(BUILD_TESTS)
     # Set gtest build configuration
     # Attempt to enable if it is available.
@@ -368,6 +275,7 @@
         set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
         set(gtest_force_shared_crt ON CACHE BOOL "Link gtest runtimes dynamically" FORCE)
         set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
+        set(INSTALL_GTEST OFF CACHE BOOL "Don't install gtest")
         # The googletest directory exists, so enable it as a target.
         message(STATUS "Vulkan-Loader/external: " "googletest found - configuring it for tests")
         add_subdirectory("${GOOGLETEST_INSTALL_DIR}")
@@ -375,6 +283,11 @@
         message(SEND_ERROR "Could not find googletest directory. Be sure to run update_deps.py with the --tests option to download the appropriate version of googletest")
         set(BUILD_TESTS OFF)
     endif()
+
+    # make sure gtest uses the dynamic runtime instead
+    set_target_properties(gtest PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
+    set_target_properties(gtest_main PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
+
     if (WIN32)
         if(TARGET detours)
             # Already enabled as a target (perhaps by a project enclosing this one)
@@ -447,7 +360,7 @@
 
             if(MSVC)
                 target_compile_definitions(detours PUBLIC  "_CRT_SECURE_NO_WARNINGS=1")
-                set_target_properties(detours PROPERTIES COMPILE_FLAGS /EHsc)
+                set_target_properties(detours PROPERTIES COMPILE_FLAGS /EHsc ${TESTS_STANDARD_CXX_PROPERTIES})
             endif()
 
             # Silence errors found in clang-cl
@@ -458,7 +371,7 @@
     endif()
 
     if (BUILD_TESTS)
+        enable_testing()
         add_subdirectory(tests)
     endif()
-
 endif()
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6faaf88..4c65e12 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -42,7 +42,7 @@
   [submitting a pull request](https://help.github.com/articles/using-pull-requests/).
 * Please read and adhere to the style and process
   [guidelines](#coding-conventions-and-formatting) enumerated below.
-* Please base your fixes on the master branch.
+* Please base your fixes on the `main` branch.
   SDK branches are generally not updated except for critical fixes needed to
   repair an SDK release.
 * Provide one or more tests which show a failure for the issue before your changes
@@ -117,7 +117,7 @@
 corresponding generated output to keep the repository self-consistent. This requirement is enforced by both
 Travis CI and AppVeyor test configurations. Regenerate source files after modifying any of the generator
 scripts and before building and testing your changes. More details can be found in
-[BUILD.md](https://github.com/KhronosGroup/Vulkan-Loader/blob/master/BUILD.md#generated-source-code).
+[BUILD.md](BUILD.md#generated-source-code).
 
 #### Testing Your Changes
 
@@ -139,21 +139,6 @@
   * The indent is 4 spaces.
   * CMake functions are lower-case.
   * Variable and keyword names are upper-case.
-* The format is defined by
-  [cmake-format](https://github.com/cheshirekow/cmake_format)
-  using the `.cmake-format.py` file in the repository to define the settings.
-  See the cmake-format page for information about its simple markup for comments.
-* Disable reformatting of a block of comment lines by inserting
-  a `# ~~~` comment line before and after that block.
-* Disable any formatting of a block of lines by surrounding that block with
-  `# cmake-format: off` and `# cmake-format: on` comment lines.
-* To install: `sudo pip install cmake_format`
-* To run: `cmake-format --in-place $FILENAME`
-* **IMPORTANT (June 2018)** cmake-format v0.3.6 has a
-  [bug]( https://github.com/cheshirekow/cmake_format/issues/50)
-  that can corrupt the formatting of comment lines in CMake files.
-  A workaround is to use the following command _before_ running cmake-format:
-  `sed --in-place='' 's/^  *#/#/' $FILENAME`
 
 ### Contributor License Agreement (CLA)
 
diff --git a/README.md b/README.md
index 8654da8..3f9193b 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,6 @@
-# Vulkan Ecosystem Components
+# Vulkan Loader
 
-This project provides the Khronos official Vulkan ICD desktop loader for Windows, Linux, and MacOS.
-
-## CI Build Status
-
-[![Build Status](https://github.com/KhronosGroup/Vulkan-Loader/workflows/CI%20Build/badge.svg?branch=master)](https://github.com/KhronosGroup/Vulkan-Loader/actions)
+This project provides the Khronos official Vulkan Loader for all platforms except [Android](https://android.googlesource.com/platform/frameworks/native/+/master/vulkan/)
 
 ## Introduction
 
@@ -31,29 +27,25 @@
 ## Information for Developing or Contributing
 
 Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository for more details.
-Please see the [GOVERNANCE.md](GOVERNANCE.md) file in this repository for repository
-management details.
+Please see the [GOVERNANCE.md](GOVERNANCE.md) file in this repository for repository management details.
 
 ## How to Build and Run
 
-[BUILD.md](BUILD.md)
-Includes directions for building all components.
+[BUILD.md](BUILD.md) includes directions for building all components.
 
-Architecture and interface information for the loader is in
-[docs/LoaderInterfaceArchitecture.md](docs/LoaderInterfaceArchitecture.md).
+Architecture and interface information for the loader is in [docs/LoaderInterfaceArchitecture.md](docs/LoaderInterfaceArchitecture.md).
 
 ## Version Tagging Scheme
 
-Updates to the `Vulkan-Loader` repository which correspond to a new Vulkan specification release are tagged using the following format: `v<`_`version`_`>` (e.g., `v1.1.96`).
+Updates to this repository which correspond to a new Vulkan specification release are tagged using the following format: `v<`_`version`_`>` (e.g., `v1.3.266`).
 
-**Note**: Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the `sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `sdk-1.1.92.0`).
+**Note**: Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the `vulkan-sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `vulkan-sdk-1.3.266.0`).
 
-This scheme was adopted following the 1.1.96 Vulkan specification release.
+This scheme was adopted following the `1.3.266` Vulkan specification release.
 
 ## License
 
-This work is released as open source under a Apache-style license from Khronos
-including a Khronos copyright.
+This work is released as open source under a Apache-style license from Khronos including a Khronos copyright.
 
 ## Acknowledgements
 
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..a421b2a
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,13 @@
+# Security Policy
+
+## Supported Versions
+
+Security updates are applied only to the latest release.
+
+## Reporting a Vulnerability
+
+If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
+
+Please disclose it at [security advisory](https://github.com/KhronosGroup/Vulkan-Loader/security/advisories/new).
+
+This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
diff --git a/build-gn/DEPS b/build-gn/DEPS
index d44f2a3..8cf931a 100644
--- a/build-gn/DEPS
+++ b/build-gn/DEPS
@@ -1,53 +1,64 @@
+gclient_gn_args_file = 'build/config/gclient_args.gni'
+
 vars = {
   'chromium_git': 'https://chromium.googlesource.com',
+  'ninja_version': 'version:2@1.11.1.chromium.6',
 }
 
 deps = {
 
   'build': {
-    'url': '{chromium_git}/chromium/src/build.git@45ab3c89af6fc3126b0ca5a7836f0db85ad1ba0e',
+    'url': '{chromium_git}/chromium/src/build.git@1015724d82945f9ef7e51c6f804034ccf5f79951',
   },
 
   'buildtools': {
-    'url': '{chromium_git}/chromium/src/buildtools.git@204a35a2a64f7179f8b76d7a0385653690839e21',
+    'url': '{chromium_git}/chromium/src/buildtools.git@3c7e3f1b8b1e4c0b6ec693430379cea682de78d6',
+  },
+
+  'buildtools/linux64': {
+    'packages': [
+      {
+        'package': 'gn/gn/linux-${{arch}}',
+        'version': 'git_revision:5e19d2fb166fbd4f6f32147fbb2f497091a54ad8',
+      }
+    ],
+    'dep_type': 'cipd',
+    'condition': 'host_os == "linux"',
   },
 
   'testing': {
-    'url': '{chromium_git}/chromium/src/testing@3993ef1f527b206d8d3bf3f9824f4fe0e4bbdb0e',
+    'url': '{chromium_git}/chromium/src/testing@949b2864b6bd27656753b917c9aa7731dc7a06f6',
   },
 
   'tools/clang': {
-    'url': '{chromium_git}/chromium/src/tools/clang.git@04b99e7bf9160d551c3a5562f583014b6afc90f9',
+    'url': '{chromium_git}/chromium/src/tools/clang.git@566877f1ff1a5fa6beaca3ab4b47bd0b92eb614f',
+  },
+
+  'third_party/ninja': {
+    'packages': [
+      {
+        'package': 'infra/3pp/tools/ninja/${{platform}}',
+        'version': Var('ninja_version'),
+      }
+    ],
+    'dep_type': 'cipd',
   },
 
 }
 
 hooks = [
-  # Pull clang-format binaries using checked-in hashes.
-  {
-    'name': 'clang_format_linux',
-    'pattern': '.',
-    'condition': 'host_os == "linux"',
-    'action': [ 'download_from_google_storage',
-                '--no_resume',
-                '--platform=linux*',
-                '--no_auth',
-                '--bucket', 'chromium-clang-format',
-                '-s', 'buildtools/linux64/clang-format.sha1',
-    ],
-  },
   {
     'name': 'sysroot_x64',
     'pattern': '.',
     'condition': 'checkout_linux and checkout_x64',
-    'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=x64'],
   },
   {
     # Note: On Win, this should run after win_toolchain, as it may use it.
     'name': 'clang',
     'pattern': '.',
-    'action': ['python', 'tools/clang/scripts/update.py'],
+    'action': ['python3', 'tools/clang/scripts/update.py'],
   },
 ]
 
diff --git a/build-qnx/common.mk b/build-qnx/common.mk
index a0d2a73..16f68f1 100644
--- a/build-qnx/common.mk
+++ b/build-qnx/common.mk
@@ -22,7 +22,9 @@
 
 SRCS = cJSON.c debug_utils.c dev_ext_trampoline.c loader.c \
 	phys_dev_ext.c trampoline.c unknown_ext_chain.c wsi.c \
-	extension_manual.c unknown_function_handling.c
+	extension_manual.c unknown_function_handling.c settings.c \
+	log.c allocation.c loader_environment.c gpa_helper.c \
+	terminator.c
 
 LDFLAGS += -Wl,--unresolved-symbols=report-all -Wl,--no-undefined -Wl,-fPIC
 
diff --git a/cmake/Copyright_cmake.txt b/cmake/Copyright_cmake.txt
deleted file mode 100644
index 743c634..0000000
--- a/cmake/Copyright_cmake.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-CMake - Cross Platform Makefile Generator
-Copyright 2000-2018 Kitware, Inc. and Contributors
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-
-* Neither the name of Kitware, Inc. nor the names of Contributors
-  may be used to endorse or promote products derived from this
-  software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-------------------------------------------------------------------------------
-
-The following individuals and institutions are among the Contributors:
-
-* Aaron C. Meadows <cmake@shadowguarddev.com>
-* Adriaan de Groot <groot@kde.org>
-* Aleksey Avdeev <solo@altlinux.ru>
-* Alexander Neundorf <neundorf@kde.org>
-* Alexander Smorkalov <alexander.smorkalov@itseez.com>
-* Alexey Sokolov <sokolov@google.com>
-* Alex Turbov <i.zaufi@gmail.com>
-* Andreas Pakulat <apaku@gmx.de>
-* Andreas Schneider <asn@cryptomilk.org>
-* André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no>
-* Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf
-* Benjamin Eikel
-* Bjoern Ricks <bjoern.ricks@gmail.com>
-* Brad Hards <bradh@kde.org>
-* Christopher Harvey
-* Christoph Grüninger <foss@grueninger.de>
-* Clement Creusot <creusot@cs.york.ac.uk>
-* Daniel Blezek <blezek@gmail.com>
-* Daniel Pfeifer <daniel@pfeifer-mail.de>
-* Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
-* Eran Ifrah <eran.ifrah@gmail.com>
-* Esben Mose Hansen, Ange Optimization ApS
-* Geoffrey Viola <geoffrey.viola@asirobots.com>
-* Google Inc
-* Gregor Jasny
-* Helio Chissini de Castro <helio@kde.org>
-* Ilya Lavrenov <ilya.lavrenov@itseez.com>
-* Insight Software Consortium <insightsoftwareconsortium.org>
-* Jan Woetzel
-* Kelly Thompson <kgt@lanl.gov>
-* Konstantin Podsvirov <konstantin@podsvirov.pro>
-* Mario Bensi <mbensi@ipsquad.net>
-* Mathieu Malaterre <mathieu.malaterre@gmail.com>
-* Matthaeus G. Chajdas
-* Matthias Kretz <kretz@kde.org>
-* Matthias Maennich <matthias@maennich.net>
-* Michael Stürmer
-* Miguel A. Figueroa-Villanueva
-* Mike Jackson
-* Mike McQuaid <mike@mikemcquaid.com>
-* Nicolas Bock <nicolasbock@gmail.com>
-* Nicolas Despres <nicolas.despres@gmail.com>
-* Nikita Krupen'ko <krnekit@gmail.com>
-* NVIDIA Corporation <www.nvidia.com>
-* OpenGamma Ltd. <opengamma.com>
-* Patrick Stotko <stotko@cs.uni-bonn.de>
-* Per Øyvind Karlsen <peroyvind@mandriva.org>
-* Peter Collingbourne <peter@pcc.me.uk>
-* Petr Gotthard <gotthard@honeywell.com>
-* Philip Lowman <philip@yhbt.com>
-* Philippe Proulx <pproulx@efficios.com>
-* Raffi Enficiaud, Max Planck Society
-* Raumfeld <raumfeld.com>
-* Roger Leigh <rleigh@codelibre.net>
-* Rolf Eike Beer <eike@sf-mail.de>
-* Roman Donchenko <roman.donchenko@itseez.com>
-* Roman Kharitonov <roman.kharitonov@itseez.com>
-* Ruslan Baratov
-* Sebastian Holtermann <sebholt@xwmw.org>
-* Stephen Kelly <steveire@gmail.com>
-* Sylvain Joubert <joubert.sy@gmail.com>
-* Thomas Sondergaard <ts@medical-insight.com>
-* Tobias Hunger <tobias.hunger@qt.io>
-* Todd Gamblin <tgamblin@llnl.gov>
-* Tristan Carel
-* University of Dundee
-* Vadim Zhukov
-* Will Dicharry <wdicharry@stellarscience.com>
-
-See version control history for details of individual contributions.
-
-The above copyright and license notice applies to distributions of
-CMake in source and binary form.  Third-party software packages supplied
-with CMake under compatible licenses provide their own copyright notices
-documented in corresponding subdirectories or source files.
-
-------------------------------------------------------------------------------
-
-CMake was initially developed by Kitware with the following sponsorship:
-
- * National Library of Medicine at the National Institutes of Health
-   as part of the Insight Segmentation and Registration Toolkit (ITK).
-
- * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
-   Visualization Initiative.
-
- * National Alliance for Medical Image Computing (NAMIC) is funded by the
-   National Institutes of Health through the NIH Roadmap for Medical Research,
-   Grant U54 EB005149.
-
- * Kitware, Inc.
diff --git a/cmake/FindDirectFB.cmake b/cmake/FindDirectFB.cmake
deleted file mode 100644
index 2c98b2a..0000000
--- a/cmake/FindDirectFB.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-# Try to find DirectFB
-#
-# This will define:
-#
-#   DIRECTFB_FOUND       - True if DirectFB is found
-#   DIRECTFB_LIBRARIES   - Link these to use DirectFB
-#   DIRECTFB_INCLUDE_DIR - Include directory for DirectFB
-#   DIRECTFB_DEFINITIONS - Compiler flags for using DirectFB
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-IF (NOT WIN32)
-  FIND_PACKAGE(PkgConfig)
-  PKG_CHECK_MODULES(PKG_DIRECTFB QUIET directfb)
-
-  SET(DIRECTFB_DEFINITIONS ${PKG_DIRECTFB_CFLAGS})
-
-  FIND_PATH(DIRECTFB_INCLUDE_DIR  NAMES directfb.h HINTS ${PKG_DIRECTFB_INCLUDE_DIRS})
-
-  FIND_LIBRARY(DIRECTFB_LIBRARIES NAMES directfb   HINTS ${PKG_DIRECTFB_LIBRARY_DIRS})
-
-  include(FindPackageHandleStandardArgs)
-
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTFB DEFAULT_MSG DIRECTFB_LIBRARIES DIRECTFB_INCLUDE_DIR)
-
-  MARK_AS_ADVANCED(DIRECTFB_INCLUDE_DIR DIRECTFB_LIBRARIES)
-ENDIF ()
diff --git a/cmake/FindPCIAccess.cmake b/cmake/FindPCIAccess.cmake
deleted file mode 100644
index 65f7d5c..0000000
--- a/cmake/FindPCIAccess.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-# - FindPCIAccess
-#
-# Copyright 2015 Valve Corporation
-
-find_package(PkgConfig)
-
-pkg_check_modules(PC_PCIACCESS QUIET pciaccess)
-
-find_path(PCIACCESS_INCLUDE_DIR NAMES pciaccess.h
-    HINTS
-    ${PC_PCIACCESS_INCLUDEDIR}
-    ${PC_PCIACCESS_INCLUDE_DIRS}
-    )
-
-find_library(PCIACCESS_LIBRARY NAMES pciaccess
-    HINTS
-    ${PC_PCIACCESS_LIBDIR}
-    ${PC_PCIACCESS_LIBRARY_DIRS}
-    )
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PCIAccess DEFAULT_MSG
-    PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY)
-
-mark_as_advanced(PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY)
-
-set(PCIACCESS_INCLUDE_DIRS ${PCIACCESS_INCLUDE_DIR})
-set(PCIACCESS_LIBRARIES ${PCIACCESS_LIBRARY})
diff --git a/cmake/FindPthreadStubs.cmake b/cmake/FindPthreadStubs.cmake
deleted file mode 100644
index 063bbe5..0000000
--- a/cmake/FindPthreadStubs.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-# - FindPthreadStubs
-#
-# Copyright (C) 2015 Valve Corporation
-
-find_package(PkgConfig)
-
-pkg_check_modules(PC_PTHREADSTUBS QUIET pthread-stubs)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PthreadStubs DEFAULT_MSG
-    PC_PTHREADSTUBS_FOUND)
-
-set(PTHREADSTUBS_INCLUDE_DIRS "")
-set(PTHREADSTUBS_LIBRARIES "")
diff --git a/cmake/FindUDev.cmake b/cmake/FindUDev.cmake
deleted file mode 100644
index e3d1699..0000000
--- a/cmake/FindUDev.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-# - FindUDev
-#
-# Copyright (C) 2015 Valve Corporation
-
-find_package(PkgConfig)
-
-pkg_check_modules(PC_LIBUDEV QUIET libudev)
-
-find_path(UDEV_INCLUDE_DIR NAMES libudev.h
-    HINTS
-    ${PC_LIBUDEV_INCLUDEDIR}
-    ${PC_LIBUDEV_INCLUDE_DIRS}
-    )
-
-find_library(UDEV_LIBRARY NAMES udev
-    HINTS
-    ${PC_LIBUDEV_LIBDIR}
-    ${PC_LIBUDEV_LIBRARY_DIRS}
-    )
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(UDev DEFAULT_MSG
-    UDEV_INCLUDE_DIR UDEV_LIBRARY)
-
-mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARY)
-
-set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
-set(UDEV_LIBRARIES ${UDEV_LIBRARY})
diff --git a/cmake/FindValgrind.cmake b/cmake/FindValgrind.cmake
deleted file mode 100644
index 5c1fb56..0000000
--- a/cmake/FindValgrind.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-# - FindValgrind
-#
-# Copyright (C) 2015 Valve Corporation
-
-find_package(PkgConfig)
-
-pkg_check_modules(PC_VALGRIND QUIET valgrind)
-
-find_path(VALGRIND_INCLUDE_DIR NAMES valgrind.h memcheck.h
-    HINTS
-    ${PC_VALGRIND_INCLUDEDIR}
-    ${PC_VALGRIND_INCLUDE_DIRS}
-    )
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Valgrind DEFAULT_MSG
-    VALGRIND_INCLUDE_DIR)
-
-mark_as_advanced(VALGRIND_INCLUDE_DIR)
-
-set(VALGRIND_INCLUDE_DIRS ${VALGRIND_INCLUDE_DIR})
-set(VALGRIND_LIBRARIES "")
diff --git a/cmake/FindX11_XCB.cmake b/cmake/FindX11_XCB.cmake
deleted file mode 100644
index 956bf89..0000000
--- a/cmake/FindX11_XCB.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# - Try to find libX11-xcb
-# Once done this will define
-#
-# X11_XCB_FOUND - system has libX11-xcb
-# X11_XCB_LIBRARIES - Link these to use libX11-xcb
-# X11_XCB_INCLUDE_DIR - the libX11-xcb include dir
-# X11_XCB_DEFINITIONS - compiler switches required for using libX11-xcb
-
-# Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
-# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
-# Copyright (c) 2007 Matthias Kretz, <kretz@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-IF (NOT WIN32)
-  # use pkg-config to get the directories and then use these values
-  # in the FIND_PATH() and FIND_LIBRARY() calls
-  FIND_PACKAGE(PkgConfig)
-  PKG_CHECK_MODULES(PKG_X11_XCB QUIET x11-xcb)
-
-  SET(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS})
-
-  FIND_PATH(X11_XCB_INCLUDE_DIR NAMES X11/Xlib-xcb.h HINTS ${PKG_X11_XCB_INCLUDE_DIRS})
-  FIND_LIBRARY(X11_XCB_LIBRARIES NAMES X11-xcb HINTS ${PKG_X11_XCB_LIBRARY_DIRS})
-
-  include(FindPackageHandleStandardArgs)
-  FIND_PACKAGE_HANDLE_STANDARD_ARGS(X11_XCB DEFAULT_MSG X11_XCB_LIBRARIES X11_XCB_INCLUDE_DIR)
-
-  MARK_AS_ADVANCED(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARIES)
-ENDIF (NOT WIN32)
-
diff --git a/cmake/FindXCB.cmake b/cmake/FindXCB.cmake
deleted file mode 100644
index 91127c7..0000000
--- a/cmake/FindXCB.cmake
+++ /dev/null
@@ -1,54 +0,0 @@
-# - FindXCB
-#
-# Copyright (C) 2015 Valve Corporation
-
-find_package(PkgConfig)
-
-if(NOT XCB_FIND_COMPONENTS)
-    set(XCB_FIND_COMPONENTS xcb)
-endif()
-
-include(FindPackageHandleStandardArgs)
-set(XCB_FOUND true)
-set(XCB_INCLUDE_DIRS "")
-set(XCB_LIBRARIES "")
-foreach(comp ${XCB_FIND_COMPONENTS})
-    # component name
-    string(TOUPPER ${comp} compname)
-    string(REPLACE "-" "_" compname ${compname})
-    # header name
-    string(REPLACE "xcb-" "" headername xcb/${comp}.h)
-    # library name
-    set(libname ${comp})
-
-    pkg_check_modules(PC_${comp} QUIET ${comp})
-
-    find_path(${compname}_INCLUDE_DIR NAMES ${headername}
-        HINTS
-        ${PC_${comp}_INCLUDEDIR}
-        ${PC_${comp}_INCLUDE_DIRS}
-        )
-
-    find_library(${compname}_LIBRARY NAMES ${libname}
-        HINTS
-        ${PC_${comp}_LIBDIR}
-        ${PC_${comp}_LIBRARY_DIRS}
-        )
-
-    set(FPHSA_NAME_MISMATCHED TRUE)
-    find_package_handle_standard_args(${comp}
-        FOUND_VAR ${comp}_FOUND
-        REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-    unset(FPHSA_NAME_MISMATCHED)
-
-    mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-
-    list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR})
-    list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY})
-
-    if(NOT ${comp}_FOUND)
-        set(XCB_FOUND false)
-    endif()
-endforeach()
-
-list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
deleted file mode 100644
index 2037e36..0000000
--- a/cmake/cmake_uninstall.cmake.in
+++ /dev/null
@@ -1,21 +0,0 @@
-if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-  message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-
-file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
-string(REGEX REPLACE "\n" ";" files "${files}")
-foreach(file ${files})
-  message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
-  if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-    exec_program(
-      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
-      OUTPUT_VARIABLE rm_out
-      RETURN_VALUE rm_retval
-      )
-    if(NOT "${rm_retval}" STREQUAL 0)
-      message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
-    endif(NOT "${rm_retval}" STREQUAL 0)
-  else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-    message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
-  endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
-endforeach(file)
diff --git a/docs/LoaderApplicationInterface.md b/docs/LoaderApplicationInterface.md
index 9b9eef2..d8454f1 100644
--- a/docs/LoaderApplicationInterface.md
+++ b/docs/LoaderApplicationInterface.md
@@ -4,15 +4,15 @@
 [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
 [2]: https://www.khronos.org/vulkan/
 
-# Application Interface to Loader
+# Application Interface to Loader <!-- omit from toc -->
 [![Creative Commons][3]][4]
 
-<!-- Copyright &copy; 2015-2022 LunarG, Inc. -->
+<!-- Copyright &copy; 2015-2023 LunarG, Inc. -->
 
 [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
 [4]: https://creativecommons.org/licenses/by-nd/4.0/
 
-## Table of Contents
+## Table of Contents <!-- omit from toc -->
 
 - [Overview](#overview)
 - [Interfacing with Vulkan Functions](#interfacing-with-vulkan-functions)
@@ -373,7 +373,7 @@
 While not necessary for validation anymore, VkConfig does use meta layers to
 group layers together based on user's preferences.
 More can be found out about this functionality through both the
-[VkConfig documentation](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[VkConfig documentation](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 and the section later on the [Override Layer](#override-layer).
 
 Meta-layers are detailed more in the
@@ -408,7 +408,7 @@
 are defined in the layer's JSON file.
 
 Discovery of system-installed implicit and explicit layers is described later
-in the [Layer discovery](LoaderLayerInterface#layer-discovery)
+in the [Layer discovery](LoaderLayerInterface.md#layer-discovery)
 section in the
 [LoaderLayerInterface.md](LoaderLayerInterface.md) document.
 
@@ -446,7 +446,7 @@
 #### Override Layer
 
 The "Override Layer" is a special implicit meta-layer created by the
-[VkConfig](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[VkConfig](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 tool and available by default when the tool is running.
 Once VkConfig exits, the override layer is removed, and the system should
 return to standard Vulkan behavior.
@@ -469,7 +469,7 @@
 This can be accomplished in one of two ways:
 
  1. Selecting specific layer paths using the
-[VkConfig](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[VkConfig](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 tool shipped with the Vulkan SDK.
  2. Directing the loader to look for layers in specific files and/or folders by using the
 `VK_LAYER_PATH` environment variable.
@@ -512,7 +512,7 @@
 This can be also be accomplished in one of two ways:
 
  1. Selecting specific layers using the
-[VkConfig](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[VkConfig](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 tool shipped with the Vulkan SDK.
  2. Directing the loader to look for additional layers by name using the
 `VK_INSTANCE_LAYERS` environment variable.
diff --git a/docs/LoaderDebugging.md b/docs/LoaderDebugging.md
index 1704c8f..47d5ae2 100644
--- a/docs/LoaderDebugging.md
+++ b/docs/LoaderDebugging.md
@@ -4,14 +4,14 @@
 [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
 [2]: https://www.khronos.org/vulkan/
 
-# Debugging The Vulkan Desktop Loader
+# Debugging The Vulkan Desktop Loader <!-- omit from toc -->
 [![Creative Commons][3]][4]
 
-<!-- Copyright &copy; 2015-2022 LunarG, Inc. -->
+<!-- Copyright &copy; 2015-2023 LunarG, Inc. -->
 
 [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
 [4]: https://creativecommons.org/licenses/by-nd/4.0/
-## Table of Contents
+## Table of Contents <!-- omit from toc -->
 
 - [Debugging Issues](#debugging-issues)
 - [Loader Logging](#loader-logging)
@@ -19,6 +19,7 @@
   - [Enable Layer Logging](#enable-layer-logging)
   - [Disable Layers](#disable-layers)
   - [Selectively Re-enable Layers](#selectively-re-enable-layers)
+- [Allow specific layers to be ignored by VK\_LOADER\_LAYERS\_DISABLE](#allow-specific-layers-to-be-ignored-by-vk_loader_layers_disable)
 - [Debugging Possible Driver Issues](#debugging-possible-driver-issues)
   - [Enable Driver Logging](#enable-driver-logging)
   - [Selectively Enable Specific Drivers](#selectively-enable-specific-drivers)
@@ -175,7 +176,7 @@
 (`VK_LOADER_LAYERS_ENABLE` and `VK_LOADER_LAYERS_DISABLE`) to selectively enable
 or disable various layers.
 If you're not sure what to do, try disabling all implicit layers manually by
-setting `VK_LOADER_LAYERS_DISABLE` to '~implicit~'.
+setting `VK_LOADER_LAYERS_DISABLE` to `~implicit~`.
 
 ```
   set VK_LOADER_LAYERS_DISABLE=~implicit~
@@ -226,6 +227,35 @@
 [Layer Filtering](LoaderLayerInterface.md#layer-filtering) section of the
 [LoaderLayerInterface](LoaderLayerInterface.md) document.
 
+## Allow specific layers to be ignored by VK_LOADER_LAYERS_DISABLE
+
+**NOTE:** VK_LOADER_LAYERS_DISABLE is only available with Loaders built with version
+1.3.262 of the Vulkan headers and later.
+
+When using `VK_LOADER_LAYERS_DISABLE` to disable implicit layers, it is possible
+to allow specific layers to be enabled using `VK_LOADER_LAYERS_ENABLE`.
+However, this has the effect of *forcing* layers to be enabled, which is not
+always desired.
+Implicit layers have the ability to only be enabled when a layer specified
+environment variable is set, allow for context dependent enablement.
+`VK_LOADER_LAYERS_ENABLE` ignores that context.
+
+Thus, a different environment variable is needed: `VK_LOADER_LAYERS_ALLOW`
+
+The behavior of `VK_LOADER_LAYERS_ALLOW` is similar to `VK_LOADER_LAYERS_ENABLE`
+except that it does not force a layer to be enabled.
+The way to think about this environment variable is that every layer matching
+`VK_LOADER_LAYERS_ALLOW` is excluded from being forcibly disabled by
+`VK_LOADER_LAYERS_DISABLE`.
+this allows for implicit layers that are context dependent to be enabled
+depending on the relevant context instead of force enabling them.
+
+Example: Disable all implicit layers except for any layers that have steam or
+mesa in their name.
+```
+set VK_LOADER_LAYERS_DISABLE=~implicit~
+set VK_LOADER_LAYERS_ALLOW=*steam*,*Mesa*
+```
 
 ## Debugging Possible Driver Issues
 
diff --git a/docs/LoaderDriverInterface.md b/docs/LoaderDriverInterface.md
index 821f1d5..da5f5de 100644
--- a/docs/LoaderDriverInterface.md
+++ b/docs/LoaderDriverInterface.md
@@ -4,16 +4,16 @@
 [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
 [2]: https://www.khronos.org/vulkan/
 
-# Driver interface to the Vulkan Loader
+# Driver interface to the Vulkan Loader <!-- omit from toc -->
 [![Creative Commons][3]][4]
 
-<!-- Copyright &copy; 2015-2022 LunarG, Inc. -->
+<!-- Copyright &copy; 2015-2023 LunarG, Inc. -->
 
 [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
 [4]: https://creativecommons.org/licenses/by-nd/4.0/
 
 
-## Table of Contents
+## Table of Contents <!-- omit from toc -->
 
 - [Overview](#overview)
 - [Driver Discovery](#driver-discovery)
@@ -35,10 +35,14 @@
   - [Driver Discovery on macOS](#driver-discovery-on-macos)
     - [Example macOS Driver Search Path](#example-macos-driver-search-path)
     - [Additional Settings For Driver Debugging](#additional-settings-for-driver-debugging)
+  - [Driver Discovery using the`VK_LUNARG_direct_driver_loading` extension](#driver-discovery-using-thevk_lunarg_direct_driver_loading-extension)
+    - [How to use `VK_LUNARG_direct_driver_loading`](#how-to-use-vk_lunarg_direct_driver_loading)
+    - [Interactions with other driver discovery mechanisms](#interactions-with-other-driver-discovery-mechanisms)
+    - [Limitations of `VK_LUNARG_direct_driver_loading`](#limitations-of-vk_lunarg_direct_driver_loading)
   - [Using Pre-Production ICDs or Software Drivers](#using-pre-production-icds-or-software-drivers)
   - [Driver Discovery on Android](#driver-discovery-on-android)
 - [Driver Manifest File Format](#driver-manifest-file-format)
-    - [Driver Manifest File Versions](#driver-manifest-file-versions)
+  - [Driver Manifest File Versions](#driver-manifest-file-versions)
     - [Driver Manifest File Version 1.0.0](#driver-manifest-file-version-100)
     - [Driver Manifest File Version 1.0.1](#driver-manifest-file-version-101)
 - [Driver Vulkan Entry Point Discovery](#driver-vulkan-entry-point-discovery)
@@ -53,18 +57,19 @@
 - [Handling KHR Surface Objects in WSI Extensions](#handling-khr-surface-objects-in-wsi-extensions)
 - [Loader and Driver Interface Negotiation](#loader-and-driver-interface-negotiation)
   - [Windows, Linux and macOS Driver Negotiation](#windows-linux-and-macos-driver-negotiation)
-    - [Version Negotiation Between Loader and Drivers](#version-negotiation-between-loader-and-drivers)
+    - [Version Negotiation Between the Loader and Drivers](#version-negotiation-between-the-loader-and-drivers)
     - [Interfacing With Legacy Drivers or Loaders](#interfacing-with-legacy-drivers-or-loaders)
-    - [Loader Version 6 Interface Requirements](#loader-version-6-interface-requirements)
-    - [Loader Version 5 Interface Requirements](#loader-version-5-interface-requirements)
-    - [Loader Version 4 Interface Requirements](#loader-version-4-interface-requirements)
-    - [Loader Version 3 Interface Requirements](#loader-version-3-interface-requirements)
-    - [Loader Version 2 Interface Requirements](#loader-version-2-interface-requirements)
-    - [Loader Version 1 Interface Requirements](#loader-version-1-interface-requirements)
-    - [Loader Version 0 Interface Requirements](#loader-version-0-interface-requirements)
+    - [Loader and Driver Interface Version 7 Requirements](#loader-and-driver-interface-version-7-requirements)
+    - [Loader and Driver Interface Version 6 Requirements](#loader-and-driver-interface-version-6-requirements)
+    - [Loader and Driver Interface Version 5 Requirements](#loader-and-driver-interface-version-5-requirements)
+    - [Loader and Driver Interface Version 4 Requirements](#loader-and-driver-interface-version-4-requirements)
+    - [Loader and Driver Interface Version 3 Requirements](#loader-and-driver-interface-version-3-requirements)
+    - [Loader and Driver Interface Version 2 Requirements](#loader-and-driver-interface-version-2-requirements)
+    - [Loader and Driver Interface Version 1 Requirements](#loader-and-driver-interface-version-1-requirements)
+    - [Loader and Driver Interface Version 0 Requirements](#loader-and-driver-interface-version-0-requirements)
     - [Additional Interface Notes:](#additional-interface-notes)
   - [Android Driver Negotiation](#android-driver-negotiation)
-- [Loader implementation of VK_KHR_portability_enumeration](#loader-implementation-of-vk_khr_portability_enumeration)
+- [Loader implementation of VK\_KHR\_portability\_enumeration](#loader-implementation-of-vk_khr_portability_enumeration)
 - [Loader and Driver Policy](#loader-and-driver-policy)
   - [Number Format](#number-format)
   - [Android Differences](#android-differences)
@@ -115,8 +120,9 @@
 present, then the newer `VK_DRIVER_FILES` will be used, and the values in
 `VK_ICD_FILENAMES` will be ignored.
 
-The `VK_DRIVER_FILES` environment variable is a list of Driver Manifest
-files, containing the full path to the driver JSON Manifest file.
+The `VK_DRIVER_FILES` environment variable is a list of paths to Driver Manifest
+files, containing the full path to the driver JSON Manifest file, and/or paths
+to folders containing Driver Manifest files.
 This list is colon-separated on Linux and macOS, and semicolon-separated on
 Windows.
 Typically, `VK_DRIVER_FILES` will only contain a full pathname to one info
@@ -130,7 +136,7 @@
 search paths.
 The `VK_ADD_DRIVER_FILES` environment variable can be used to add a list of
 Driver Manifest files, containing the full path to the driver JSON Manifest
-file.
+file, and/or paths to folders containing Driver Manifest files.
 This list is colon-separated on Linux and macOS, and semicolon-separated on
 Windows.
 It will be added prior to the standard driver search files.
@@ -506,6 +512,17 @@
 the application's bundle resources are searched first:
 `(bundle)/Contents/Resources/`.
 
+System installed drivers will be ignored if drivers are found inside of the app
+bundle.
+This is because there is not a standard mechanism in which to distinguish drivers
+that happen to be duplicates.
+For example, MoltenVK is commonly placed inside application bundles.
+If there exists a system installed MoltenVK, the loader will load both the app
+bundled and the system installed MoltenVK, leading to potential issues or crashes.
+Drivers found through environment variables, such as `VK_DRIVER_FILES`, will be
+used regardless of whether there are bundled drivers present or not.
+
+
 #### Example macOS Driver Search Path
 
 For a fictional user "Me" the Driver Manifest search path might look
@@ -534,6 +551,117 @@
 It is recommended that `LD_BIND_NOW` along with `VK_LOADER_DEBUG=error,warn`
 to expose any issues.
 
+### Driver Discovery using the`VK_LUNARG_direct_driver_loading` extension
+
+The `VK_LUNARG_direct_driver_loading` extension allows for applications to
+provide a driver or drivers to the Loader during vkCreateInstance.
+This allows drivers to be included with an application without requiring
+installation and is capable of being used in any execution environment, such as
+a process running with elevated privileges.
+
+When calling `vkEnumeratePhysicalDevices` with the
+`VK_LUNARG_direct_driver_loading` extension enabled, the `VkPhysicalDevice`s
+from system installed drivers and environment variable specified drivers will
+appear before any `VkPhysicalDevice`s that originate from drivers from the
+`VkDirectDriverLoadingListLUNARG::pDrivers` list.
+
+#### How to use `VK_LUNARG_direct_driver_loading`
+
+To use this extension, it must first be enabled on the VkInstance.
+This requires enabling the `VK_LUNARG_direct_driver_loading` extension through
+the `enabledExtensionCount` and `ppEnabledExtensionNames`members of
+`VkInstanceCreateInfo`.
+
+```c
+const char* extensions[] = {VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME, <other extensions>};
+VkInstanceCreateInfo instance_create_info = {};
+instance_create_info.enabledExtensionCount = <size of extension list>;
+instance_create_info.ppEnabledExtensionNames = extensions;
+```
+
+The `VkDirectDriverLoadingInfoLUNARG` structure contains a
+`VkDirectDriverLoadingFlagsLUNARG` member (reserved for future use) and a
+`PFN_vkGetInstanceProcAddrLUNARG` member which provides the loader with the
+function pointer for the driver's `vkGetInstanceProcAddr`.
+
+The `VkDirectDriverLoadingListLUNARG` structure contains a count and pointer
+members which provide the size of and pointer to an application provided array of
+`VkDirectDriverLoadingInfoLUNARG` structures.
+
+Creating those structures looks like the following
+```c
+VkDirectDriverLoadingInfoLUNARG direct_loading_info = {};
+direct_loading_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG
+direct_loading_info.pfnGetInstanceProcAddr = <put the PFN_vkGetInstanceProcAddr of the driver here>
+
+VkDirectDriverLoadingListLUNARG direct_driver_list = {};
+direct_driver_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+direct_driver_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG; // or VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG
+direct_driver_list.driverCount = 1;
+direct_driver_list.pDrivers = &direct_loading_info; // can include multiple drivers here if so desired
+```
+
+The `VkDirectDriverLoadingListLUNARG` structure contains the enum
+`VkDirectDriverLoadingModeLUNARG`.
+There are two modes:
+* `VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG` - specifies that the only drivers
+to be loaded will come from the `VkDirectDriverLoadingListLUNARG` structure.
+* `VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG` - specifies that drivers
+from the `VkDirectDriverLoadingModeLUNARG` structure will be used in addition to
+any system installed drivers and environment variable specified drivers.
+
+
+
+Then, the `VkDirectDriverLoadingListLUNARG` structure *must* be appended to the
+`pNext` chain of `VkInstanceCreateInfo`.
+
+```c
+instance_create_info.pNext = (const void*)&direct_driver_list;
+```
+
+Finally, create the instance like normal.
+
+#### Interactions with other driver discovery mechanisms
+
+If the `VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG` mode is specified in the
+`VkDirectDriverLoadingListLUNARG` structure, then no system installed drivers
+are loaded.
+This applies equally to all platforms.
+Additionally, the following environment variables have no effect:
+
+* `VK_DRIVER_FILES`
+* `VK_ICD_FILENAMES`
+* `VK_ADD_DRIVER_FILES`
+* `VK_LOADER_DRIVERS_SELECT`
+* `VK_LOADER_DRIVERS_DISABLE`
+
+Exclusive mode will also disable MacOS bundle manifest discovery of drivers.
+
+#### Limitations of `VK_LUNARG_direct_driver_loading`
+
+Because `VkDirectDriverLoadingListLUNARG` is provided to the loader at instance
+creation, there is no mechanism for the loader to query the list of instance
+extensions that originate from `VkDirectDriverLoadingListLUNARG` drivers during
+`vkEnumerateInstanceExtensionProperties`.
+Applications can instead manually load the `vkEnumerateInstanceExtensionProperties`
+function pointer directly from the drivers the application provides to the loader
+using the `pfnGetInstanceProcAddrLUNARG` for each driver.
+Then the application can call each driver's
+`vkEnumerateInstanceExtensionProperties` and append non-duplicate entriees to the
+list from the loader's `vkEnumerateInstanceExtensionProperties` to get the full
+list of supported instance extensions.
+Alternatively, because the Application is providing drivers, it is reasonable for
+the application to already know which instance extensions are available with the
+provided drivers, preventing the need to manually query them.
+
+However, there are limitations.
+If there are any active implicit layers which intercept
+`vkEnumerateInstanceExtensionProperties` to remove unsupported extensions, then
+those layers will not be able to remove unsupported extensions from drivers that
+are provided by the application.
+This is due to `vkEnumerateInstanceExtensionProperties` not having a mechanism
+to extend it.
+
 
 ### Using Pre-Production ICDs or Software Drivers
 
@@ -802,11 +930,17 @@
 ## Driver Unknown Physical Device Extensions
 
 Drivers that implement entrypoints which take a `VkPhysicalDevice` as the first
-parameter *should* support `vk_icdGetPhysicalDeviceProcAddr`. This function
-is added to the Driver Interface Version 4 and allows the loader to distinguish
-between entrypoints which take `VkDevice` and `VkPhysicalDevice` as the first
-parameter. This allows the loader to properly support entrypoints that are
-unknown to it gracefully.
+parameter *should* support `vk_icdGetPhysicalDeviceProcAddr`.
+This function is added to the Loader and Driver Driver Interface Version 4,
+allowing the loader to distinguish between entrypoints which take `VkDevice`
+and `VkPhysicalDevice` as the first parameter.
+This allows the loader to properly support entrypoints that are unknown to it
+gracefully.
+This entry point is not a part of the Vulkan API itself, only a private
+interface between the loader and drivers.
+Note: Loader and Driver Interface Version 7 makes exporting
+`vk_icdGetPhysicalDeviceProcAddr` optional.
+Instead, drivers *must* expose it through `vk_icdGetInstanceProcAddr`.
 
 ```cpp
 PFN_vkVoidFunction
@@ -842,7 +976,9 @@
 
 If a driver does implement this support, it must export the function from the
 driver library using the name `vk_icdGetPhysicalDeviceProcAddr` so that the
-symbol can be located through the platform's dynamic linking utilities.
+symbol can be located through the platform's dynamic linking utilities, or if
+the driver supports Loader and Driver Interface Version 7, exposed through
+`vk_icdGetInstanceProcAddr` instead.
 
 The behavior of the loader's `vkGetInstanceProcAddr` with support for the
 `vk_icdGetPhysicalDeviceProcAddr` function is as follows:
@@ -908,10 +1044,15 @@
 This mechanism does not force an application to use any particular GPU &mdash;
 it merely changes the order in which they are presented.
 
-This mechanism requires that a driver provide version 6 of the loader/driver
-interface.
-Version 6 of this interface defines a new exported function that the driver may
-provide on Windows:
+This mechanism requires that a driver provide The Loader and Driver Interface
+Version 6.
+This version defines a new exported function, `vk_icdEnumerateAdapterPhysicalDevices`,
+detailed below, that Drivers may provide on Windows.
+This entry point is not a part of the Vulkan API itself, only a private
+interface between the loader and drivers.
+Note: Loader and Driver Interface Version 7 makes exporting
+`vk_icdEnumerateAdapterPhysicalDevices` optional.
+Instead, drivers *must* expose it through `vk_icdGetInstanceProcAddr`.
 
 ```c
 VKAPI_ATTR VkResult VKAPI_CALL
@@ -922,6 +1063,7 @@
       VkPhysicalDevice* pPhysicalDevices);
 ```
 
+
 This function takes an adapter LUID as input, and enumerates all Vulkan physical
 devices that are associated with that LUID.
 This works in the same way as other Vulkan enumerations &mdash; if
@@ -1034,8 +1176,8 @@
 
 The driver may choose to handle `VkSurfaceKHR` object creation instead.
 If a driver desires to handle creating and destroying it must do the following:
- 1. Support version 3 or newer of the loader/driver interface.
- 2. Export and handle all functions that take in a `VkSurfaceKHR` object,
+ 1. Support Loader and Driver Interface Version 3 or newer.
+ 2. Expose and handle all functions that take in a `VkSurfaceKHR` object,
 including:
      * `vkCreateXXXSurfaceKHR`
      * `vkGetPhysicalDeviceSurfaceSupportKHR`
@@ -1078,13 +1220,16 @@
 ### Windows, Linux and macOS Driver Negotiation
 
 
-#### Version Negotiation Between Loader and Drivers
+#### Version Negotiation Between the Loader and Drivers
 
-All drivers (supporting interface version 2 or higher) must export the
-following function that is used for determination of the interface version that
-will be used.
+All drivers supporting Loader and Driver Interface Version 2 or higher must
+export the following function that is used for determination of the interface
+version that will be used.
 This entry point is not a part of the Vulkan API itself, only a private
 interface between the loader and drivers.
+Note: Loader and Driver Interface Version 7 makes exporting
+`vk_icdNegotiateLoaderICDInterfaceVersion` optional.
+Instead, drivers *must* expose it through `vk_icdGetInstanceProcAddr`.
 
 ```cpp
 VKAPI_ATTR VkResult VKAPI_CALL
@@ -1128,19 +1273,50 @@
 
 #### Interfacing With Legacy Drivers or Loaders
 
-If a loader sees that a driver does not export the
+If a loader sees that a driver does not export or expose the
 `vk_icdNegotiateLoaderICDInterfaceVersion` function, then the loader assumes the
 corresponding driver only supports either interface version 0 or 1.
 
 From the other side of the interface, if a driver sees a call to
 `vk_icdGetInstanceProcAddr` before a call to
-`vk_icdNegotiateLoaderICDInterfaceVersion`, then it knows that loader making the
-calls is a legacy loader supporting version 0 or 1.
-If the loader calls `vk_icdGetInstanceProcAddr` first, it supports at least
-version 1.
+`vk_icdNegotiateLoaderICDInterfaceVersion`, then the loader is either a legacy
+loader with only support for interface version 0 or 1, or the loader is using
+interface version 7 or newer.
+
+If the first call to `vk_icdGetInstanceProcAddr` is to query for
+`vk_icdNegotiateLoaderICDInterfaceVersion`, then that means the loader is using
+interface version 7.
+This only occurs when the driver does not export
+`vk_icdNegotiateLoaderICDInterfaceVersion`.
+Drivers which export `vk_icdNegotiateLoaderICDInterfaceVersion` will have it
+called first.
+
+If the first call to `vk_icdGetInstanceProcAddr` is **not** querying for
+`vk_icdNegotiateLoaderICDInterfaceVersion`, then loader is a legacy loader only
+which supports version 0 or 1.
+In this case, if the loader calls `vk_icdGetInstanceProcAddr` first, it supports
+at least interface version 1.
 Otherwise, the loader only supports version 0.
 
-#### Loader Version 6 Interface Requirements
+#### Loader and Driver Interface Version 7 Requirements
+
+Version 7 relaxes the requirement that Loader and Driver Interface functions
+must be exported.
+Instead, it only requires that those functions be queryable through
+`vk_icdGetInstanceProcAddr`.
+The functions are:
+    `vk_icdNegotiateLoaderICDInterfaceVersion`
+    `vk_icdGetPhysicalDeviceProcAddr`
+    `vk_icdEnumerateAdapterPhysicalDevices` (Windows only)
+These functions are considered global for the purposes of retrieval, so the
+`VkInstance` parameter of `vk_icdGetInstanceProcAddr` will be **NULL**.
+While exporting these functions is no longer a requirement, drivers may still
+export them for compatibility with older loaders.
+The changes in this version allow drivers provided through the
+`VK_LUNARG_direct_driver_loading` extension to support the entire Loader and
+Driver Interface.
+
+#### Loader and Driver Interface Version 6 Requirements
 
 Version 6 provides a mechanism to allow the loader to sort physical devices.
 The loader will only attempt to sort physical devices on a driver if version 6
@@ -1148,9 +1324,9 @@
 This version provides the `vk_icdEnumerateAdapterPhysicalDevices` function
 defined earlier in this document.
 
-#### Loader Version 5 Interface Requirements
+#### Loader and Driver Interface Version 5 Requirements
 
-Version 5 of the loader/driver interface has no changes to the actual interface.
+This interface version has no changes to the actual interface.
 If the loader requests interface version 5 or greater, it is simply
 an indication to drivers that the loader is now evaluating whether the API
 Version info passed into vkCreateInstance is a valid version for the loader.
@@ -1207,10 +1383,9 @@
   </tr>
 </table>
 
-#### Loader Version 4 Interface Requirements
+#### Loader and Driver Interface Version 4 Requirements
 
-The major change to version 4 of the loader/driver interface is the
-support of
+The major change to version 4 of this interface version is the support of
 [Unknown Physical Device Extensions](#driver-unknown-physical-device-extensions)
 using the `vk_icdGetPhysicalDeviceProcAddr` function.
 This function is purely optional.
@@ -1220,16 +1395,16 @@
 functions and cause invalid behavior.
 
 
-#### Loader Version 3 Interface Requirements
+#### Loader and Driver Interface Version 3 Requirements
 
-The primary change that occurred in version 3 of the loader/driver interface was
-to allow a driver to handle creation/destruction of their own KHR_surfaces.
+The primary change that occurred in this interface version is to allow a driver
+to handle creation and destruction of their own KHR_surfaces.
 Up until this point, the loader created a surface object that was used by all
 drivers.
-However, some drivers may want to provide their own surface handles.
-If a driver chooses to enable this support, it must export support for version 3
-of the loader/driver interface, as well as any Vulkan function that uses a
-KHR_surface handle, such as:
+However, some drivers *may* want to provide their own surface handles.
+If a driver chooses to enable this support, it must support Loader and Driver
+Interface Version 3, as well as any Vulkan function that uses a `VkSurfaceKHR`
+handle, such as:
 - `vkCreateXXXSurfaceKHR` (where XXX is the platform-specific identifier [i.e.
 `vkCreateWin32SurfaceKHR` for Windows])
 - `vkDestroySurfaceKHR`
@@ -1239,25 +1414,24 @@
 - `vkGetPhysicalDeviceSurfaceFormatsKHR`
 - `vkGetPhysicalDeviceSurfacePresentModesKHR`
 
-A driver can still choose to not take advantage of this functionality
-by simply not exposing the above `vkCreateXXXSurfaceKHR` and
+A driver which does not participate in this functionality can opt out by
+simply not exposing the above `vkCreateXXXSurfaceKHR` and
 `vkDestroySurfaceKHR` functions.
 
 
-#### Loader Version 2 Interface Requirements
+#### Loader and Driver Interface Version 2 Requirements
 
-Version 2 interface is the first to implement the new
-`vk_icdNegotiateLoaderICDInterfaceVersion` functionality, see
-[Version Negotiation Between Loader and Drivers](#version-negotiation-between-loader-and-drivers) for more details
-on that function.
+Interface Version 2 requires that drivers export
+`vk_icdNegotiateLoaderICDInterfaceVersion`.
+For more information, see [Version Negotiation Between Loader and Drivers](#version-negotiation-between-loader-and-drivers).
 
-Additional, version 2 was the first to define that Vulkan dispatchable objects
-created by drivers must now be created in accordance to the
+Additional, version 2 requires that Vulkan dispatchable objects created by
+drivers must be created in accordance to the
 [Driver Dispatchable Object Creation](#driver-dispatchable-object-creation)
 section.
 
 
-#### Loader Version 1 Interface Requirements
+#### Loader and Driver Interface Version 1 Requirements
 
 Version 1 of the interface added the driver-specific entry-point
 `vk_icdGetInstanceProcAddr`.
@@ -1272,14 +1446,14 @@
 the appropriate function pointers using that.
 
 
-#### Loader Version 0 Interface Requirements
+#### Loader and Driver Interface Version 0 Requirements
 
-Version 0 interface does not support either `vk_icdGetInstanceProcAddr` or
+Version 0 does not support either `vk_icdGetInstanceProcAddr` or
 `vk_icdNegotiateLoaderICDInterfaceVersion`.
 Because of this, the loader will assume the driver supports only version 0 of
 the interface unless one of those functions exists.
 
-Additionally, for version 0, the driver must expose at least the following core
+Additionally, for Version 0, the driver must expose at least the following core
 Vulkan entry-points so the loader may build up the interface to the driver:
 
 - The function `vkGetInstanceProcAddr` **must be exported** in the driver
@@ -1361,8 +1535,8 @@
 
 ### Number Format
 
-Loader/Driver policy items start with the prefix `LDP_` (short for
-Loader/Driver Policy) which is followed by an identifier based on what
+Loader and Driver policy items start with the prefix `LDP_` (short for
+Loader and Driver Policy) which is followed by an identifier based on what
 component the policy is targeted against.
 In this case there are only two possible components:
  - Drivers: which will have the string `DRIVER_` as part of the policy number.
@@ -1424,7 +1598,7 @@
   <tr>
     <td><small><b>LDP_DRIVER_3</b></small></td>
     <td>A driver <b>must</b> be able to negotiate a supported version of the
-        loader/driver interface with the loader in accordance with the stated
+        Loader and Driver Interface with the loader in accordance with the stated
         negotiation process.
     </td>
     <td>The driver will not be loaded.</td>
@@ -1466,7 +1640,7 @@
         possibly including crashes or corruption.
     </td>
     <td><small>
-        <a href="https://github.com/KhronosGroup/VK-GL-CTS/blob/master/external/openglcts/README.md">
+        <a href="https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/openglcts/README.md">
         Vulkan CTS Documentation</a>
         </small>
     </td>
@@ -1484,7 +1658,7 @@
   <tr>
     <td><small><b>LDP_DRIVER_7</b></small></td>
     <td>If a driver desires to support Vulkan API 1.1 or newer, it <b>must</b>
-        expose support of Vulkan loader/driver interface 5 or newer.
+        expose support for Loader and Driver Interface Version 5 or newer.
     </td>
     <td>The driver will be used when it shouldn't be and will cause
         undefined behavior possibly including crashes or corruption.
@@ -1499,7 +1673,7 @@
   <tr>
     <td><small><b>LDP_DRIVER_8</b></small></td>
     <td>If a driver wishes to handle its own <i>VkSurfaceKHR</i> object
-        creation, it <b>must</b> implement loader/driver interface version 3 or
+        creation, it <b>must</b> implement the Loader and Driver Interface Version 3 or
         newer and support querying all the relevant surface functions via
         <i>vk_icdGetInstanceProcAddr</i>.
     </td>
@@ -1513,15 +1687,15 @@
   </tr>
   <tr>
     <td><small><b>LDP_DRIVER_9</b></small></td>
-    <td>If a driver negotiation results in it using loader/driver interface
-        version 4 or earlier, the driver <b>must</b> verify that the Vulkan API
-        version passed into <i>vkCreateInstance</i> (through
+    <td>If version negotiation results in a driver using the Loader
+        and Driver Interface Version 4 or earlier, the driver <b>must</b> verify
+        that the Vulkan API version passed into <i>vkCreateInstance</i> (through
         <i>VkInstanceCreateInfo</i>’s <i>VkApplicationInfo</i>'s
         <i>apiVersion</i>) is supported.
         If the requested Vulkan API version can not be supported by the driver,
         it <b>must</b> return <b>VK_ERROR_INCOMPATIBLE_DRIVER</b>. <br/>
         This is not required if the interface version is 5 or newer because the
-        responsibility for this check then falls on the loader.
+        loader is responsible for this check.
     </td>
     <td>The behavior is undefined and may result in crashes or corruption.</td>
     <td>No</td>
@@ -1533,11 +1707,13 @@
   </tr>
   <tr>
     <td><small><b>LDP_DRIVER_10</b></small></td>
-    <td>If a driver negotiation results in it using loader/driver interface
-        version 5 or newer, the driver <b>must</b> ignore the Vulkan API version
+    <td>If version negotiation results in a driver using the Loader and Driver Interface
+        Version 5 or newer, the driver <b>must</b> not return
+        <b>VK_ERROR_INCOMPATIBLE_DRIVER</b> if the Vulkan API version
         passed into <i>vkCreateInstance</i> (through
         <i>VkInstanceCreateInfo</i>’s <i>VkApplicationInfo</i>'s
-        <i>apiVersion</i>).
+        <i>apiVersion</i>) is not supported by the driver. This check is performed
+        by the loader on the drivers behalf.
     </td>
     <td>The behavior is undefined and may result in crashes or corruption.</td>
     <td>No</td>
@@ -1596,7 +1772,7 @@
   </tr>
   <tr>
     <td><small><b>LDP_DRIVER_6</b></small></td>
-    <td>A driver supporting loader/driver interface version 1 or newer <b>must
+    <td>A driver supporting Loader and Driver Interface Version 1 or newer <b>must
         not</b> directly export standard Vulkan entry-points.
         <br/>
         Instead, it <b>must</b> export only the loader interface functions
@@ -1682,7 +1858,7 @@
   <tr>
     <td><small><b>LDP_LOADER_5</b></small></td>
     <td>A loader <b>must</b> ignore any driver for which a compatible
-        loader/driver interface version can not be negotiated.
+        Loader and Driver Interface Version can not be negotiated.
     </td>
     <td>The loader would load a driver improperly resulting in undefined
         behavior possibly including crashes or corruption.
@@ -1695,16 +1871,16 @@
   </tr>
   <tr>
     <td><small><b>LDP_LOADER_6</b></small></td>
-    <td>If a driver negotiation results in it using loader/driver interface
-        version 5 or newer, a loader <b>must</b> verify that the Vulkan API
-        version passed into <i>vkCreateInstance</i> (through
+    <td>If a driver negotiation results in the loader using Loader and Driver
+        Interface Version 5 or newer, a loader <b>must</b> verify that the Vulkan
+        API version passed into <i>vkCreateInstance</i> (through
         <i>VkInstanceCreateInfo</i>’s <i>VkApplicationInfo</i>'s
         <i>apiVersion</i>) is supported by at least one driver.
         If the requested Vulkan API version can not be supported by any
         driver, the loader <b>must</b> return
         <b>VK_ERROR_INCOMPATIBLE_DRIVER</b>.<br/>
-        This is not required if the interface version is 4 or earlier because
-        the responsibility for this check then falls on the drivers.
+        This is not required if the Loader and Driver Interface Version is 4 or
+        earlier because the responsibility for this check falls on the drivers.
     </td>
     <td>The behavior is undefined and may result in crashes or corruption.</td>
     <td>No</td>
diff --git a/docs/LoaderInterfaceArchitecture.md b/docs/LoaderInterfaceArchitecture.md
index 8c203b8..dc9347b 100644
--- a/docs/LoaderInterfaceArchitecture.md
+++ b/docs/LoaderInterfaceArchitecture.md
@@ -4,14 +4,14 @@
 [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
 [2]: https://www.khronos.org/vulkan/
 
-# Architecture of the Vulkan Loader Interfaces
+# Architecture of the Vulkan Loader Interfaces <!-- omit from toc -->
 [![Creative Commons][3]][4]
 
-<!-- Copyright &copy; 2015-2022 LunarG, Inc. -->
+<!-- Copyright &copy; 2015-2023 LunarG, Inc. -->
 
 [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
 [4]: https://creativecommons.org/licenses/by-nd/4.0/
-## Table of Contents
+## Table of Contents <!-- omit from toc -->
 
 - [Overview](#overview)
   - [Who Should Read This Document](#who-should-read-this-document)
@@ -47,6 +47,8 @@
   - [Case-Insensitive](#case-insensitive)
   - [Environment Variable Priority](#environment-variable-priority)
 - [Table of Debug Environment Variables](#table-of-debug-environment-variables)
+  - [Active Environment Variables](#active-environment-variables)
+  - [Deprecated Environment Variables](#deprecated-environment-variables)
 - [Glossary of Terms](#glossary-of-terms)
 
 ## Overview
@@ -224,7 +226,7 @@
 loader.
 
 More details on VkConfig can be found in its
-[GitHub documentation](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md).
+[GitHub documentation](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md).
 <br/>
 <br/>
 
@@ -381,7 +383,7 @@
 For example, the diagram below represents what happens in the call chain for
 `vkCreateInstance`.
 After initializing the chain, the loader calls into the first layer's
-`vkCreateInstance`, which will call the next layer's `vkCreateInstance
+`vkCreateInstance`, which will call the next layer's `vkCreateInstance`
 before finally terminating in the loader again where it will call
 every driver's `vkCreateInstance`.
 This allows every enabled layer in the chain to set up what it needs based on
@@ -630,14 +632,15 @@
     <td><small>
         Force the loader to use the specific driver JSON files.
         The value contains a list of delimited full path listings to
-        driver JSON Manifest files.<br/>
+        driver JSON Manifest files and/or
+        paths to folders containing driver JSON files.<br/>
         <br/>
         This has replaced the older deprecated environment variable
         <i>VK_ICD_FILENAMES</i>, however the older environment variable will
-        continue to work for some time.
+        continue to work.
     </small></td>
     <td><small>
-        If a global path to the JSON file is not used, issues may be encountered.
+        If a relative path not used, issues may be encountered.
         <br/> <br/>
         <a href="#elevated-privilege-caveats">
             Ignored when running Vulkan application with elevated privileges.
@@ -779,10 +782,10 @@
     </small></td>
     <td><small>
         export<br/>
-        &nbsp;&nbsp;VK_LOADER_DRIVERS_SELECT=nvidia<br/>
+        &nbsp;&nbsp;VK_LOADER_DRIVERS_SELECT=nvidia*<br/>
         <br/>
         set<br/>
-        &nbsp;&nbsp;VK_LOADER_DRIVERS_SELECT=nvidia<br/><br/>
+        &nbsp;&nbsp;VK_LOADER_DRIVERS_SELECT=nvidia*<br/><br/>
         The above would select only the Nvidia driver if it was present on the
         system and already visible to the loader.
     </small></td>
@@ -885,6 +888,54 @@
         that would normally be enabled on the system.
     </small></td>
   </tr>
+  <tr>
+  <td><small>
+    <i>VK_LOADER_LAYERS_ALLOW</i>
+    </small></td>
+    <td><small>
+        A comma-delimited list of globs to search for in known layers and
+        used to prevent layers whose layer name matches one or more of
+        the provided globs from being disabled by <i>VK_LOADER_LAYERS_DISABLE</i>.<br/>
+        Known layers are those which are found by the loader taking into account
+        default search paths and other environment variables
+        (like <i>VK_LAYER_PATH</i>).
+    </small></td>
+    <td><small>
+        This functionality is only available with Loaders built with version
+        1.3.262 of the Vulkan headers and later.<br/>
+        This will not cause layers to be enabled if the normal mechanism to
+        enable them
+    </small></td>
+    <td><small>
+        export<br/>
+        &nbsp;&nbsp;VK_LOADER_LAYERS_ALLOW=*validation*,*recon*<br/>
+        <br/>
+        set<br/>
+        &nbsp;&nbsp;VK_LOADER_LAYERS_ALLOW=*validation*,*recon*<br/><br/>
+        The above would allow any layer whose name is validation or recon to be
+        enabled regardless of the value of <i>VK_LOADER_LAYERS_DISABLE</i>.
+    </small></td>
+  </tr>
+  <tr>
+    <td><small>
+        <i>VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING</i>
+    </small></td>
+    <td><small>
+        If set to "1", causes the loader to not unload dynamic libraries during vkDestroyInstance.
+        This option allows leak sanitizers to have full stack traces.
+    </small></td>
+    <td><small>
+        This functionality is only available with Loaders built with version
+        1.3.259 of the Vulkan headers and later.<br/>
+    </small></td>
+    <td><small>
+        export<br/>
+        &nbsp;&nbsp;VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1<br/>
+        <br/>
+        set<br/>
+        &nbsp;&nbsp;VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING=1<br/><br/>
+    </small></td>
+  </tr>
 </table>
 
 <br/>
@@ -1190,4 +1241,31 @@
         for more information.
     </td>
   </tr>
+  <tr>
+    <td>Exported Function</td>
+    <td>A function which is intended to be obtained through the platform specific
+        dynamic linker, specifically from a Driver or a Layer library.
+        Functions that are required to be exported are primarily the very first
+        functions the Loader calls on a Layer or Driver library. <br/>
+    </td>
+  </tr>
+  <tr>
+    <td>Exposed Function</td>
+    <td>A function which is intended to be obtained through a Querying Function, such as
+        `vkGetInstanceProcAddr`.
+        The exact Querying Function required for a specific exposed function varies
+        between Layers and Drivers, as well as between interface versions. <br/>
+    </td>
+  </tr>
+  <tr>
+    <td>Querying Functions</td>
+    <td>These are functions which allow the Loader to query other functions from
+        drivers and layers. These functions may be in the Vulkan API but also may be
+        from the private Loader and Driver Interface or the Loader and Layer Interface. <br/>
+        These functions are:
+        `vkGetInstanceProcAddr`, `vkGetDeviceProcAddr`,
+        `vk_icdGetInstanceProcAddr`, `vk_icdGetPhysicalDeviceProcAddr`, and
+        `vk_layerGetPhysicalDeviceProcAddr`.
+    </td>
+  </tr>
 </table>
diff --git a/docs/LoaderLayerInterface.md b/docs/LoaderLayerInterface.md
index 1d0a3be..2ee6144 100644
--- a/docs/LoaderLayerInterface.md
+++ b/docs/LoaderLayerInterface.md
@@ -4,16 +4,16 @@
 [1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
 [2]: https://www.khronos.org/vulkan/
 
-# Layer Interface to the Loader
+# Layer Interface to the Loader <!-- omit from toc -->
 [![Creative Commons][3]][4]
 
-<!-- Copyright &copy; 2015-2022 LunarG, Inc. -->
+<!-- Copyright &copy; 2015-2023 LunarG, Inc. -->
 
 [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
 [4]: https://creativecommons.org/licenses/by-nd/4.0/
 
 
-## Table of Contents
+## Table of Contents <!-- omit from toc -->
 
 - [Overview](#overview)
 - [Layer Discovery](#layer-discovery)
@@ -30,6 +30,8 @@
     - [Layer Disable Filtering](#layer-disable-filtering)
     - [Layer Special Case Disable](#layer-special-case-disable)
     - [Layer Disable Warning](#layer-disable-warning)
+    - [Allow certain Layers to ignore Layer Disabling](#allow-certain-layers-to-ignore-layer-disabling)
+      - [`VK_INSTANCE_LAYERS`](#vk_instance_layers)
   - [Exception for Elevated Privileges](#exception-for-elevated-privileges)
 - [Layer Version Negotiation](#layer-version-negotiation)
 - [Layer Call Chains and Distributed Dispatch](#layer-call-chains-and-distributed-dispatch)
@@ -53,6 +55,7 @@
   - [Versioning and Activation Interactions](#versioning-and-activation-interactions)
 - [Layer Manifest File Format](#layer-manifest-file-format)
   - [Layer Manifest File Version History](#layer-manifest-file-version-history)
+  - [Layer Manifest File Version 1.2.1](#layer-manifest-file-version-121)
     - [Layer Manifest File Version 1.2.0](#layer-manifest-file-version-120)
     - [Layer Manifest File Version 1.1.2](#layer-manifest-file-version-112)
     - [Layer Manifest File Version 1.1.1](#layer-manifest-file-version-111)
@@ -504,7 +507,31 @@
 `~all~` or `~explicit~` could cause application breakage if the application is
 relying on features provided by one or more explicit layers.
 
-##### VK_INSTANCE_LAYERS
+#### Allow certain Layers to ignore Layer Disabling
+
+**NOTE:** VK_LOADER_LAYERS_DISABLE is only available with Loaders built with version
+1.3.262 of the Vulkan headers and later.
+
+The layer allow environment variable `VK_LOADER_LAYERS_ALLOW` is a
+comma-delimited list of globs to search for in known layers.
+The layer names are compared against the globs listed in the environment
+variable, and if they match, they will not be able to be disabled by
+`VK_LOADER_LAYERS_DISABLE`.
+
+Implicit layers have the ability to only be enabled when a layer specified
+environment variable is set, allow for context dependent enablement.
+`VK_LOADER_LAYERS_ENABLE` ignores that context.
+`VK_LOADER_LAYERS_ALLOW` behaves similar to `VK_LOADER_LAYERS_ENABLE` while
+also respecting the context which is normally used to determine whether an
+implicit layer should be enabled.
+
+`VK_LOADER_LAYERS_ALLOW` effectively negates the behavior of
+`VK_LOADER_LAYERS_DISABLE`.
+Explicit layers listed by `VK_LOADER_LAYERS_ALLOW` will not be enabled.
+Implicit layers listed by ``VK_LOADER_LAYERS_ALLOW` which are always active,
+i.e. they do not require any external context to be enabled, will be enabled.
+
+##### `VK_INSTANCE_LAYERS`
 
 The original `VK_INSTANCE_LAYERS` can be viewed as a special case of the new
 `VK_LOADER_LAYERS_ENABLE`.
@@ -1176,7 +1203,7 @@
 layer is disabled.
 
 The override meta-layer is primarily enabled when using the
-[VkConfig](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[VkConfig](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 tool included in the Vulkan SDK.
 It is typically only available while the VkConfig tool is actually executing.
 Please refer to that documentation for more information.
@@ -1895,7 +1922,7 @@
 #### Layer Manifest File Version 1.2.0
 
 The ability to define the layer settings as defined by the
-[layer manifest schema](https://github.com/LunarG/VulkanTools/blob/master/vkconfig_core/layers/layers_schema.json).
+[layer manifest schema](https://github.com/LunarG/VulkanTools/blob/main/vkconfig_core/layers/layers_schema.json).
 
 The ability to briefly document the layer thanks to the fields:
  * "introduction": Presentation of the purpose of the layer in a paragraph.
@@ -1905,7 +1932,7 @@
 
 These changes were made to enable third-party layers to expose their features
 within
-[Vulkan Configurator](https://github.com/LunarG/VulkanTools/blob/master/vkconfig/README.md)
+[Vulkan Configurator](https://github.com/LunarG/VulkanTools/blob/main/vkconfig/README.md)
 or other tools.
 
 #### Layer Manifest File Version 1.1.2
@@ -1994,7 +2021,7 @@
 ### Layer Interface Version 1
 
 A layer supporting interface version 1 had the following behavior:
- 1. `GetInstanceProcAddr` and `GetDeviceProcAddr` were directly exported
+ 1. `vkGetInstanceProcAddr` and `vkGetDeviceProcAddr` were directly exported
  2. The layer manifest file was able to override the names of the
 `GetInstanceProcAddr` and `GetDeviceProcAddr`functions.
 
@@ -2193,7 +2220,7 @@
     <td>A layer <b>must</b> have a valid JSON manifest file for the
         loader to process that ends with the ".json" suffix.
         It is recommended validating the layer manifest file against
-        <a href="https://github.com/LunarG/VulkanTools/blob/master/vkconfig_core/layers/layers_schema.json">
+        <a href="https://github.com/LunarG/VulkanTools/blob/main/vkconfig_core/layers/layers_schema.json">
         the layer schema</a> prior to publication.</br>
         The <b>only</b> exception is on Android which determines layer
         functionality through the introspection functions defined in
@@ -2271,7 +2298,7 @@
     <td>Yes</td>
     <td>No</td>
     <td><small>
-        <a href="https://github.com/KhronosGroup/VK-GL-CTS/blob/master/external/openglcts/README.md">
+        <a href="https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/openglcts/README.md">
         Vulkan CTS Documentation</a>
         </small>
     </td>
@@ -2473,6 +2500,22 @@
     <td>Yes</td>
     <td><small>N/A</small></td>
   </tr>
+  <tr>
+  <td><small><b>LLP_LAYER_22</b></small></td>
+    <td>During <i>vkCreateDevice</i>, a layer <b>must not</b> modify the
+        <i>pDevice</i> pointer during prior to calling down to the lower
+        layers.<br/>
+        This is because the loader passes information in this pointer that is
+        necessary for the initialization code in the loader's terminator
+        function.<br/>
+        Instead, if the layer is overriding the <i>pDevice</i> pointer, it
+        <b>must</b> do so only after the call to the lower layers returns.
+    </td>
+    <td>The loader will likely crash.</td>
+    <td>No</td>
+    <td>Yes</td>
+    <td><small>N/A</small></td>
+  </tr>
 </table>
 
 
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
index eb6032c..c6366ee 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -1,7 +1,7 @@
 # ~~~
-# Copyright (c) 2014-2021 The Khronos Group Inc.
-# Copyright (c) 2014-2021 Valve Corporation
-# Copyright (c) 2014-2021 LunarG, Inc.
+# Copyright (c) 2014-2023 The Khronos Group Inc.
+# Copyright (c) 2014-2023 Valve Corporation
+# Copyright (c) 2014-2023 LunarG, Inc.
 # Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,27 +22,6 @@
 target_include_directories(loader_specific_options INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/generated ${CMAKE_CURRENT_BINARY_DIR})
 
 if(WIN32)
-    if(MSVC)
-        # Use static MSVCRT libraries
-        foreach(configuration
-                in
-                CMAKE_C_FLAGS_DEBUG
-                CMAKE_C_FLAGS_MINSIZEREL
-                CMAKE_C_FLAGS_RELEASE
-                CMAKE_C_FLAGS_RELWITHDEBINFO
-                CMAKE_CXX_FLAGS_DEBUG
-                CMAKE_CXX_FLAGS_MINSIZEREL
-                CMAKE_CXX_FLAGS_RELEASE
-                CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-            if(${configuration} MATCHES "/MD")
-                string(REGEX
-                    REPLACE "/MD"
-                            "/MT"
-                            ${configuration}
-                            "${${configuration}}")
-            endif()
-        endforeach()
-    endif()
 
     if(ENABLE_WIN10_ONECORE)
         # Note: When linking your app or driver to OneCore.lib, be sure to remove any links to non-umbrella libs (such as
@@ -51,7 +30,6 @@
         set(CMAKE_C_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES})
     endif()
 
-    target_compile_options(loader_specific_options INTERFACE -D_CRT_SECURE_NO_WARNINGS)
     # ~~~
     # Build dev_ext_trampoline.c and unknown_ext_chain.c with /O2 to allow tail-call optimization.
     # Setup two CMake targets (loader-norm and loader-opt) for the different compilation flags.
@@ -65,27 +43,24 @@
     separate_arguments(MODIFIED_C_FLAGS_DEBUG WINDOWS_COMMAND ${MODIFIED_C_FLAGS_DEBUG})
 
     # ~~~
-    # Setup the loader.rc flie to contain the correct info
-    # Optionally uses the BUILD_DLL_VERSIONINFO build option to allow setting the exact build version
-    # Adds "Dev Build" to any build without the BUILD_DLL_VERSIONINFO option set
+    # Only generate the loader.rc file with CMake if BUILD_DLL_VERSIONINFO was set.
+    # This feature is for the Vulkan Runtime build
+    # Otherwise rely on the checked in loader.rc from the python script
     # ~~~
-    if ("$CACHE{BUILD_DLL_VERSIONINFO}" STREQUAL "")
-        # default case - use 0 as the BUILDNO
-        set(LOADER_RC_VERSION "1.0.1111.2222")
-        set(LOADER_VER_FILE_VERSION_STR "\"${LOADER_RC_VERSION}.Dev Build\"")
-        set(LOADER_VER_FILE_DESCRIPTION_STR "\"Vulkan Loader - Dev Build\"")
-    else()
+    if (NOT "$CACHE{BUILD_DLL_VERSIONINFO}" STREQUAL "")
+        string(TIMESTAMP CURRENT_YEAR "%Y")
+        set(LOADER_CUR_COPYRIGHT_YEAR "${CURRENT_YEAR}")
         set(LOADER_RC_VERSION "$CACHE{BUILD_DLL_VERSIONINFO}")
         set(LOADER_VER_FILE_VERSION_STR "\"${LOADER_RC_VERSION}\"")
         set(LOADER_VER_FILE_DESCRIPTION_STR "\"Vulkan Loader\"")
+
+        # RC file wants the value of FILEVERSION to separated by commas
+        string(REPLACE "." ", " LOADER_VER_FILE_VERSION "${LOADER_RC_VERSION}")
+
+        # Configure the file to include the versioning info
+        # Place it in the build directory - the GN build will use the checked in file
+        configure_file(loader.rc.in ${CMAKE_CURRENT_BINARY_DIR}/loader.rc)
     endif()
-
-    # RC file wants the value of FILEVERSION to separated by commas
-    string(REPLACE "." ", " LOADER_VER_FILE_VERSION "${LOADER_RC_VERSION}")
-
-    # Configure the file to include the versioning info
-    # Place it in the current directory for check-in - so the GN build has up to date info
-    configure_file(loader.rc.in ${CMAKE_CURRENT_LIST_DIR}/loader.rc)
 else()
     # Used to make alloca() and secure_getenv() available
     target_compile_definitions(loader_specific_options INTERFACE _GNU_SOURCE)
@@ -100,17 +75,29 @@
 
 set(NORMAL_LOADER_SRCS
     allocation.c
+    allocation.h
     cJSON.c
+    cJSON.h
     debug_utils.c
+    debug_utils.h
     extension_manual.c
+    extension_manual.h
     loader_environment.c
+    loader_environment.h
     gpa_helper.c
+    gpa_helper.h
     loader.c
+    loader.h
     log.c
+    log.h
+    settings.c
+    settings.h
     terminator.c
     trampoline.c
     unknown_function_handling.c
+    unknown_function_handling.h
     wsi.c
+    wsi.h
     )
 
 if(WIN32)
@@ -128,8 +115,9 @@
 set(ASM_FAILURE_MSG "${ASM_FAILURE_MSG} the stack frame for certain calls. If the compiler does not do this, then unknown device")
 set(ASM_FAILURE_MSG "${ASM_FAILURE_MSG} extensions will suffer from a corrupted stack.")
 if(WIN32)
-    if(MINGW)
-        find_program(JWASM_FOUND jwasm)
+    option(USE_MASM "Use MASM" ON)
+    if(USE_MASM AND MINGW)
+        find_program(JWASM_FOUND NAMES jwasm uasm)
         if (JWASM_FOUND)
             set(CMAKE_ASM_MASM_COMPILER ${JWASM_FOUND})
             execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE COMPILER_VERSION_OUTPUT)
@@ -137,26 +125,55 @@
                 if (COMPILER_VERSION_OUTPUT MATCHES "x86_64")
                     set(JWASM_FLAGS -win64)
                 else()
-                    set(JWASM_FLAGS -coff)
+                    # jwasm requires setting the cpu to at least 386 for setting a flat model
+                    set(JWASM_FLAGS -3 -coff)
                 endif()
             endif()
         endif()
     endif()
-    option(USE_MASM "Use MASM" ON)
     if (USE_MASM)
-      enable_language(ASM_MASM)
+        enable_language(ASM_MASM)
+    endif()
+    # Test if the detected compiler actually works.
+    # Unfortunately, CMake's detection of ASM_MASM is not reliable, so we need to do this ourselves.
+    if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+.model flat
+.code
+extrn _start:near
+    xor eax, eax
+    ret
+end
+]=])
+    else()
+        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm [=[
+.code
+extrn start:near
+    xor rax, rax
+    ret
+end
+]=])
     endif ()
-    if(CMAKE_ASM_MASM_COMPILER_WORKS OR JWASM_FOUND)
-        if(MINGW)
-            set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} ${JWASM_FLAGS})
-        elseif(NOT CMAKE_CL_64 AND NOT JWASM_FOUND)
-            set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} /safeseh)
-        endif()
-
+    if(MINGW)
+        set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} ${JWASM_FLAGS})
+    elseif(NOT CMAKE_CL_64 AND NOT JWASM_FOUND)
+        set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} /safeseh)
+    endif()
+    # try_compile does not work here due to the same reasons as static above.
+    execute_process(COMMAND ${CMAKE_ASM_MASM_COMPILER} ${CMAKE_ASM_MASM_FLAGS} -c -Fo ${CMAKE_CURRENT_BINARY_DIR}/masm_check.obj ${CMAKE_CURRENT_BINARY_DIR}/masm_check.asm
+        RESULT_VARIABLE CMAKE_ASM_MASM_COMPILER_WORKS
+        OUTPUT_QUIET ERROR_QUIET)
+    # Convert the return code to a boolean
+    if(CMAKE_ASM_MASM_COMPILER_WORKS EQUAL 0)
+        set(CMAKE_ASM_MASM_COMPILER_WORKS true)
+    else()
+        set(CMAKE_ASM_MASM_COMPILER_WORKS false)
+    endif()
+    if(CMAKE_ASM_MASM_COMPILER_WORKS)
         add_executable(asm_offset asm_offset.c)
         target_link_libraries(asm_offset PRIVATE loader_specific_options)
-        # If not cross compiling, run asm_offset to generage gen_defines.asm
-        if (NOT CMAKE_CROSSCOMPILING)
+        # If am emulator is provided (Like Wine), or running on native, run asm_offset to generate gen_defines.asm
+        if (CMAKE_CROSSCOMPILING_EMULATOR OR NOT CMAKE_CROSSCOMPILING)
             add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset MASM)
         else()
             # Forces compiler to write the intermediate asm file, needed so that we can get sizeof/offset of info out of it.
@@ -164,13 +181,13 @@
             # Force off optimization so that the output assembly includes all the necessary info - optimizer would get rid of it otherwise.
             target_compile_options(asm_offset PRIVATE /Od)
 
-            find_package(PythonInterp REQUIRED)
+            find_package(Python3 REQUIRED QUIET)
             # Run parse_asm_values.py on asm_offset's assembly file to generate the gen_defines.asm, which the asm code depends on
             add_custom_command(TARGET asm_offset POST_BUILD
-                COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/parse_asm_values.py "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm"
+                COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/scripts/parse_asm_values.py "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm"
                     "$<TARGET_FILE_DIR:asm_offset>/asm_offset.asm" "MASM" "${CMAKE_CXX_COMPILER_ID}" "${CMAKE_SYSTEM_PROCESSOR}"
                 BYPRODUCTS gen_defines.asm
-                )
+            )
         endif()
         add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
         set_target_properties(loader_asm_gen_files PROPERTIES FOLDER ${LOADER_HELPER_FOLDER})
@@ -180,18 +197,10 @@
         target_include_directories(loader-unknown-chain PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
         add_dependencies(loader-unknown-chain loader_asm_gen_files)
     else()
+        set(USE_ASSEMBLY_FALLBACK ON)
         message(WARNING "Could not find working MASM assembler\n${ASM_FAILURE_MSG}")
-        add_custom_target(loader_asm_gen_files)
-        add_library(loader-unknown-chain OBJECT unknown_ext_chain.c)
-        target_link_libraries(loader-unknown-chain loader_specific_options)
-        set_target_properties(loader-unknown-chain PROPERTIES CMAKE_C_FLAGS_DEBUG "${MODIFIED_C_FLAGS_DEBUG}")
     endif()
-elseif(APPLE)
-    # For MacOS, use the C code and force the compiler's tail-call optimization instead of using assembly code.
-    set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain.c)
-    set_source_files_properties(${OPT_LOADER_SRCS} PROPERTIES COMPILE_FLAGS -O)
-    add_custom_target(loader_asm_gen_files) # This causes no assembly files to be generated.
-else() # i.e.: Linux
+elseif(UNIX) # i.e.: Linux & Apple
     option(USE_GAS "Use GAS" ON)
     if(USE_GAS)
         enable_language(ASM)
@@ -199,7 +208,7 @@
         set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS}")
         set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
 
-        if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
+        if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64")
             try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/asm_test_aarch64.S)
             if(ASSEMBLER_WORKS)
                 set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas_aarch64.S)
@@ -236,28 +245,51 @@
             # Forces compiler to write the intermediate asm file, needed so that we can get sizeof/offset of info out of it.
             target_compile_options(asm_offset PRIVATE -save-temps=obj)
             if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+                set(ASM_OFFSET_EXECUTABLE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/gen_defines.asm")
                 set(ASM_OFFSET_INTERMEDIATE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/CMakeFiles/asm_offset.dir/asm_offset.c.s")
             elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+                set(ASM_OFFSET_EXECUTABLE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/gen_defines.asm")
                 set(ASM_OFFSET_INTERMEDIATE_LOCATION "$<TARGET_FILE_DIR:asm_offset>/CMakeFiles/asm_offset.dir/asm_offset.s")
+            elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+            # Need to use the current binary dir since the asm_offset.s file is in that folder rather than the bundle
+                set(ASM_OFFSET_EXECUTABLE_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gen_defines.asm")
+                set(ASM_OFFSET_INTERMEDIATE_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/asm_offset.dir/asm_offset.s")
+            else()
+                message(FATAL_ERROR "CXX_COMPILER_ID not supported!")
             endif()
 
-            find_package(PythonInterp REQUIRED)
+            find_package(Python3 REQUIRED QUIET)
             # Run parse_asm_values.py on asm_offset's assembly file to generate the gen_defines.asm, which the asm code depends on
             add_custom_command(TARGET asm_offset POST_BUILD
-                COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/parse_asm_values.py "$<TARGET_FILE_DIR:asm_offset>/gen_defines.asm"
+                COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/scripts/parse_asm_values.py "${ASM_OFFSET_EXECUTABLE_LOCATION}"
                     "${ASM_OFFSET_INTERMEDIATE_LOCATION}" "GAS" "${CMAKE_CXX_COMPILER_ID}" "${ASM_OFFSET_SYSTEM_PROCESSOR}"
                 BYPRODUCTS gen_defines.asm
-                )
+            )
         endif()
         add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
+
+        if (APPLE)
+            set(MODIFY_UNKNOWN_FUNCTION_DECLS ON)
+        endif()
     else()
+        set(USE_ASSEMBLY_FALLBACK ON)
         if(USE_GAS)
             message(WARNING "Could not find working ${ASM_OFFSET_SYSTEM_PROCESSOR} GAS assembler\n${ASM_FAILURE_MSG}")
         else()
             message(WARNING "Assembly sources have been disabled\n${ASM_FAILURE_MSG}")
         endif()
+    endif()
+endif()
+
+if(USE_ASSEMBLY_FALLBACK)
+    add_custom_target(loader_asm_gen_files)
+    if (MSVC)
+        add_library(loader-unknown-chain OBJECT unknown_ext_chain.c)
+        target_link_libraries(loader-unknown-chain loader_specific_options)
+        set_target_properties(loader-unknown-chain PROPERTIES CMAKE_C_FLAGS_DEBUG "${MODIFIED_C_FLAGS_DEBUG}")
+    else()
         set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain.c)
-        add_custom_target(loader_asm_gen_files)
+        set_source_files_properties(${OPT_LOADER_SRCS} PROPERTIES COMPILE_FLAGS -O)
     endif()
 endif()
 
@@ -267,19 +299,23 @@
     add_dependencies(loader-opt loader_asm_gen_files)
     set_target_properties(loader-opt PROPERTIES CMAKE_C_FLAGS_DEBUG "${MODIFIED_C_FLAGS_DEBUG}")
 
+    # If BUILD_DLL_VERSIONINFO was set, use the loader.rc in the build dir, otherwise use the checked in file
+    set(RC_FILE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/loader.rc)
+    if (NOT "$CACHE{BUILD_DLL_VERSIONINFO}" STREQUAL "")
+        set(RC_FILE_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/loader.rc)
+    endif()
+
+    set(LOADER_UNKNOWN_CHAIN_LIBRARY $<$<TARGET_EXISTS:loader-unknown-chain>:$<TARGET_OBJECTS:loader-unknown-chain>>)
+
     add_library(vulkan
                 SHARED
                 ${NORMAL_LOADER_SRCS}
-                $<TARGET_OBJECTS:loader-unknown-chain>
+                ${LOADER_UNKNOWN_CHAIN_LIBRARY}
                 ${CMAKE_CURRENT_SOURCE_DIR}/vulkan-1.def
-                ${CMAKE_CURRENT_LIST_DIR}/loader.rc)
+                ${RC_FILE_LOCATION})
 
     target_link_libraries(vulkan PRIVATE loader_specific_options loader-opt)
 
-    if (UPDATE_DEPS)
-        add_dependencies(vulkan vl_update_deps)
-    endif()
-
     # when adding the suffix the import and runtime library names must be consistent
     # mingw: libvulkan-1.dll.a / vulkan-1.dll
     # msvc: vulkan-1.lib / vulkan-1.dll
@@ -312,10 +348,16 @@
     add_dependencies(vulkan loader_asm_gen_files)
     set_target_properties(vulkan
                           PROPERTIES SOVERSION "1"
-                          VERSION ${VulkanHeaders_VERSION})
-    target_link_libraries(vulkan PRIVATE ${CMAKE_DL_LIBS} m)
-    if (NOT ANDROID)
-        target_link_libraries(vulkan PRIVATE Threads::Threads)
+                          VERSION ${VULKAN_LOADER_VERSION})
+    target_link_libraries(vulkan PRIVATE ${CMAKE_DL_LIBS} m Threads::Threads)
+
+    if (LOADER_ENABLE_ADDRESS_SANITIZER)
+        target_compile_options(vulkan PUBLIC -fsanitize=address)
+        target_link_options(vulkan PUBLIC -fsanitize=address)
+    endif()
+    if (LOADER_ENABLE_THREAD_SANITIZER)
+        target_compile_options(vulkan PUBLIC -fsanitize=thread)
+        target_link_options(vulkan PUBLIC -fsanitize=thread)
     endif()
 
     if(APPLE)
@@ -325,13 +367,8 @@
         # Build vulkan.framework
         # Use GLOB_RECURSE to find all the header files and populate the vulkan.framework headers with them
         # Use CONFIGURE_DEPENDS to ensure that if the header files are updated, this list is also updated
-        # Note: CONFIGURE_DEPENDS is a 3.12 feature - gate it for now and remove when CMake minimum version is higher
         get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES)
-        if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
-            file(GLOB_RECURSE CONFIGURE_DEPENDS FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS})
-        else()
-            file(GLOB_RECURSE FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS})
-        endif()
+        file(GLOB_RECURSE CONFIGURE_DEPENDS FRAMEWORK_HEADERS ${VulkanHeaders_INCLUDE_DIRS})
         if(BUILD_STATIC_LOADER)
             add_library(vulkan-framework STATIC ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS} ${FRAMEWORK_HEADERS})
         else()
@@ -341,17 +378,23 @@
         target_link_libraries(vulkan-framework ${CMAKE_DL_LIBS} Threads::Threads -lm "-framework CoreFoundation")
         target_link_libraries(vulkan-framework loader_specific_options)
 
+        if (MODIFY_UNKNOWN_FUNCTION_DECLS)
+            # Modifies the names of functions as they appearin the assembly code so that the
+            # unknown function handling will work
+            target_compile_definitions(vulkan PRIVATE MODIFY_UNKNOWN_FUNCTION_DECLS)
+            target_compile_definitions(vulkan-framework PRIVATE MODIFY_UNKNOWN_FUNCTION_DECLS)
+        endif()
+
         # The FRAMEWORK_VERSION needs to be "A" here so that Xcode code-signing works when a user adds their framework to an Xcode
         # project and does "Sign on Copy". It would have been nicer to use "1" to denote Vulkan 1. Although Apple docs say that a
         # framework version does not have to be "A", this part of the Apple toolchain expects it.
         # https://forums.developer.apple.com/thread/65963
 
-# cmake-format: off
         set_target_properties(vulkan-framework PROPERTIES
             OUTPUT_NAME vulkan
             FRAMEWORK TRUE
             FRAMEWORK_VERSION A
-            VERSION "${VulkanHeaders_VERSION}" # "current version"
+            VERSION "${VULKAN_LOADER_VERSION}" # "current generated version"
             SOVERSION "1.0.0"                  # "compatibility version"
             MACOSX_FRAMEWORK_IDENTIFIER com.lunarg.vulkanFramework
             PUBLIC_HEADER "${FRAMEWORK_HEADERS}"
@@ -360,62 +403,60 @@
             PUBLIC_HEADER DESTINATION vulkan
             FRAMEWORK DESTINATION loader
         )
-# cmake-format: on
     endif()
 endif()
 
+option(LOADER_USE_UNSAFE_FILE_SEARCH "Allows the loader to search in unsafe locations")
+if (LOADER_USE_UNSAFE_FILE_SEARCH)
+    target_compile_definitions(vulkan PRIVATE LOADER_USE_UNSAFE_FILE_SEARCH)
+endif()
+
 # common attributes of the vulkan library
 target_link_libraries(vulkan PRIVATE loader_specific_options)
 
-set_target_properties(vulkan ${LOADER_STANDARD_C_PROPERTIES})
+set_target_properties(vulkan PROPERTIES ${LOADER_STANDARD_C_PROPERTIES})
 if (TARGET asm_offset)
-    set_target_properties(asm_offset ${LOADER_STANDARD_C_PROPERTIES})
+    set_target_properties(asm_offset PROPERTIES ${LOADER_STANDARD_C_PROPERTIES})
 endif()
 
-# Generate pkg-config file.
-find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
-    set(VK_API_VERSION "${VulkanHeaders_VERSION}")
-    set(PRIVATE_LIBS "")
-    if (APPLE AND BUILD_STATIC_LOADER)
-        # Libs.private should only be present when building a static loader
-        foreach(LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
-            list(APPEND PRIVATE_LIBS "-l${LIB}")
-        endforeach()
-        list(REMOVE_DUPLICATES PRIVATE_LIBS)
-        set(PRIVATE_LIBS "Libs.private: ${PRIVATE_LIBS}")
-    endif()
+target_link_libraries(vulkan PRIVATE Vulkan::Headers)
+add_library(Vulkan::Loader ALIAS vulkan)
+
+if (APPLE AND BUILD_STATIC_LOADER)
+    # When exporting a static library all linked libraries - private or not - need to be exported.
+    message(NOTICE "vulkan.pc and VulkanLoaderConfig.cmake not generated for STATIC Apple builds!")
+    return()
+endif()
+
+# Generate CMake Configuration File (IE: VulkanLoaderConfig.cmake)
+install(TARGETS vulkan EXPORT VulkanLoaderConfig)
+set_target_properties(vulkan PROPERTIES EXPORT_NAME "Loader")
+install(EXPORT VulkanLoaderConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/VulkanLoader NAMESPACE Vulkan::)
+
+# Generate PkgConfig File (IE: vulkan.pc)
+# NOTE: Hopefully in the future CMake can generate .pc files natively.
+# https://gitlab.kitware.com/cmake/cmake/-/issues/22621
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
     if(WIN32)
         if(MINGW)
             set(VULKAN_LIB_SUFFIX "-1.dll")
         else()
             set(VULKAN_LIB_SUFFIX "-1")
         endif()
-        # Set libdir path as in cmake's FindVulkan.cmake
-        # https://github.com/KhronosGroup/Vulkan-Loader/issues/668
-        if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-            string(REPLACE "lib" "Lib" CMAKE_INSTALL_FULL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR})
-        else()
-            string(REPLACE "lib" "Lib32" CMAKE_INSTALL_FULL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR})
-        endif()
-    else()
-        set(CMAKE_INSTALL_FULL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR})
-    endif ()
+    endif()
+
+    # BUG: The following code will NOT work well with `cmake --install ... --prefix <dir>`
+    # due to this code relying on CMAKE_INSTALL_PREFIX being defined at configure time.
+    #
+    # NOTE: vulkan.pc essentially cover both Vulkan-Loader and Vulkan-Headers for legacy reasons.
     if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
-        set(CMAKE_INSTALL_REL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR_PC})
-        set(CMAKE_INSTALL_REL_INCLUDEDIR_PC ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+        set(CMAKE_INSTALL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR})
+        set(CMAKE_INSTALL_INCLUDEDIR_PC ${CMAKE_INSTALL_FULL_INCLUDEDIR})
     else()
-        file(RELATIVE_PATH CMAKE_INSTALL_REL_LIBDIR_PC ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR_PC})
-        file(RELATIVE_PATH CMAKE_INSTALL_REL_INCLUDEDIR_PC ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_INCLUDEDIR})
+        file(RELATIVE_PATH CMAKE_INSTALL_LIBDIR_PC ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR})
+        file(RELATIVE_PATH CMAKE_INSTALL_INCLUDEDIR_PC ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_INCLUDEDIR})
     endif()
     configure_file("vulkan.pc.in" "vulkan.pc" @ONLY)
     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vulkan.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
 endif()
-
-target_link_libraries(vulkan PRIVATE Vulkan::Headers)
-add_library(Vulkan::Vulkan ALIAS vulkan)
-
-install(TARGETS vulkan
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/loader/asm_offset.c b/loader/asm_offset.c
index 248d8fb..f99ff56 100644
--- a/loader/asm_offset.c
+++ b/loader/asm_offset.c
@@ -22,6 +22,12 @@
 
 // This code generates an assembly file which provides offsets to get struct members from assembly code.
 
+// __USE_MINGW_ANSI_STDIO is needed to use the %zu format specifier with mingw-w64.
+// Otherwise the compiler will complain about an unknown format specifier.
+#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO)
+#define __USE_MINGW_ANSI_STDIO 1
+#endif
+
 #include <stdio.h>
 #include "loader_common.h"
 #include "log.h"
@@ -54,12 +60,16 @@
 static const uint32_t INSTANCE_OFFSET_ICD_TERM = offsetof(struct loader_icd_term, this_instance);
 static const uint32_t DISPATCH_OFFSET_ICD_TERM = offsetof(struct loader_icd_term, phys_dev_ext);
 static const uint32_t EXT_OFFSET_DEVICE_DISPATCH = offsetof(struct loader_dev_dispatch_table, ext_dispatch);
+#else
+#warning asm_offset.c variable declarations need to be defined for this platform
 #endif
 
 #if !defined(_MSC_VER) || (_MSC_VER >= 1900)
 #define SIZE_T_FMT "%-8zu"
-#else
+#elif defined(__GNUC__) || defined(__clang__)
 #define SIZE_T_FMT "%-8lu"
+#else
+#warning asm_offset.c SIZE_T_FMT must be defined for this platform
 #endif
 
 struct ValueInfo {
@@ -110,7 +120,7 @@
         // clang-format on
     };
 
-    FILE *file = fopen("gen_defines.asm", "w");
+    FILE *file = loader_fopen("gen_defines.asm", "w");
     fprintf(file, "\n");
     if (!strcmp(assembler, "MASM")) {
         for (size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i) {
diff --git a/loader/cJSON.c b/loader/cJSON.c
index 6368f21..256cd94 100644
--- a/loader/cJSON.c
+++ b/loader/cJSON.c
@@ -27,6 +27,7 @@
 /* JSON parser in C. */
 
 #include <ctype.h>
+#include <fcntl.h>
 #include <float.h>
 #include <limits.h>
 #include <math.h>
@@ -37,18 +38,27 @@
 #include "cJSON.h"
 
 #include "allocation.h"
+#include "loader.h"
+#include "log.h"
 
-void *cJSON_malloc(const VkAllocationCallbacks *pAllocator, size_t size) {
-    return loader_alloc(pAllocator, size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+static void *cJSON_malloc(const VkAllocationCallbacks *pAllocator, size_t size) {
+    return loader_calloc(pAllocator, size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
 }
 
-void cJSON_Free(const VkAllocationCallbacks *pAllocator, void *pMemory) { loader_free(pAllocator, pMemory); }
+static void *cJSON_malloc_instance_scope(const VkAllocationCallbacks *pAllocator, size_t size) {
+    return loader_calloc(pAllocator, size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+}
 
+static void cJSON_Free(const VkAllocationCallbacks *pAllocator, void *pMemory) { loader_free(pAllocator, pMemory); }
+
+/*
+// commented out as it is unused - static error code channel requires external locks to be used.
 static const char *ep;
 
 const char *cJSON_GetErrorPtr(void) { return ep; }
+*/
 
-char *cJSON_strdup(const VkAllocationCallbacks *pAllocator, const char *str) {
+static char *cJSON_strdup(const VkAllocationCallbacks *pAllocator, const char *str) {
     size_t len;
     char *copy;
 
@@ -60,7 +70,7 @@
 }
 
 /* Internal constructor. */
-cJSON *cJSON_New_Item(const VkAllocationCallbacks *pAllocator) {
+static cJSON *cJSON_New_Item(const VkAllocationCallbacks *pAllocator) {
     cJSON *node = (cJSON *)cJSON_malloc(pAllocator, sizeof(cJSON));
     if (node) {
         memset(node, 0, sizeof(cJSON));
@@ -70,11 +80,11 @@
 }
 
 /* Delete a cJSON structure. */
-void cJSON_Delete(cJSON *c) {
+void loader_cJSON_Delete(cJSON *c) {
     cJSON *next;
     while (c) {
         next = c->next;
-        if (!(c->type & cJSON_IsReference) && c->child) cJSON_Delete(c->child);
+        if (!(c->type & cJSON_IsReference) && c->child) loader_cJSON_Delete(c->child);
         if (!(c->type & cJSON_IsReference) && c->valuestring) cJSON_Free(c->pAllocator, c->valuestring);
         if (!(c->type & cJSON_StringIsConst) && c->string) cJSON_Free(c->pAllocator, c->string);
         cJSON_Free(c->pAllocator, c);
@@ -84,7 +94,7 @@
 
 /* Parse the input text to generate a number, and populate the result into item.
  */
-const char *parse_number(cJSON *item, const char *num) {
+static const char *parse_number(cJSON *item, const char *num) {
     double n = 0, sign = 1, scale = 0;
     int subscale = 0, signsubscale = 1;
 
@@ -118,7 +128,7 @@
     return num;
 }
 
-size_t pow2gt(size_t x) {
+static size_t pow2gt(size_t x) {
     --x;
     x |= x >> 1;
     x |= x >> 2;
@@ -134,7 +144,7 @@
     size_t offset;
 } printbuffer;
 
-char *ensure(const VkAllocationCallbacks *pAllocator, printbuffer *p, size_t needed) {
+static char *ensure(const VkAllocationCallbacks *pAllocator, printbuffer *p, size_t needed) {
     char *newbuffer;
     size_t newsize;
     if (!p || !p->buffer) return 0;
@@ -155,7 +165,7 @@
     return newbuffer + p->offset;
 }
 
-size_t cJSON_update(printbuffer *p) {
+static size_t cJSON_update(printbuffer *p) {
     char *str;
     if (!p || !p->buffer) return 0;
     str = p->buffer + p->offset;
@@ -163,7 +173,7 @@
 }
 
 /* Render the number nicely from the given item into a string. */
-char *print_number(cJSON *item, printbuffer *p) {
+static char *print_number(cJSON *item, printbuffer *p) {
     char *str = 0;
     size_t str_buf_size;
     double d = item->valuedouble;
@@ -173,7 +183,7 @@
             str = ensure(item->pAllocator, p, str_buf_size);
         else
             str = (char *)cJSON_malloc(item->pAllocator, str_buf_size);
-        if (str) strcpy(str, "0");
+        if (str) loader_strncpy(str, str_buf_size, "0", 2);
     } else if (fabs(((double)item->valueint) - d) <= DBL_EPSILON && d <= INT_MAX && d >= INT_MIN) {
         str_buf_size = 21; /* 2^64+1 can be represented in 21 chars. */
         if (p)
@@ -199,7 +209,7 @@
     return str;
 }
 
-unsigned parse_hex4(const char *str) {
+static unsigned parse_hex4(const char *str) {
     unsigned h = 0;
     if (*str >= '0' && *str <= '9')
         h += (*str) - '0';
@@ -244,14 +254,14 @@
 
 /* Parse the input text into an unescaped cstring, and populate item. */
 static const unsigned char firstByteMark[7] = {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC};
-const char *parse_string(cJSON *item, const char *str) {
+static const char *parse_string(cJSON *item, const char *str) {
     const char *ptr = str + 1;
     char *ptr2;
     char *out;
     int len = 0;
     unsigned uc, uc2;
     if (*str != '\"') {
-        ep = str;
+        // ep = str; // commented out as it is unused
         return 0;
     } /* not a string! */
 
@@ -333,7 +343,7 @@
 }
 
 /* Render the cstring provided to an escaped version that can be printed. */
-char *print_string_ptr(const VkAllocationCallbacks *pAllocator, const char *str, printbuffer *p) {
+static char *print_string_ptr(const VkAllocationCallbacks *pAllocator, const char *str, printbuffer *p) {
     const char *ptr;
     char *ptr2;
     char *out;
@@ -343,17 +353,18 @@
     for (ptr = str; *ptr; ptr++) flag |= ((*ptr > 0 && *ptr < 32) || (*ptr == '\"') || (*ptr == '\\')) ? 1 : 0;
     if (!flag) {
         len = ptr - str;
-        out_buf_size = len + 3;
+        out_buf_size = len + 1;
+        // out_buf_size = len + 3; // Modified to not put quotes around the string
         if (p)
             out = ensure(pAllocator, p, out_buf_size);
         else
-            out = (char *)cJSON_malloc(pAllocator, out_buf_size);
+            out = (char *)cJSON_malloc_instance_scope(pAllocator, out_buf_size);
         if (!out) return 0;
         ptr2 = out;
-        *ptr2++ = '\"';
-        strcpy(ptr2, str);
-        ptr2[len] = '\"';
-        ptr2[len + 1] = 0;
+        // *ptr2++ = '\"'; // Modified to not put quotes around the string
+        loader_strncpy(ptr2, out_buf_size, str, out_buf_size);
+        // ptr2[len] = '\"'; // Modified to not put quotes around the string
+        ptr2[len] = 0;  // ptr2[len + 1] = 0; // Modified to not put quotes around the string
         return out;
     }
 
@@ -362,9 +373,9 @@
         if (p)
             out = ensure(pAllocator, p, out_buf_size);
         else
-            out = (char *)cJSON_malloc(pAllocator, out_buf_size);
+            out = (char *)cJSON_malloc_instance_scope(pAllocator, out_buf_size);
         if (!out) return 0;
-        strcpy(out, "\"\"");
+        loader_strncpy(out, out_buf_size, "\"\"", 3);
         return out;
     }
     ptr = str;
@@ -378,16 +389,17 @@
         token = *ptr;
     }
 
-    out_buf_size = len + 3;
+    out_buf_size = len + 1;
+    // out_buf_size = len + 3; // Modified to not put quotes around the string
     if (p)
         out = ensure(pAllocator, p, out_buf_size);
     else
-        out = (char *)cJSON_malloc(pAllocator, out_buf_size);
+        out = (char *)cJSON_malloc_instance_scope(pAllocator, out_buf_size);
     if (!out) return 0;
 
     ptr2 = out;
     ptr = str;
-    *ptr2++ = '\"';
+    // *ptr2++ = '\"'; // Modified to not put quotes around the string
     while (*ptr) {
         if ((unsigned char)*ptr > 31 && *ptr != '\"' && *ptr != '\\')
             *ptr2++ = *ptr++;
@@ -421,38 +433,38 @@
             }
         }
     }
-    *ptr2++ = '\"';
+    // *ptr2++ = '\"'; // Modified to not put quotes around the string
     *ptr2++ = 0;
     return out;
 }
 /* Invoke print_string_ptr (which is useful) on an item. */
-char *print_string(cJSON *item, printbuffer *p) { return print_string_ptr(item->pAllocator, item->valuestring, p); }
+static char *print_string(cJSON *item, printbuffer *p) { return print_string_ptr(item->pAllocator, item->valuestring, p); }
 
 /* Predeclare these prototypes. */
-const char *parse_value(cJSON *item, const char *value);
-char *print_value(cJSON *item, int depth, int fmt, printbuffer *p);
-const char *parse_array(cJSON *item, const char *value);
-char *print_array(cJSON *item, int depth, int fmt, printbuffer *p);
-const char *parse_object(cJSON *item, const char *value);
-char *print_object(cJSON *item, int depth, int fmt, printbuffer *p);
+static const char *parse_value(cJSON *item, const char *value);
+static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p);
+static const char *parse_array(cJSON *item, const char *value);
+static char *print_array(cJSON *item, int depth, int fmt, printbuffer *p);
+static const char *parse_object(cJSON *item, const char *value);
+static char *print_object(cJSON *item, int depth, int fmt, printbuffer *p);
 
 /* Utility to jump whitespace and cr/lf */
-const char *skip(const char *in) {
+static const char *skip(const char *in) {
     while (in && *in && (unsigned char)*in <= 32) in++;
     return in;
 }
 
 /* Parse an object - create a new root, and populate. */
-cJSON *cJSON_ParseWithOpts(const VkAllocationCallbacks *pAllocator, const char *value, const char **return_parse_end,
-                           int require_null_terminated) {
+static cJSON *cJSON_ParseWithOpts(const VkAllocationCallbacks *pAllocator, const char *value, const char **return_parse_end,
+                                  int require_null_terminated) {
     const char *end = 0;
     cJSON *c = cJSON_New_Item(pAllocator);
-    ep = 0;
+    // ep = 0; // commented out as it is unused
     if (!c) return 0; /* memory fail */
 
     end = parse_value(c, skip(value));
     if (!end) {
-        cJSON_Delete(c);
+        loader_cJSON_Delete(c);
         return 0;
     } /* parse failure. ep is set. */
 
@@ -461,8 +473,8 @@
     if (require_null_terminated) {
         end = skip(end);
         if (*end) {
-            cJSON_Delete(c);
-            ep = end;
+            loader_cJSON_Delete(c);
+            // ep = end; // commented out as it is unused
             return 0;
         }
     }
@@ -470,24 +482,16 @@
     return c;
 }
 /* Default options for cJSON_Parse */
-cJSON *cJSON_Parse(const VkAllocationCallbacks *pAllocator, const char *value) {
+static cJSON *cJSON_Parse(const VkAllocationCallbacks *pAllocator, const char *value) {
     return cJSON_ParseWithOpts(pAllocator, value, 0, 0);
 }
 
 /* Render a cJSON item/entity/structure to text. */
-char *cJSON_Print(cJSON *item) { return print_value(item, 0, 1, 0); }
-char *cJSON_PrintUnformatted(cJSON *item) { return print_value(item, 0, 0, 0); }
-
-char *cJSON_PrintBuffered(cJSON *item, int prebuffer, int fmt) {
-    printbuffer p;
-    p.buffer = (char *)cJSON_malloc(item->pAllocator, prebuffer);
-    p.length = prebuffer;
-    p.offset = 0;
-    return print_value(item, 0, fmt, &p);
-}
+char *loader_cJSON_Print(cJSON *item) { return print_value(item, 0, 1, 0); }
+char *loader_cJSON_PrintUnformatted(cJSON *item) { return print_value(item, 0, 0, 0); }
 
 /* Parser core - when encountering text, process appropriately. */
-const char *parse_value(cJSON *item, const char *value) {
+static const char *parse_value(cJSON *item, const char *value) {
     if (!value) return 0; /* Fail on null. */
     if (!strncmp(value, "null", 4)) {
         item->type = cJSON_NULL;
@@ -515,29 +519,29 @@
         return parse_object(item, value);
     }
 
-    ep = value;
+    // ep = value; // commented out as it is unused
     return 0; /* failure. */
 }
 
 /* Render a value to text. */
-char *print_value(cJSON *item, int depth, int fmt, printbuffer *p) {
+static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p) {
     char *out = 0;
     if (!item) return 0;
     if (p) {
         switch ((item->type) & 255) {
             case cJSON_NULL: {
                 out = ensure(item->pAllocator, p, 5);
-                if (out) strcpy(out, "null");
+                if (out) loader_strncpy(out, 5, "null", 5);
                 break;
             }
             case cJSON_False: {
                 out = ensure(item->pAllocator, p, 6);
-                if (out) strcpy(out, "false");
+                if (out) loader_strncpy(out, 6, "false", 6);
                 break;
             }
             case cJSON_True: {
                 out = ensure(item->pAllocator, p, 5);
-                if (out) strcpy(out, "true");
+                if (out) loader_strncpy(out, 5, "true", 5);
                 break;
             }
             case cJSON_Number:
@@ -582,10 +586,10 @@
 }
 
 /* Build an array from input text. */
-const char *parse_array(cJSON *item, const char *value) {
+static const char *parse_array(cJSON *item, const char *value) {
     cJSON *child;
     if (*value != '[') {
-        ep = value;
+        // ep = value; // commented out as it is unused
         return 0;
     } /* not an array! */
 
@@ -610,12 +614,12 @@
     }
 
     if (*value == ']') return value + 1; /* end of array */
-    ep = value;
+    // ep = value; // commented out as it is unused
     return 0; /* malformed. */
 }
 
 /* Render an array to text */
-char *print_array(cJSON *item, int depth, int fmt, printbuffer *p) {
+static char *print_array(cJSON *item, int depth, int fmt, printbuffer *p) {
     char **entries;
     char *out = 0, *ptr, *ret;
     size_t len = 5;
@@ -631,7 +635,7 @@
             out = ensure(item->pAllocator, p, 3);
         else
             out = (char *)cJSON_malloc(item->pAllocator, 3);
-        if (out) strcpy(out, "[]");
+        if (out) loader_strncpy(out, 3, "[]", 3);
         return out;
     }
 
@@ -715,10 +719,10 @@
 }
 
 /* Build an object from the text. */
-const char *parse_object(cJSON *item, const char *value) {
+static const char *parse_object(cJSON *item, const char *value) {
     cJSON *child;
     if (*value != '{') {
-        ep = value;
+        // ep = value; // commented out as it is unused
         return 0;
     } /* not an object! */
 
@@ -733,7 +737,7 @@
     child->string = child->valuestring;
     child->valuestring = 0;
     if (*value != ':') {
-        ep = value;
+        // ep = value; // commented out as it is unused
         return 0;
     }                                                  /* fail! */
     value = skip(parse_value(child, skip(value + 1))); /* skip any spacing, get the value. */
@@ -751,7 +755,7 @@
         child->string = child->valuestring;
         child->valuestring = 0;
         if (*value != ':') {
-            ep = value;
+            // ep = value; // commented out as it is unused
             return 0;
         }                                                  /* fail! */
         value = skip(parse_value(child, skip(value + 1))); /* skip any spacing, get the value. */
@@ -759,12 +763,12 @@
     }
 
     if (*value == '}') return value + 1; /* end of array */
-    ep = value;
+    // ep = value; // commented out as it is unused
     return 0; /* malformed. */
 }
 
 /* Render an object to text. */
-char *print_object(cJSON *item, int depth, int fmt, printbuffer *p) {
+static char *print_object(cJSON *item, int depth, int fmt, printbuffer *p) {
     char **entries = 0, **names = 0;
     char *out = 0, *ptr, *ret, *str;
     int j;
@@ -892,8 +896,9 @@
             ptr += tmplen;
             *ptr++ = ':';
             if (fmt) *ptr++ = '\t';
-            strcpy(ptr, entries[j]);
-            ptr += strlen(entries[j]);
+            size_t entries_size = strlen(entries[j]);
+            loader_strncpy(ptr, len - (ptr - out), entries[j], entries_size);
+            ptr += entries_size;
             if (j != numentries - 1) *ptr++ = ',';
             if (fmt) *ptr++ = '\n';
             *ptr = 0;
@@ -912,306 +917,192 @@
 }
 
 /* Get Array size/item / object item. */
-int cJSON_GetArraySize(cJSON *array) {
+int loader_cJSON_GetArraySize(cJSON *array) {
     cJSON *c = array->child;
     int i = 0;
     while (c) i++, c = c->next;
     return i;
 }
-cJSON *cJSON_GetArrayItem(cJSON *array, int item) {
+cJSON *loader_cJSON_GetArrayItem(cJSON *array, int item) {
     cJSON *c = array->child;
     while (c && item > 0) item--, c = c->next;
     return c;
 }
-cJSON *cJSON_GetObjectItem(cJSON *object, const char *string) {
+cJSON *loader_cJSON_GetObjectItem(cJSON *object, const char *string) {
     cJSON *c = object->child;
     while (c && strcmp(c->string, string)) c = c->next;
     return c;
 }
 
-/* Utility for array list handling. */
-void suffix_object(cJSON *prev, cJSON *item) {
-    prev->next = item;
-    item->prev = prev;
-}
-/* Utility for handling references. */
-cJSON *create_reference(cJSON *item) {
-    cJSON *ref = cJSON_New_Item(item->pAllocator);
-    if (!ref) return 0;
-    memcpy(ref, item, sizeof(cJSON));
-    ref->string = 0;
-    ref->type |= cJSON_IsReference;
-    ref->next = ref->prev = 0;
-    return ref;
-}
+VkResult loader_get_json(const struct loader_instance *inst, int dir_fd, const char *filename, cJSON **json) {
+    FILE *file = NULL;
+    char *json_buf = NULL;
+    size_t len;
+    VkResult res = VK_SUCCESS;
 
-/* Add item to array/object. */
-void cJSON_AddItemToArray(cJSON *array, cJSON *item) {
-    cJSON *c = array->child;
-    if (!item) return;
-    if (!c) {
-        array->child = item;
-    } else {
-        while (c && c->next) c = c->next;
-        suffix_object(c, item);
-    }
-}
-void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) {
-    if (!item) return;
-    if (item->string) cJSON_Free(object->pAllocator, item->string);
-    item->string = cJSON_strdup(object->pAllocator, string);
-    cJSON_AddItemToArray(object, item);
-}
-void cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item) {
-    if (!item) return;
-    if (!(item->type & cJSON_StringIsConst) && item->string) cJSON_Free(object->pAllocator, item->string);
-    item->string = (char *)string;
-    item->type |= cJSON_StringIsConst;
-    cJSON_AddItemToArray(object, item);
-}
-void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) { cJSON_AddItemToArray(array, create_reference(item)); }
-void cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item) {
-    cJSON_AddItemToObject(object, string, create_reference(item));
-}
+    assert(json != NULL);
 
-cJSON *cJSON_DetachItemFromArray(cJSON *array, int which) {
-    cJSON *c = array->child;
-    while (c && which > 0) c = c->next, which--;
-    if (!c) return 0;
-    if (c->prev) c->prev->next = c->next;
-    if (c->next) c->next->prev = c->prev;
-    if (c == array->child) array->child = c->next;
-    c->prev = c->next = 0;
-    return c;
-}
-void cJSON_DeleteItemFromArray(cJSON *array, int which) { cJSON_Delete(cJSON_DetachItemFromArray(array, which)); }
-cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string) {
-    int i = 0;
-    cJSON *c = object->child;
-    while (c && strcmp(c->string, string)) i++, c = c->next;
-    if (c) return cJSON_DetachItemFromArray(object, i);
-    return 0;
-}
-void cJSON_DeleteItemFromObject(cJSON *object, const char *string) { cJSON_Delete(cJSON_DetachItemFromObject(object, string)); }
+    *json = NULL;
 
-/* Replace array/object items with new ones. */
-void cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem) {
-    cJSON *c = array->child;
-    while (c && which > 0) c = c->next, which--;
-    if (!c) {
-        cJSON_AddItemToArray(array, newitem);
-        return;
-    }
-    newitem->next = c;
-    newitem->prev = c->prev;
-    c->prev = newitem;
-    if (c == array->child)
-        array->child = newitem;
-    else
-        newitem->prev->next = newitem;
-}
-void cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem) {
-    cJSON *c = array->child;
-    while (c && which > 0) c = c->next, which--;
-    if (!c) return;
-    newitem->next = c->next;
-    newitem->prev = c->prev;
-    if (newitem->next) newitem->next->prev = newitem;
-    if (c == array->child)
-        array->child = newitem;
-    else
-        newitem->prev->next = newitem;
-    c->next = c->prev = 0;
-    cJSON_Delete(c);
-}
-void cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem) {
-    int i = 0;
-    cJSON *c = object->child;
-    while (c && strcmp(c->string, string)) i++, c = c->next;
-    if (c) {
-        newitem->string = cJSON_strdup(object->pAllocator, string);
-        cJSON_ReplaceItemInArray(object, i, newitem);
-    }
-}
-
-/* Create basic types: */
-cJSON *cJSON_CreateNull(const VkAllocationCallbacks *pAllocator) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = cJSON_NULL;
-    return item;
-}
-cJSON *cJSON_CreateTrue(const VkAllocationCallbacks *pAllocator) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = cJSON_True;
-    return item;
-}
-cJSON *cJSON_CreateFalse(const VkAllocationCallbacks *pAllocator) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = cJSON_False;
-    return item;
-}
-cJSON *cJSON_CreateBool(const VkAllocationCallbacks *pAllocator, int b) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = b ? cJSON_True : cJSON_False;
-    return item;
-}
-cJSON *cJSON_CreateNumber(const VkAllocationCallbacks *pAllocator, double num) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) {
-        item->type = cJSON_Number;
-        item->valuedouble = num;
-        item->valueint = (int)num;
-    }
-    return item;
-}
-cJSON *cJSON_CreateString(const VkAllocationCallbacks *pAllocator, const char *string) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) {
-        item->type = cJSON_String;
-        item->valuestring = cJSON_strdup(pAllocator, string);
-    }
-    return item;
-}
-cJSON *cJSON_CreateArray(const VkAllocationCallbacks *pAllocator) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = cJSON_Array;
-    return item;
-}
-cJSON *cJSON_CreateObject(const VkAllocationCallbacks *pAllocator) {
-    cJSON *item = cJSON_New_Item(pAllocator);
-    if (item) item->type = cJSON_Object;
-    return item;
-}
-
-/* Create Arrays: */
-cJSON *cJSON_CreateIntArray(const VkAllocationCallbacks *pAllocator, const int *numbers, int count) {
-    int i;
-    cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(pAllocator);
-    for (i = 0; a && i < count; i++) {
-        n = cJSON_CreateNumber(pAllocator, numbers[i]);
-        if (!i)
-            a->child = n;
-        else
-            suffix_object(p, n);
-        p = n;
-    }
-    return a;
-}
-cJSON *cJSON_CreateFloatArray(const VkAllocationCallbacks *pAllocator, const float *numbers, int count) {
-    int i;
-    cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(pAllocator);
-    for (i = 0; a && i < count; i++) {
-        n = cJSON_CreateNumber(pAllocator, numbers[i]);
-        if (!i)
-            a->child = n;
-        else
-            suffix_object(p, n);
-        p = n;
-    }
-    return a;
-}
-cJSON *cJSON_CreateDoubleArray(const VkAllocationCallbacks *pAllocator, const double *numbers, int count) {
-    int i;
-    cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(pAllocator);
-    for (i = 0; a && i < count; i++) {
-        n = cJSON_CreateNumber(pAllocator, numbers[i]);
-        if (!i)
-            a->child = n;
-        else
-            suffix_object(p, n);
-        p = n;
-    }
-    return a;
-}
-cJSON *cJSON_CreateStringArray(const VkAllocationCallbacks *pAllocator, const char **strings, int count) {
-    int i;
-    cJSON *n = 0, *p = 0, *a = cJSON_CreateArray(pAllocator);
-    for (i = 0; a && i < count; i++) {
-        n = cJSON_CreateString(pAllocator, strings[i]);
-        if (!i)
-            a->child = n;
-        else
-            suffix_object(p, n);
-        p = n;
-    }
-    return a;
-}
-
-/* Duplication */
-cJSON *cJSON_Duplicate(cJSON *item, int recurse) {
-    cJSON *newitem, *cptr, *nptr = 0, *newchild;
-    /* Bail on bad ptr */
-    if (!item) return 0;
-    /* Create new item */
-    newitem = cJSON_New_Item(item->pAllocator);
-    if (!newitem) return 0;
-    /* Copy over all vars */
-    newitem->type = item->type & (~cJSON_IsReference), newitem->valueint = item->valueint, newitem->valuedouble = item->valuedouble;
-    if (item->valuestring) {
-        newitem->valuestring = cJSON_strdup(item->pAllocator, item->valuestring);
-        if (!newitem->valuestring) {
-            cJSON_Delete(newitem);
-            return 0;
-        }
-    }
-    if (item->string) {
-        newitem->string = cJSON_strdup(item->pAllocator, item->string);
-        if (!newitem->string) {
-            cJSON_Delete(newitem);
-            return 0;
-        }
-    }
-    /* If non-recursive, then we're done! */
-    if (!recurse) return newitem;
-    /* Walk the ->next chain for the child. */
-    cptr = item->child;
-    while (cptr) {
-        newchild = cJSON_Duplicate(cptr, 1); /* Duplicate (with recurse) each item in the ->next chain */
-        if (!newchild) {
-            cJSON_Delete(newitem);
-            return 0;
-        }
-        if (nptr) {
-            nptr->next = newchild, newchild->prev = nptr;
-            nptr = newchild;
-        } /* If newitem->child already set, then crosswire ->prev and ->next and
-             move on */
-        else {
-            newitem->child = newchild;
-            nptr = newchild;
-        } /* Set newitem->child and move to it */
-        cptr = cptr->next;
-    }
-    return newitem;
-}
-
-void cJSON_Minify(char *json) {
-    char *into = json;
-    while (*json) {
-        if (*json == ' ')
-            json++;
-        else if (*json == '\t')
-            json++; /* Whitespace characters. */
-        else if (*json == '\r')
-            json++;
-        else if (*json == '\n')
-            json++;
-        else if (*json == '/' && json[1] == '/')
-            while (*json && *json != '\n') json++; /* double-slash comments, to end of line. */
-        else if (*json == '/' && json[1] == '*') {
-            while (*json && !(*json == '*' && json[1] == '/')) json++;
-            json += 2;
-        } /* multiline comments. */
-        else if (*json == '\"') {
-            *into++ = *json++;
-            while (*json && *json != '\"') {
-                if (*json == '\\') *into++ = *json++;
-                *into++ = *json++;
+#if defined(_WIN32)
+    int filename_utf16_size = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
+    if (filename_utf16_size > 0) {
+        wchar_t *filename_utf16 = (wchar_t *)loader_stack_alloc(filename_utf16_size * sizeof(wchar_t));
+        if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filename_utf16, filename_utf16_size) == filename_utf16_size) {
+            errno_t wfopen_error = _wfopen_s(&file, filename_utf16, L"rb");
+            if (0 != wfopen_error) {
+                loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to open JSON file %s", filename);
             }
-            *into++ = *json++;
-        } /* string literals, which are \" sensitive. */
-        else
-            *into++ = *json++; /* All other characters. */
+        }
     }
-    *into = 0; /* and null-terminate. */
+#else
+#if !defined(__Fuchsia__)
+    assert(dir_fd < 0);
+#endif
+
+    if (dir_fd >= 0) {
+        int file_fd = openat(dir_fd, filename, O_RDONLY);
+        if (file_fd < 0) {
+            loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_get_json: Failed to open JSON file \"%s\"", filename);
+            res = VK_ERROR_INITIALIZATION_FAILED;
+            goto out;
+        }
+        file = fdopen(file_fd, "rb");
+    } else {
+#if COMMON_UNIX_PLATFORMS
+        file = fopen(filename, "rb");
+#else
+#warning fopen not available on this platform
+#endif
+    }
+#endif
+
+    if (!file) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to open JSON file %s", filename);
+        res = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+    // NOTE: We can't just use fseek(file, 0, SEEK_END) because that isn't guaranteed to be supported on all systems
+    size_t fread_ret_count = 0;
+    do {
+        char buffer[256];
+        fread_ret_count = fread(buffer, 1, 256, file);
+    } while (fread_ret_count == 256 && !feof(file));
+    len = ftell(file);
+    fseek(file, 0, SEEK_SET);
+    json_buf = (char *)loader_instance_heap_calloc(inst, len + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+    if (json_buf == NULL) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "loader_get_json: Failed to allocate space for JSON file %s buffer of length %lu", filename, len);
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+    if (fread(json_buf, sizeof(char), len, file) != len) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read JSON file %s.", filename);
+        res = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+    json_buf[len] = '\0';
+
+    // Can't be a valid json if the string is of length zero
+    if (len == 0) {
+        res = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+    // Parse text from file
+    *json = cJSON_Parse(inst ? &inst->alloc_callbacks : NULL, json_buf);
+    if (*json == NULL) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "loader_get_json: Failed to parse JSON file %s, this is usually because something ran out of memory.", filename);
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+out:
+    loader_instance_heap_free(inst, json_buf);
+    if (NULL != file) {
+        fclose(file);
+    }
+    if (res != VK_SUCCESS && *json != NULL) {
+        loader_cJSON_Delete(*json);
+        *json = NULL;
+    }
+
+    return res;
+}
+
+VkResult loader_parse_json_string_to_existing_str(const struct loader_instance *inst, cJSON *object, const char *key,
+                                                  size_t out_str_len, char *out_string) {
+    cJSON *item = loader_cJSON_GetObjectItem(object, key);
+    if (NULL == item) {
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    char *str = loader_cJSON_Print(item);
+    if (str == NULL) {
+        return VK_ERROR_OUT_OF_HOST_MEMORY;
+    }
+    if (NULL != out_string) {
+        loader_strncpy(out_string, out_str_len, str, out_str_len);
+        if (out_str_len > 0) {
+            out_string[out_str_len - 1] = '\0';
+        }
+    }
+    loader_instance_heap_free(inst, str);
+    return VK_SUCCESS;
+}
+
+VkResult loader_parse_json_string(cJSON *object, const char *key, char **out_string) {
+    cJSON *item = loader_cJSON_GetObjectItem(object, key);
+    if (NULL == item) {
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    char *str = loader_cJSON_Print(item);
+    if (str == NULL) {
+        return VK_ERROR_OUT_OF_HOST_MEMORY;
+    }
+    if (NULL != out_string) {
+        *out_string = str;
+    }
+    return VK_SUCCESS;
+}
+VkResult loader_parse_json_array_of_strings(const struct loader_instance *inst, cJSON *object, const char *key,
+                                            struct loader_string_list *string_list) {
+    VkResult res = VK_SUCCESS;
+    cJSON *item = loader_cJSON_GetObjectItem(object, key);
+    if (NULL == item) {
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    uint32_t count = loader_cJSON_GetArraySize(item);
+    if (count == 0) {
+        return VK_SUCCESS;
+    }
+
+    res = create_string_list(inst, count, string_list);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+        goto out;
+    }
+    for (uint32_t i = 0; i < count; i++) {
+        cJSON *element = loader_cJSON_GetArrayItem(item, i);
+        if (element == NULL) {
+            return VK_ERROR_INITIALIZATION_FAILED;
+        }
+        char *out_data = loader_cJSON_Print(element);
+        if (out_data == NULL) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
+        }
+        res = append_str_to_string_list(inst, string_list, out_data);
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+            goto out;
+        }
+    }
+out:
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY && NULL != string_list->list) {
+        free_string_list(inst, string_list);
+    }
+
+    return res;
 }
diff --git a/loader/cJSON.h b/loader/cJSON.h
index 9379cf8..0b24894 100644
--- a/loader/cJSON.h
+++ b/loader/cJSON.h
@@ -25,11 +25,9 @@
 
 #pragma once
 
-#include "loader_common.h"
+#include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <vulkan/vulkan_core.h>
 
 /* cJSON Types: */
 #define cJSON_False 0
@@ -64,96 +62,50 @@
     VkAllocationCallbacks *pAllocator;
 } cJSON;
 
-/* Supply a block of JSON, and this returns a cJSON object you can interrogate.
- * Call cJSON_Delete when finished. */
-cJSON *cJSON_Parse(const VkAllocationCallbacks *pAllocator, const char *value);
 /* Render a cJSON entity to text for transfer/storage. Free the char* when
  * finished. */
-char *cJSON_Print(cJSON *item);
+char *loader_cJSON_Print(cJSON *item);
 /* Render a cJSON entity to text for transfer/storage without any formatting.
  * Free the char* when finished. */
-char *cJSON_PrintUnformatted(cJSON *item);
-/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess
- * at the final size. guessing well reduces reallocation. fmt=0 gives
- * unformatted, =1 gives formatted */
-char *cJSON_PrintBuffered(cJSON *item, int prebuffer, int fmt);
+char *loader_cJSON_PrintUnformatted(cJSON *item);
 /* Delete a cJSON entity and all subentities. */
-void cJSON_Delete(cJSON *c);
-/* Delete an item allocated inside the JSON parser*/
-void cJSON_Free(const VkAllocationCallbacks *pAllocator, void *p);
+void loader_cJSON_Delete(cJSON *c);
 
 /* Returns the number of items in an array (or object). */
-int cJSON_GetArraySize(cJSON *array);
+int loader_cJSON_GetArraySize(cJSON *array);
 /* Retrieve item number "item" from array "array". Returns NULL if unsuccessful.
  */
-cJSON *cJSON_GetArrayItem(cJSON *array, int item);
+cJSON *loader_cJSON_GetArrayItem(cJSON *array, int item);
 /* Get item "string" from object. Case insensitive. */
-cJSON *cJSON_GetObjectItem(cJSON *object, const char *string);
-
-/* For analysing failed parses. This returns a pointer to the parse error.
- * You'll probably need to look a few chars back to make sense of it. Defined
- * when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */
-const char *cJSON_GetErrorPtr(void);
-
-/* These calls create a cJSON item of the appropriate type. */
-cJSON *cJSON_CreateNull(const VkAllocationCallbacks *pAllocator);
-cJSON *cJSON_CreateTrue(const VkAllocationCallbacks *pAllocator);
-cJSON *cJSON_CreateFalse(const VkAllocationCallbacks *pAllocator);
-cJSON *cJSON_CreateBool(const VkAllocationCallbacks *pAllocator, int b);
-cJSON *cJSON_CreateNumber(const VkAllocationCallbacks *pAllocator, double num);
-cJSON *cJSON_CreateString(const VkAllocationCallbacks *pAllocator, const char *string);
-cJSON *cJSON_CreateArray(const VkAllocationCallbacks *pAllocator);
-cJSON *cJSON_CreateObject(const VkAllocationCallbacks *pAllocator);
-
-/* These utilities create an Array of count items. */
-cJSON *cJSON_CreateIntArray(const VkAllocationCallbacks *pAllocator, const int *numbers, int count);
-cJSON *cJSON_CreateFloatArray(const VkAllocationCallbacks *pAllocator, const float *numbers, int count);
-cJSON *cJSON_CreateDoubleArray(const VkAllocationCallbacks *pAllocator, const double *numbers, int count);
-cJSON *cJSON_CreateStringArray(const VkAllocationCallbacks *pAllocator, const char **strings, int count);
-
-/* Append item to the specified array/object. */
-void cJSON_AddItemToArray(cJSON *array, cJSON *item);
-void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
-/* Use this when string is definitely const  (i.e. a literal, or as good as), and
- * will definitely survive the cJSON object */
-void cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item);
-/* Append reference to item to the specified array/object. Use this when you
- * want to add an existing cJSON to a new cJSON, but don't want to corrupt your
- * existing cJSON. */
-void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
-void cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item);
-
-/* Remove/Detach items from Arrays/Objects. */
-cJSON *cJSON_DetachItemFromArray(cJSON *array, int which);
-void cJSON_DeleteItemFromArray(cJSON *array, int which);
-cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string);
-void cJSON_DeleteItemFromObject(cJSON *object, const char *string);
-
-/* Update array items. */
-void cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */
-void cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
-void cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem);
-
-/* Duplicate a cJSON item */
-cJSON *cJSON_Duplicate(cJSON *item, int recurse);
-/* Duplicate will create a new, identical cJSON item to the one you pass, in new
-memory that will
-need to be released. With recurse!=0, it will duplicate any children connected
-to the item.
-The item->next and ->prev pointers are always zero on return from Duplicate. */
-
-/* ParseWithOpts allows you to require (and check) that the JSON is null
- * terminated, and to retrieve the pointer to the final byte parsed. */
-cJSON *cJSON_ParseWithOpts(const VkAllocationCallbacks *pAllocator, const char *value, const char **return_parse_end,
-                           int require_null_terminated);
-
-void cJSON_Minify(char *json);
+cJSON *loader_cJSON_GetObjectItem(cJSON *object, const char *string);
 
 /* When assigning an integer value, it needs to be propagated to valuedouble
  * too. */
 #define cJSON_SetIntValue(object, val) ((object) ? (object)->valueint = (object)->valuedouble = (val) : (val))
 #define cJSON_SetNumberValue(object, val) ((object) ? (object)->valueint = (object)->valuedouble = (val) : (val))
 
-#ifdef __cplusplus
-}
-#endif
+// Helper functions to using JSON
+
+struct loader_instance;
+struct loader_string_list;
+
+// Read a JSON file into a buffer.
+//
+// @return -  A pointer to a cJSON object representing the JSON parse tree.
+//            This returned buffer should be freed by caller.
+VkResult loader_get_json(const struct loader_instance *inst, int dir_fd, const char *filename, cJSON **json);
+
+// Given a cJSON object, find the string associated with the key and puts an pre-allocated string into out_string.
+// Length is given by out_str_len, and this function truncates the string with a null terminator if it the provided space isn't
+// large enough.
+VkResult loader_parse_json_string_to_existing_str(const struct loader_instance *inst, cJSON *object, const char *key,
+                                                  size_t out_str_len, char *out_string);
+
+// Given a cJSON object, find the string associated with the key and puts an allocated string into out_string.
+// It is the callers responsibility to free out_string.
+VkResult loader_parse_json_string(cJSON *object, const char *key, char **out_string);
+
+// Given a cJSON object, find the array of strings assocated with they key and writes the count into out_count and data into
+// out_array_of_strings. It is the callers responsibility to free out_array_of_strings.
+VkResult loader_parse_json_array_of_strings(const struct loader_instance *inst, cJSON *object, const char *key,
+                                            struct loader_string_list *string_list);
diff --git a/loader/debug_utils.c b/loader/debug_utils.c
index 620f714..bdd6331 100644
--- a/loader/debug_utils.c
+++ b/loader/debug_utils.c
@@ -27,9 +27,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifndef WIN32
+#if !defined(WIN32)
 #include <signal.h>
-#else
 #endif
 
 #include "vulkan/vk_layer.h"
@@ -66,9 +65,10 @@
     return VK_SUCCESS;
 }
 
-static VKAPI_ATTR VkResult VKAPI_CALL
-debug_utils_CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo,
-                                         const VkAllocationCallbacks *pAllocator, VkDebugUtilsMessengerEXT *pMessenger) {
+VKAPI_ATTR VkResult VKAPI_CALL debug_utils_CreateDebugUtilsMessengerEXT(VkInstance instance,
+                                                                        const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo,
+                                                                        const VkAllocationCallbacks *pAllocator,
+                                                                        VkDebugUtilsMessengerEXT *pMessenger) {
     struct loader_instance *inst = loader_get_instance(instance);
     loader_platform_thread_lock_mutex(&loader_lock);
     VkResult result = inst->disp->layer_inst_disp.CreateDebugUtilsMessengerEXT(inst->instance, pCreateInfo, pAllocator, pMessenger);
@@ -149,16 +149,17 @@
     return VK_SUCCESS;
 }
 
-static VKAPI_ATTR void VKAPI_CALL debug_utils_SubmitDebugUtilsMessageEXT(
-    VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes,
-    const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData) {
+VKAPI_ATTR void VKAPI_CALL debug_utils_SubmitDebugUtilsMessageEXT(VkInstance instance,
+                                                                  VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+                                                                  VkDebugUtilsMessageTypeFlagsEXT messageTypes,
+                                                                  const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData) {
     struct loader_instance *inst = loader_get_instance(instance);
 
     inst->disp->layer_inst_disp.SubmitDebugUtilsMessageEXT(inst->instance, messageSeverity, messageTypes, pCallbackData);
 }
 
-static VKAPI_ATTR void VKAPI_CALL debug_utils_DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger,
-                                                                            const VkAllocationCallbacks *pAllocator) {
+VKAPI_ATTR void VKAPI_CALL debug_utils_DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger,
+                                                                     const VkAllocationCallbacks *pAllocator) {
     struct loader_instance *inst = loader_get_instance(instance);
     loader_platform_thread_lock_mutex(&loader_lock);
 
@@ -308,9 +309,10 @@
     return VK_SUCCESS;
 }
 
-static VKAPI_ATTR VkResult VKAPI_CALL
-debug_utils_CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
-                                         const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback) {
+VKAPI_ATTR VkResult VKAPI_CALL debug_utils_CreateDebugReportCallbackEXT(VkInstance instance,
+                                                                        const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
+                                                                        const VkAllocationCallbacks *pAllocator,
+                                                                        VkDebugReportCallbackEXT *pCallback) {
     struct loader_instance *inst = loader_get_instance(instance);
     loader_platform_thread_lock_mutex(&loader_lock);
     VkResult result = inst->disp->layer_inst_disp.CreateDebugReportCallbackEXT(inst->instance, pCreateInfo, pAllocator, pCallback);
@@ -399,8 +401,8 @@
     return VK_SUCCESS;
 }
 
-static VKAPI_ATTR void VKAPI_CALL debug_utils_DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback,
-                                                                            const VkAllocationCallbacks *pAllocator) {
+VKAPI_ATTR void VKAPI_CALL debug_utils_DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback,
+                                                                     const VkAllocationCallbacks *pAllocator) {
     struct loader_instance *inst = loader_get_instance(instance);
     loader_platform_thread_lock_mutex(&loader_lock);
 
@@ -409,10 +411,9 @@
     loader_platform_thread_unlock_mutex(&loader_lock);
 }
 
-static VKAPI_ATTR void VKAPI_CALL debug_utils_DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags,
-                                                                    VkDebugReportObjectTypeEXT objType, uint64_t object,
-                                                                    size_t location, int32_t msgCode, const char *pLayerPrefix,
-                                                                    const char *pMsg) {
+VKAPI_ATTR void VKAPI_CALL debug_utils_DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags,
+                                                             VkDebugReportObjectTypeEXT objType, uint64_t object, size_t location,
+                                                             int32_t msgCode, const char *pLayerPrefix, const char *pMsg) {
     struct loader_instance *inst = loader_get_instance(instance);
 
     inst->disp->layer_inst_disp.DebugReportMessageEXT(inst->instance, flags, objType, object, location, msgCode, pLayerPrefix,
@@ -548,7 +549,7 @@
 
 // General utilities
 
-static const VkExtensionProperties debug_utils_extension_info[] = {
+const VkExtensionProperties debug_utils_extension_info[] = {
     {VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION},
     {VK_EXT_DEBUG_UTILS_EXTENSION_NAME, VK_EXT_DEBUG_UTILS_SPEC_VERSION},
 };
@@ -564,8 +565,8 @@
     inst->DbgFunctionHead = NULL;
 }
 
-void add_debug_extensions_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list) {
-    loader_add_to_ext_list(inst, ext_list, sizeof(debug_utils_extension_info) / sizeof(VkExtensionProperties),
+VkResult add_debug_extensions_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list) {
+    return loader_add_to_ext_list(inst, ext_list, sizeof(debug_utils_extension_info) / sizeof(VkExtensionProperties),
                            debug_utils_extension_info);
 }
 
diff --git a/loader/debug_utils.h b/loader/debug_utils.h
index dec1108..9472ef9 100644
--- a/loader/debug_utils.h
+++ b/loader/debug_utils.h
@@ -28,7 +28,7 @@
 
 // General utilities
 
-void add_debug_extensions_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list);
+VkResult add_debug_extensions_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list);
 void check_for_enabled_debug_extensions(struct loader_instance *ptr_instance, const VkInstanceCreateInfo *pCreateInfo);
 bool debug_extensions_InstanceGpa(struct loader_instance *ptr_instance, const char *name, void **addr);
 bool debug_utils_ReportFlagsToAnnotFlags(VkDebugReportFlagsEXT dr_flags, bool default_flag_is_spec,
diff --git a/loader/dev_ext_trampoline.c b/loader/dev_ext_trampoline.c
index 9605c13..ae28467 100644
--- a/loader/dev_ext_trampoline.c
+++ b/loader/dev_ext_trampoline.c
@@ -24,259 +24,266 @@
 #pragma GCC optimize(3)  // force gcc to use tail-calls
 #endif
 
+// The asm declaration prevents name mangling which is necessary for macOS
+#if defined(MODIFY_UNKNOWN_FUNCTION_DECLS)
+#define ASM_NAME(name) __asm(name)
+#else
+#define ASM_NAME(name)
+#endif
+
 // Clang-format does not understand macros.
 // clang-format off
 
-VKAPI_ATTR void VKAPI_CALL vkdev_ext0(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext1(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext2(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext3(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext4(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext5(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext6(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext7(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext8(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext9(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext10(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext11(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext12(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext13(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext14(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext15(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext16(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext17(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext18(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext19(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext20(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext21(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext22(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext23(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext24(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext25(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext26(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext27(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext28(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext29(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext30(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext31(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext32(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext33(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext34(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext35(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext36(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext37(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext38(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext39(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext40(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext41(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext42(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext43(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext44(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext45(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext46(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext47(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext48(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext49(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext50(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext51(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext52(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext53(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext54(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext55(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext56(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext57(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext58(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext59(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext60(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext61(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext62(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext63(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext64(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext65(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext66(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext67(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext68(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext69(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext70(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext71(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext72(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext73(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext74(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext75(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext76(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext77(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext78(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext79(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext80(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext81(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext82(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext83(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext84(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext85(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext86(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext87(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext88(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext89(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext90(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext91(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext92(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext93(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext94(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext95(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext96(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext97(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext98(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext99(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext100(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext101(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext102(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext103(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext104(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext105(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext106(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext107(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext108(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext109(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext110(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext111(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext112(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext113(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext114(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext115(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext116(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext117(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext118(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext119(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext120(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext121(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext122(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext123(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext124(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext125(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext126(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext127(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext128(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext129(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext130(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext131(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext132(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext133(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext134(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext135(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext136(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext137(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext138(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext139(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext140(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext141(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext142(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext143(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext144(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext145(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext146(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext147(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext148(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext149(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext150(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext151(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext152(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext153(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext154(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext155(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext156(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext157(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext158(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext159(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext160(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext161(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext162(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext163(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext164(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext165(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext166(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext167(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext168(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext169(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext170(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext171(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext172(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext173(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext174(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext175(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext176(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext177(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext178(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext179(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext180(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext181(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext182(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext183(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext184(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext185(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext186(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext187(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext188(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext189(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext190(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext191(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext192(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext193(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext194(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext195(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext196(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext197(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext198(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext199(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext200(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext201(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext202(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext203(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext204(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext205(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext206(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext207(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext208(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext209(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext210(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext211(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext212(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext213(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext214(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext215(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext216(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext217(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext218(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext219(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext220(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext221(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext222(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext223(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext224(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext225(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext226(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext227(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext228(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext229(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext230(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext231(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext232(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext233(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext234(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext235(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext236(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext237(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext238(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext239(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext240(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext241(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext242(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext243(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext244(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext245(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext246(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext247(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext248(VkDevice device);
-VKAPI_ATTR void VKAPI_CALL vkdev_ext249(VkDevice device);
+VKAPI_ATTR void VKAPI_CALL vkdev_ext0(VkDevice device) ASM_NAME("vkdev_ext0");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext1(VkDevice device) ASM_NAME("vkdev_ext1");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext2(VkDevice device) ASM_NAME("vkdev_ext2");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext3(VkDevice device) ASM_NAME("vkdev_ext3");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext4(VkDevice device) ASM_NAME("vkdev_ext4");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext5(VkDevice device) ASM_NAME("vkdev_ext5");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext6(VkDevice device) ASM_NAME("vkdev_ext6");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext7(VkDevice device) ASM_NAME("vkdev_ext7");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext8(VkDevice device) ASM_NAME("vkdev_ext8");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext9(VkDevice device) ASM_NAME("vkdev_ext9");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext10(VkDevice device) ASM_NAME("vkdev_ext10");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext11(VkDevice device) ASM_NAME("vkdev_ext11");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext12(VkDevice device) ASM_NAME("vkdev_ext12");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext13(VkDevice device) ASM_NAME("vkdev_ext13");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext14(VkDevice device) ASM_NAME("vkdev_ext14");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext15(VkDevice device) ASM_NAME("vkdev_ext15");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext16(VkDevice device) ASM_NAME("vkdev_ext16");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext17(VkDevice device) ASM_NAME("vkdev_ext17");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext18(VkDevice device) ASM_NAME("vkdev_ext18");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext19(VkDevice device) ASM_NAME("vkdev_ext19");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext20(VkDevice device) ASM_NAME("vkdev_ext20");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext21(VkDevice device) ASM_NAME("vkdev_ext21");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext22(VkDevice device) ASM_NAME("vkdev_ext22");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext23(VkDevice device) ASM_NAME("vkdev_ext23");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext24(VkDevice device) ASM_NAME("vkdev_ext24");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext25(VkDevice device) ASM_NAME("vkdev_ext25");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext26(VkDevice device) ASM_NAME("vkdev_ext26");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext27(VkDevice device) ASM_NAME("vkdev_ext27");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext28(VkDevice device) ASM_NAME("vkdev_ext28");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext29(VkDevice device) ASM_NAME("vkdev_ext29");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext30(VkDevice device) ASM_NAME("vkdev_ext30");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext31(VkDevice device) ASM_NAME("vkdev_ext31");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext32(VkDevice device) ASM_NAME("vkdev_ext32");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext33(VkDevice device) ASM_NAME("vkdev_ext33");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext34(VkDevice device) ASM_NAME("vkdev_ext34");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext35(VkDevice device) ASM_NAME("vkdev_ext35");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext36(VkDevice device) ASM_NAME("vkdev_ext36");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext37(VkDevice device) ASM_NAME("vkdev_ext37");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext38(VkDevice device) ASM_NAME("vkdev_ext38");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext39(VkDevice device) ASM_NAME("vkdev_ext39");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext40(VkDevice device) ASM_NAME("vkdev_ext40");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext41(VkDevice device) ASM_NAME("vkdev_ext41");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext42(VkDevice device) ASM_NAME("vkdev_ext42");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext43(VkDevice device) ASM_NAME("vkdev_ext43");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext44(VkDevice device) ASM_NAME("vkdev_ext44");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext45(VkDevice device) ASM_NAME("vkdev_ext45");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext46(VkDevice device) ASM_NAME("vkdev_ext46");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext47(VkDevice device) ASM_NAME("vkdev_ext47");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext48(VkDevice device) ASM_NAME("vkdev_ext48");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext49(VkDevice device) ASM_NAME("vkdev_ext49");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext50(VkDevice device) ASM_NAME("vkdev_ext50");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext51(VkDevice device) ASM_NAME("vkdev_ext51");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext52(VkDevice device) ASM_NAME("vkdev_ext52");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext53(VkDevice device) ASM_NAME("vkdev_ext53");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext54(VkDevice device) ASM_NAME("vkdev_ext54");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext55(VkDevice device) ASM_NAME("vkdev_ext55");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext56(VkDevice device) ASM_NAME("vkdev_ext56");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext57(VkDevice device) ASM_NAME("vkdev_ext57");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext58(VkDevice device) ASM_NAME("vkdev_ext58");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext59(VkDevice device) ASM_NAME("vkdev_ext59");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext60(VkDevice device) ASM_NAME("vkdev_ext60");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext61(VkDevice device) ASM_NAME("vkdev_ext61");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext62(VkDevice device) ASM_NAME("vkdev_ext62");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext63(VkDevice device) ASM_NAME("vkdev_ext63");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext64(VkDevice device) ASM_NAME("vkdev_ext64");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext65(VkDevice device) ASM_NAME("vkdev_ext65");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext66(VkDevice device) ASM_NAME("vkdev_ext66");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext67(VkDevice device) ASM_NAME("vkdev_ext67");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext68(VkDevice device) ASM_NAME("vkdev_ext68");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext69(VkDevice device) ASM_NAME("vkdev_ext69");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext70(VkDevice device) ASM_NAME("vkdev_ext70");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext71(VkDevice device) ASM_NAME("vkdev_ext71");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext72(VkDevice device) ASM_NAME("vkdev_ext72");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext73(VkDevice device) ASM_NAME("vkdev_ext73");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext74(VkDevice device) ASM_NAME("vkdev_ext74");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext75(VkDevice device) ASM_NAME("vkdev_ext75");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext76(VkDevice device) ASM_NAME("vkdev_ext76");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext77(VkDevice device) ASM_NAME("vkdev_ext77");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext78(VkDevice device) ASM_NAME("vkdev_ext78");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext79(VkDevice device) ASM_NAME("vkdev_ext79");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext80(VkDevice device) ASM_NAME("vkdev_ext80");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext81(VkDevice device) ASM_NAME("vkdev_ext81");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext82(VkDevice device) ASM_NAME("vkdev_ext82");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext83(VkDevice device) ASM_NAME("vkdev_ext83");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext84(VkDevice device) ASM_NAME("vkdev_ext84");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext85(VkDevice device) ASM_NAME("vkdev_ext85");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext86(VkDevice device) ASM_NAME("vkdev_ext86");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext87(VkDevice device) ASM_NAME("vkdev_ext87");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext88(VkDevice device) ASM_NAME("vkdev_ext88");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext89(VkDevice device) ASM_NAME("vkdev_ext89");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext90(VkDevice device) ASM_NAME("vkdev_ext90");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext91(VkDevice device) ASM_NAME("vkdev_ext91");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext92(VkDevice device) ASM_NAME("vkdev_ext92");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext93(VkDevice device) ASM_NAME("vkdev_ext93");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext94(VkDevice device) ASM_NAME("vkdev_ext94");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext95(VkDevice device) ASM_NAME("vkdev_ext95");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext96(VkDevice device) ASM_NAME("vkdev_ext96");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext97(VkDevice device) ASM_NAME("vkdev_ext97");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext98(VkDevice device) ASM_NAME("vkdev_ext98");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext99(VkDevice device) ASM_NAME("vkdev_ext99");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext100(VkDevice device) ASM_NAME("vkdev_ext100");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext101(VkDevice device) ASM_NAME("vkdev_ext101");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext102(VkDevice device) ASM_NAME("vkdev_ext102");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext103(VkDevice device) ASM_NAME("vkdev_ext103");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext104(VkDevice device) ASM_NAME("vkdev_ext104");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext105(VkDevice device) ASM_NAME("vkdev_ext105");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext106(VkDevice device) ASM_NAME("vkdev_ext106");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext107(VkDevice device) ASM_NAME("vkdev_ext107");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext108(VkDevice device) ASM_NAME("vkdev_ext108");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext109(VkDevice device) ASM_NAME("vkdev_ext109");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext110(VkDevice device) ASM_NAME("vkdev_ext110");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext111(VkDevice device) ASM_NAME("vkdev_ext111");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext112(VkDevice device) ASM_NAME("vkdev_ext112");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext113(VkDevice device) ASM_NAME("vkdev_ext113");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext114(VkDevice device) ASM_NAME("vkdev_ext114");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext115(VkDevice device) ASM_NAME("vkdev_ext115");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext116(VkDevice device) ASM_NAME("vkdev_ext116");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext117(VkDevice device) ASM_NAME("vkdev_ext117");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext118(VkDevice device) ASM_NAME("vkdev_ext118");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext119(VkDevice device) ASM_NAME("vkdev_ext119");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext120(VkDevice device) ASM_NAME("vkdev_ext120");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext121(VkDevice device) ASM_NAME("vkdev_ext121");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext122(VkDevice device) ASM_NAME("vkdev_ext122");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext123(VkDevice device) ASM_NAME("vkdev_ext123");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext124(VkDevice device) ASM_NAME("vkdev_ext124");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext125(VkDevice device) ASM_NAME("vkdev_ext125");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext126(VkDevice device) ASM_NAME("vkdev_ext126");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext127(VkDevice device) ASM_NAME("vkdev_ext127");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext128(VkDevice device) ASM_NAME("vkdev_ext128");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext129(VkDevice device) ASM_NAME("vkdev_ext129");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext130(VkDevice device) ASM_NAME("vkdev_ext130");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext131(VkDevice device) ASM_NAME("vkdev_ext131");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext132(VkDevice device) ASM_NAME("vkdev_ext132");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext133(VkDevice device) ASM_NAME("vkdev_ext133");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext134(VkDevice device) ASM_NAME("vkdev_ext134");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext135(VkDevice device) ASM_NAME("vkdev_ext135");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext136(VkDevice device) ASM_NAME("vkdev_ext136");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext137(VkDevice device) ASM_NAME("vkdev_ext137");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext138(VkDevice device) ASM_NAME("vkdev_ext138");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext139(VkDevice device) ASM_NAME("vkdev_ext139");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext140(VkDevice device) ASM_NAME("vkdev_ext140");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext141(VkDevice device) ASM_NAME("vkdev_ext141");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext142(VkDevice device) ASM_NAME("vkdev_ext142");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext143(VkDevice device) ASM_NAME("vkdev_ext143");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext144(VkDevice device) ASM_NAME("vkdev_ext144");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext145(VkDevice device) ASM_NAME("vkdev_ext145");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext146(VkDevice device) ASM_NAME("vkdev_ext146");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext147(VkDevice device) ASM_NAME("vkdev_ext147");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext148(VkDevice device) ASM_NAME("vkdev_ext148");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext149(VkDevice device) ASM_NAME("vkdev_ext149");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext150(VkDevice device) ASM_NAME("vkdev_ext150");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext151(VkDevice device) ASM_NAME("vkdev_ext151");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext152(VkDevice device) ASM_NAME("vkdev_ext152");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext153(VkDevice device) ASM_NAME("vkdev_ext153");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext154(VkDevice device) ASM_NAME("vkdev_ext154");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext155(VkDevice device) ASM_NAME("vkdev_ext155");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext156(VkDevice device) ASM_NAME("vkdev_ext156");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext157(VkDevice device) ASM_NAME("vkdev_ext157");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext158(VkDevice device) ASM_NAME("vkdev_ext158");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext159(VkDevice device) ASM_NAME("vkdev_ext159");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext160(VkDevice device) ASM_NAME("vkdev_ext160");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext161(VkDevice device) ASM_NAME("vkdev_ext161");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext162(VkDevice device) ASM_NAME("vkdev_ext162");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext163(VkDevice device) ASM_NAME("vkdev_ext163");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext164(VkDevice device) ASM_NAME("vkdev_ext164");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext165(VkDevice device) ASM_NAME("vkdev_ext165");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext166(VkDevice device) ASM_NAME("vkdev_ext166");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext167(VkDevice device) ASM_NAME("vkdev_ext167");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext168(VkDevice device) ASM_NAME("vkdev_ext168");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext169(VkDevice device) ASM_NAME("vkdev_ext169");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext170(VkDevice device) ASM_NAME("vkdev_ext170");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext171(VkDevice device) ASM_NAME("vkdev_ext171");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext172(VkDevice device) ASM_NAME("vkdev_ext172");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext173(VkDevice device) ASM_NAME("vkdev_ext173");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext174(VkDevice device) ASM_NAME("vkdev_ext174");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext175(VkDevice device) ASM_NAME("vkdev_ext175");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext176(VkDevice device) ASM_NAME("vkdev_ext176");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext177(VkDevice device) ASM_NAME("vkdev_ext177");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext178(VkDevice device) ASM_NAME("vkdev_ext178");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext179(VkDevice device) ASM_NAME("vkdev_ext179");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext180(VkDevice device) ASM_NAME("vkdev_ext180");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext181(VkDevice device) ASM_NAME("vkdev_ext181");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext182(VkDevice device) ASM_NAME("vkdev_ext182");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext183(VkDevice device) ASM_NAME("vkdev_ext183");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext184(VkDevice device) ASM_NAME("vkdev_ext184");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext185(VkDevice device) ASM_NAME("vkdev_ext185");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext186(VkDevice device) ASM_NAME("vkdev_ext186");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext187(VkDevice device) ASM_NAME("vkdev_ext187");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext188(VkDevice device) ASM_NAME("vkdev_ext188");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext189(VkDevice device) ASM_NAME("vkdev_ext189");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext190(VkDevice device) ASM_NAME("vkdev_ext190");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext191(VkDevice device) ASM_NAME("vkdev_ext191");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext192(VkDevice device) ASM_NAME("vkdev_ext192");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext193(VkDevice device) ASM_NAME("vkdev_ext193");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext194(VkDevice device) ASM_NAME("vkdev_ext194");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext195(VkDevice device) ASM_NAME("vkdev_ext195");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext196(VkDevice device) ASM_NAME("vkdev_ext196");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext197(VkDevice device) ASM_NAME("vkdev_ext197");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext198(VkDevice device) ASM_NAME("vkdev_ext198");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext199(VkDevice device) ASM_NAME("vkdev_ext199");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext200(VkDevice device) ASM_NAME("vkdev_ext200");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext201(VkDevice device) ASM_NAME("vkdev_ext201");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext202(VkDevice device) ASM_NAME("vkdev_ext202");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext203(VkDevice device) ASM_NAME("vkdev_ext203");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext204(VkDevice device) ASM_NAME("vkdev_ext204");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext205(VkDevice device) ASM_NAME("vkdev_ext205");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext206(VkDevice device) ASM_NAME("vkdev_ext206");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext207(VkDevice device) ASM_NAME("vkdev_ext207");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext208(VkDevice device) ASM_NAME("vkdev_ext208");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext209(VkDevice device) ASM_NAME("vkdev_ext209");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext210(VkDevice device) ASM_NAME("vkdev_ext210");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext211(VkDevice device) ASM_NAME("vkdev_ext211");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext212(VkDevice device) ASM_NAME("vkdev_ext212");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext213(VkDevice device) ASM_NAME("vkdev_ext213");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext214(VkDevice device) ASM_NAME("vkdev_ext214");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext215(VkDevice device) ASM_NAME("vkdev_ext215");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext216(VkDevice device) ASM_NAME("vkdev_ext216");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext217(VkDevice device) ASM_NAME("vkdev_ext217");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext218(VkDevice device) ASM_NAME("vkdev_ext218");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext219(VkDevice device) ASM_NAME("vkdev_ext219");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext220(VkDevice device) ASM_NAME("vkdev_ext220");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext221(VkDevice device) ASM_NAME("vkdev_ext221");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext222(VkDevice device) ASM_NAME("vkdev_ext222");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext223(VkDevice device) ASM_NAME("vkdev_ext223");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext224(VkDevice device) ASM_NAME("vkdev_ext224");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext225(VkDevice device) ASM_NAME("vkdev_ext225");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext226(VkDevice device) ASM_NAME("vkdev_ext226");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext227(VkDevice device) ASM_NAME("vkdev_ext227");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext228(VkDevice device) ASM_NAME("vkdev_ext228");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext229(VkDevice device) ASM_NAME("vkdev_ext229");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext230(VkDevice device) ASM_NAME("vkdev_ext230");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext231(VkDevice device) ASM_NAME("vkdev_ext231");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext232(VkDevice device) ASM_NAME("vkdev_ext232");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext233(VkDevice device) ASM_NAME("vkdev_ext233");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext234(VkDevice device) ASM_NAME("vkdev_ext234");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext235(VkDevice device) ASM_NAME("vkdev_ext235");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext236(VkDevice device) ASM_NAME("vkdev_ext236");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext237(VkDevice device) ASM_NAME("vkdev_ext237");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext238(VkDevice device) ASM_NAME("vkdev_ext238");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext239(VkDevice device) ASM_NAME("vkdev_ext239");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext240(VkDevice device) ASM_NAME("vkdev_ext240");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext241(VkDevice device) ASM_NAME("vkdev_ext241");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext242(VkDevice device) ASM_NAME("vkdev_ext242");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext243(VkDevice device) ASM_NAME("vkdev_ext243");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext244(VkDevice device) ASM_NAME("vkdev_ext244");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext245(VkDevice device) ASM_NAME("vkdev_ext245");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext246(VkDevice device) ASM_NAME("vkdev_ext246");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext247(VkDevice device) ASM_NAME("vkdev_ext247");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext248(VkDevice device) ASM_NAME("vkdev_ext248");
+VKAPI_ATTR void VKAPI_CALL vkdev_ext249(VkDevice device) ASM_NAME("vkdev_ext249");
 
 void *loader_get_dev_ext_trampoline(uint32_t index) {
     switch (index) {
diff --git a/loader/dirent_on_windows.c b/loader/dirent_on_windows.c
index 779291a..82309cb 100644
--- a/loader/dirent_on_windows.c
+++ b/loader/dirent_on_windows.c
@@ -16,7 +16,7 @@
 
 #include "allocation.h"
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -36,11 +36,12 @@
         size_t base_length = strlen(name);
         const char *all = /* search pattern must end with suitable wildcard */
             strchr("/\\", name[base_length - 1]) ? "*" : "/*";
+        size_t full_length = base_length + strlen(all) + 1;
 
         if ((dir = (DIR *)loader_alloc(pAllocator, sizeof *dir, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) != 0 &&
-            (dir->name = (char *)loader_alloc(pAllocator, base_length + strlen(all) + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) !=
-                0) {
-            strcat(strcpy(dir->name, name), all);
+            (dir->name = (char *)loader_calloc(pAllocator, full_length, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) != 0) {
+            loader_strncpy(dir->name, full_length, name, base_length);
+            loader_strncat(dir->name, full_length, all, strlen(all));
 
             if ((dir->handle = (handle_type)_findfirst(dir->name, &dir->info)) != -1) {
                 dir->result.d_name = 0;
@@ -108,7 +109,7 @@
     }
 }
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 }
 #endif
 
diff --git a/loader/dirent_on_windows.h b/loader/dirent_on_windows.h
index d11a2d4..cf55d61 100644
--- a/loader/dirent_on_windows.h
+++ b/loader/dirent_on_windows.h
@@ -12,7 +12,7 @@
 
 #include <vulkan/vulkan.h>
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 extern "C" {
 #endif
 
@@ -46,6 +46,6 @@
 
 */
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 }
 #endif
diff --git a/loader/extension_manual.c b/loader/extension_manual.c
index 50cc720..feadd6d 100644
--- a/loader/extension_manual.c
+++ b/loader/extension_manual.c
@@ -46,7 +46,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceExternalImageFormatPropertiesNV: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceExternalImageFormatPropertiesNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -92,7 +92,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceExternalImageFormatPropertiesNV: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceCapabilities2EXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -157,7 +157,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkReleaseDisplayEXT: Invalid physicalDevice [VUID-vkReleaseDisplayEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -170,7 +170,7 @@
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
 
     if (icd_term->dispatch.ReleaseDisplayEXT == NULL) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD \"%s\" associated with VkPhysicalDevice does not support vkReleaseDisplayEXT - Consequently, the call is "
                    "invalid because it should not be possible to acquire a display on this device",
                    icd_term->scanned_icd->lib_name);
@@ -181,12 +181,12 @@
 
 // ---- VK_EXT_acquire_xlib_display extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display *dpy, VkDisplayKHR display) {
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireXlibDisplayEXT: Invalid physicalDevice [VUID-vkAcquireXlibDisplayEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -217,7 +217,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRandROutputDisplayEXT: Invalid physicalDevice [VUID-vkGetRandROutputDisplayEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -247,7 +247,7 @@
 
 #endif  // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice,
                                                                         const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo,
                                                                         uint32_t *pPresentModeCount,
@@ -255,7 +255,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfacePresentModes2EXT: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -270,7 +270,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceSurfacePresentModes2EXT) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceSurfacePresentModes2EXT");
         abort();
     }
@@ -293,7 +293,7 @@
                                                                      VkDeviceGroupPresentModeFlagsKHR *pModes) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupSurfacePresentModes2EXT: Invalid device "
                    "[VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -309,14 +309,14 @@
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev ||
         NULL == dev->loader_dispatch.extension_terminator_dispatch.GetDeviceGroupSurfacePresentModes2EXT) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupSurfacePresentModes2EXT Terminator: Invalid device handle. This is likely the result of a "
                    "layer wrapping device handles and failing to unwrap them in all functions. "
                    "[VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     if (NULL == pSurfaceInfo) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupSurfacePresentModes2EXT: Invalid pSurfaceInfo pointer "
                    "[VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -342,7 +342,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceToolPropertiesEXT: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceToolPropertiesEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
diff --git a/loader/extension_manual.h b/loader/extension_manual.h
index 5c6906e..0ba63ef 100644
--- a/loader/extension_manual.h
+++ b/loader/extension_manual.h
@@ -49,7 +49,7 @@
 
 VKAPI_ATTR VkResult VKAPI_CALL terminator_ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
 
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
 
 VKAPI_ATTR VkResult VKAPI_CALL terminator_AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy,
@@ -62,7 +62,7 @@
                                                                    VkDisplayKHR* pDisplay);
 #endif  // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice,
                                                                         const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
                                                                         uint32_t* pPresentModeCount,
diff --git a/loader/generated/vk_dispatch_table_helper.h b/loader/generated/vk_dispatch_table_helper.h
deleted file mode 100644
index 6641530..0000000
--- a/loader/generated/vk_dispatch_table_helper.h
+++ /dev/null
@@ -1,1451 +0,0 @@
-#pragma once
-// *** THIS FILE IS GENERATED - DO NOT EDIT ***
-// See dispatch_helper_generator.py for modifications
-
-/*
- * Copyright (c) 2015-2021 The Khronos Group Inc.
- * Copyright (c) 2015-2021 Valve Corporation
- * Copyright (c) 2015-2021 LunarG, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
- * Author: Jon Ashburn <jon@lunarg.com>
- * Author: Mark Lobodzinski <mark@lunarg.com>
- */
-
-#include <vulkan/vulkan.h>
-#include <vulkan/vk_layer.h>
-#include <string.h>
-#include "vk_layer_dispatch_table.h"
-
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { return VK_SUCCESS; }
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { return VK_SUCCESS; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { return VK_SUCCESS; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR VkResult VKAPI_CALL StubBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { return VK_SUCCESS; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters) { return VK_SUCCESS; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR VkResult VKAPI_CALL StubUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { return VK_SUCCESS; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginRenderingKHR(VkCommandBuffer                   commandBuffer, const VkRenderingInfo*                              pRenderingInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndRenderingKHR(VkCommandBuffer                   commandBuffer) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) {  }
-static VKAPI_ATTR void VKAPI_CALL StubTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) {  }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties) { return VK_SUCCESS; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo*      pRenderPassBegin, const VkSubpassBeginInfo*      pSubpassBeginInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo*      pSubpassBeginInfo, const VkSubpassEndInfo*        pSubpassEndInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo*        pSubpassEndInfo) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubReleaseProfilingLockKHR(VkDevice device) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetFragmentShadingRateKHR(VkCommandBuffer           commandBuffer, const VkExtent2D*                           pFragmentSize, const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { return VK_SUCCESS; }
-static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }
-static VKAPI_ATTR uint64_t VKAPI_CALL StubGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }
-static VKAPI_ATTR uint64_t VKAPI_CALL StubGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { return 0L; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR uint32_t VKAPI_CALL StubGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { return 0; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutablePropertiesKHR(VkDevice                        device, const VkPipelineInfoKHR*        pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutableStatisticsKHR(VkDevice                        device, const VkPipelineExecutableInfoKHR*  pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelineExecutableInternalRepresentationsKHR(VkDevice                        device, const VkPipelineExecutableInfoKHR*  pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { return VK_SUCCESS; }
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) {  }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetEvent2KHR(VkCommandBuffer                   commandBuffer, VkEvent                                             event, const VkDependencyInfo*                             pDependencyInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdResetEvent2KHR(VkCommandBuffer                   commandBuffer, VkEvent                                             event, VkPipelineStageFlags2               stageMask) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWaitEvents2KHR(VkCommandBuffer                   commandBuffer, uint32_t                                            eventCount, const VkEvent*                     pEvents, const VkDependencyInfo*            pDependencyInfos) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdPipelineBarrier2KHR(VkCommandBuffer                   commandBuffer, const VkDependencyInfo*                             pDependencyInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteTimestamp2KHR(VkCommandBuffer                   commandBuffer, VkPipelineStageFlags2               stage, VkQueryPool                                         queryPool, uint32_t                                            query) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubQueueSubmit2KHR(VkQueue                           queue, uint32_t                            submitCount, const VkSubmitInfo2*              pSubmits, VkFence           fence) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteBufferMarker2AMD(VkCommandBuffer                   commandBuffer, VkPipelineStageFlags2               stage, VkBuffer                                            dstBuffer, VkDeviceSize                                        dstOffset, uint32_t                                            marker) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) {  }
-static VKAPI_ATTR uint32_t VKAPI_CALL StubGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { return 0; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { return VK_SUCCESS; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR void VKAPI_CALL StubCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) {  }
-static VKAPI_ATTR void VKAPI_CALL StubSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata) {  }
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubUninitializePerformanceApiINTEL(VkDevice device) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubAcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) {  }
-static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { return 0L; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) {  }
-static VKAPI_ATTR void VKAPI_CALL StubResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData) {  }
-#ifdef VK_USE_PLATFORM_METAL_EXT
-static VKAPI_ATTR void VKAPI_CALL StubExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo) {  }
-#endif // VK_USE_PLATFORM_METAL_EXT
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetFragmentShadingRateEnumNV(VkCommandBuffer           commandBuffer, VkFragmentShadingRateNV                     shadingRate, const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2EXT* pSubresource, VkSubresourceLayout2EXT* pLayout) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) {  }
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubImportSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR void VKAPI_CALL StubDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator) {  }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties) { return VK_SUCCESS; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetColorWriteEnableEXT(VkCommandBuffer       commandBuffer, uint32_t                                attachmentCount, const VkBool32*   pColorWriteEnables) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateMicromapEXT(VkDevice                                           device, const VkMicromapCreateInfoEXT*        pCreateInfo, const VkAllocationCallbacks*       pAllocator, VkMicromapEXT*                        pMicromap) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBuildMicromapsEXT(VkCommandBuffer                                    commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBuildMicromapsEXT(VkDevice                                           device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType  queryType, size_t       dataSize, void* pData, size_t stride) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetMicromapBuildSizesEXT(VkDevice                                            device, VkAccelerationStructureBuildTypeKHR                 buildType, const VkMicromapBuildInfoEXT*  pBuildInfo, VkMicromapBuildSizesInfoEXT*           pSizeInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubSetDeviceMemoryPriorityEXT(VkDevice       device, VkDeviceMemory memory, float          priority) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits  rasterizationSamples) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits  samples, const VkSampleMask*    pSampleMask) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateAccelerationStructureKHR(VkDevice                                           device, const VkAccelerationStructureCreateInfoKHR*        pCreateInfo, const VkAllocationCallbacks*       pAllocator, VkAccelerationStructureKHR*                        pAccelerationStructure) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBuildAccelerationStructuresKHR(VkCommandBuffer                                    commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer                  commandBuffer, uint32_t                                           infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress*             pIndirectDeviceAddresses, const uint32_t*                    pIndirectStrides, const uint32_t* const*             ppMaxPrimitiveCounts) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubBuildAccelerationStructuresKHR(VkDevice                                           device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType  queryType, size_t       dataSize, void* pData, size_t stride) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) {  }
-static VKAPI_ATTR VkDeviceAddress VKAPI_CALL StubGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { return 0L; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) {  }
-static VKAPI_ATTR void VKAPI_CALL StubGetAccelerationStructureBuildSizesKHR(VkDevice                                            device, VkAccelerationStructureBuildTypeKHR                 buildType, const VkAccelerationStructureBuildGeometryInfoKHR*  pBuildInfo, const uint32_t*  pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR*           pSizeInfo) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth) {  }
-static VKAPI_ATTR VkResult VKAPI_CALL StubCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { return VK_SUCCESS; }
-static VKAPI_ATTR VkResult VKAPI_CALL StubGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { return VK_SUCCESS; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) {  }
-static VKAPI_ATTR VkDeviceSize VKAPI_CALL StubGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader) { return 0L; }
-static VKAPI_ATTR void VKAPI_CALL StubCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) {  }
-static VKAPI_ATTR void VKAPI_CALL StubCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) {  }
-
-
-
-static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDispatchTable *table, PFN_vkGetDeviceProcAddr gpa) {
-    memset(table, 0, sizeof(*table));
-    table->magic = DEVICE_DISP_TABLE_MAGIC_NUMBER;
-
-    // Device function pointers
-    table->GetDeviceProcAddr = gpa;
-    table->DestroyDevice = (PFN_vkDestroyDevice) gpa(device, "vkDestroyDevice");
-    table->GetDeviceQueue = (PFN_vkGetDeviceQueue) gpa(device, "vkGetDeviceQueue");
-    table->QueueSubmit = (PFN_vkQueueSubmit) gpa(device, "vkQueueSubmit");
-    table->QueueWaitIdle = (PFN_vkQueueWaitIdle) gpa(device, "vkQueueWaitIdle");
-    table->DeviceWaitIdle = (PFN_vkDeviceWaitIdle) gpa(device, "vkDeviceWaitIdle");
-    table->AllocateMemory = (PFN_vkAllocateMemory) gpa(device, "vkAllocateMemory");
-    table->FreeMemory = (PFN_vkFreeMemory) gpa(device, "vkFreeMemory");
-    table->MapMemory = (PFN_vkMapMemory) gpa(device, "vkMapMemory");
-    table->UnmapMemory = (PFN_vkUnmapMemory) gpa(device, "vkUnmapMemory");
-    table->FlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) gpa(device, "vkFlushMappedMemoryRanges");
-    table->InvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) gpa(device, "vkInvalidateMappedMemoryRanges");
-    table->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) gpa(device, "vkGetDeviceMemoryCommitment");
-    table->BindBufferMemory = (PFN_vkBindBufferMemory) gpa(device, "vkBindBufferMemory");
-    table->BindImageMemory = (PFN_vkBindImageMemory) gpa(device, "vkBindImageMemory");
-    table->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) gpa(device, "vkGetBufferMemoryRequirements");
-    table->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) gpa(device, "vkGetImageMemoryRequirements");
-    table->GetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) gpa(device, "vkGetImageSparseMemoryRequirements");
-    table->QueueBindSparse = (PFN_vkQueueBindSparse) gpa(device, "vkQueueBindSparse");
-    table->CreateFence = (PFN_vkCreateFence) gpa(device, "vkCreateFence");
-    table->DestroyFence = (PFN_vkDestroyFence) gpa(device, "vkDestroyFence");
-    table->ResetFences = (PFN_vkResetFences) gpa(device, "vkResetFences");
-    table->GetFenceStatus = (PFN_vkGetFenceStatus) gpa(device, "vkGetFenceStatus");
-    table->WaitForFences = (PFN_vkWaitForFences) gpa(device, "vkWaitForFences");
-    table->CreateSemaphore = (PFN_vkCreateSemaphore) gpa(device, "vkCreateSemaphore");
-    table->DestroySemaphore = (PFN_vkDestroySemaphore) gpa(device, "vkDestroySemaphore");
-    table->CreateEvent = (PFN_vkCreateEvent) gpa(device, "vkCreateEvent");
-    table->DestroyEvent = (PFN_vkDestroyEvent) gpa(device, "vkDestroyEvent");
-    table->GetEventStatus = (PFN_vkGetEventStatus) gpa(device, "vkGetEventStatus");
-    table->SetEvent = (PFN_vkSetEvent) gpa(device, "vkSetEvent");
-    table->ResetEvent = (PFN_vkResetEvent) gpa(device, "vkResetEvent");
-    table->CreateQueryPool = (PFN_vkCreateQueryPool) gpa(device, "vkCreateQueryPool");
-    table->DestroyQueryPool = (PFN_vkDestroyQueryPool) gpa(device, "vkDestroyQueryPool");
-    table->GetQueryPoolResults = (PFN_vkGetQueryPoolResults) gpa(device, "vkGetQueryPoolResults");
-    table->CreateBuffer = (PFN_vkCreateBuffer) gpa(device, "vkCreateBuffer");
-    table->DestroyBuffer = (PFN_vkDestroyBuffer) gpa(device, "vkDestroyBuffer");
-    table->CreateBufferView = (PFN_vkCreateBufferView) gpa(device, "vkCreateBufferView");
-    table->DestroyBufferView = (PFN_vkDestroyBufferView) gpa(device, "vkDestroyBufferView");
-    table->CreateImage = (PFN_vkCreateImage) gpa(device, "vkCreateImage");
-    table->DestroyImage = (PFN_vkDestroyImage) gpa(device, "vkDestroyImage");
-    table->GetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) gpa(device, "vkGetImageSubresourceLayout");
-    table->CreateImageView = (PFN_vkCreateImageView) gpa(device, "vkCreateImageView");
-    table->DestroyImageView = (PFN_vkDestroyImageView) gpa(device, "vkDestroyImageView");
-    table->CreateShaderModule = (PFN_vkCreateShaderModule) gpa(device, "vkCreateShaderModule");
-    table->DestroyShaderModule = (PFN_vkDestroyShaderModule) gpa(device, "vkDestroyShaderModule");
-    table->CreatePipelineCache = (PFN_vkCreatePipelineCache) gpa(device, "vkCreatePipelineCache");
-    table->DestroyPipelineCache = (PFN_vkDestroyPipelineCache) gpa(device, "vkDestroyPipelineCache");
-    table->GetPipelineCacheData = (PFN_vkGetPipelineCacheData) gpa(device, "vkGetPipelineCacheData");
-    table->MergePipelineCaches = (PFN_vkMergePipelineCaches) gpa(device, "vkMergePipelineCaches");
-    table->CreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) gpa(device, "vkCreateGraphicsPipelines");
-    table->CreateComputePipelines = (PFN_vkCreateComputePipelines) gpa(device, "vkCreateComputePipelines");
-    table->DestroyPipeline = (PFN_vkDestroyPipeline) gpa(device, "vkDestroyPipeline");
-    table->CreatePipelineLayout = (PFN_vkCreatePipelineLayout) gpa(device, "vkCreatePipelineLayout");
-    table->DestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) gpa(device, "vkDestroyPipelineLayout");
-    table->CreateSampler = (PFN_vkCreateSampler) gpa(device, "vkCreateSampler");
-    table->DestroySampler = (PFN_vkDestroySampler) gpa(device, "vkDestroySampler");
-    table->CreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) gpa(device, "vkCreateDescriptorSetLayout");
-    table->DestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) gpa(device, "vkDestroyDescriptorSetLayout");
-    table->CreateDescriptorPool = (PFN_vkCreateDescriptorPool) gpa(device, "vkCreateDescriptorPool");
-    table->DestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) gpa(device, "vkDestroyDescriptorPool");
-    table->ResetDescriptorPool = (PFN_vkResetDescriptorPool) gpa(device, "vkResetDescriptorPool");
-    table->AllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) gpa(device, "vkAllocateDescriptorSets");
-    table->FreeDescriptorSets = (PFN_vkFreeDescriptorSets) gpa(device, "vkFreeDescriptorSets");
-    table->UpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) gpa(device, "vkUpdateDescriptorSets");
-    table->CreateFramebuffer = (PFN_vkCreateFramebuffer) gpa(device, "vkCreateFramebuffer");
-    table->DestroyFramebuffer = (PFN_vkDestroyFramebuffer) gpa(device, "vkDestroyFramebuffer");
-    table->CreateRenderPass = (PFN_vkCreateRenderPass) gpa(device, "vkCreateRenderPass");
-    table->DestroyRenderPass = (PFN_vkDestroyRenderPass) gpa(device, "vkDestroyRenderPass");
-    table->GetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) gpa(device, "vkGetRenderAreaGranularity");
-    table->CreateCommandPool = (PFN_vkCreateCommandPool) gpa(device, "vkCreateCommandPool");
-    table->DestroyCommandPool = (PFN_vkDestroyCommandPool) gpa(device, "vkDestroyCommandPool");
-    table->ResetCommandPool = (PFN_vkResetCommandPool) gpa(device, "vkResetCommandPool");
-    table->AllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) gpa(device, "vkAllocateCommandBuffers");
-    table->FreeCommandBuffers = (PFN_vkFreeCommandBuffers) gpa(device, "vkFreeCommandBuffers");
-    table->BeginCommandBuffer = (PFN_vkBeginCommandBuffer) gpa(device, "vkBeginCommandBuffer");
-    table->EndCommandBuffer = (PFN_vkEndCommandBuffer) gpa(device, "vkEndCommandBuffer");
-    table->ResetCommandBuffer = (PFN_vkResetCommandBuffer) gpa(device, "vkResetCommandBuffer");
-    table->CmdBindPipeline = (PFN_vkCmdBindPipeline) gpa(device, "vkCmdBindPipeline");
-    table->CmdSetViewport = (PFN_vkCmdSetViewport) gpa(device, "vkCmdSetViewport");
-    table->CmdSetScissor = (PFN_vkCmdSetScissor) gpa(device, "vkCmdSetScissor");
-    table->CmdSetLineWidth = (PFN_vkCmdSetLineWidth) gpa(device, "vkCmdSetLineWidth");
-    table->CmdSetDepthBias = (PFN_vkCmdSetDepthBias) gpa(device, "vkCmdSetDepthBias");
-    table->CmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) gpa(device, "vkCmdSetBlendConstants");
-    table->CmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) gpa(device, "vkCmdSetDepthBounds");
-    table->CmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) gpa(device, "vkCmdSetStencilCompareMask");
-    table->CmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) gpa(device, "vkCmdSetStencilWriteMask");
-    table->CmdSetStencilReference = (PFN_vkCmdSetStencilReference) gpa(device, "vkCmdSetStencilReference");
-    table->CmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) gpa(device, "vkCmdBindDescriptorSets");
-    table->CmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) gpa(device, "vkCmdBindIndexBuffer");
-    table->CmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) gpa(device, "vkCmdBindVertexBuffers");
-    table->CmdDraw = (PFN_vkCmdDraw) gpa(device, "vkCmdDraw");
-    table->CmdDrawIndexed = (PFN_vkCmdDrawIndexed) gpa(device, "vkCmdDrawIndexed");
-    table->CmdDrawIndirect = (PFN_vkCmdDrawIndirect) gpa(device, "vkCmdDrawIndirect");
-    table->CmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) gpa(device, "vkCmdDrawIndexedIndirect");
-    table->CmdDispatch = (PFN_vkCmdDispatch) gpa(device, "vkCmdDispatch");
-    table->CmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) gpa(device, "vkCmdDispatchIndirect");
-    table->CmdCopyBuffer = (PFN_vkCmdCopyBuffer) gpa(device, "vkCmdCopyBuffer");
-    table->CmdCopyImage = (PFN_vkCmdCopyImage) gpa(device, "vkCmdCopyImage");
-    table->CmdBlitImage = (PFN_vkCmdBlitImage) gpa(device, "vkCmdBlitImage");
-    table->CmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) gpa(device, "vkCmdCopyBufferToImage");
-    table->CmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) gpa(device, "vkCmdCopyImageToBuffer");
-    table->CmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) gpa(device, "vkCmdUpdateBuffer");
-    table->CmdFillBuffer = (PFN_vkCmdFillBuffer) gpa(device, "vkCmdFillBuffer");
-    table->CmdClearColorImage = (PFN_vkCmdClearColorImage) gpa(device, "vkCmdClearColorImage");
-    table->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) gpa(device, "vkCmdClearDepthStencilImage");
-    table->CmdClearAttachments = (PFN_vkCmdClearAttachments) gpa(device, "vkCmdClearAttachments");
-    table->CmdResolveImage = (PFN_vkCmdResolveImage) gpa(device, "vkCmdResolveImage");
-    table->CmdSetEvent = (PFN_vkCmdSetEvent) gpa(device, "vkCmdSetEvent");
-    table->CmdResetEvent = (PFN_vkCmdResetEvent) gpa(device, "vkCmdResetEvent");
-    table->CmdWaitEvents = (PFN_vkCmdWaitEvents) gpa(device, "vkCmdWaitEvents");
-    table->CmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) gpa(device, "vkCmdPipelineBarrier");
-    table->CmdBeginQuery = (PFN_vkCmdBeginQuery) gpa(device, "vkCmdBeginQuery");
-    table->CmdEndQuery = (PFN_vkCmdEndQuery) gpa(device, "vkCmdEndQuery");
-    table->CmdResetQueryPool = (PFN_vkCmdResetQueryPool) gpa(device, "vkCmdResetQueryPool");
-    table->CmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) gpa(device, "vkCmdWriteTimestamp");
-    table->CmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) gpa(device, "vkCmdCopyQueryPoolResults");
-    table->CmdPushConstants = (PFN_vkCmdPushConstants) gpa(device, "vkCmdPushConstants");
-    table->CmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) gpa(device, "vkCmdBeginRenderPass");
-    table->CmdNextSubpass = (PFN_vkCmdNextSubpass) gpa(device, "vkCmdNextSubpass");
-    table->CmdEndRenderPass = (PFN_vkCmdEndRenderPass) gpa(device, "vkCmdEndRenderPass");
-    table->CmdExecuteCommands = (PFN_vkCmdExecuteCommands) gpa(device, "vkCmdExecuteCommands");
-    table->BindBufferMemory2 = (PFN_vkBindBufferMemory2) gpa(device, "vkBindBufferMemory2");
-    table->BindImageMemory2 = (PFN_vkBindImageMemory2) gpa(device, "vkBindImageMemory2");
-    table->GetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) gpa(device, "vkGetDeviceGroupPeerMemoryFeatures");
-    table->CmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) gpa(device, "vkCmdSetDeviceMask");
-    table->CmdDispatchBase = (PFN_vkCmdDispatchBase) gpa(device, "vkCmdDispatchBase");
-    table->GetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) gpa(device, "vkGetImageMemoryRequirements2");
-    table->GetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) gpa(device, "vkGetBufferMemoryRequirements2");
-    table->GetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) gpa(device, "vkGetImageSparseMemoryRequirements2");
-    table->TrimCommandPool = (PFN_vkTrimCommandPool) gpa(device, "vkTrimCommandPool");
-    table->GetDeviceQueue2 = (PFN_vkGetDeviceQueue2) gpa(device, "vkGetDeviceQueue2");
-    table->CreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) gpa(device, "vkCreateSamplerYcbcrConversion");
-    table->DestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) gpa(device, "vkDestroySamplerYcbcrConversion");
-    table->CreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) gpa(device, "vkCreateDescriptorUpdateTemplate");
-    table->DestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) gpa(device, "vkDestroyDescriptorUpdateTemplate");
-    table->UpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) gpa(device, "vkUpdateDescriptorSetWithTemplate");
-    table->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) gpa(device, "vkGetDescriptorSetLayoutSupport");
-    table->CmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount) gpa(device, "vkCmdDrawIndirectCount");
-    table->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount) gpa(device, "vkCmdDrawIndexedIndirectCount");
-    table->CreateRenderPass2 = (PFN_vkCreateRenderPass2) gpa(device, "vkCreateRenderPass2");
-    table->CmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2) gpa(device, "vkCmdBeginRenderPass2");
-    table->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2) gpa(device, "vkCmdNextSubpass2");
-    table->CmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2) gpa(device, "vkCmdEndRenderPass2");
-    table->ResetQueryPool = (PFN_vkResetQueryPool) gpa(device, "vkResetQueryPool");
-    table->GetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue) gpa(device, "vkGetSemaphoreCounterValue");
-    table->WaitSemaphores = (PFN_vkWaitSemaphores) gpa(device, "vkWaitSemaphores");
-    table->SignalSemaphore = (PFN_vkSignalSemaphore) gpa(device, "vkSignalSemaphore");
-    table->GetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress) gpa(device, "vkGetBufferDeviceAddress");
-    table->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress) gpa(device, "vkGetBufferOpaqueCaptureAddress");
-    table->GetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddress");
-    table->CreatePrivateDataSlot = (PFN_vkCreatePrivateDataSlot) gpa(device, "vkCreatePrivateDataSlot");
-    table->DestroyPrivateDataSlot = (PFN_vkDestroyPrivateDataSlot) gpa(device, "vkDestroyPrivateDataSlot");
-    table->SetPrivateData = (PFN_vkSetPrivateData) gpa(device, "vkSetPrivateData");
-    table->GetPrivateData = (PFN_vkGetPrivateData) gpa(device, "vkGetPrivateData");
-    table->CmdSetEvent2 = (PFN_vkCmdSetEvent2) gpa(device, "vkCmdSetEvent2");
-    table->CmdResetEvent2 = (PFN_vkCmdResetEvent2) gpa(device, "vkCmdResetEvent2");
-    table->CmdWaitEvents2 = (PFN_vkCmdWaitEvents2) gpa(device, "vkCmdWaitEvents2");
-    table->CmdPipelineBarrier2 = (PFN_vkCmdPipelineBarrier2) gpa(device, "vkCmdPipelineBarrier2");
-    table->CmdWriteTimestamp2 = (PFN_vkCmdWriteTimestamp2) gpa(device, "vkCmdWriteTimestamp2");
-    table->QueueSubmit2 = (PFN_vkQueueSubmit2) gpa(device, "vkQueueSubmit2");
-    table->CmdCopyBuffer2 = (PFN_vkCmdCopyBuffer2) gpa(device, "vkCmdCopyBuffer2");
-    table->CmdCopyImage2 = (PFN_vkCmdCopyImage2) gpa(device, "vkCmdCopyImage2");
-    table->CmdCopyBufferToImage2 = (PFN_vkCmdCopyBufferToImage2) gpa(device, "vkCmdCopyBufferToImage2");
-    table->CmdCopyImageToBuffer2 = (PFN_vkCmdCopyImageToBuffer2) gpa(device, "vkCmdCopyImageToBuffer2");
-    table->CmdBlitImage2 = (PFN_vkCmdBlitImage2) gpa(device, "vkCmdBlitImage2");
-    table->CmdResolveImage2 = (PFN_vkCmdResolveImage2) gpa(device, "vkCmdResolveImage2");
-    table->CmdBeginRendering = (PFN_vkCmdBeginRendering) gpa(device, "vkCmdBeginRendering");
-    table->CmdEndRendering = (PFN_vkCmdEndRendering) gpa(device, "vkCmdEndRendering");
-    table->CmdSetCullMode = (PFN_vkCmdSetCullMode) gpa(device, "vkCmdSetCullMode");
-    table->CmdSetFrontFace = (PFN_vkCmdSetFrontFace) gpa(device, "vkCmdSetFrontFace");
-    table->CmdSetPrimitiveTopology = (PFN_vkCmdSetPrimitiveTopology) gpa(device, "vkCmdSetPrimitiveTopology");
-    table->CmdSetViewportWithCount = (PFN_vkCmdSetViewportWithCount) gpa(device, "vkCmdSetViewportWithCount");
-    table->CmdSetScissorWithCount = (PFN_vkCmdSetScissorWithCount) gpa(device, "vkCmdSetScissorWithCount");
-    table->CmdBindVertexBuffers2 = (PFN_vkCmdBindVertexBuffers2) gpa(device, "vkCmdBindVertexBuffers2");
-    table->CmdSetDepthTestEnable = (PFN_vkCmdSetDepthTestEnable) gpa(device, "vkCmdSetDepthTestEnable");
-    table->CmdSetDepthWriteEnable = (PFN_vkCmdSetDepthWriteEnable) gpa(device, "vkCmdSetDepthWriteEnable");
-    table->CmdSetDepthCompareOp = (PFN_vkCmdSetDepthCompareOp) gpa(device, "vkCmdSetDepthCompareOp");
-    table->CmdSetDepthBoundsTestEnable = (PFN_vkCmdSetDepthBoundsTestEnable) gpa(device, "vkCmdSetDepthBoundsTestEnable");
-    table->CmdSetStencilTestEnable = (PFN_vkCmdSetStencilTestEnable) gpa(device, "vkCmdSetStencilTestEnable");
-    table->CmdSetStencilOp = (PFN_vkCmdSetStencilOp) gpa(device, "vkCmdSetStencilOp");
-    table->CmdSetRasterizerDiscardEnable = (PFN_vkCmdSetRasterizerDiscardEnable) gpa(device, "vkCmdSetRasterizerDiscardEnable");
-    table->CmdSetDepthBiasEnable = (PFN_vkCmdSetDepthBiasEnable) gpa(device, "vkCmdSetDepthBiasEnable");
-    table->CmdSetPrimitiveRestartEnable = (PFN_vkCmdSetPrimitiveRestartEnable) gpa(device, "vkCmdSetPrimitiveRestartEnable");
-    table->GetDeviceBufferMemoryRequirements = (PFN_vkGetDeviceBufferMemoryRequirements) gpa(device, "vkGetDeviceBufferMemoryRequirements");
-    table->GetDeviceImageMemoryRequirements = (PFN_vkGetDeviceImageMemoryRequirements) gpa(device, "vkGetDeviceImageMemoryRequirements");
-    table->GetDeviceImageSparseMemoryRequirements = (PFN_vkGetDeviceImageSparseMemoryRequirements) gpa(device, "vkGetDeviceImageSparseMemoryRequirements");
-    table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
-    if (table->CreateSwapchainKHR == nullptr) { table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)StubCreateSwapchainKHR; }
-    table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
-    if (table->DestroySwapchainKHR == nullptr) { table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)StubDestroySwapchainKHR; }
-    table->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
-    if (table->GetSwapchainImagesKHR == nullptr) { table->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)StubGetSwapchainImagesKHR; }
-    table->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) gpa(device, "vkAcquireNextImageKHR");
-    if (table->AcquireNextImageKHR == nullptr) { table->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)StubAcquireNextImageKHR; }
-    table->QueuePresentKHR = (PFN_vkQueuePresentKHR) gpa(device, "vkQueuePresentKHR");
-    if (table->QueuePresentKHR == nullptr) { table->QueuePresentKHR = (PFN_vkQueuePresentKHR)StubQueuePresentKHR; }
-    table->GetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) gpa(device, "vkGetDeviceGroupPresentCapabilitiesKHR");
-    if (table->GetDeviceGroupPresentCapabilitiesKHR == nullptr) { table->GetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)StubGetDeviceGroupPresentCapabilitiesKHR; }
-    table->GetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) gpa(device, "vkGetDeviceGroupSurfacePresentModesKHR");
-    if (table->GetDeviceGroupSurfacePresentModesKHR == nullptr) { table->GetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)StubGetDeviceGroupSurfacePresentModesKHR; }
-    table->AcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) gpa(device, "vkAcquireNextImage2KHR");
-    if (table->AcquireNextImage2KHR == nullptr) { table->AcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)StubAcquireNextImage2KHR; }
-    table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR) gpa(device, "vkCreateSharedSwapchainsKHR");
-    if (table->CreateSharedSwapchainsKHR == nullptr) { table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)StubCreateSharedSwapchainsKHR; }
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR) gpa(device, "vkCreateVideoSessionKHR");
-    if (table->CreateVideoSessionKHR == nullptr) { table->CreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR)StubCreateVideoSessionKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->DestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR) gpa(device, "vkDestroyVideoSessionKHR");
-    if (table->DestroyVideoSessionKHR == nullptr) { table->DestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR)StubDestroyVideoSessionKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->GetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR) gpa(device, "vkGetVideoSessionMemoryRequirementsKHR");
-    if (table->GetVideoSessionMemoryRequirementsKHR == nullptr) { table->GetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR)StubGetVideoSessionMemoryRequirementsKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->BindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR) gpa(device, "vkBindVideoSessionMemoryKHR");
-    if (table->BindVideoSessionMemoryKHR == nullptr) { table->BindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR)StubBindVideoSessionMemoryKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR) gpa(device, "vkCreateVideoSessionParametersKHR");
-    if (table->CreateVideoSessionParametersKHR == nullptr) { table->CreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR)StubCreateVideoSessionParametersKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->UpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR) gpa(device, "vkUpdateVideoSessionParametersKHR");
-    if (table->UpdateVideoSessionParametersKHR == nullptr) { table->UpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR)StubUpdateVideoSessionParametersKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->DestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR) gpa(device, "vkDestroyVideoSessionParametersKHR");
-    if (table->DestroyVideoSessionParametersKHR == nullptr) { table->DestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR)StubDestroyVideoSessionParametersKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR) gpa(device, "vkCmdBeginVideoCodingKHR");
-    if (table->CmdBeginVideoCodingKHR == nullptr) { table->CmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR)StubCmdBeginVideoCodingKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR) gpa(device, "vkCmdEndVideoCodingKHR");
-    if (table->CmdEndVideoCodingKHR == nullptr) { table->CmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR)StubCmdEndVideoCodingKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR) gpa(device, "vkCmdControlVideoCodingKHR");
-    if (table->CmdControlVideoCodingKHR == nullptr) { table->CmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR)StubCmdControlVideoCodingKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR) gpa(device, "vkCmdDecodeVideoKHR");
-    if (table->CmdDecodeVideoKHR == nullptr) { table->CmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR)StubCmdDecodeVideoKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-    table->CmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR) gpa(device, "vkCmdBeginRenderingKHR");
-    if (table->CmdBeginRenderingKHR == nullptr) { table->CmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR)StubCmdBeginRenderingKHR; }
-    table->CmdEndRenderingKHR = (PFN_vkCmdEndRenderingKHR) gpa(device, "vkCmdEndRenderingKHR");
-    if (table->CmdEndRenderingKHR == nullptr) { table->CmdEndRenderingKHR = (PFN_vkCmdEndRenderingKHR)StubCmdEndRenderingKHR; }
-    table->GetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR) gpa(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR");
-    if (table->GetDeviceGroupPeerMemoryFeaturesKHR == nullptr) { table->GetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)StubGetDeviceGroupPeerMemoryFeaturesKHR; }
-    table->CmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR) gpa(device, "vkCmdSetDeviceMaskKHR");
-    if (table->CmdSetDeviceMaskKHR == nullptr) { table->CmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)StubCmdSetDeviceMaskKHR; }
-    table->CmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR) gpa(device, "vkCmdDispatchBaseKHR");
-    if (table->CmdDispatchBaseKHR == nullptr) { table->CmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)StubCmdDispatchBaseKHR; }
-    table->TrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR) gpa(device, "vkTrimCommandPoolKHR");
-    if (table->TrimCommandPoolKHR == nullptr) { table->TrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)StubTrimCommandPoolKHR; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR) gpa(device, "vkGetMemoryWin32HandleKHR");
-    if (table->GetMemoryWin32HandleKHR == nullptr) { table->GetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)StubGetMemoryWin32HandleKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR) gpa(device, "vkGetMemoryWin32HandlePropertiesKHR");
-    if (table->GetMemoryWin32HandlePropertiesKHR == nullptr) { table->GetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)StubGetMemoryWin32HandlePropertiesKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->GetMemoryFdKHR = (PFN_vkGetMemoryFdKHR) gpa(device, "vkGetMemoryFdKHR");
-    if (table->GetMemoryFdKHR == nullptr) { table->GetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)StubGetMemoryFdKHR; }
-    table->GetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR) gpa(device, "vkGetMemoryFdPropertiesKHR");
-    if (table->GetMemoryFdPropertiesKHR == nullptr) { table->GetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)StubGetMemoryFdPropertiesKHR; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->ImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR) gpa(device, "vkImportSemaphoreWin32HandleKHR");
-    if (table->ImportSemaphoreWin32HandleKHR == nullptr) { table->ImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)StubImportSemaphoreWin32HandleKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR) gpa(device, "vkGetSemaphoreWin32HandleKHR");
-    if (table->GetSemaphoreWin32HandleKHR == nullptr) { table->GetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)StubGetSemaphoreWin32HandleKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->ImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR) gpa(device, "vkImportSemaphoreFdKHR");
-    if (table->ImportSemaphoreFdKHR == nullptr) { table->ImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)StubImportSemaphoreFdKHR; }
-    table->GetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR) gpa(device, "vkGetSemaphoreFdKHR");
-    if (table->GetSemaphoreFdKHR == nullptr) { table->GetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)StubGetSemaphoreFdKHR; }
-    table->CmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR) gpa(device, "vkCmdPushDescriptorSetKHR");
-    if (table->CmdPushDescriptorSetKHR == nullptr) { table->CmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)StubCmdPushDescriptorSetKHR; }
-    table->CmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR) gpa(device, "vkCmdPushDescriptorSetWithTemplateKHR");
-    if (table->CmdPushDescriptorSetWithTemplateKHR == nullptr) { table->CmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)StubCmdPushDescriptorSetWithTemplateKHR; }
-    table->CreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR) gpa(device, "vkCreateDescriptorUpdateTemplateKHR");
-    if (table->CreateDescriptorUpdateTemplateKHR == nullptr) { table->CreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)StubCreateDescriptorUpdateTemplateKHR; }
-    table->DestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR) gpa(device, "vkDestroyDescriptorUpdateTemplateKHR");
-    if (table->DestroyDescriptorUpdateTemplateKHR == nullptr) { table->DestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)StubDestroyDescriptorUpdateTemplateKHR; }
-    table->UpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR) gpa(device, "vkUpdateDescriptorSetWithTemplateKHR");
-    if (table->UpdateDescriptorSetWithTemplateKHR == nullptr) { table->UpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)StubUpdateDescriptorSetWithTemplateKHR; }
-    table->CreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR) gpa(device, "vkCreateRenderPass2KHR");
-    if (table->CreateRenderPass2KHR == nullptr) { table->CreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR)StubCreateRenderPass2KHR; }
-    table->CmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR) gpa(device, "vkCmdBeginRenderPass2KHR");
-    if (table->CmdBeginRenderPass2KHR == nullptr) { table->CmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR)StubCmdBeginRenderPass2KHR; }
-    table->CmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR) gpa(device, "vkCmdNextSubpass2KHR");
-    if (table->CmdNextSubpass2KHR == nullptr) { table->CmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR)StubCmdNextSubpass2KHR; }
-    table->CmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR) gpa(device, "vkCmdEndRenderPass2KHR");
-    if (table->CmdEndRenderPass2KHR == nullptr) { table->CmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR)StubCmdEndRenderPass2KHR; }
-    table->GetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR) gpa(device, "vkGetSwapchainStatusKHR");
-    if (table->GetSwapchainStatusKHR == nullptr) { table->GetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)StubGetSwapchainStatusKHR; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->ImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR) gpa(device, "vkImportFenceWin32HandleKHR");
-    if (table->ImportFenceWin32HandleKHR == nullptr) { table->ImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)StubImportFenceWin32HandleKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR) gpa(device, "vkGetFenceWin32HandleKHR");
-    if (table->GetFenceWin32HandleKHR == nullptr) { table->GetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)StubGetFenceWin32HandleKHR; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR) gpa(device, "vkImportFenceFdKHR");
-    if (table->ImportFenceFdKHR == nullptr) { table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR)StubImportFenceFdKHR; }
-    table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR) gpa(device, "vkGetFenceFdKHR");
-    if (table->GetFenceFdKHR == nullptr) { table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR)StubGetFenceFdKHR; }
-    table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR) gpa(device, "vkAcquireProfilingLockKHR");
-    if (table->AcquireProfilingLockKHR == nullptr) { table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)StubAcquireProfilingLockKHR; }
-    table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR) gpa(device, "vkReleaseProfilingLockKHR");
-    if (table->ReleaseProfilingLockKHR == nullptr) { table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)StubReleaseProfilingLockKHR; }
-    table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR) gpa(device, "vkGetImageMemoryRequirements2KHR");
-    if (table->GetImageMemoryRequirements2KHR == nullptr) { table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)StubGetImageMemoryRequirements2KHR; }
-    table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR) gpa(device, "vkGetBufferMemoryRequirements2KHR");
-    if (table->GetBufferMemoryRequirements2KHR == nullptr) { table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)StubGetBufferMemoryRequirements2KHR; }
-    table->GetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR) gpa(device, "vkGetImageSparseMemoryRequirements2KHR");
-    if (table->GetImageSparseMemoryRequirements2KHR == nullptr) { table->GetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)StubGetImageSparseMemoryRequirements2KHR; }
-    table->CreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR) gpa(device, "vkCreateSamplerYcbcrConversionKHR");
-    if (table->CreateSamplerYcbcrConversionKHR == nullptr) { table->CreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)StubCreateSamplerYcbcrConversionKHR; }
-    table->DestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR) gpa(device, "vkDestroySamplerYcbcrConversionKHR");
-    if (table->DestroySamplerYcbcrConversionKHR == nullptr) { table->DestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)StubDestroySamplerYcbcrConversionKHR; }
-    table->BindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR) gpa(device, "vkBindBufferMemory2KHR");
-    if (table->BindBufferMemory2KHR == nullptr) { table->BindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)StubBindBufferMemory2KHR; }
-    table->BindImageMemory2KHR = (PFN_vkBindImageMemory2KHR) gpa(device, "vkBindImageMemory2KHR");
-    if (table->BindImageMemory2KHR == nullptr) { table->BindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)StubBindImageMemory2KHR; }
-    table->GetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR) gpa(device, "vkGetDescriptorSetLayoutSupportKHR");
-    if (table->GetDescriptorSetLayoutSupportKHR == nullptr) { table->GetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)StubGetDescriptorSetLayoutSupportKHR; }
-    table->CmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR) gpa(device, "vkCmdDrawIndirectCountKHR");
-    if (table->CmdDrawIndirectCountKHR == nullptr) { table->CmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR)StubCmdDrawIndirectCountKHR; }
-    table->CmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR) gpa(device, "vkCmdDrawIndexedIndirectCountKHR");
-    if (table->CmdDrawIndexedIndirectCountKHR == nullptr) { table->CmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR)StubCmdDrawIndexedIndirectCountKHR; }
-    table->GetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR) gpa(device, "vkGetSemaphoreCounterValueKHR");
-    if (table->GetSemaphoreCounterValueKHR == nullptr) { table->GetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR)StubGetSemaphoreCounterValueKHR; }
-    table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR) gpa(device, "vkWaitSemaphoresKHR");
-    if (table->WaitSemaphoresKHR == nullptr) { table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR)StubWaitSemaphoresKHR; }
-    table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR) gpa(device, "vkSignalSemaphoreKHR");
-    if (table->SignalSemaphoreKHR == nullptr) { table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR)StubSignalSemaphoreKHR; }
-    table->CmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR) gpa(device, "vkCmdSetFragmentShadingRateKHR");
-    if (table->CmdSetFragmentShadingRateKHR == nullptr) { table->CmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR)StubCmdSetFragmentShadingRateKHR; }
-    table->WaitForPresentKHR = (PFN_vkWaitForPresentKHR) gpa(device, "vkWaitForPresentKHR");
-    if (table->WaitForPresentKHR == nullptr) { table->WaitForPresentKHR = (PFN_vkWaitForPresentKHR)StubWaitForPresentKHR; }
-    table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR) gpa(device, "vkGetBufferDeviceAddressKHR");
-    if (table->GetBufferDeviceAddressKHR == nullptr) { table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)StubGetBufferDeviceAddressKHR; }
-    table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR) gpa(device, "vkGetBufferOpaqueCaptureAddressKHR");
-    if (table->GetBufferOpaqueCaptureAddressKHR == nullptr) { table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR)StubGetBufferOpaqueCaptureAddressKHR; }
-    table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
-    if (table->GetDeviceMemoryOpaqueCaptureAddressKHR == nullptr) { table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR)StubGetDeviceMemoryOpaqueCaptureAddressKHR; }
-    table->CreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR) gpa(device, "vkCreateDeferredOperationKHR");
-    if (table->CreateDeferredOperationKHR == nullptr) { table->CreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR)StubCreateDeferredOperationKHR; }
-    table->DestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR) gpa(device, "vkDestroyDeferredOperationKHR");
-    if (table->DestroyDeferredOperationKHR == nullptr) { table->DestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR)StubDestroyDeferredOperationKHR; }
-    table->GetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR) gpa(device, "vkGetDeferredOperationMaxConcurrencyKHR");
-    if (table->GetDeferredOperationMaxConcurrencyKHR == nullptr) { table->GetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR)StubGetDeferredOperationMaxConcurrencyKHR; }
-    table->GetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR) gpa(device, "vkGetDeferredOperationResultKHR");
-    if (table->GetDeferredOperationResultKHR == nullptr) { table->GetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR)StubGetDeferredOperationResultKHR; }
-    table->DeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR) gpa(device, "vkDeferredOperationJoinKHR");
-    if (table->DeferredOperationJoinKHR == nullptr) { table->DeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR)StubDeferredOperationJoinKHR; }
-    table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR) gpa(device, "vkGetPipelineExecutablePropertiesKHR");
-    if (table->GetPipelineExecutablePropertiesKHR == nullptr) { table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR)StubGetPipelineExecutablePropertiesKHR; }
-    table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR) gpa(device, "vkGetPipelineExecutableStatisticsKHR");
-    if (table->GetPipelineExecutableStatisticsKHR == nullptr) { table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)StubGetPipelineExecutableStatisticsKHR; }
-    table->GetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR) gpa(device, "vkGetPipelineExecutableInternalRepresentationsKHR");
-    if (table->GetPipelineExecutableInternalRepresentationsKHR == nullptr) { table->GetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)StubGetPipelineExecutableInternalRepresentationsKHR; }
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->CmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR) gpa(device, "vkCmdEncodeVideoKHR");
-    if (table->CmdEncodeVideoKHR == nullptr) { table->CmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR)StubCmdEncodeVideoKHR; }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-    table->CmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR) gpa(device, "vkCmdSetEvent2KHR");
-    if (table->CmdSetEvent2KHR == nullptr) { table->CmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR)StubCmdSetEvent2KHR; }
-    table->CmdResetEvent2KHR = (PFN_vkCmdResetEvent2KHR) gpa(device, "vkCmdResetEvent2KHR");
-    if (table->CmdResetEvent2KHR == nullptr) { table->CmdResetEvent2KHR = (PFN_vkCmdResetEvent2KHR)StubCmdResetEvent2KHR; }
-    table->CmdWaitEvents2KHR = (PFN_vkCmdWaitEvents2KHR) gpa(device, "vkCmdWaitEvents2KHR");
-    if (table->CmdWaitEvents2KHR == nullptr) { table->CmdWaitEvents2KHR = (PFN_vkCmdWaitEvents2KHR)StubCmdWaitEvents2KHR; }
-    table->CmdPipelineBarrier2KHR = (PFN_vkCmdPipelineBarrier2KHR) gpa(device, "vkCmdPipelineBarrier2KHR");
-    if (table->CmdPipelineBarrier2KHR == nullptr) { table->CmdPipelineBarrier2KHR = (PFN_vkCmdPipelineBarrier2KHR)StubCmdPipelineBarrier2KHR; }
-    table->CmdWriteTimestamp2KHR = (PFN_vkCmdWriteTimestamp2KHR) gpa(device, "vkCmdWriteTimestamp2KHR");
-    if (table->CmdWriteTimestamp2KHR == nullptr) { table->CmdWriteTimestamp2KHR = (PFN_vkCmdWriteTimestamp2KHR)StubCmdWriteTimestamp2KHR; }
-    table->QueueSubmit2KHR = (PFN_vkQueueSubmit2KHR) gpa(device, "vkQueueSubmit2KHR");
-    if (table->QueueSubmit2KHR == nullptr) { table->QueueSubmit2KHR = (PFN_vkQueueSubmit2KHR)StubQueueSubmit2KHR; }
-    table->CmdWriteBufferMarker2AMD = (PFN_vkCmdWriteBufferMarker2AMD) gpa(device, "vkCmdWriteBufferMarker2AMD");
-    if (table->CmdWriteBufferMarker2AMD == nullptr) { table->CmdWriteBufferMarker2AMD = (PFN_vkCmdWriteBufferMarker2AMD)StubCmdWriteBufferMarker2AMD; }
-    table->GetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV) gpa(device, "vkGetQueueCheckpointData2NV");
-    if (table->GetQueueCheckpointData2NV == nullptr) { table->GetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV)StubGetQueueCheckpointData2NV; }
-    table->CmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR) gpa(device, "vkCmdCopyBuffer2KHR");
-    if (table->CmdCopyBuffer2KHR == nullptr) { table->CmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR)StubCmdCopyBuffer2KHR; }
-    table->CmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR) gpa(device, "vkCmdCopyImage2KHR");
-    if (table->CmdCopyImage2KHR == nullptr) { table->CmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR)StubCmdCopyImage2KHR; }
-    table->CmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR) gpa(device, "vkCmdCopyBufferToImage2KHR");
-    if (table->CmdCopyBufferToImage2KHR == nullptr) { table->CmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR)StubCmdCopyBufferToImage2KHR; }
-    table->CmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR) gpa(device, "vkCmdCopyImageToBuffer2KHR");
-    if (table->CmdCopyImageToBuffer2KHR == nullptr) { table->CmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR)StubCmdCopyImageToBuffer2KHR; }
-    table->CmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR) gpa(device, "vkCmdBlitImage2KHR");
-    if (table->CmdBlitImage2KHR == nullptr) { table->CmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR)StubCmdBlitImage2KHR; }
-    table->CmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR) gpa(device, "vkCmdResolveImage2KHR");
-    if (table->CmdResolveImage2KHR == nullptr) { table->CmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR)StubCmdResolveImage2KHR; }
-    table->CmdTraceRaysIndirect2KHR = (PFN_vkCmdTraceRaysIndirect2KHR) gpa(device, "vkCmdTraceRaysIndirect2KHR");
-    if (table->CmdTraceRaysIndirect2KHR == nullptr) { table->CmdTraceRaysIndirect2KHR = (PFN_vkCmdTraceRaysIndirect2KHR)StubCmdTraceRaysIndirect2KHR; }
-    table->GetDeviceBufferMemoryRequirementsKHR = (PFN_vkGetDeviceBufferMemoryRequirementsKHR) gpa(device, "vkGetDeviceBufferMemoryRequirementsKHR");
-    if (table->GetDeviceBufferMemoryRequirementsKHR == nullptr) { table->GetDeviceBufferMemoryRequirementsKHR = (PFN_vkGetDeviceBufferMemoryRequirementsKHR)StubGetDeviceBufferMemoryRequirementsKHR; }
-    table->GetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR) gpa(device, "vkGetDeviceImageMemoryRequirementsKHR");
-    if (table->GetDeviceImageMemoryRequirementsKHR == nullptr) { table->GetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)StubGetDeviceImageMemoryRequirementsKHR; }
-    table->GetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR) gpa(device, "vkGetDeviceImageSparseMemoryRequirementsKHR");
-    if (table->GetDeviceImageSparseMemoryRequirementsKHR == nullptr) { table->GetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)StubGetDeviceImageSparseMemoryRequirementsKHR; }
-    table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT) gpa(device, "vkDebugMarkerSetObjectTagEXT");
-    if (table->DebugMarkerSetObjectTagEXT == nullptr) { table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)StubDebugMarkerSetObjectTagEXT; }
-    table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT) gpa(device, "vkDebugMarkerSetObjectNameEXT");
-    if (table->DebugMarkerSetObjectNameEXT == nullptr) { table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)StubDebugMarkerSetObjectNameEXT; }
-    table->CmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT) gpa(device, "vkCmdDebugMarkerBeginEXT");
-    if (table->CmdDebugMarkerBeginEXT == nullptr) { table->CmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)StubCmdDebugMarkerBeginEXT; }
-    table->CmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT) gpa(device, "vkCmdDebugMarkerEndEXT");
-    if (table->CmdDebugMarkerEndEXT == nullptr) { table->CmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)StubCmdDebugMarkerEndEXT; }
-    table->CmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT) gpa(device, "vkCmdDebugMarkerInsertEXT");
-    if (table->CmdDebugMarkerInsertEXT == nullptr) { table->CmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)StubCmdDebugMarkerInsertEXT; }
-    table->CmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT) gpa(device, "vkCmdBindTransformFeedbackBuffersEXT");
-    if (table->CmdBindTransformFeedbackBuffersEXT == nullptr) { table->CmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT)StubCmdBindTransformFeedbackBuffersEXT; }
-    table->CmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT) gpa(device, "vkCmdBeginTransformFeedbackEXT");
-    if (table->CmdBeginTransformFeedbackEXT == nullptr) { table->CmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)StubCmdBeginTransformFeedbackEXT; }
-    table->CmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT) gpa(device, "vkCmdEndTransformFeedbackEXT");
-    if (table->CmdEndTransformFeedbackEXT == nullptr) { table->CmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT)StubCmdEndTransformFeedbackEXT; }
-    table->CmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT) gpa(device, "vkCmdBeginQueryIndexedEXT");
-    if (table->CmdBeginQueryIndexedEXT == nullptr) { table->CmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)StubCmdBeginQueryIndexedEXT; }
-    table->CmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT) gpa(device, "vkCmdEndQueryIndexedEXT");
-    if (table->CmdEndQueryIndexedEXT == nullptr) { table->CmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT)StubCmdEndQueryIndexedEXT; }
-    table->CmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT) gpa(device, "vkCmdDrawIndirectByteCountEXT");
-    if (table->CmdDrawIndirectByteCountEXT == nullptr) { table->CmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT)StubCmdDrawIndirectByteCountEXT; }
-    table->CreateCuModuleNVX = (PFN_vkCreateCuModuleNVX) gpa(device, "vkCreateCuModuleNVX");
-    if (table->CreateCuModuleNVX == nullptr) { table->CreateCuModuleNVX = (PFN_vkCreateCuModuleNVX)StubCreateCuModuleNVX; }
-    table->CreateCuFunctionNVX = (PFN_vkCreateCuFunctionNVX) gpa(device, "vkCreateCuFunctionNVX");
-    if (table->CreateCuFunctionNVX == nullptr) { table->CreateCuFunctionNVX = (PFN_vkCreateCuFunctionNVX)StubCreateCuFunctionNVX; }
-    table->DestroyCuModuleNVX = (PFN_vkDestroyCuModuleNVX) gpa(device, "vkDestroyCuModuleNVX");
-    if (table->DestroyCuModuleNVX == nullptr) { table->DestroyCuModuleNVX = (PFN_vkDestroyCuModuleNVX)StubDestroyCuModuleNVX; }
-    table->DestroyCuFunctionNVX = (PFN_vkDestroyCuFunctionNVX) gpa(device, "vkDestroyCuFunctionNVX");
-    if (table->DestroyCuFunctionNVX == nullptr) { table->DestroyCuFunctionNVX = (PFN_vkDestroyCuFunctionNVX)StubDestroyCuFunctionNVX; }
-    table->CmdCuLaunchKernelNVX = (PFN_vkCmdCuLaunchKernelNVX) gpa(device, "vkCmdCuLaunchKernelNVX");
-    if (table->CmdCuLaunchKernelNVX == nullptr) { table->CmdCuLaunchKernelNVX = (PFN_vkCmdCuLaunchKernelNVX)StubCmdCuLaunchKernelNVX; }
-    table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX) gpa(device, "vkGetImageViewHandleNVX");
-    if (table->GetImageViewHandleNVX == nullptr) { table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX)StubGetImageViewHandleNVX; }
-    table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX) gpa(device, "vkGetImageViewAddressNVX");
-    if (table->GetImageViewAddressNVX == nullptr) { table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX)StubGetImageViewAddressNVX; }
-    table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD) gpa(device, "vkCmdDrawIndirectCountAMD");
-    if (table->CmdDrawIndirectCountAMD == nullptr) { table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)StubCmdDrawIndirectCountAMD; }
-    table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD) gpa(device, "vkCmdDrawIndexedIndirectCountAMD");
-    if (table->CmdDrawIndexedIndirectCountAMD == nullptr) { table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)StubCmdDrawIndexedIndirectCountAMD; }
-    table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD) gpa(device, "vkGetShaderInfoAMD");
-    if (table->GetShaderInfoAMD == nullptr) { table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)StubGetShaderInfoAMD; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV) gpa(device, "vkGetMemoryWin32HandleNV");
-    if (table->GetMemoryWin32HandleNV == nullptr) { table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)StubGetMemoryWin32HandleNV; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->CmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT) gpa(device, "vkCmdBeginConditionalRenderingEXT");
-    if (table->CmdBeginConditionalRenderingEXT == nullptr) { table->CmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT)StubCmdBeginConditionalRenderingEXT; }
-    table->CmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT) gpa(device, "vkCmdEndConditionalRenderingEXT");
-    if (table->CmdEndConditionalRenderingEXT == nullptr) { table->CmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT)StubCmdEndConditionalRenderingEXT; }
-    table->CmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV) gpa(device, "vkCmdSetViewportWScalingNV");
-    if (table->CmdSetViewportWScalingNV == nullptr) { table->CmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)StubCmdSetViewportWScalingNV; }
-    table->DisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT) gpa(device, "vkDisplayPowerControlEXT");
-    if (table->DisplayPowerControlEXT == nullptr) { table->DisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)StubDisplayPowerControlEXT; }
-    table->RegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT) gpa(device, "vkRegisterDeviceEventEXT");
-    if (table->RegisterDeviceEventEXT == nullptr) { table->RegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)StubRegisterDeviceEventEXT; }
-    table->RegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT) gpa(device, "vkRegisterDisplayEventEXT");
-    if (table->RegisterDisplayEventEXT == nullptr) { table->RegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)StubRegisterDisplayEventEXT; }
-    table->GetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT) gpa(device, "vkGetSwapchainCounterEXT");
-    if (table->GetSwapchainCounterEXT == nullptr) { table->GetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)StubGetSwapchainCounterEXT; }
-    table->GetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE) gpa(device, "vkGetRefreshCycleDurationGOOGLE");
-    if (table->GetRefreshCycleDurationGOOGLE == nullptr) { table->GetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)StubGetRefreshCycleDurationGOOGLE; }
-    table->GetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE) gpa(device, "vkGetPastPresentationTimingGOOGLE");
-    if (table->GetPastPresentationTimingGOOGLE == nullptr) { table->GetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)StubGetPastPresentationTimingGOOGLE; }
-    table->CmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT) gpa(device, "vkCmdSetDiscardRectangleEXT");
-    if (table->CmdSetDiscardRectangleEXT == nullptr) { table->CmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)StubCmdSetDiscardRectangleEXT; }
-    table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT) gpa(device, "vkSetHdrMetadataEXT");
-    if (table->SetHdrMetadataEXT == nullptr) { table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)StubSetHdrMetadataEXT; }
-    table->SetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT) gpa(device, "vkSetDebugUtilsObjectNameEXT");
-    table->SetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT) gpa(device, "vkSetDebugUtilsObjectTagEXT");
-    table->QueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT) gpa(device, "vkQueueBeginDebugUtilsLabelEXT");
-    table->QueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT) gpa(device, "vkQueueEndDebugUtilsLabelEXT");
-    table->QueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT) gpa(device, "vkQueueInsertDebugUtilsLabelEXT");
-    table->CmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT) gpa(device, "vkCmdBeginDebugUtilsLabelEXT");
-    table->CmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT) gpa(device, "vkCmdEndDebugUtilsLabelEXT");
-    table->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT) gpa(device, "vkCmdInsertDebugUtilsLabelEXT");
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-    table->GetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID) gpa(device, "vkGetAndroidHardwareBufferPropertiesANDROID");
-    if (table->GetAndroidHardwareBufferPropertiesANDROID == nullptr) { table->GetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)StubGetAndroidHardwareBufferPropertiesANDROID; }
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-    table->GetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID) gpa(device, "vkGetMemoryAndroidHardwareBufferANDROID");
-    if (table->GetMemoryAndroidHardwareBufferANDROID == nullptr) { table->GetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)StubGetMemoryAndroidHardwareBufferANDROID; }
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-    table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT) gpa(device, "vkCmdSetSampleLocationsEXT");
-    if (table->CmdSetSampleLocationsEXT == nullptr) { table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)StubCmdSetSampleLocationsEXT; }
-    table->GetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT) gpa(device, "vkGetImageDrmFormatModifierPropertiesEXT");
-    if (table->GetImageDrmFormatModifierPropertiesEXT == nullptr) { table->GetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT)StubGetImageDrmFormatModifierPropertiesEXT; }
-    table->CreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT) gpa(device, "vkCreateValidationCacheEXT");
-    if (table->CreateValidationCacheEXT == nullptr) { table->CreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)StubCreateValidationCacheEXT; }
-    table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT) gpa(device, "vkDestroyValidationCacheEXT");
-    if (table->DestroyValidationCacheEXT == nullptr) { table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)StubDestroyValidationCacheEXT; }
-    table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT) gpa(device, "vkMergeValidationCachesEXT");
-    if (table->MergeValidationCachesEXT == nullptr) { table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)StubMergeValidationCachesEXT; }
-    table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT) gpa(device, "vkGetValidationCacheDataEXT");
-    if (table->GetValidationCacheDataEXT == nullptr) { table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)StubGetValidationCacheDataEXT; }
-    table->CmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV) gpa(device, "vkCmdBindShadingRateImageNV");
-    if (table->CmdBindShadingRateImageNV == nullptr) { table->CmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV)StubCmdBindShadingRateImageNV; }
-    table->CmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV) gpa(device, "vkCmdSetViewportShadingRatePaletteNV");
-    if (table->CmdSetViewportShadingRatePaletteNV == nullptr) { table->CmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV)StubCmdSetViewportShadingRatePaletteNV; }
-    table->CmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV) gpa(device, "vkCmdSetCoarseSampleOrderNV");
-    if (table->CmdSetCoarseSampleOrderNV == nullptr) { table->CmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV)StubCmdSetCoarseSampleOrderNV; }
-    table->CreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV) gpa(device, "vkCreateAccelerationStructureNV");
-    if (table->CreateAccelerationStructureNV == nullptr) { table->CreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV)StubCreateAccelerationStructureNV; }
-    table->DestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV) gpa(device, "vkDestroyAccelerationStructureNV");
-    if (table->DestroyAccelerationStructureNV == nullptr) { table->DestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV)StubDestroyAccelerationStructureNV; }
-    table->GetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV) gpa(device, "vkGetAccelerationStructureMemoryRequirementsNV");
-    if (table->GetAccelerationStructureMemoryRequirementsNV == nullptr) { table->GetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)StubGetAccelerationStructureMemoryRequirementsNV; }
-    table->BindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV) gpa(device, "vkBindAccelerationStructureMemoryNV");
-    if (table->BindAccelerationStructureMemoryNV == nullptr) { table->BindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV)StubBindAccelerationStructureMemoryNV; }
-    table->CmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV) gpa(device, "vkCmdBuildAccelerationStructureNV");
-    if (table->CmdBuildAccelerationStructureNV == nullptr) { table->CmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV)StubCmdBuildAccelerationStructureNV; }
-    table->CmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV) gpa(device, "vkCmdCopyAccelerationStructureNV");
-    if (table->CmdCopyAccelerationStructureNV == nullptr) { table->CmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV)StubCmdCopyAccelerationStructureNV; }
-    table->CmdTraceRaysNV = (PFN_vkCmdTraceRaysNV) gpa(device, "vkCmdTraceRaysNV");
-    if (table->CmdTraceRaysNV == nullptr) { table->CmdTraceRaysNV = (PFN_vkCmdTraceRaysNV)StubCmdTraceRaysNV; }
-    table->CreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV) gpa(device, "vkCreateRayTracingPipelinesNV");
-    if (table->CreateRayTracingPipelinesNV == nullptr) { table->CreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV)StubCreateRayTracingPipelinesNV; }
-    table->GetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR) gpa(device, "vkGetRayTracingShaderGroupHandlesKHR");
-    if (table->GetRayTracingShaderGroupHandlesKHR == nullptr) { table->GetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR)StubGetRayTracingShaderGroupHandlesKHR; }
-    table->GetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV) gpa(device, "vkGetRayTracingShaderGroupHandlesNV");
-    if (table->GetRayTracingShaderGroupHandlesNV == nullptr) { table->GetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)StubGetRayTracingShaderGroupHandlesNV; }
-    table->GetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV) gpa(device, "vkGetAccelerationStructureHandleNV");
-    if (table->GetAccelerationStructureHandleNV == nullptr) { table->GetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV)StubGetAccelerationStructureHandleNV; }
-    table->CmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV) gpa(device, "vkCmdWriteAccelerationStructuresPropertiesNV");
-    if (table->CmdWriteAccelerationStructuresPropertiesNV == nullptr) { table->CmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV)StubCmdWriteAccelerationStructuresPropertiesNV; }
-    table->CompileDeferredNV = (PFN_vkCompileDeferredNV) gpa(device, "vkCompileDeferredNV");
-    if (table->CompileDeferredNV == nullptr) { table->CompileDeferredNV = (PFN_vkCompileDeferredNV)StubCompileDeferredNV; }
-    table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT) gpa(device, "vkGetMemoryHostPointerPropertiesEXT");
-    if (table->GetMemoryHostPointerPropertiesEXT == nullptr) { table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)StubGetMemoryHostPointerPropertiesEXT; }
-    table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD) gpa(device, "vkCmdWriteBufferMarkerAMD");
-    if (table->CmdWriteBufferMarkerAMD == nullptr) { table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)StubCmdWriteBufferMarkerAMD; }
-    table->GetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT) gpa(device, "vkGetCalibratedTimestampsEXT");
-    if (table->GetCalibratedTimestampsEXT == nullptr) { table->GetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT)StubGetCalibratedTimestampsEXT; }
-    table->CmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV) gpa(device, "vkCmdDrawMeshTasksNV");
-    if (table->CmdDrawMeshTasksNV == nullptr) { table->CmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV)StubCmdDrawMeshTasksNV; }
-    table->CmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV) gpa(device, "vkCmdDrawMeshTasksIndirectNV");
-    if (table->CmdDrawMeshTasksIndirectNV == nullptr) { table->CmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)StubCmdDrawMeshTasksIndirectNV; }
-    table->CmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV) gpa(device, "vkCmdDrawMeshTasksIndirectCountNV");
-    if (table->CmdDrawMeshTasksIndirectCountNV == nullptr) { table->CmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)StubCmdDrawMeshTasksIndirectCountNV; }
-    table->CmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV) gpa(device, "vkCmdSetExclusiveScissorNV");
-    if (table->CmdSetExclusiveScissorNV == nullptr) { table->CmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)StubCmdSetExclusiveScissorNV; }
-    table->CmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV) gpa(device, "vkCmdSetCheckpointNV");
-    if (table->CmdSetCheckpointNV == nullptr) { table->CmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)StubCmdSetCheckpointNV; }
-    table->GetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV) gpa(device, "vkGetQueueCheckpointDataNV");
-    if (table->GetQueueCheckpointDataNV == nullptr) { table->GetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)StubGetQueueCheckpointDataNV; }
-    table->InitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL) gpa(device, "vkInitializePerformanceApiINTEL");
-    if (table->InitializePerformanceApiINTEL == nullptr) { table->InitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL)StubInitializePerformanceApiINTEL; }
-    table->UninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL) gpa(device, "vkUninitializePerformanceApiINTEL");
-    if (table->UninitializePerformanceApiINTEL == nullptr) { table->UninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL)StubUninitializePerformanceApiINTEL; }
-    table->CmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL) gpa(device, "vkCmdSetPerformanceMarkerINTEL");
-    if (table->CmdSetPerformanceMarkerINTEL == nullptr) { table->CmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL)StubCmdSetPerformanceMarkerINTEL; }
-    table->CmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL) gpa(device, "vkCmdSetPerformanceStreamMarkerINTEL");
-    if (table->CmdSetPerformanceStreamMarkerINTEL == nullptr) { table->CmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL)StubCmdSetPerformanceStreamMarkerINTEL; }
-    table->CmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL) gpa(device, "vkCmdSetPerformanceOverrideINTEL");
-    if (table->CmdSetPerformanceOverrideINTEL == nullptr) { table->CmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL)StubCmdSetPerformanceOverrideINTEL; }
-    table->AcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL) gpa(device, "vkAcquirePerformanceConfigurationINTEL");
-    if (table->AcquirePerformanceConfigurationINTEL == nullptr) { table->AcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL)StubAcquirePerformanceConfigurationINTEL; }
-    table->ReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL) gpa(device, "vkReleasePerformanceConfigurationINTEL");
-    if (table->ReleasePerformanceConfigurationINTEL == nullptr) { table->ReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL)StubReleasePerformanceConfigurationINTEL; }
-    table->QueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL) gpa(device, "vkQueueSetPerformanceConfigurationINTEL");
-    if (table->QueueSetPerformanceConfigurationINTEL == nullptr) { table->QueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL)StubQueueSetPerformanceConfigurationINTEL; }
-    table->GetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL) gpa(device, "vkGetPerformanceParameterINTEL");
-    if (table->GetPerformanceParameterINTEL == nullptr) { table->GetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL)StubGetPerformanceParameterINTEL; }
-    table->SetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD) gpa(device, "vkSetLocalDimmingAMD");
-    if (table->SetLocalDimmingAMD == nullptr) { table->SetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD)StubSetLocalDimmingAMD; }
-    table->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT) gpa(device, "vkGetBufferDeviceAddressEXT");
-    if (table->GetBufferDeviceAddressEXT == nullptr) { table->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)StubGetBufferDeviceAddressEXT; }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->AcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT) gpa(device, "vkAcquireFullScreenExclusiveModeEXT");
-    if (table->AcquireFullScreenExclusiveModeEXT == nullptr) { table->AcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT)StubAcquireFullScreenExclusiveModeEXT; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->ReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT) gpa(device, "vkReleaseFullScreenExclusiveModeEXT");
-    if (table->ReleaseFullScreenExclusiveModeEXT == nullptr) { table->ReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT)StubReleaseFullScreenExclusiveModeEXT; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT) gpa(device, "vkGetDeviceGroupSurfacePresentModes2EXT");
-    if (table->GetDeviceGroupSurfacePresentModes2EXT == nullptr) { table->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)StubGetDeviceGroupSurfacePresentModes2EXT; }
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->CmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT) gpa(device, "vkCmdSetLineStippleEXT");
-    if (table->CmdSetLineStippleEXT == nullptr) { table->CmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT)StubCmdSetLineStippleEXT; }
-    table->ResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT) gpa(device, "vkResetQueryPoolEXT");
-    if (table->ResetQueryPoolEXT == nullptr) { table->ResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT)StubResetQueryPoolEXT; }
-    table->CmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT) gpa(device, "vkCmdSetCullModeEXT");
-    if (table->CmdSetCullModeEXT == nullptr) { table->CmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)StubCmdSetCullModeEXT; }
-    table->CmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT) gpa(device, "vkCmdSetFrontFaceEXT");
-    if (table->CmdSetFrontFaceEXT == nullptr) { table->CmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)StubCmdSetFrontFaceEXT; }
-    table->CmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT) gpa(device, "vkCmdSetPrimitiveTopologyEXT");
-    if (table->CmdSetPrimitiveTopologyEXT == nullptr) { table->CmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)StubCmdSetPrimitiveTopologyEXT; }
-    table->CmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT) gpa(device, "vkCmdSetViewportWithCountEXT");
-    if (table->CmdSetViewportWithCountEXT == nullptr) { table->CmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)StubCmdSetViewportWithCountEXT; }
-    table->CmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT) gpa(device, "vkCmdSetScissorWithCountEXT");
-    if (table->CmdSetScissorWithCountEXT == nullptr) { table->CmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)StubCmdSetScissorWithCountEXT; }
-    table->CmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT) gpa(device, "vkCmdBindVertexBuffers2EXT");
-    if (table->CmdBindVertexBuffers2EXT == nullptr) { table->CmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)StubCmdBindVertexBuffers2EXT; }
-    table->CmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT) gpa(device, "vkCmdSetDepthTestEnableEXT");
-    if (table->CmdSetDepthTestEnableEXT == nullptr) { table->CmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)StubCmdSetDepthTestEnableEXT; }
-    table->CmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT) gpa(device, "vkCmdSetDepthWriteEnableEXT");
-    if (table->CmdSetDepthWriteEnableEXT == nullptr) { table->CmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)StubCmdSetDepthWriteEnableEXT; }
-    table->CmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT) gpa(device, "vkCmdSetDepthCompareOpEXT");
-    if (table->CmdSetDepthCompareOpEXT == nullptr) { table->CmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)StubCmdSetDepthCompareOpEXT; }
-    table->CmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT) gpa(device, "vkCmdSetDepthBoundsTestEnableEXT");
-    if (table->CmdSetDepthBoundsTestEnableEXT == nullptr) { table->CmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)StubCmdSetDepthBoundsTestEnableEXT; }
-    table->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT) gpa(device, "vkCmdSetStencilTestEnableEXT");
-    if (table->CmdSetStencilTestEnableEXT == nullptr) { table->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)StubCmdSetStencilTestEnableEXT; }
-    table->CmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT) gpa(device, "vkCmdSetStencilOpEXT");
-    if (table->CmdSetStencilOpEXT == nullptr) { table->CmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)StubCmdSetStencilOpEXT; }
-    table->GetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV) gpa(device, "vkGetGeneratedCommandsMemoryRequirementsNV");
-    if (table->GetGeneratedCommandsMemoryRequirementsNV == nullptr) { table->GetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)StubGetGeneratedCommandsMemoryRequirementsNV; }
-    table->CmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV) gpa(device, "vkCmdPreprocessGeneratedCommandsNV");
-    if (table->CmdPreprocessGeneratedCommandsNV == nullptr) { table->CmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV)StubCmdPreprocessGeneratedCommandsNV; }
-    table->CmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV) gpa(device, "vkCmdExecuteGeneratedCommandsNV");
-    if (table->CmdExecuteGeneratedCommandsNV == nullptr) { table->CmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV)StubCmdExecuteGeneratedCommandsNV; }
-    table->CmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV) gpa(device, "vkCmdBindPipelineShaderGroupNV");
-    if (table->CmdBindPipelineShaderGroupNV == nullptr) { table->CmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV)StubCmdBindPipelineShaderGroupNV; }
-    table->CreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV) gpa(device, "vkCreateIndirectCommandsLayoutNV");
-    if (table->CreateIndirectCommandsLayoutNV == nullptr) { table->CreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV)StubCreateIndirectCommandsLayoutNV; }
-    table->DestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV) gpa(device, "vkDestroyIndirectCommandsLayoutNV");
-    if (table->DestroyIndirectCommandsLayoutNV == nullptr) { table->DestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)StubDestroyIndirectCommandsLayoutNV; }
-    table->CreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT) gpa(device, "vkCreatePrivateDataSlotEXT");
-    if (table->CreatePrivateDataSlotEXT == nullptr) { table->CreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT)StubCreatePrivateDataSlotEXT; }
-    table->DestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT) gpa(device, "vkDestroyPrivateDataSlotEXT");
-    if (table->DestroyPrivateDataSlotEXT == nullptr) { table->DestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT)StubDestroyPrivateDataSlotEXT; }
-    table->SetPrivateDataEXT = (PFN_vkSetPrivateDataEXT) gpa(device, "vkSetPrivateDataEXT");
-    if (table->SetPrivateDataEXT == nullptr) { table->SetPrivateDataEXT = (PFN_vkSetPrivateDataEXT)StubSetPrivateDataEXT; }
-    table->GetPrivateDataEXT = (PFN_vkGetPrivateDataEXT) gpa(device, "vkGetPrivateDataEXT");
-    if (table->GetPrivateDataEXT == nullptr) { table->GetPrivateDataEXT = (PFN_vkGetPrivateDataEXT)StubGetPrivateDataEXT; }
-#ifdef VK_USE_PLATFORM_METAL_EXT
-    table->ExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT) gpa(device, "vkExportMetalObjectsEXT");
-    if (table->ExportMetalObjectsEXT == nullptr) { table->ExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT)StubExportMetalObjectsEXT; }
-#endif // VK_USE_PLATFORM_METAL_EXT
-    table->CmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV) gpa(device, "vkCmdSetFragmentShadingRateEnumNV");
-    if (table->CmdSetFragmentShadingRateEnumNV == nullptr) { table->CmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)StubCmdSetFragmentShadingRateEnumNV; }
-    table->GetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT) gpa(device, "vkGetImageSubresourceLayout2EXT");
-    if (table->GetImageSubresourceLayout2EXT == nullptr) { table->GetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT)StubGetImageSubresourceLayout2EXT; }
-    table->GetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT) gpa(device, "vkGetDeviceFaultInfoEXT");
-    if (table->GetDeviceFaultInfoEXT == nullptr) { table->GetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)StubGetDeviceFaultInfoEXT; }
-    table->CmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT) gpa(device, "vkCmdSetVertexInputEXT");
-    if (table->CmdSetVertexInputEXT == nullptr) { table->CmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)StubCmdSetVertexInputEXT; }
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->GetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA) gpa(device, "vkGetMemoryZirconHandleFUCHSIA");
-    if (table->GetMemoryZirconHandleFUCHSIA == nullptr) { table->GetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA)StubGetMemoryZirconHandleFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->GetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA) gpa(device, "vkGetMemoryZirconHandlePropertiesFUCHSIA");
-    if (table->GetMemoryZirconHandlePropertiesFUCHSIA == nullptr) { table->GetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)StubGetMemoryZirconHandlePropertiesFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->ImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA) gpa(device, "vkImportSemaphoreZirconHandleFUCHSIA");
-    if (table->ImportSemaphoreZirconHandleFUCHSIA == nullptr) { table->ImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA)StubImportSemaphoreZirconHandleFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->GetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA) gpa(device, "vkGetSemaphoreZirconHandleFUCHSIA");
-    if (table->GetSemaphoreZirconHandleFUCHSIA == nullptr) { table->GetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA)StubGetSemaphoreZirconHandleFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->CreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA) gpa(device, "vkCreateBufferCollectionFUCHSIA");
-    if (table->CreateBufferCollectionFUCHSIA == nullptr) { table->CreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)StubCreateBufferCollectionFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->SetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA) gpa(device, "vkSetBufferCollectionImageConstraintsFUCHSIA");
-    if (table->SetBufferCollectionImageConstraintsFUCHSIA == nullptr) { table->SetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)StubSetBufferCollectionImageConstraintsFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->SetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA) gpa(device, "vkSetBufferCollectionBufferConstraintsFUCHSIA");
-    if (table->SetBufferCollectionBufferConstraintsFUCHSIA == nullptr) { table->SetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)StubSetBufferCollectionBufferConstraintsFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->DestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA) gpa(device, "vkDestroyBufferCollectionFUCHSIA");
-    if (table->DestroyBufferCollectionFUCHSIA == nullptr) { table->DestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)StubDestroyBufferCollectionFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->GetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA) gpa(device, "vkGetBufferCollectionPropertiesFUCHSIA");
-    if (table->GetBufferCollectionPropertiesFUCHSIA == nullptr) { table->GetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA)StubGetBufferCollectionPropertiesFUCHSIA; }
-#endif // VK_USE_PLATFORM_FUCHSIA
-    table->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI) gpa(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI");
-    if (table->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI == nullptr) { table->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)StubGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI; }
-    table->CmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI) gpa(device, "vkCmdSubpassShadingHUAWEI");
-    if (table->CmdSubpassShadingHUAWEI == nullptr) { table->CmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI)StubCmdSubpassShadingHUAWEI; }
-    table->CmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI) gpa(device, "vkCmdBindInvocationMaskHUAWEI");
-    if (table->CmdBindInvocationMaskHUAWEI == nullptr) { table->CmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)StubCmdBindInvocationMaskHUAWEI; }
-    table->GetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV) gpa(device, "vkGetMemoryRemoteAddressNV");
-    if (table->GetMemoryRemoteAddressNV == nullptr) { table->GetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV)StubGetMemoryRemoteAddressNV; }
-    table->GetPipelinePropertiesEXT = (PFN_vkGetPipelinePropertiesEXT) gpa(device, "vkGetPipelinePropertiesEXT");
-    if (table->GetPipelinePropertiesEXT == nullptr) { table->GetPipelinePropertiesEXT = (PFN_vkGetPipelinePropertiesEXT)StubGetPipelinePropertiesEXT; }
-    table->CmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT) gpa(device, "vkCmdSetPatchControlPointsEXT");
-    if (table->CmdSetPatchControlPointsEXT == nullptr) { table->CmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)StubCmdSetPatchControlPointsEXT; }
-    table->CmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT) gpa(device, "vkCmdSetRasterizerDiscardEnableEXT");
-    if (table->CmdSetRasterizerDiscardEnableEXT == nullptr) { table->CmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)StubCmdSetRasterizerDiscardEnableEXT; }
-    table->CmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT) gpa(device, "vkCmdSetDepthBiasEnableEXT");
-    if (table->CmdSetDepthBiasEnableEXT == nullptr) { table->CmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)StubCmdSetDepthBiasEnableEXT; }
-    table->CmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT) gpa(device, "vkCmdSetLogicOpEXT");
-    if (table->CmdSetLogicOpEXT == nullptr) { table->CmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)StubCmdSetLogicOpEXT; }
-    table->CmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT) gpa(device, "vkCmdSetPrimitiveRestartEnableEXT");
-    if (table->CmdSetPrimitiveRestartEnableEXT == nullptr) { table->CmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)StubCmdSetPrimitiveRestartEnableEXT; }
-    table->CmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT) gpa(device, "vkCmdSetColorWriteEnableEXT");
-    if (table->CmdSetColorWriteEnableEXT == nullptr) { table->CmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT)StubCmdSetColorWriteEnableEXT; }
-    table->CmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT) gpa(device, "vkCmdDrawMultiEXT");
-    if (table->CmdDrawMultiEXT == nullptr) { table->CmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT)StubCmdDrawMultiEXT; }
-    table->CmdDrawMultiIndexedEXT = (PFN_vkCmdDrawMultiIndexedEXT) gpa(device, "vkCmdDrawMultiIndexedEXT");
-    if (table->CmdDrawMultiIndexedEXT == nullptr) { table->CmdDrawMultiIndexedEXT = (PFN_vkCmdDrawMultiIndexedEXT)StubCmdDrawMultiIndexedEXT; }
-    table->CreateMicromapEXT = (PFN_vkCreateMicromapEXT) gpa(device, "vkCreateMicromapEXT");
-    if (table->CreateMicromapEXT == nullptr) { table->CreateMicromapEXT = (PFN_vkCreateMicromapEXT)StubCreateMicromapEXT; }
-    table->DestroyMicromapEXT = (PFN_vkDestroyMicromapEXT) gpa(device, "vkDestroyMicromapEXT");
-    if (table->DestroyMicromapEXT == nullptr) { table->DestroyMicromapEXT = (PFN_vkDestroyMicromapEXT)StubDestroyMicromapEXT; }
-    table->CmdBuildMicromapsEXT = (PFN_vkCmdBuildMicromapsEXT) gpa(device, "vkCmdBuildMicromapsEXT");
-    if (table->CmdBuildMicromapsEXT == nullptr) { table->CmdBuildMicromapsEXT = (PFN_vkCmdBuildMicromapsEXT)StubCmdBuildMicromapsEXT; }
-    table->BuildMicromapsEXT = (PFN_vkBuildMicromapsEXT) gpa(device, "vkBuildMicromapsEXT");
-    if (table->BuildMicromapsEXT == nullptr) { table->BuildMicromapsEXT = (PFN_vkBuildMicromapsEXT)StubBuildMicromapsEXT; }
-    table->CopyMicromapEXT = (PFN_vkCopyMicromapEXT) gpa(device, "vkCopyMicromapEXT");
-    if (table->CopyMicromapEXT == nullptr) { table->CopyMicromapEXT = (PFN_vkCopyMicromapEXT)StubCopyMicromapEXT; }
-    table->CopyMicromapToMemoryEXT = (PFN_vkCopyMicromapToMemoryEXT) gpa(device, "vkCopyMicromapToMemoryEXT");
-    if (table->CopyMicromapToMemoryEXT == nullptr) { table->CopyMicromapToMemoryEXT = (PFN_vkCopyMicromapToMemoryEXT)StubCopyMicromapToMemoryEXT; }
-    table->CopyMemoryToMicromapEXT = (PFN_vkCopyMemoryToMicromapEXT) gpa(device, "vkCopyMemoryToMicromapEXT");
-    if (table->CopyMemoryToMicromapEXT == nullptr) { table->CopyMemoryToMicromapEXT = (PFN_vkCopyMemoryToMicromapEXT)StubCopyMemoryToMicromapEXT; }
-    table->WriteMicromapsPropertiesEXT = (PFN_vkWriteMicromapsPropertiesEXT) gpa(device, "vkWriteMicromapsPropertiesEXT");
-    if (table->WriteMicromapsPropertiesEXT == nullptr) { table->WriteMicromapsPropertiesEXT = (PFN_vkWriteMicromapsPropertiesEXT)StubWriteMicromapsPropertiesEXT; }
-    table->CmdCopyMicromapEXT = (PFN_vkCmdCopyMicromapEXT) gpa(device, "vkCmdCopyMicromapEXT");
-    if (table->CmdCopyMicromapEXT == nullptr) { table->CmdCopyMicromapEXT = (PFN_vkCmdCopyMicromapEXT)StubCmdCopyMicromapEXT; }
-    table->CmdCopyMicromapToMemoryEXT = (PFN_vkCmdCopyMicromapToMemoryEXT) gpa(device, "vkCmdCopyMicromapToMemoryEXT");
-    if (table->CmdCopyMicromapToMemoryEXT == nullptr) { table->CmdCopyMicromapToMemoryEXT = (PFN_vkCmdCopyMicromapToMemoryEXT)StubCmdCopyMicromapToMemoryEXT; }
-    table->CmdCopyMemoryToMicromapEXT = (PFN_vkCmdCopyMemoryToMicromapEXT) gpa(device, "vkCmdCopyMemoryToMicromapEXT");
-    if (table->CmdCopyMemoryToMicromapEXT == nullptr) { table->CmdCopyMemoryToMicromapEXT = (PFN_vkCmdCopyMemoryToMicromapEXT)StubCmdCopyMemoryToMicromapEXT; }
-    table->CmdWriteMicromapsPropertiesEXT = (PFN_vkCmdWriteMicromapsPropertiesEXT) gpa(device, "vkCmdWriteMicromapsPropertiesEXT");
-    if (table->CmdWriteMicromapsPropertiesEXT == nullptr) { table->CmdWriteMicromapsPropertiesEXT = (PFN_vkCmdWriteMicromapsPropertiesEXT)StubCmdWriteMicromapsPropertiesEXT; }
-    table->GetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT) gpa(device, "vkGetDeviceMicromapCompatibilityEXT");
-    if (table->GetDeviceMicromapCompatibilityEXT == nullptr) { table->GetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT)StubGetDeviceMicromapCompatibilityEXT; }
-    table->GetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT) gpa(device, "vkGetMicromapBuildSizesEXT");
-    if (table->GetMicromapBuildSizesEXT == nullptr) { table->GetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT)StubGetMicromapBuildSizesEXT; }
-    table->SetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT) gpa(device, "vkSetDeviceMemoryPriorityEXT");
-    if (table->SetDeviceMemoryPriorityEXT == nullptr) { table->SetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT)StubSetDeviceMemoryPriorityEXT; }
-    table->GetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE) gpa(device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE");
-    if (table->GetDescriptorSetLayoutHostMappingInfoVALVE == nullptr) { table->GetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)StubGetDescriptorSetLayoutHostMappingInfoVALVE; }
-    table->GetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE) gpa(device, "vkGetDescriptorSetHostMappingVALVE");
-    if (table->GetDescriptorSetHostMappingVALVE == nullptr) { table->GetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)StubGetDescriptorSetHostMappingVALVE; }
-    table->CmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT) gpa(device, "vkCmdSetTessellationDomainOriginEXT");
-    if (table->CmdSetTessellationDomainOriginEXT == nullptr) { table->CmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)StubCmdSetTessellationDomainOriginEXT; }
-    table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT) gpa(device, "vkCmdSetDepthClampEnableEXT");
-    if (table->CmdSetDepthClampEnableEXT == nullptr) { table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)StubCmdSetDepthClampEnableEXT; }
-    table->CmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT) gpa(device, "vkCmdSetPolygonModeEXT");
-    if (table->CmdSetPolygonModeEXT == nullptr) { table->CmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)StubCmdSetPolygonModeEXT; }
-    table->CmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT) gpa(device, "vkCmdSetRasterizationSamplesEXT");
-    if (table->CmdSetRasterizationSamplesEXT == nullptr) { table->CmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)StubCmdSetRasterizationSamplesEXT; }
-    table->CmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT) gpa(device, "vkCmdSetSampleMaskEXT");
-    if (table->CmdSetSampleMaskEXT == nullptr) { table->CmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)StubCmdSetSampleMaskEXT; }
-    table->CmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT) gpa(device, "vkCmdSetAlphaToCoverageEnableEXT");
-    if (table->CmdSetAlphaToCoverageEnableEXT == nullptr) { table->CmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)StubCmdSetAlphaToCoverageEnableEXT; }
-    table->CmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT) gpa(device, "vkCmdSetAlphaToOneEnableEXT");
-    if (table->CmdSetAlphaToOneEnableEXT == nullptr) { table->CmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)StubCmdSetAlphaToOneEnableEXT; }
-    table->CmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT) gpa(device, "vkCmdSetLogicOpEnableEXT");
-    if (table->CmdSetLogicOpEnableEXT == nullptr) { table->CmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)StubCmdSetLogicOpEnableEXT; }
-    table->CmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT) gpa(device, "vkCmdSetColorBlendEnableEXT");
-    if (table->CmdSetColorBlendEnableEXT == nullptr) { table->CmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)StubCmdSetColorBlendEnableEXT; }
-    table->CmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT) gpa(device, "vkCmdSetColorBlendEquationEXT");
-    if (table->CmdSetColorBlendEquationEXT == nullptr) { table->CmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)StubCmdSetColorBlendEquationEXT; }
-    table->CmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT) gpa(device, "vkCmdSetColorWriteMaskEXT");
-    if (table->CmdSetColorWriteMaskEXT == nullptr) { table->CmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)StubCmdSetColorWriteMaskEXT; }
-    table->CmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT) gpa(device, "vkCmdSetRasterizationStreamEXT");
-    if (table->CmdSetRasterizationStreamEXT == nullptr) { table->CmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)StubCmdSetRasterizationStreamEXT; }
-    table->CmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT) gpa(device, "vkCmdSetConservativeRasterizationModeEXT");
-    if (table->CmdSetConservativeRasterizationModeEXT == nullptr) { table->CmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)StubCmdSetConservativeRasterizationModeEXT; }
-    table->CmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT) gpa(device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
-    if (table->CmdSetExtraPrimitiveOverestimationSizeEXT == nullptr) { table->CmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)StubCmdSetExtraPrimitiveOverestimationSizeEXT; }
-    table->CmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT) gpa(device, "vkCmdSetDepthClipEnableEXT");
-    if (table->CmdSetDepthClipEnableEXT == nullptr) { table->CmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)StubCmdSetDepthClipEnableEXT; }
-    table->CmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT) gpa(device, "vkCmdSetSampleLocationsEnableEXT");
-    if (table->CmdSetSampleLocationsEnableEXT == nullptr) { table->CmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)StubCmdSetSampleLocationsEnableEXT; }
-    table->CmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT) gpa(device, "vkCmdSetColorBlendAdvancedEXT");
-    if (table->CmdSetColorBlendAdvancedEXT == nullptr) { table->CmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)StubCmdSetColorBlendAdvancedEXT; }
-    table->CmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT) gpa(device, "vkCmdSetProvokingVertexModeEXT");
-    if (table->CmdSetProvokingVertexModeEXT == nullptr) { table->CmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)StubCmdSetProvokingVertexModeEXT; }
-    table->CmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT) gpa(device, "vkCmdSetLineRasterizationModeEXT");
-    if (table->CmdSetLineRasterizationModeEXT == nullptr) { table->CmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)StubCmdSetLineRasterizationModeEXT; }
-    table->CmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT) gpa(device, "vkCmdSetLineStippleEnableEXT");
-    if (table->CmdSetLineStippleEnableEXT == nullptr) { table->CmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)StubCmdSetLineStippleEnableEXT; }
-    table->CmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT) gpa(device, "vkCmdSetDepthClipNegativeOneToOneEXT");
-    if (table->CmdSetDepthClipNegativeOneToOneEXT == nullptr) { table->CmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)StubCmdSetDepthClipNegativeOneToOneEXT; }
-    table->CmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV) gpa(device, "vkCmdSetViewportWScalingEnableNV");
-    if (table->CmdSetViewportWScalingEnableNV == nullptr) { table->CmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)StubCmdSetViewportWScalingEnableNV; }
-    table->CmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV) gpa(device, "vkCmdSetViewportSwizzleNV");
-    if (table->CmdSetViewportSwizzleNV == nullptr) { table->CmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)StubCmdSetViewportSwizzleNV; }
-    table->CmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV) gpa(device, "vkCmdSetCoverageToColorEnableNV");
-    if (table->CmdSetCoverageToColorEnableNV == nullptr) { table->CmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)StubCmdSetCoverageToColorEnableNV; }
-    table->CmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV) gpa(device, "vkCmdSetCoverageToColorLocationNV");
-    if (table->CmdSetCoverageToColorLocationNV == nullptr) { table->CmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)StubCmdSetCoverageToColorLocationNV; }
-    table->CmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV) gpa(device, "vkCmdSetCoverageModulationModeNV");
-    if (table->CmdSetCoverageModulationModeNV == nullptr) { table->CmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)StubCmdSetCoverageModulationModeNV; }
-    table->CmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV) gpa(device, "vkCmdSetCoverageModulationTableEnableNV");
-    if (table->CmdSetCoverageModulationTableEnableNV == nullptr) { table->CmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)StubCmdSetCoverageModulationTableEnableNV; }
-    table->CmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV) gpa(device, "vkCmdSetCoverageModulationTableNV");
-    if (table->CmdSetCoverageModulationTableNV == nullptr) { table->CmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)StubCmdSetCoverageModulationTableNV; }
-    table->CmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV) gpa(device, "vkCmdSetShadingRateImageEnableNV");
-    if (table->CmdSetShadingRateImageEnableNV == nullptr) { table->CmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)StubCmdSetShadingRateImageEnableNV; }
-    table->CmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV) gpa(device, "vkCmdSetRepresentativeFragmentTestEnableNV");
-    if (table->CmdSetRepresentativeFragmentTestEnableNV == nullptr) { table->CmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)StubCmdSetRepresentativeFragmentTestEnableNV; }
-    table->CmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV) gpa(device, "vkCmdSetCoverageReductionModeNV");
-    if (table->CmdSetCoverageReductionModeNV == nullptr) { table->CmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)StubCmdSetCoverageReductionModeNV; }
-    table->GetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT) gpa(device, "vkGetShaderModuleIdentifierEXT");
-    if (table->GetShaderModuleIdentifierEXT == nullptr) { table->GetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT)StubGetShaderModuleIdentifierEXT; }
-    table->GetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT) gpa(device, "vkGetShaderModuleCreateInfoIdentifierEXT");
-    if (table->GetShaderModuleCreateInfoIdentifierEXT == nullptr) { table->GetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT)StubGetShaderModuleCreateInfoIdentifierEXT; }
-    table->CreateOpticalFlowSessionNV = (PFN_vkCreateOpticalFlowSessionNV) gpa(device, "vkCreateOpticalFlowSessionNV");
-    if (table->CreateOpticalFlowSessionNV == nullptr) { table->CreateOpticalFlowSessionNV = (PFN_vkCreateOpticalFlowSessionNV)StubCreateOpticalFlowSessionNV; }
-    table->DestroyOpticalFlowSessionNV = (PFN_vkDestroyOpticalFlowSessionNV) gpa(device, "vkDestroyOpticalFlowSessionNV");
-    if (table->DestroyOpticalFlowSessionNV == nullptr) { table->DestroyOpticalFlowSessionNV = (PFN_vkDestroyOpticalFlowSessionNV)StubDestroyOpticalFlowSessionNV; }
-    table->BindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV) gpa(device, "vkBindOpticalFlowSessionImageNV");
-    if (table->BindOpticalFlowSessionImageNV == nullptr) { table->BindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV)StubBindOpticalFlowSessionImageNV; }
-    table->CmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV) gpa(device, "vkCmdOpticalFlowExecuteNV");
-    if (table->CmdOpticalFlowExecuteNV == nullptr) { table->CmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV)StubCmdOpticalFlowExecuteNV; }
-    table->GetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM) gpa(device, "vkGetFramebufferTilePropertiesQCOM");
-    if (table->GetFramebufferTilePropertiesQCOM == nullptr) { table->GetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM)StubGetFramebufferTilePropertiesQCOM; }
-    table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM) gpa(device, "vkGetDynamicRenderingTilePropertiesQCOM");
-    if (table->GetDynamicRenderingTilePropertiesQCOM == nullptr) { table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)StubGetDynamicRenderingTilePropertiesQCOM; }
-    table->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR) gpa(device, "vkCreateAccelerationStructureKHR");
-    if (table->CreateAccelerationStructureKHR == nullptr) { table->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)StubCreateAccelerationStructureKHR; }
-    table->DestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR) gpa(device, "vkDestroyAccelerationStructureKHR");
-    if (table->DestroyAccelerationStructureKHR == nullptr) { table->DestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR)StubDestroyAccelerationStructureKHR; }
-    table->CmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR) gpa(device, "vkCmdBuildAccelerationStructuresKHR");
-    if (table->CmdBuildAccelerationStructuresKHR == nullptr) { table->CmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR)StubCmdBuildAccelerationStructuresKHR; }
-    table->CmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR) gpa(device, "vkCmdBuildAccelerationStructuresIndirectKHR");
-    if (table->CmdBuildAccelerationStructuresIndirectKHR == nullptr) { table->CmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR)StubCmdBuildAccelerationStructuresIndirectKHR; }
-    table->BuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR) gpa(device, "vkBuildAccelerationStructuresKHR");
-    if (table->BuildAccelerationStructuresKHR == nullptr) { table->BuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR)StubBuildAccelerationStructuresKHR; }
-    table->CopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR) gpa(device, "vkCopyAccelerationStructureKHR");
-    if (table->CopyAccelerationStructureKHR == nullptr) { table->CopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR)StubCopyAccelerationStructureKHR; }
-    table->CopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR) gpa(device, "vkCopyAccelerationStructureToMemoryKHR");
-    if (table->CopyAccelerationStructureToMemoryKHR == nullptr) { table->CopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR)StubCopyAccelerationStructureToMemoryKHR; }
-    table->CopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR) gpa(device, "vkCopyMemoryToAccelerationStructureKHR");
-    if (table->CopyMemoryToAccelerationStructureKHR == nullptr) { table->CopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR)StubCopyMemoryToAccelerationStructureKHR; }
-    table->WriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR) gpa(device, "vkWriteAccelerationStructuresPropertiesKHR");
-    if (table->WriteAccelerationStructuresPropertiesKHR == nullptr) { table->WriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR)StubWriteAccelerationStructuresPropertiesKHR; }
-    table->CmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR) gpa(device, "vkCmdCopyAccelerationStructureKHR");
-    if (table->CmdCopyAccelerationStructureKHR == nullptr) { table->CmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR)StubCmdCopyAccelerationStructureKHR; }
-    table->CmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR) gpa(device, "vkCmdCopyAccelerationStructureToMemoryKHR");
-    if (table->CmdCopyAccelerationStructureToMemoryKHR == nullptr) { table->CmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR)StubCmdCopyAccelerationStructureToMemoryKHR; }
-    table->CmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR) gpa(device, "vkCmdCopyMemoryToAccelerationStructureKHR");
-    if (table->CmdCopyMemoryToAccelerationStructureKHR == nullptr) { table->CmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR)StubCmdCopyMemoryToAccelerationStructureKHR; }
-    table->GetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR) gpa(device, "vkGetAccelerationStructureDeviceAddressKHR");
-    if (table->GetAccelerationStructureDeviceAddressKHR == nullptr) { table->GetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR)StubGetAccelerationStructureDeviceAddressKHR; }
-    table->CmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR) gpa(device, "vkCmdWriteAccelerationStructuresPropertiesKHR");
-    if (table->CmdWriteAccelerationStructuresPropertiesKHR == nullptr) { table->CmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR)StubCmdWriteAccelerationStructuresPropertiesKHR; }
-    table->GetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR) gpa(device, "vkGetDeviceAccelerationStructureCompatibilityKHR");
-    if (table->GetDeviceAccelerationStructureCompatibilityKHR == nullptr) { table->GetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)StubGetDeviceAccelerationStructureCompatibilityKHR; }
-    table->GetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR) gpa(device, "vkGetAccelerationStructureBuildSizesKHR");
-    if (table->GetAccelerationStructureBuildSizesKHR == nullptr) { table->GetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR)StubGetAccelerationStructureBuildSizesKHR; }
-    table->CmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR) gpa(device, "vkCmdTraceRaysKHR");
-    if (table->CmdTraceRaysKHR == nullptr) { table->CmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR)StubCmdTraceRaysKHR; }
-    table->CreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR) gpa(device, "vkCreateRayTracingPipelinesKHR");
-    if (table->CreateRayTracingPipelinesKHR == nullptr) { table->CreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR)StubCreateRayTracingPipelinesKHR; }
-    table->GetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR) gpa(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR");
-    if (table->GetRayTracingCaptureReplayShaderGroupHandlesKHR == nullptr) { table->GetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)StubGetRayTracingCaptureReplayShaderGroupHandlesKHR; }
-    table->CmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR) gpa(device, "vkCmdTraceRaysIndirectKHR");
-    if (table->CmdTraceRaysIndirectKHR == nullptr) { table->CmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR)StubCmdTraceRaysIndirectKHR; }
-    table->GetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR) gpa(device, "vkGetRayTracingShaderGroupStackSizeKHR");
-    if (table->GetRayTracingShaderGroupStackSizeKHR == nullptr) { table->GetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR)StubGetRayTracingShaderGroupStackSizeKHR; }
-    table->CmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR) gpa(device, "vkCmdSetRayTracingPipelineStackSizeKHR");
-    if (table->CmdSetRayTracingPipelineStackSizeKHR == nullptr) { table->CmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR)StubCmdSetRayTracingPipelineStackSizeKHR; }
-    table->CmdDrawMeshTasksEXT = (PFN_vkCmdDrawMeshTasksEXT) gpa(device, "vkCmdDrawMeshTasksEXT");
-    if (table->CmdDrawMeshTasksEXT == nullptr) { table->CmdDrawMeshTasksEXT = (PFN_vkCmdDrawMeshTasksEXT)StubCmdDrawMeshTasksEXT; }
-    table->CmdDrawMeshTasksIndirectEXT = (PFN_vkCmdDrawMeshTasksIndirectEXT) gpa(device, "vkCmdDrawMeshTasksIndirectEXT");
-    if (table->CmdDrawMeshTasksIndirectEXT == nullptr) { table->CmdDrawMeshTasksIndirectEXT = (PFN_vkCmdDrawMeshTasksIndirectEXT)StubCmdDrawMeshTasksIndirectEXT; }
-    table->CmdDrawMeshTasksIndirectCountEXT = (PFN_vkCmdDrawMeshTasksIndirectCountEXT) gpa(device, "vkCmdDrawMeshTasksIndirectCountEXT");
-    if (table->CmdDrawMeshTasksIndirectCountEXT == nullptr) { table->CmdDrawMeshTasksIndirectCountEXT = (PFN_vkCmdDrawMeshTasksIndirectCountEXT)StubCmdDrawMeshTasksIndirectCountEXT; }
-}
-
-
-static inline void layer_init_instance_dispatch_table(VkInstance instance, VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa) {
-    memset(table, 0, sizeof(*table));
-
-    // Instance function pointers
-    table->DestroyInstance = (PFN_vkDestroyInstance) gpa(instance, "vkDestroyInstance");
-    table->EnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) gpa(instance, "vkEnumeratePhysicalDevices");
-    table->GetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) gpa(instance, "vkGetPhysicalDeviceFeatures");
-    table->GetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) gpa(instance, "vkGetPhysicalDeviceFormatProperties");
-    table->GetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties");
-    table->GetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) gpa(instance, "vkGetPhysicalDeviceProperties");
-    table->GetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties");
-    table->GetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) gpa(instance, "vkGetPhysicalDeviceMemoryProperties");
-    table->GetInstanceProcAddr = gpa;
-    table->EnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) gpa(instance, "vkEnumerateDeviceExtensionProperties");
-    table->EnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) gpa(instance, "vkEnumerateDeviceLayerProperties");
-    table->GetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties");
-    table->EnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) gpa(instance, "vkEnumeratePhysicalDeviceGroups");
-    table->GetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) gpa(instance, "vkGetPhysicalDeviceFeatures2");
-    table->GetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) gpa(instance, "vkGetPhysicalDeviceProperties2");
-    table->GetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) gpa(instance, "vkGetPhysicalDeviceFormatProperties2");
-    table->GetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties2");
-    table->GetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties2");
-    table->GetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) gpa(instance, "vkGetPhysicalDeviceMemoryProperties2");
-    table->GetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2");
-    table->GetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) gpa(instance, "vkGetPhysicalDeviceExternalBufferProperties");
-    table->GetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) gpa(instance, "vkGetPhysicalDeviceExternalFenceProperties");
-    table->GetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) gpa(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties");
-    table->GetPhysicalDeviceToolProperties = (PFN_vkGetPhysicalDeviceToolProperties) gpa(instance, "vkGetPhysicalDeviceToolProperties");
-    table->DestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) gpa(instance, "vkDestroySurfaceKHR");
-    table->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
-    table->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
-    table->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
-    table->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
-    table->GetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) gpa(instance, "vkGetPhysicalDevicePresentRectanglesKHR");
-    table->GetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR");
-    table->GetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
-    table->GetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR) gpa(instance, "vkGetDisplayPlaneSupportedDisplaysKHR");
-    table->GetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR) gpa(instance, "vkGetDisplayModePropertiesKHR");
-    table->CreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR) gpa(instance, "vkCreateDisplayModeKHR");
-    table->GetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR) gpa(instance, "vkGetDisplayPlaneCapabilitiesKHR");
-    table->CreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR) gpa(instance, "vkCreateDisplayPlaneSurfaceKHR");
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-    table->CreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR) gpa(instance, "vkCreateXlibSurfaceKHR");
-#endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-    table->GetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
-#endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
-    table->CreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR) gpa(instance, "vkCreateXcbSurfaceKHR");
-#endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
-    table->GetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
-#endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-    table->CreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR) gpa(instance, "vkCreateWaylandSurfaceKHR");
-#endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-    table->GetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
-#endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
-    table->CreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR) gpa(instance, "vkCreateAndroidSurfaceKHR");
-#endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->CreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) gpa(instance, "vkCreateWin32SurfaceKHR");
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->GetPhysicalDeviceVideoCapabilitiesKHR = (PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
-    table->GetPhysicalDeviceVideoFormatPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-    table->GetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR) gpa(instance, "vkGetPhysicalDeviceFeatures2KHR");
-    table->GetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR) gpa(instance, "vkGetPhysicalDeviceProperties2KHR");
-    table->GetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceFormatProperties2KHR");
-    table->GetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR");
-    table->GetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR");
-    table->GetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR) gpa(instance, "vkGetPhysicalDeviceMemoryProperties2KHR");
-    table->GetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
-    table->EnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR) gpa(instance, "vkEnumeratePhysicalDeviceGroupsKHR");
-    table->GetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR");
-    table->GetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
-    table->GetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
-    table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) gpa(instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
-    table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) gpa(instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
-    table->GetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
-    table->GetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR");
-    table->GetPhysicalDeviceDisplayProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayProperties2KHR) gpa(instance, "vkGetPhysicalDeviceDisplayProperties2KHR");
-    table->GetPhysicalDeviceDisplayPlaneProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR) gpa(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
-    table->GetDisplayModeProperties2KHR = (PFN_vkGetDisplayModeProperties2KHR) gpa(instance, "vkGetDisplayModeProperties2KHR");
-    table->GetDisplayPlaneCapabilities2KHR = (PFN_vkGetDisplayPlaneCapabilities2KHR) gpa(instance, "vkGetDisplayPlaneCapabilities2KHR");
-    table->GetPhysicalDeviceFragmentShadingRatesKHR = (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR) gpa(instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
-    table->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) gpa(instance, "vkCreateDebugReportCallbackEXT");
-    table->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) gpa(instance, "vkDestroyDebugReportCallbackEXT");
-    table->DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) gpa(instance, "vkDebugReportMessageEXT");
-#ifdef VK_USE_PLATFORM_GGP
-    table->CreateStreamDescriptorSurfaceGGP = (PFN_vkCreateStreamDescriptorSurfaceGGP) gpa(instance, "vkCreateStreamDescriptorSurfaceGGP");
-#endif // VK_USE_PLATFORM_GGP
-    table->GetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV) gpa(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
-#ifdef VK_USE_PLATFORM_VI_NN
-    table->CreateViSurfaceNN = (PFN_vkCreateViSurfaceNN) gpa(instance, "vkCreateViSurfaceNN");
-#endif // VK_USE_PLATFORM_VI_NN
-    table->ReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT) gpa(instance, "vkReleaseDisplayEXT");
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
-    table->AcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT) gpa(instance, "vkAcquireXlibDisplayEXT");
-#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
-    table->GetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT) gpa(instance, "vkGetRandROutputDisplayEXT");
-#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-    table->GetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT");
-#ifdef VK_USE_PLATFORM_IOS_MVK
-    table->CreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK) gpa(instance, "vkCreateIOSSurfaceMVK");
-#endif // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_MACOS_MVK
-    table->CreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK) gpa(instance, "vkCreateMacOSSurfaceMVK");
-#endif // VK_USE_PLATFORM_MACOS_MVK
-    table->CreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT) gpa(instance, "vkCreateDebugUtilsMessengerEXT");
-    table->DestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT) gpa(instance, "vkDestroyDebugUtilsMessengerEXT");
-    table->SubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT) gpa(instance, "vkSubmitDebugUtilsMessageEXT");
-    table->GetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT) gpa(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT");
-    table->GetPhysicalDeviceCalibrateableTimeDomainsEXT = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT) gpa(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
-#ifdef VK_USE_PLATFORM_FUCHSIA
-    table->CreateImagePipeSurfaceFUCHSIA = (PFN_vkCreateImagePipeSurfaceFUCHSIA) gpa(instance, "vkCreateImagePipeSurfaceFUCHSIA");
-#endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_METAL_EXT
-    table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT) gpa(instance, "vkCreateMetalSurfaceEXT");
-#endif // VK_USE_PLATFORM_METAL_EXT
-    table->GetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT) gpa(instance, "vkGetPhysicalDeviceToolPropertiesEXT");
-    table->GetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV) gpa(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV");
-    table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) gpa(instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetPhysicalDeviceSurfacePresentModes2EXT = (PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT");
-#endif // VK_USE_PLATFORM_WIN32_KHR
-    table->CreateHeadlessSurfaceEXT = (PFN_vkCreateHeadlessSurfaceEXT) gpa(instance, "vkCreateHeadlessSurfaceEXT");
-    table->AcquireDrmDisplayEXT = (PFN_vkAcquireDrmDisplayEXT) gpa(instance, "vkAcquireDrmDisplayEXT");
-    table->GetDrmDisplayEXT = (PFN_vkGetDrmDisplayEXT) gpa(instance, "vkGetDrmDisplayEXT");
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->AcquireWinrtDisplayNV = (PFN_vkAcquireWinrtDisplayNV) gpa(instance, "vkAcquireWinrtDisplayNV");
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-    table->GetWinrtDisplayNV = (PFN_vkGetWinrtDisplayNV) gpa(instance, "vkGetWinrtDisplayNV");
-#endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
-    table->CreateDirectFBSurfaceEXT = (PFN_vkCreateDirectFBSurfaceEXT) gpa(instance, "vkCreateDirectFBSurfaceEXT");
-#endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
-    table->GetPhysicalDeviceDirectFBPresentationSupportEXT = (PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT) gpa(instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT");
-#endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
-    table->CreateScreenSurfaceQNX = (PFN_vkCreateScreenSurfaceQNX) gpa(instance, "vkCreateScreenSurfaceQNX");
-#endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
-    table->GetPhysicalDeviceScreenPresentationSupportQNX = (PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX) gpa(instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX");
-#endif // VK_USE_PLATFORM_SCREEN_QNX
-    table->GetPhysicalDeviceOpticalFlowImageFormatsNV = (PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV) gpa(instance, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV");
-}
diff --git a/loader/generated/vk_layer_dispatch_table.h b/loader/generated/vk_layer_dispatch_table.h
index 5fc3c86..7c775c5 100644
--- a/loader/generated/vk_layer_dispatch_table.h
+++ b/loader/generated/vk_layer_dispatch_table.h
@@ -24,7 +24,9 @@
 
 #pragma once
 
+#if !defined(PFN_GetPhysicalDeviceProcAddr)
 typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
+#endif
 
 // Instance function pointer dispatch table
 typedef struct VkLayerInstanceDispatchTable_ {
@@ -86,49 +88,45 @@
     PFN_vkCreateDisplayPlaneSurfaceKHR CreateDisplayPlaneSurfaceKHR;
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR GetPhysicalDeviceVideoCapabilitiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR GetPhysicalDeviceVideoFormatPropertiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR;
@@ -168,13 +166,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR GetPhysicalDeviceFragmentShadingRatesKHR;
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR GetPhysicalDeviceCooperativeMatrixPropertiesKHR;
+
     // ---- VK_EXT_debug_report extension commands
     PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
     PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
     PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     PFN_vkCreateStreamDescriptorSurfaceGGP CreateStreamDescriptorSurfaceGGP;
 #endif // VK_USE_PLATFORM_GGP
 
@@ -182,7 +188,7 @@
     PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV;
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     PFN_vkCreateViSurfaceNN CreateViSurfaceNN;
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -190,10 +196,10 @@
     PFN_vkReleaseDisplayEXT ReleaseDisplayEXT;
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     PFN_vkAcquireXlibDisplayEXT AcquireXlibDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     PFN_vkGetRandROutputDisplayEXT GetRandROutputDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -201,12 +207,12 @@
     PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT GetPhysicalDeviceSurfaceCapabilities2EXT;
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     PFN_vkCreateIOSSurfaceMVK CreateIOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -222,12 +228,12 @@
     PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT GetPhysicalDeviceCalibrateableTimeDomainsEXT;
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkCreateImagePipeSurfaceFUCHSIA CreateImagePipeSurfaceFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     PFN_vkCreateMetalSurfaceEXT CreateMetalSurfaceEXT;
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -241,7 +247,7 @@
     PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT GetPhysicalDeviceSurfacePresentModes2EXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -253,26 +259,26 @@
     PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT;
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkAcquireWinrtDisplayNV AcquireWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetWinrtDisplayNV GetWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     PFN_vkCreateDirectFBSurfaceEXT CreateDirectFBSurfaceEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT GetPhysicalDeviceDirectFBPresentationSupportEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     PFN_vkCreateScreenSurfaceQNX CreateScreenSurfaceQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX GetPhysicalDeviceScreenPresentationSupportQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -493,41 +499,19 @@
     PFN_vkCreateSharedSwapchainsKHR CreateSharedSwapchainsKHR;
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCreateVideoSessionKHR CreateVideoSessionKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkDestroyVideoSessionKHR DestroyVideoSessionKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkGetVideoSessionMemoryRequirementsKHR GetVideoSessionMemoryRequirementsKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkBindVideoSessionMemoryKHR BindVideoSessionMemoryKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCreateVideoSessionParametersKHR CreateVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkUpdateVideoSessionParametersKHR UpdateVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkDestroyVideoSessionParametersKHR DestroyVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCmdBeginVideoCodingKHR CmdBeginVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCmdEndVideoCodingKHR CmdEndVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCmdControlVideoCodingKHR CmdControlVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_video_decode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkCmdDecodeVideoKHR CmdDecodeVideoKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_dynamic_rendering extension commands
     PFN_vkCmdBeginRenderingKHR CmdBeginRenderingKHR;
@@ -542,10 +526,10 @@
     PFN_vkTrimCommandPoolKHR TrimCommandPoolKHR;
 
     // ---- VK_KHR_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetMemoryWin32HandleKHR GetMemoryWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetMemoryWin32HandlePropertiesKHR GetMemoryWin32HandlePropertiesKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -554,10 +538,10 @@
     PFN_vkGetMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR;
 
     // ---- VK_KHR_external_semaphore_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkImportSemaphoreWin32HandleKHR ImportSemaphoreWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetSemaphoreWin32HandleKHR GetSemaphoreWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -584,10 +568,10 @@
     PFN_vkGetSwapchainStatusKHR GetSwapchainStatusKHR;
 
     // ---- VK_KHR_external_fence_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkImportFenceWin32HandleKHR ImportFenceWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetFenceWin32HandleKHR GetFenceWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -647,8 +631,15 @@
     PFN_vkGetPipelineExecutableStatisticsKHR GetPipelineExecutableStatisticsKHR;
     PFN_vkGetPipelineExecutableInternalRepresentationsKHR GetPipelineExecutableInternalRepresentationsKHR;
 
+    // ---- VK_KHR_map_memory2 extension commands
+    PFN_vkMapMemory2KHR MapMemory2KHR;
+    PFN_vkUnmapMemory2KHR UnmapMemory2KHR;
+
     // ---- VK_KHR_video_encode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkGetEncodedVideoSessionParametersKHR GetEncodedVideoSessionParametersKHR;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
     PFN_vkCmdEncodeVideoKHR CmdEncodeVideoKHR;
 #endif // VK_ENABLE_BETA_EXTENSIONS
 
@@ -678,6 +669,12 @@
     PFN_vkGetDeviceImageMemoryRequirementsKHR GetDeviceImageMemoryRequirementsKHR;
     PFN_vkGetDeviceImageSparseMemoryRequirementsKHR GetDeviceImageSparseMemoryRequirementsKHR;
 
+    // ---- VK_KHR_maintenance5 extension commands
+    PFN_vkCmdBindIndexBuffer2KHR CmdBindIndexBuffer2KHR;
+    PFN_vkGetRenderingAreaGranularityKHR GetRenderingAreaGranularityKHR;
+    PFN_vkGetDeviceImageSubresourceLayoutKHR GetDeviceImageSubresourceLayoutKHR;
+    PFN_vkGetImageSubresourceLayout2KHR GetImageSubresourceLayout2KHR;
+
     // ---- VK_EXT_debug_marker extension commands
     PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT;
     PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT;
@@ -712,7 +709,7 @@
     PFN_vkGetShaderInfoAMD GetShaderInfoAMD;
 
     // ---- VK_NV_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetMemoryWin32HandleNV GetMemoryWin32HandleNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -735,6 +732,8 @@
 
     // ---- VK_EXT_discard_rectangles extension commands
     PFN_vkCmdSetDiscardRectangleEXT CmdSetDiscardRectangleEXT;
+    PFN_vkCmdSetDiscardRectangleEnableEXT CmdSetDiscardRectangleEnableEXT;
+    PFN_vkCmdSetDiscardRectangleModeEXT CmdSetDiscardRectangleModeEXT;
 
     // ---- VK_EXT_hdr_metadata extension commands
     PFN_vkSetHdrMetadataEXT SetHdrMetadataEXT;
@@ -750,13 +749,36 @@
     PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
 
     // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     PFN_vkGetAndroidHardwareBufferPropertiesANDROID GetAndroidHardwareBufferPropertiesANDROID;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     PFN_vkGetMemoryAndroidHardwareBufferANDROID GetMemoryAndroidHardwareBufferANDROID;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
+    // ---- VK_AMDX_shader_enqueue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkCreateExecutionGraphPipelinesAMDX CreateExecutionGraphPipelinesAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkGetExecutionGraphPipelineScratchSizeAMDX GetExecutionGraphPipelineScratchSizeAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkGetExecutionGraphPipelineNodeIndexAMDX GetExecutionGraphPipelineNodeIndexAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkCmdInitializeGraphScratchMemoryAMDX CmdInitializeGraphScratchMemoryAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkCmdDispatchGraphAMDX CmdDispatchGraphAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkCmdDispatchGraphIndirectAMDX CmdDispatchGraphIndirectAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkCmdDispatchGraphIndirectCountAMDX CmdDispatchGraphIndirectCountAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
     // ---- VK_EXT_sample_locations extension commands
     PFN_vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT;
 
@@ -804,6 +826,7 @@
     PFN_vkCmdDrawMeshTasksIndirectCountNV CmdDrawMeshTasksIndirectCountNV;
 
     // ---- VK_NV_scissor_exclusive extension commands
+    PFN_vkCmdSetExclusiveScissorEnableNV CmdSetExclusiveScissorEnableNV;
     PFN_vkCmdSetExclusiveScissorNV CmdSetExclusiveScissorNV;
 
     // ---- VK_NV_device_diagnostic_checkpoints extension commands
@@ -828,13 +851,13 @@
     PFN_vkGetBufferDeviceAddressEXT GetBufferDeviceAddressEXT;
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkAcquireFullScreenExclusiveModeEXT AcquireFullScreenExclusiveModeEXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkReleaseFullScreenExclusiveModeEXT ReleaseFullScreenExclusiveModeEXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetDeviceGroupSurfacePresentModes2EXT GetDeviceGroupSurfacePresentModes2EXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -858,6 +881,16 @@
     PFN_vkCmdSetStencilTestEnableEXT CmdSetStencilTestEnableEXT;
     PFN_vkCmdSetStencilOpEXT CmdSetStencilOpEXT;
 
+    // ---- VK_EXT_host_image_copy extension commands
+    PFN_vkCopyMemoryToImageEXT CopyMemoryToImageEXT;
+    PFN_vkCopyImageToMemoryEXT CopyImageToMemoryEXT;
+    PFN_vkCopyImageToImageEXT CopyImageToImageEXT;
+    PFN_vkTransitionImageLayoutEXT TransitionImageLayoutEXT;
+    PFN_vkGetImageSubresourceLayout2EXT GetImageSubresourceLayout2EXT;
+
+    // ---- VK_EXT_swapchain_maintenance1 extension commands
+    PFN_vkReleaseSwapchainImagesEXT ReleaseSwapchainImagesEXT;
+
     // ---- VK_NV_device_generated_commands extension commands
     PFN_vkGetGeneratedCommandsMemoryRequirementsNV GetGeneratedCommandsMemoryRequirementsNV;
     PFN_vkCmdPreprocessGeneratedCommandsNV CmdPreprocessGeneratedCommandsNV;
@@ -866,6 +899,9 @@
     PFN_vkCreateIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV;
     PFN_vkDestroyIndirectCommandsLayoutNV DestroyIndirectCommandsLayoutNV;
 
+    // ---- VK_EXT_depth_bias_control extension commands
+    PFN_vkCmdSetDepthBias2EXT CmdSetDepthBias2EXT;
+
     // ---- VK_EXT_private_data extension commands
     PFN_vkCreatePrivateDataSlotEXT CreatePrivateDataSlotEXT;
     PFN_vkDestroyPrivateDataSlotEXT DestroyPrivateDataSlotEXT;
@@ -873,16 +909,26 @@
     PFN_vkGetPrivateDataEXT GetPrivateDataEXT;
 
     // ---- VK_EXT_metal_objects extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     PFN_vkExportMetalObjectsEXT ExportMetalObjectsEXT;
 #endif // VK_USE_PLATFORM_METAL_EXT
 
+    // ---- VK_EXT_descriptor_buffer extension commands
+    PFN_vkGetDescriptorSetLayoutSizeEXT GetDescriptorSetLayoutSizeEXT;
+    PFN_vkGetDescriptorSetLayoutBindingOffsetEXT GetDescriptorSetLayoutBindingOffsetEXT;
+    PFN_vkGetDescriptorEXT GetDescriptorEXT;
+    PFN_vkCmdBindDescriptorBuffersEXT CmdBindDescriptorBuffersEXT;
+    PFN_vkCmdSetDescriptorBufferOffsetsEXT CmdSetDescriptorBufferOffsetsEXT;
+    PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT CmdBindDescriptorBufferEmbeddedSamplersEXT;
+    PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT GetBufferOpaqueCaptureDescriptorDataEXT;
+    PFN_vkGetImageOpaqueCaptureDescriptorDataEXT GetImageOpaqueCaptureDescriptorDataEXT;
+    PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT GetImageViewOpaqueCaptureDescriptorDataEXT;
+    PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT GetSamplerOpaqueCaptureDescriptorDataEXT;
+    PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT GetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
+
     // ---- VK_NV_fragment_shading_rate_enums extension commands
     PFN_vkCmdSetFragmentShadingRateEnumNV CmdSetFragmentShadingRateEnumNV;
 
-    // ---- VK_EXT_image_compression_control extension commands
-    PFN_vkGetImageSubresourceLayout2EXT GetImageSubresourceLayout2EXT;
-
     // ---- VK_EXT_device_fault extension commands
     PFN_vkGetDeviceFaultInfoEXT GetDeviceFaultInfoEXT;
 
@@ -890,35 +936,35 @@
     PFN_vkCmdSetVertexInputEXT CmdSetVertexInputEXT;
 
     // ---- VK_FUCHSIA_external_memory extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkGetMemoryZirconHandleFUCHSIA GetMemoryZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA GetMemoryZirconHandlePropertiesFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_external_semaphore extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkImportSemaphoreZirconHandleFUCHSIA ImportSemaphoreZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkGetSemaphoreZirconHandleFUCHSIA GetSemaphoreZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_buffer_collection extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkCreateBufferCollectionFUCHSIA CreateBufferCollectionFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkSetBufferCollectionImageConstraintsFUCHSIA SetBufferCollectionImageConstraintsFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA SetBufferCollectionBufferConstraintsFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkDestroyBufferCollectionFUCHSIA DestroyBufferCollectionFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkGetBufferCollectionPropertiesFUCHSIA GetBufferCollectionPropertiesFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
@@ -965,6 +1011,10 @@
     PFN_vkGetDeviceMicromapCompatibilityEXT GetDeviceMicromapCompatibilityEXT;
     PFN_vkGetMicromapBuildSizesEXT GetMicromapBuildSizesEXT;
 
+    // ---- VK_HUAWEI_cluster_culling_shader extension commands
+    PFN_vkCmdDrawClusterHUAWEI CmdDrawClusterHUAWEI;
+    PFN_vkCmdDrawClusterIndirectHUAWEI CmdDrawClusterIndirectHUAWEI;
+
     // ---- VK_EXT_pageable_device_local_memory extension commands
     PFN_vkSetDeviceMemoryPriorityEXT SetDeviceMemoryPriorityEXT;
 
@@ -972,6 +1022,19 @@
     PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE GetDescriptorSetLayoutHostMappingInfoVALVE;
     PFN_vkGetDescriptorSetHostMappingVALVE GetDescriptorSetHostMappingVALVE;
 
+    // ---- VK_NV_copy_memory_indirect extension commands
+    PFN_vkCmdCopyMemoryIndirectNV CmdCopyMemoryIndirectNV;
+    PFN_vkCmdCopyMemoryToImageIndirectNV CmdCopyMemoryToImageIndirectNV;
+
+    // ---- VK_NV_memory_decompression extension commands
+    PFN_vkCmdDecompressMemoryNV CmdDecompressMemoryNV;
+    PFN_vkCmdDecompressMemoryIndirectCountNV CmdDecompressMemoryIndirectCountNV;
+
+    // ---- VK_NV_device_generated_commands_compute extension commands
+    PFN_vkGetPipelineIndirectMemoryRequirementsNV GetPipelineIndirectMemoryRequirementsNV;
+    PFN_vkCmdUpdatePipelineIndirectBufferNV CmdUpdatePipelineIndirectBufferNV;
+    PFN_vkGetPipelineIndirectDeviceAddressNV GetPipelineIndirectDeviceAddressNV;
+
     // ---- VK_EXT_extended_dynamic_state3 extension commands
     PFN_vkCmdSetTessellationDomainOriginEXT CmdSetTessellationDomainOriginEXT;
     PFN_vkCmdSetDepthClampEnableEXT CmdSetDepthClampEnableEXT;
@@ -1015,10 +1078,31 @@
     PFN_vkBindOpticalFlowSessionImageNV BindOpticalFlowSessionImageNV;
     PFN_vkCmdOpticalFlowExecuteNV CmdOpticalFlowExecuteNV;
 
+    // ---- VK_EXT_shader_object extension commands
+    PFN_vkCreateShadersEXT CreateShadersEXT;
+    PFN_vkDestroyShaderEXT DestroyShaderEXT;
+    PFN_vkGetShaderBinaryDataEXT GetShaderBinaryDataEXT;
+    PFN_vkCmdBindShadersEXT CmdBindShadersEXT;
+
     // ---- VK_QCOM_tile_properties extension commands
     PFN_vkGetFramebufferTilePropertiesQCOM GetFramebufferTilePropertiesQCOM;
     PFN_vkGetDynamicRenderingTilePropertiesQCOM GetDynamicRenderingTilePropertiesQCOM;
 
+    // ---- VK_NV_low_latency2 extension commands
+    PFN_vkSetLatencySleepModeNV SetLatencySleepModeNV;
+    PFN_vkLatencySleepNV LatencySleepNV;
+    PFN_vkSetLatencyMarkerNV SetLatencyMarkerNV;
+    PFN_vkGetLatencyTimingsNV GetLatencyTimingsNV;
+    PFN_vkQueueNotifyOutOfBandNV QueueNotifyOutOfBandNV;
+
+    // ---- VK_EXT_attachment_feedback_loop_dynamic_state extension commands
+    PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT CmdSetAttachmentFeedbackLoopEnableEXT;
+
+    // ---- VK_QNX_external_memory_screen_buffer extension commands
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    PFN_vkGetScreenBufferPropertiesQNX GetScreenBufferPropertiesQNX;
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+
     // ---- VK_KHR_acceleration_structure extension commands
     PFN_vkCreateAccelerationStructureKHR CreateAccelerationStructureKHR;
     PFN_vkDestroyAccelerationStructureKHR DestroyAccelerationStructureKHR;
diff --git a/loader/generated/vk_loader_extensions.c b/loader/generated/vk_loader_extensions.c
index 34b52f8..948c2f1 100644
--- a/loader/generated/vk_loader_extensions.c
+++ b/loader/generated/vk_loader_extensions.c
@@ -110,49 +110,45 @@
     LOOKUP_GIPA(CreateDisplayPlaneSurfaceKHR, false);
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     LOOKUP_GIPA(CreateXlibSurfaceKHR, false);
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     LOOKUP_GIPA(GetPhysicalDeviceXlibPresentationSupportKHR, false);
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     LOOKUP_GIPA(CreateXcbSurfaceKHR, false);
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     LOOKUP_GIPA(GetPhysicalDeviceXcbPresentationSupportKHR, false);
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     LOOKUP_GIPA(CreateWaylandSurfaceKHR, false);
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     LOOKUP_GIPA(GetPhysicalDeviceWaylandPresentationSupportKHR, false);
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     LOOKUP_GIPA(CreateAndroidSurfaceKHR, false);
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     LOOKUP_GIPA(CreateWin32SurfaceKHR, false);
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     LOOKUP_GIPA(GetPhysicalDeviceWin32PresentationSupportKHR, false);
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     LOOKUP_GIPA(GetPhysicalDeviceVideoCapabilitiesKHR, false);
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     LOOKUP_GIPA(GetPhysicalDeviceVideoFormatPropertiesKHR, false);
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     LOOKUP_GIPA(GetPhysicalDeviceFeatures2KHR, false);
@@ -192,13 +188,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     LOOKUP_GIPA(GetPhysicalDeviceFragmentShadingRatesKHR, false);
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    LOOKUP_GIPA(GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, false);
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    LOOKUP_GIPA(GetPhysicalDeviceCooperativeMatrixPropertiesKHR, false);
+
     // ---- VK_EXT_debug_report extension commands
     LOOKUP_GIPA(CreateDebugReportCallbackEXT, false);
     LOOKUP_GIPA(DestroyDebugReportCallbackEXT, false);
     LOOKUP_GIPA(DebugReportMessageEXT, false);
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     LOOKUP_GIPA(CreateStreamDescriptorSurfaceGGP, false);
 #endif // VK_USE_PLATFORM_GGP
 
@@ -206,7 +210,7 @@
     LOOKUP_GIPA(GetPhysicalDeviceExternalImageFormatPropertiesNV, false);
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     LOOKUP_GIPA(CreateViSurfaceNN, false);
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -214,10 +218,10 @@
     LOOKUP_GIPA(ReleaseDisplayEXT, false);
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     LOOKUP_GIPA(AcquireXlibDisplayEXT, false);
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     LOOKUP_GIPA(GetRandROutputDisplayEXT, false);
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -225,12 +229,12 @@
     LOOKUP_GIPA(GetPhysicalDeviceSurfaceCapabilities2EXT, false);
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     LOOKUP_GIPA(CreateIOSSurfaceMVK, false);
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     LOOKUP_GIPA(CreateMacOSSurfaceMVK, false);
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -246,12 +250,12 @@
     LOOKUP_GIPA(GetPhysicalDeviceCalibrateableTimeDomainsEXT, false);
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     LOOKUP_GIPA(CreateImagePipeSurfaceFUCHSIA, false);
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     LOOKUP_GIPA(CreateMetalSurfaceEXT, false);
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -265,7 +269,7 @@
     LOOKUP_GIPA(GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, false);
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     LOOKUP_GIPA(GetPhysicalDeviceSurfacePresentModes2EXT, false);
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -277,26 +281,26 @@
     LOOKUP_GIPA(GetDrmDisplayEXT, false);
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     LOOKUP_GIPA(AcquireWinrtDisplayNV, false);
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     LOOKUP_GIPA(GetWinrtDisplayNV, false);
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     LOOKUP_GIPA(CreateDirectFBSurfaceEXT, false);
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     LOOKUP_GIPA(GetPhysicalDeviceDirectFBPresentationSupportEXT, false);
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     LOOKUP_GIPA(CreateScreenSurfaceQNX, false);
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     LOOKUP_GIPA(GetPhysicalDeviceScreenPresentationSupportQNX, false);
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -312,7 +316,7 @@
 VKAPI_ATTR void VKAPI_CALL loader_init_device_dispatch_table(struct loader_dev_dispatch_table *dev_table, PFN_vkGetDeviceProcAddr gpa,
                                                              VkDevice dev) {
     VkLayerDispatchTable *table = &dev_table->core_dispatch;
-    table->magic = DEVICE_DISP_TABLE_MAGIC_NUMBER;
+    if (table->magic != DEVICE_DISP_TABLE_MAGIC_NUMBER) { abort(); }
     for (uint32_t i = 0; i < MAX_NUM_UNKNOWN_EXTS; i++) dev_table->ext_dispatch[i] = (PFN_vkDevExt)vkDevExtError;
 
     // ---- Core 1_0 commands
@@ -533,41 +537,19 @@
     table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)gdpa(dev, "vkCreateSharedSwapchainsKHR");
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR)gdpa(dev, "vkCreateVideoSessionKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->DestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR)gdpa(dev, "vkDestroyVideoSessionKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->GetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR)gdpa(dev, "vkGetVideoSessionMemoryRequirementsKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->BindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR)gdpa(dev, "vkBindVideoSessionMemoryKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR)gdpa(dev, "vkCreateVideoSessionParametersKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->UpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR)gdpa(dev, "vkUpdateVideoSessionParametersKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->DestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR)gdpa(dev, "vkDestroyVideoSessionParametersKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR)gdpa(dev, "vkCmdBeginVideoCodingKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR)gdpa(dev, "vkCmdEndVideoCodingKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR)gdpa(dev, "vkCmdControlVideoCodingKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_video_decode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->CmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR)gdpa(dev, "vkCmdDecodeVideoKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_dynamic_rendering extension commands
     table->CmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR)gdpa(dev, "vkCmdBeginRenderingKHR");
@@ -582,10 +564,10 @@
     table->TrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)gdpa(dev, "vkTrimCommandPoolKHR");
 
     // ---- VK_KHR_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)gdpa(dev, "vkGetMemoryWin32HandleKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)gdpa(dev, "vkGetMemoryWin32HandlePropertiesKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -594,10 +576,10 @@
     table->GetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)gdpa(dev, "vkGetMemoryFdPropertiesKHR");
 
     // ---- VK_KHR_external_semaphore_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->ImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)gdpa(dev, "vkImportSemaphoreWin32HandleKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)gdpa(dev, "vkGetSemaphoreWin32HandleKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -624,10 +606,10 @@
     table->GetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)gdpa(dev, "vkGetSwapchainStatusKHR");
 
     // ---- VK_KHR_external_fence_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->ImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)gdpa(dev, "vkImportFenceWin32HandleKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)gdpa(dev, "vkGetFenceWin32HandleKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -687,8 +669,15 @@
     table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR)gdpa(dev, "vkGetPipelineExecutableStatisticsKHR");
     table->GetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR)gdpa(dev, "vkGetPipelineExecutableInternalRepresentationsKHR");
 
+    // ---- VK_KHR_map_memory2 extension commands
+    table->MapMemory2KHR = (PFN_vkMapMemory2KHR)gdpa(dev, "vkMapMemory2KHR");
+    table->UnmapMemory2KHR = (PFN_vkUnmapMemory2KHR)gdpa(dev, "vkUnmapMemory2KHR");
+
     // ---- VK_KHR_video_encode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetEncodedVideoSessionParametersKHR = (PFN_vkGetEncodedVideoSessionParametersKHR)gdpa(dev, "vkGetEncodedVideoSessionParametersKHR");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
     table->CmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR)gdpa(dev, "vkCmdEncodeVideoKHR");
 #endif // VK_ENABLE_BETA_EXTENSIONS
 
@@ -718,6 +707,12 @@
     table->GetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)gdpa(dev, "vkGetDeviceImageMemoryRequirementsKHR");
     table->GetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)gdpa(dev, "vkGetDeviceImageSparseMemoryRequirementsKHR");
 
+    // ---- VK_KHR_maintenance5 extension commands
+    table->CmdBindIndexBuffer2KHR = (PFN_vkCmdBindIndexBuffer2KHR)gdpa(dev, "vkCmdBindIndexBuffer2KHR");
+    table->GetRenderingAreaGranularityKHR = (PFN_vkGetRenderingAreaGranularityKHR)gdpa(dev, "vkGetRenderingAreaGranularityKHR");
+    table->GetDeviceImageSubresourceLayoutKHR = (PFN_vkGetDeviceImageSubresourceLayoutKHR)gdpa(dev, "vkGetDeviceImageSubresourceLayoutKHR");
+    table->GetImageSubresourceLayout2KHR = (PFN_vkGetImageSubresourceLayout2KHR)gdpa(dev, "vkGetImageSubresourceLayout2KHR");
+
     // ---- VK_EXT_debug_marker extension commands
     table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)gdpa(dev, "vkDebugMarkerSetObjectTagEXT");
     table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)gdpa(dev, "vkDebugMarkerSetObjectNameEXT");
@@ -752,7 +747,7 @@
     table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)gdpa(dev, "vkGetShaderInfoAMD");
 
     // ---- VK_NV_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)gdpa(dev, "vkGetMemoryWin32HandleNV");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -775,6 +770,8 @@
 
     // ---- VK_EXT_discard_rectangles extension commands
     table->CmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)gdpa(dev, "vkCmdSetDiscardRectangleEXT");
+    table->CmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT)gdpa(dev, "vkCmdSetDiscardRectangleEnableEXT");
+    table->CmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT)gdpa(dev, "vkCmdSetDiscardRectangleModeEXT");
 
     // ---- VK_EXT_hdr_metadata extension commands
     table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)gdpa(dev, "vkSetHdrMetadataEXT");
@@ -790,13 +787,36 @@
     table->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)gipa(inst, "vkCmdInsertDebugUtilsLabelEXT");
 
     // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     table->GetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)gdpa(dev, "vkGetAndroidHardwareBufferPropertiesANDROID");
 #endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     table->GetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)gdpa(dev, "vkGetMemoryAndroidHardwareBufferANDROID");
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
+    // ---- VK_AMDX_shader_enqueue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CreateExecutionGraphPipelinesAMDX = (PFN_vkCreateExecutionGraphPipelinesAMDX)gdpa(dev, "vkCreateExecutionGraphPipelinesAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetExecutionGraphPipelineScratchSizeAMDX = (PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)gdpa(dev, "vkGetExecutionGraphPipelineScratchSizeAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetExecutionGraphPipelineNodeIndexAMDX = (PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)gdpa(dev, "vkGetExecutionGraphPipelineNodeIndexAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CmdInitializeGraphScratchMemoryAMDX = (PFN_vkCmdInitializeGraphScratchMemoryAMDX)gdpa(dev, "vkCmdInitializeGraphScratchMemoryAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CmdDispatchGraphAMDX = (PFN_vkCmdDispatchGraphAMDX)gdpa(dev, "vkCmdDispatchGraphAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CmdDispatchGraphIndirectAMDX = (PFN_vkCmdDispatchGraphIndirectAMDX)gdpa(dev, "vkCmdDispatchGraphIndirectAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CmdDispatchGraphIndirectCountAMDX = (PFN_vkCmdDispatchGraphIndirectCountAMDX)gdpa(dev, "vkCmdDispatchGraphIndirectCountAMDX");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
     // ---- VK_EXT_sample_locations extension commands
     table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)gdpa(dev, "vkCmdSetSampleLocationsEXT");
 
@@ -844,6 +864,7 @@
     table->CmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)gdpa(dev, "vkCmdDrawMeshTasksIndirectCountNV");
 
     // ---- VK_NV_scissor_exclusive extension commands
+    table->CmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV)gdpa(dev, "vkCmdSetExclusiveScissorEnableNV");
     table->CmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)gdpa(dev, "vkCmdSetExclusiveScissorNV");
 
     // ---- VK_NV_device_diagnostic_checkpoints extension commands
@@ -868,13 +889,13 @@
     table->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)gdpa(dev, "vkGetBufferDeviceAddressEXT");
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->AcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT)gdpa(dev, "vkAcquireFullScreenExclusiveModeEXT");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->ReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT)gdpa(dev, "vkReleaseFullScreenExclusiveModeEXT");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)gdpa(dev, "vkGetDeviceGroupSurfacePresentModes2EXT");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -898,6 +919,16 @@
     table->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)gdpa(dev, "vkCmdSetStencilTestEnableEXT");
     table->CmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)gdpa(dev, "vkCmdSetStencilOpEXT");
 
+    // ---- VK_EXT_host_image_copy extension commands
+    table->CopyMemoryToImageEXT = (PFN_vkCopyMemoryToImageEXT)gdpa(dev, "vkCopyMemoryToImageEXT");
+    table->CopyImageToMemoryEXT = (PFN_vkCopyImageToMemoryEXT)gdpa(dev, "vkCopyImageToMemoryEXT");
+    table->CopyImageToImageEXT = (PFN_vkCopyImageToImageEXT)gdpa(dev, "vkCopyImageToImageEXT");
+    table->TransitionImageLayoutEXT = (PFN_vkTransitionImageLayoutEXT)gdpa(dev, "vkTransitionImageLayoutEXT");
+    table->GetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT)gdpa(dev, "vkGetImageSubresourceLayout2EXT");
+
+    // ---- VK_EXT_swapchain_maintenance1 extension commands
+    table->ReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT)gdpa(dev, "vkReleaseSwapchainImagesEXT");
+
     // ---- VK_NV_device_generated_commands extension commands
     table->GetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV)gdpa(dev, "vkGetGeneratedCommandsMemoryRequirementsNV");
     table->CmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV)gdpa(dev, "vkCmdPreprocessGeneratedCommandsNV");
@@ -906,6 +937,9 @@
     table->CreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV)gdpa(dev, "vkCreateIndirectCommandsLayoutNV");
     table->DestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV)gdpa(dev, "vkDestroyIndirectCommandsLayoutNV");
 
+    // ---- VK_EXT_depth_bias_control extension commands
+    table->CmdSetDepthBias2EXT = (PFN_vkCmdSetDepthBias2EXT)gdpa(dev, "vkCmdSetDepthBias2EXT");
+
     // ---- VK_EXT_private_data extension commands
     table->CreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT)gdpa(dev, "vkCreatePrivateDataSlotEXT");
     table->DestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT)gdpa(dev, "vkDestroyPrivateDataSlotEXT");
@@ -913,16 +947,26 @@
     table->GetPrivateDataEXT = (PFN_vkGetPrivateDataEXT)gdpa(dev, "vkGetPrivateDataEXT");
 
     // ---- VK_EXT_metal_objects extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     table->ExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT)gdpa(dev, "vkExportMetalObjectsEXT");
 #endif // VK_USE_PLATFORM_METAL_EXT
 
+    // ---- VK_EXT_descriptor_buffer extension commands
+    table->GetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT)gdpa(dev, "vkGetDescriptorSetLayoutSizeEXT");
+    table->GetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)gdpa(dev, "vkGetDescriptorSetLayoutBindingOffsetEXT");
+    table->GetDescriptorEXT = (PFN_vkGetDescriptorEXT)gdpa(dev, "vkGetDescriptorEXT");
+    table->CmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT)gdpa(dev, "vkCmdBindDescriptorBuffersEXT");
+    table->CmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT)gdpa(dev, "vkCmdSetDescriptorBufferOffsetsEXT");
+    table->CmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)gdpa(dev, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT");
+    table->GetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)gdpa(dev, "vkGetBufferOpaqueCaptureDescriptorDataEXT");
+    table->GetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)gdpa(dev, "vkGetImageOpaqueCaptureDescriptorDataEXT");
+    table->GetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)gdpa(dev, "vkGetImageViewOpaqueCaptureDescriptorDataEXT");
+    table->GetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)gdpa(dev, "vkGetSamplerOpaqueCaptureDescriptorDataEXT");
+    table->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)gdpa(dev, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT");
+
     // ---- VK_NV_fragment_shading_rate_enums extension commands
     table->CmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)gdpa(dev, "vkCmdSetFragmentShadingRateEnumNV");
 
-    // ---- VK_EXT_image_compression_control extension commands
-    table->GetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT)gdpa(dev, "vkGetImageSubresourceLayout2EXT");
-
     // ---- VK_EXT_device_fault extension commands
     table->GetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)gdpa(dev, "vkGetDeviceFaultInfoEXT");
 
@@ -930,35 +974,35 @@
     table->CmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)gdpa(dev, "vkCmdSetVertexInputEXT");
 
     // ---- VK_FUCHSIA_external_memory extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->GetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA)gdpa(dev, "vkGetMemoryZirconHandleFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->GetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)gdpa(dev, "vkGetMemoryZirconHandlePropertiesFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_external_semaphore extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->ImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA)gdpa(dev, "vkImportSemaphoreZirconHandleFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->GetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA)gdpa(dev, "vkGetSemaphoreZirconHandleFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_buffer_collection extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->CreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)gdpa(dev, "vkCreateBufferCollectionFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->SetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)gdpa(dev, "vkSetBufferCollectionImageConstraintsFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->SetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)gdpa(dev, "vkSetBufferCollectionBufferConstraintsFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->DestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)gdpa(dev, "vkDestroyBufferCollectionFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->GetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA)gdpa(dev, "vkGetBufferCollectionPropertiesFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
 
@@ -1005,6 +1049,10 @@
     table->GetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT)gdpa(dev, "vkGetDeviceMicromapCompatibilityEXT");
     table->GetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT)gdpa(dev, "vkGetMicromapBuildSizesEXT");
 
+    // ---- VK_HUAWEI_cluster_culling_shader extension commands
+    table->CmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI)gdpa(dev, "vkCmdDrawClusterHUAWEI");
+    table->CmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI)gdpa(dev, "vkCmdDrawClusterIndirectHUAWEI");
+
     // ---- VK_EXT_pageable_device_local_memory extension commands
     table->SetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT)gdpa(dev, "vkSetDeviceMemoryPriorityEXT");
 
@@ -1012,6 +1060,19 @@
     table->GetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)gdpa(dev, "vkGetDescriptorSetLayoutHostMappingInfoVALVE");
     table->GetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)gdpa(dev, "vkGetDescriptorSetHostMappingVALVE");
 
+    // ---- VK_NV_copy_memory_indirect extension commands
+    table->CmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV)gdpa(dev, "vkCmdCopyMemoryIndirectNV");
+    table->CmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV)gdpa(dev, "vkCmdCopyMemoryToImageIndirectNV");
+
+    // ---- VK_NV_memory_decompression extension commands
+    table->CmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV)gdpa(dev, "vkCmdDecompressMemoryNV");
+    table->CmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV)gdpa(dev, "vkCmdDecompressMemoryIndirectCountNV");
+
+    // ---- VK_NV_device_generated_commands_compute extension commands
+    table->GetPipelineIndirectMemoryRequirementsNV = (PFN_vkGetPipelineIndirectMemoryRequirementsNV)gdpa(dev, "vkGetPipelineIndirectMemoryRequirementsNV");
+    table->CmdUpdatePipelineIndirectBufferNV = (PFN_vkCmdUpdatePipelineIndirectBufferNV)gdpa(dev, "vkCmdUpdatePipelineIndirectBufferNV");
+    table->GetPipelineIndirectDeviceAddressNV = (PFN_vkGetPipelineIndirectDeviceAddressNV)gdpa(dev, "vkGetPipelineIndirectDeviceAddressNV");
+
     // ---- VK_EXT_extended_dynamic_state3 extension commands
     table->CmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)gdpa(dev, "vkCmdSetTessellationDomainOriginEXT");
     table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)gdpa(dev, "vkCmdSetDepthClampEnableEXT");
@@ -1055,10 +1116,31 @@
     table->BindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV)gdpa(dev, "vkBindOpticalFlowSessionImageNV");
     table->CmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV)gdpa(dev, "vkCmdOpticalFlowExecuteNV");
 
+    // ---- VK_EXT_shader_object extension commands
+    table->CreateShadersEXT = (PFN_vkCreateShadersEXT)gdpa(dev, "vkCreateShadersEXT");
+    table->DestroyShaderEXT = (PFN_vkDestroyShaderEXT)gdpa(dev, "vkDestroyShaderEXT");
+    table->GetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT)gdpa(dev, "vkGetShaderBinaryDataEXT");
+    table->CmdBindShadersEXT = (PFN_vkCmdBindShadersEXT)gdpa(dev, "vkCmdBindShadersEXT");
+
     // ---- VK_QCOM_tile_properties extension commands
     table->GetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM)gdpa(dev, "vkGetFramebufferTilePropertiesQCOM");
     table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM)gdpa(dev, "vkGetDynamicRenderingTilePropertiesQCOM");
 
+    // ---- VK_NV_low_latency2 extension commands
+    table->SetLatencySleepModeNV = (PFN_vkSetLatencySleepModeNV)gdpa(dev, "vkSetLatencySleepModeNV");
+    table->LatencySleepNV = (PFN_vkLatencySleepNV)gdpa(dev, "vkLatencySleepNV");
+    table->SetLatencyMarkerNV = (PFN_vkSetLatencyMarkerNV)gdpa(dev, "vkSetLatencyMarkerNV");
+    table->GetLatencyTimingsNV = (PFN_vkGetLatencyTimingsNV)gdpa(dev, "vkGetLatencyTimingsNV");
+    table->QueueNotifyOutOfBandNV = (PFN_vkQueueNotifyOutOfBandNV)gdpa(dev, "vkQueueNotifyOutOfBandNV");
+
+    // ---- VK_EXT_attachment_feedback_loop_dynamic_state extension commands
+    table->CmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)gdpa(dev, "vkCmdSetAttachmentFeedbackLoopEnableEXT");
+
+    // ---- VK_QNX_external_memory_screen_buffer extension commands
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    table->GetScreenBufferPropertiesQNX = (PFN_vkGetScreenBufferPropertiesQNX)gdpa(dev, "vkGetScreenBufferPropertiesQNX");
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+
     // ---- VK_KHR_acceleration_structure extension commands
     table->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR)gdpa(dev, "vkCreateAccelerationStructureKHR");
     table->DestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR)gdpa(dev, "vkDestroyAccelerationStructureKHR");
@@ -1150,49 +1232,45 @@
     table->CreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)gpa(inst, "vkCreateDisplayPlaneSurfaceKHR");
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     table->CreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)gpa(inst, "vkCreateXlibSurfaceKHR");
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     table->GetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     table->CreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)gpa(inst, "vkCreateXcbSurfaceKHR");
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     table->GetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     table->CreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)gpa(inst, "vkCreateWaylandSurfaceKHR");
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     table->GetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     table->CreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)gpa(inst, "vkCreateAndroidSurfaceKHR");
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->CreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)gpa(inst, "vkCreateWin32SurfaceKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)gpa(inst, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->GetPhysicalDeviceVideoCapabilitiesKHR = (PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)gpa(inst, "vkGetPhysicalDeviceVideoCapabilitiesKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     table->GetPhysicalDeviceVideoFormatPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)gpa(inst, "vkGetPhysicalDeviceVideoFormatPropertiesKHR");
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     table->GetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)gpa(inst, "vkGetPhysicalDeviceFeatures2KHR");
@@ -1232,13 +1310,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     table->GetPhysicalDeviceFragmentShadingRatesKHR = (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR)gpa(inst, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)gpa(inst, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    table->GetPhysicalDeviceCooperativeMatrixPropertiesKHR = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)gpa(inst, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR");
+
     // ---- VK_EXT_debug_report extension commands
     table->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)gpa(inst, "vkCreateDebugReportCallbackEXT");
     table->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)gpa(inst, "vkDestroyDebugReportCallbackEXT");
     table->DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)gpa(inst, "vkDebugReportMessageEXT");
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     table->CreateStreamDescriptorSurfaceGGP = (PFN_vkCreateStreamDescriptorSurfaceGGP)gpa(inst, "vkCreateStreamDescriptorSurfaceGGP");
 #endif // VK_USE_PLATFORM_GGP
 
@@ -1246,7 +1332,7 @@
     table->GetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)gpa(inst, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     table->CreateViSurfaceNN = (PFN_vkCreateViSurfaceNN)gpa(inst, "vkCreateViSurfaceNN");
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -1254,10 +1340,10 @@
     table->ReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT)gpa(inst, "vkReleaseDisplayEXT");
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     table->AcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT)gpa(inst, "vkAcquireXlibDisplayEXT");
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     table->GetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT)gpa(inst, "vkGetRandROutputDisplayEXT");
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -1265,12 +1351,12 @@
     table->GetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)gpa(inst, "vkGetPhysicalDeviceSurfaceCapabilities2EXT");
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     table->CreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK)gpa(inst, "vkCreateIOSSurfaceMVK");
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     table->CreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)gpa(inst, "vkCreateMacOSSurfaceMVK");
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -1286,12 +1372,12 @@
     table->GetPhysicalDeviceCalibrateableTimeDomainsEXT = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)gpa(inst, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     table->CreateImagePipeSurfaceFUCHSIA = (PFN_vkCreateImagePipeSurfaceFUCHSIA)gpa(inst, "vkCreateImagePipeSurfaceFUCHSIA");
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT)gpa(inst, "vkCreateMetalSurfaceEXT");
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -1305,7 +1391,7 @@
     table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)gpa(inst, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetPhysicalDeviceSurfacePresentModes2EXT = (PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)gpa(inst, "vkGetPhysicalDeviceSurfacePresentModes2EXT");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1317,26 +1403,26 @@
     table->GetDrmDisplayEXT = (PFN_vkGetDrmDisplayEXT)gpa(inst, "vkGetDrmDisplayEXT");
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->AcquireWinrtDisplayNV = (PFN_vkAcquireWinrtDisplayNV)gpa(inst, "vkAcquireWinrtDisplayNV");
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     table->GetWinrtDisplayNV = (PFN_vkGetWinrtDisplayNV)gpa(inst, "vkGetWinrtDisplayNV");
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     table->CreateDirectFBSurfaceEXT = (PFN_vkCreateDirectFBSurfaceEXT)gpa(inst, "vkCreateDirectFBSurfaceEXT");
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     table->GetPhysicalDeviceDirectFBPresentationSupportEXT = (PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)gpa(inst, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT");
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     table->CreateScreenSurfaceQNX = (PFN_vkCreateScreenSurfaceQNX)gpa(inst, "vkCreateScreenSurfaceQNX");
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     table->GetPhysicalDeviceScreenPresentationSupportQNX = (PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)gpa(inst, "vkGetPhysicalDeviceScreenPresentationSupportQNX");
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -1350,241 +1436,824 @@
     struct loader_device_terminator_dispatch* dispatch = &dev->loader_dispatch.extension_terminator_dispatch;
     PFN_vkGetDeviceProcAddr gpda = (PFN_vkGetDeviceProcAddr)dev->phys_dev_term->this_icd_term->dispatch.GetDeviceProcAddr;
     // ---- VK_KHR_swapchain extension commands
-    if (dev->extensions.khr_swapchain_enabled)
+    if (dev->driver_extensions.khr_swapchain_enabled)
        dispatch->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)gpda(dev->icd_device, "vkCreateSwapchainKHR");
-    if (dev->extensions.khr_swapchain_enabled)
+    if (dev->driver_extensions.khr_swapchain_enabled)
        dispatch->GetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)gpda(dev->icd_device, "vkGetDeviceGroupSurfacePresentModesKHR");
     // ---- VK_KHR_display_swapchain extension commands
-    if (dev->extensions.khr_display_swapchain_enabled)
+    if (dev->driver_extensions.khr_display_swapchain_enabled)
        dispatch->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)gpda(dev->icd_device, "vkCreateSharedSwapchainsKHR");
     // ---- VK_EXT_debug_marker extension commands
-    if (dev->extensions.ext_debug_marker_enabled)
+    if (dev->driver_extensions.ext_debug_marker_enabled)
        dispatch->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)gpda(dev->icd_device, "vkDebugMarkerSetObjectTagEXT");
-    if (dev->extensions.ext_debug_marker_enabled)
+    if (dev->driver_extensions.ext_debug_marker_enabled)
        dispatch->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)gpda(dev->icd_device, "vkDebugMarkerSetObjectNameEXT");
     // ---- VK_EXT_debug_utils extension commands
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->SetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)gpda(dev->icd_device, "vkSetDebugUtilsObjectNameEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->SetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)gpda(dev->icd_device, "vkSetDebugUtilsObjectTagEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->QueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)gpda(dev->icd_device, "vkQueueBeginDebugUtilsLabelEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->QueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)gpda(dev->icd_device, "vkQueueEndDebugUtilsLabelEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->QueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)gpda(dev->icd_device, "vkQueueInsertDebugUtilsLabelEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->CmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)gpda(dev->icd_device, "vkCmdBeginDebugUtilsLabelEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->CmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT)gpda(dev->icd_device, "vkCmdEndDebugUtilsLabelEXT");
-    if (dev->extensions.ext_debug_utils_enabled)
+    if (dev->driver_extensions.ext_debug_utils_enabled)
        dispatch->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)gpda(dev->icd_device, "vkCmdInsertDebugUtilsLabelEXT");
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     // ---- VK_EXT_full_screen_exclusive extension commands
-    if (dev->extensions.ext_full_screen_exclusive_enabled && dev->extensions.khr_device_group_enabled)
+    if (dev->driver_extensions.ext_full_screen_exclusive_enabled && dev->driver_extensions.khr_device_group_enabled)
        dispatch->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)gpda(dev->icd_device, "vkGetDeviceGroupSurfacePresentModes2EXT");
-#endif // None
+#endif // VK_USE_PLATFORM_WIN32_KHR
 }
 
+// These are prototypes for functions that need their trampoline called in all circumstances.
+// They are used in loader_lookup_device_dispatch_table but are defined afterwards.
+    // ---- VK_EXT_debug_marker extension commands
+VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(
+    VkDevice                                    device,
+    const VkDebugMarkerObjectTagInfoEXT*        pTagInfo);
+VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(
+    VkDevice                                    device,
+    const VkDebugMarkerObjectNameInfoEXT*       pNameInfo);
+    // ---- VK_EXT_debug_utils extension commands
+VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(
+    VkDevice                                    device,
+    const VkDebugUtilsObjectNameInfoEXT*        pNameInfo);
+VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(
+    VkDevice                                    device,
+    const VkDebugUtilsObjectTagInfoEXT*         pTagInfo);
+
 // Device command lookup function
-VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name) {
-    if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
+VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name, bool* found_name) {
+    if (!name || name[0] != 'v' || name[1] != 'k') {
+        *found_name = false;
+        return NULL;
+    }
 
     name += 2;
+    *found_name = true;
+    struct loader_device* dev = (struct loader_device *)table;
+    const struct loader_instance* inst = dev->phys_dev_term->this_icd_term->this_instance;
+    uint32_t api_version = VK_MAKE_API_VERSION(0, inst->app_api_version.major, inst->app_api_version.minor, inst->app_api_version.patch);
+
 
     // ---- Core 1_0 commands
-    if (!strcmp(name, "GetDeviceProcAddr")) return (void *)table->GetDeviceProcAddr;
-    if (!strcmp(name, "DestroyDevice")) return (void *)table->DestroyDevice;
-    if (!strcmp(name, "GetDeviceQueue")) return (void *)table->GetDeviceQueue;
-    if (!strcmp(name, "QueueSubmit")) return (void *)table->QueueSubmit;
-    if (!strcmp(name, "QueueWaitIdle")) return (void *)table->QueueWaitIdle;
-    if (!strcmp(name, "DeviceWaitIdle")) return (void *)table->DeviceWaitIdle;
-    if (!strcmp(name, "AllocateMemory")) return (void *)table->AllocateMemory;
-    if (!strcmp(name, "FreeMemory")) return (void *)table->FreeMemory;
-    if (!strcmp(name, "MapMemory")) return (void *)table->MapMemory;
-    if (!strcmp(name, "UnmapMemory")) return (void *)table->UnmapMemory;
-    if (!strcmp(name, "FlushMappedMemoryRanges")) return (void *)table->FlushMappedMemoryRanges;
-    if (!strcmp(name, "InvalidateMappedMemoryRanges")) return (void *)table->InvalidateMappedMemoryRanges;
-    if (!strcmp(name, "GetDeviceMemoryCommitment")) return (void *)table->GetDeviceMemoryCommitment;
-    if (!strcmp(name, "BindBufferMemory")) return (void *)table->BindBufferMemory;
-    if (!strcmp(name, "BindImageMemory")) return (void *)table->BindImageMemory;
-    if (!strcmp(name, "GetBufferMemoryRequirements")) return (void *)table->GetBufferMemoryRequirements;
-    if (!strcmp(name, "GetImageMemoryRequirements")) return (void *)table->GetImageMemoryRequirements;
-    if (!strcmp(name, "GetImageSparseMemoryRequirements")) return (void *)table->GetImageSparseMemoryRequirements;
-    if (!strcmp(name, "QueueBindSparse")) return (void *)table->QueueBindSparse;
-    if (!strcmp(name, "CreateFence")) return (void *)table->CreateFence;
-    if (!strcmp(name, "DestroyFence")) return (void *)table->DestroyFence;
-    if (!strcmp(name, "ResetFences")) return (void *)table->ResetFences;
-    if (!strcmp(name, "GetFenceStatus")) return (void *)table->GetFenceStatus;
-    if (!strcmp(name, "WaitForFences")) return (void *)table->WaitForFences;
-    if (!strcmp(name, "CreateSemaphore")) return (void *)table->CreateSemaphore;
-    if (!strcmp(name, "DestroySemaphore")) return (void *)table->DestroySemaphore;
-    if (!strcmp(name, "CreateEvent")) return (void *)table->CreateEvent;
-    if (!strcmp(name, "DestroyEvent")) return (void *)table->DestroyEvent;
-    if (!strcmp(name, "GetEventStatus")) return (void *)table->GetEventStatus;
-    if (!strcmp(name, "SetEvent")) return (void *)table->SetEvent;
-    if (!strcmp(name, "ResetEvent")) return (void *)table->ResetEvent;
-    if (!strcmp(name, "CreateQueryPool")) return (void *)table->CreateQueryPool;
-    if (!strcmp(name, "DestroyQueryPool")) return (void *)table->DestroyQueryPool;
-    if (!strcmp(name, "GetQueryPoolResults")) return (void *)table->GetQueryPoolResults;
-    if (!strcmp(name, "CreateBuffer")) return (void *)table->CreateBuffer;
-    if (!strcmp(name, "DestroyBuffer")) return (void *)table->DestroyBuffer;
-    if (!strcmp(name, "CreateBufferView")) return (void *)table->CreateBufferView;
-    if (!strcmp(name, "DestroyBufferView")) return (void *)table->DestroyBufferView;
-    if (!strcmp(name, "CreateImage")) return (void *)table->CreateImage;
-    if (!strcmp(name, "DestroyImage")) return (void *)table->DestroyImage;
-    if (!strcmp(name, "GetImageSubresourceLayout")) return (void *)table->GetImageSubresourceLayout;
-    if (!strcmp(name, "CreateImageView")) return (void *)table->CreateImageView;
-    if (!strcmp(name, "DestroyImageView")) return (void *)table->DestroyImageView;
-    if (!strcmp(name, "CreateShaderModule")) return (void *)table->CreateShaderModule;
-    if (!strcmp(name, "DestroyShaderModule")) return (void *)table->DestroyShaderModule;
-    if (!strcmp(name, "CreatePipelineCache")) return (void *)table->CreatePipelineCache;
-    if (!strcmp(name, "DestroyPipelineCache")) return (void *)table->DestroyPipelineCache;
-    if (!strcmp(name, "GetPipelineCacheData")) return (void *)table->GetPipelineCacheData;
-    if (!strcmp(name, "MergePipelineCaches")) return (void *)table->MergePipelineCaches;
-    if (!strcmp(name, "CreateGraphicsPipelines")) return (void *)table->CreateGraphicsPipelines;
-    if (!strcmp(name, "CreateComputePipelines")) return (void *)table->CreateComputePipelines;
-    if (!strcmp(name, "DestroyPipeline")) return (void *)table->DestroyPipeline;
-    if (!strcmp(name, "CreatePipelineLayout")) return (void *)table->CreatePipelineLayout;
-    if (!strcmp(name, "DestroyPipelineLayout")) return (void *)table->DestroyPipelineLayout;
-    if (!strcmp(name, "CreateSampler")) return (void *)table->CreateSampler;
-    if (!strcmp(name, "DestroySampler")) return (void *)table->DestroySampler;
-    if (!strcmp(name, "CreateDescriptorSetLayout")) return (void *)table->CreateDescriptorSetLayout;
-    if (!strcmp(name, "DestroyDescriptorSetLayout")) return (void *)table->DestroyDescriptorSetLayout;
-    if (!strcmp(name, "CreateDescriptorPool")) return (void *)table->CreateDescriptorPool;
-    if (!strcmp(name, "DestroyDescriptorPool")) return (void *)table->DestroyDescriptorPool;
-    if (!strcmp(name, "ResetDescriptorPool")) return (void *)table->ResetDescriptorPool;
-    if (!strcmp(name, "AllocateDescriptorSets")) return (void *)table->AllocateDescriptorSets;
-    if (!strcmp(name, "FreeDescriptorSets")) return (void *)table->FreeDescriptorSets;
-    if (!strcmp(name, "UpdateDescriptorSets")) return (void *)table->UpdateDescriptorSets;
-    if (!strcmp(name, "CreateFramebuffer")) return (void *)table->CreateFramebuffer;
-    if (!strcmp(name, "DestroyFramebuffer")) return (void *)table->DestroyFramebuffer;
-    if (!strcmp(name, "CreateRenderPass")) return (void *)table->CreateRenderPass;
-    if (!strcmp(name, "DestroyRenderPass")) return (void *)table->DestroyRenderPass;
-    if (!strcmp(name, "GetRenderAreaGranularity")) return (void *)table->GetRenderAreaGranularity;
-    if (!strcmp(name, "CreateCommandPool")) return (void *)table->CreateCommandPool;
-    if (!strcmp(name, "DestroyCommandPool")) return (void *)table->DestroyCommandPool;
-    if (!strcmp(name, "ResetCommandPool")) return (void *)table->ResetCommandPool;
-    if (!strcmp(name, "AllocateCommandBuffers")) return (void *)table->AllocateCommandBuffers;
-    if (!strcmp(name, "FreeCommandBuffers")) return (void *)table->FreeCommandBuffers;
-    if (!strcmp(name, "BeginCommandBuffer")) return (void *)table->BeginCommandBuffer;
-    if (!strcmp(name, "EndCommandBuffer")) return (void *)table->EndCommandBuffer;
-    if (!strcmp(name, "ResetCommandBuffer")) return (void *)table->ResetCommandBuffer;
-    if (!strcmp(name, "CmdBindPipeline")) return (void *)table->CmdBindPipeline;
-    if (!strcmp(name, "CmdSetViewport")) return (void *)table->CmdSetViewport;
-    if (!strcmp(name, "CmdSetScissor")) return (void *)table->CmdSetScissor;
-    if (!strcmp(name, "CmdSetLineWidth")) return (void *)table->CmdSetLineWidth;
-    if (!strcmp(name, "CmdSetDepthBias")) return (void *)table->CmdSetDepthBias;
-    if (!strcmp(name, "CmdSetBlendConstants")) return (void *)table->CmdSetBlendConstants;
-    if (!strcmp(name, "CmdSetDepthBounds")) return (void *)table->CmdSetDepthBounds;
-    if (!strcmp(name, "CmdSetStencilCompareMask")) return (void *)table->CmdSetStencilCompareMask;
-    if (!strcmp(name, "CmdSetStencilWriteMask")) return (void *)table->CmdSetStencilWriteMask;
-    if (!strcmp(name, "CmdSetStencilReference")) return (void *)table->CmdSetStencilReference;
-    if (!strcmp(name, "CmdBindDescriptorSets")) return (void *)table->CmdBindDescriptorSets;
-    if (!strcmp(name, "CmdBindIndexBuffer")) return (void *)table->CmdBindIndexBuffer;
-    if (!strcmp(name, "CmdBindVertexBuffers")) return (void *)table->CmdBindVertexBuffers;
-    if (!strcmp(name, "CmdDraw")) return (void *)table->CmdDraw;
-    if (!strcmp(name, "CmdDrawIndexed")) return (void *)table->CmdDrawIndexed;
-    if (!strcmp(name, "CmdDrawIndirect")) return (void *)table->CmdDrawIndirect;
-    if (!strcmp(name, "CmdDrawIndexedIndirect")) return (void *)table->CmdDrawIndexedIndirect;
-    if (!strcmp(name, "CmdDispatch")) return (void *)table->CmdDispatch;
-    if (!strcmp(name, "CmdDispatchIndirect")) return (void *)table->CmdDispatchIndirect;
-    if (!strcmp(name, "CmdCopyBuffer")) return (void *)table->CmdCopyBuffer;
-    if (!strcmp(name, "CmdCopyImage")) return (void *)table->CmdCopyImage;
-    if (!strcmp(name, "CmdBlitImage")) return (void *)table->CmdBlitImage;
-    if (!strcmp(name, "CmdCopyBufferToImage")) return (void *)table->CmdCopyBufferToImage;
-    if (!strcmp(name, "CmdCopyImageToBuffer")) return (void *)table->CmdCopyImageToBuffer;
-    if (!strcmp(name, "CmdUpdateBuffer")) return (void *)table->CmdUpdateBuffer;
-    if (!strcmp(name, "CmdFillBuffer")) return (void *)table->CmdFillBuffer;
-    if (!strcmp(name, "CmdClearColorImage")) return (void *)table->CmdClearColorImage;
-    if (!strcmp(name, "CmdClearDepthStencilImage")) return (void *)table->CmdClearDepthStencilImage;
-    if (!strcmp(name, "CmdClearAttachments")) return (void *)table->CmdClearAttachments;
-    if (!strcmp(name, "CmdResolveImage")) return (void *)table->CmdResolveImage;
-    if (!strcmp(name, "CmdSetEvent")) return (void *)table->CmdSetEvent;
-    if (!strcmp(name, "CmdResetEvent")) return (void *)table->CmdResetEvent;
-    if (!strcmp(name, "CmdWaitEvents")) return (void *)table->CmdWaitEvents;
-    if (!strcmp(name, "CmdPipelineBarrier")) return (void *)table->CmdPipelineBarrier;
-    if (!strcmp(name, "CmdBeginQuery")) return (void *)table->CmdBeginQuery;
-    if (!strcmp(name, "CmdEndQuery")) return (void *)table->CmdEndQuery;
-    if (!strcmp(name, "CmdResetQueryPool")) return (void *)table->CmdResetQueryPool;
-    if (!strcmp(name, "CmdWriteTimestamp")) return (void *)table->CmdWriteTimestamp;
-    if (!strcmp(name, "CmdCopyQueryPoolResults")) return (void *)table->CmdCopyQueryPoolResults;
-    if (!strcmp(name, "CmdPushConstants")) return (void *)table->CmdPushConstants;
-    if (!strcmp(name, "CmdBeginRenderPass")) return (void *)table->CmdBeginRenderPass;
-    if (!strcmp(name, "CmdNextSubpass")) return (void *)table->CmdNextSubpass;
-    if (!strcmp(name, "CmdEndRenderPass")) return (void *)table->CmdEndRenderPass;
-    if (!strcmp(name, "CmdExecuteCommands")) return (void *)table->CmdExecuteCommands;
+    if (!strcmp(name, "GetDeviceProcAddr")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetDeviceProcAddr;
+    }
+    if (!strcmp(name, "DestroyDevice")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyDevice;
+    }
+    if (!strcmp(name, "GetDeviceQueue")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetDeviceQueue;
+    }
+    if (!strcmp(name, "QueueSubmit")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->QueueSubmit;
+    }
+    if (!strcmp(name, "QueueWaitIdle")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->QueueWaitIdle;
+    }
+    if (!strcmp(name, "DeviceWaitIdle")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DeviceWaitIdle;
+    }
+    if (!strcmp(name, "AllocateMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->AllocateMemory;
+    }
+    if (!strcmp(name, "FreeMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->FreeMemory;
+    }
+    if (!strcmp(name, "MapMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->MapMemory;
+    }
+    if (!strcmp(name, "UnmapMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->UnmapMemory;
+    }
+    if (!strcmp(name, "FlushMappedMemoryRanges")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->FlushMappedMemoryRanges;
+    }
+    if (!strcmp(name, "InvalidateMappedMemoryRanges")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->InvalidateMappedMemoryRanges;
+    }
+    if (!strcmp(name, "GetDeviceMemoryCommitment")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetDeviceMemoryCommitment;
+    }
+    if (!strcmp(name, "BindBufferMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->BindBufferMemory;
+    }
+    if (!strcmp(name, "BindImageMemory")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->BindImageMemory;
+    }
+    if (!strcmp(name, "GetBufferMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetBufferMemoryRequirements;
+    }
+    if (!strcmp(name, "GetImageMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetImageMemoryRequirements;
+    }
+    if (!strcmp(name, "GetImageSparseMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetImageSparseMemoryRequirements;
+    }
+    if (!strcmp(name, "QueueBindSparse")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->QueueBindSparse;
+    }
+    if (!strcmp(name, "CreateFence")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateFence;
+    }
+    if (!strcmp(name, "DestroyFence")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyFence;
+    }
+    if (!strcmp(name, "ResetFences")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->ResetFences;
+    }
+    if (!strcmp(name, "GetFenceStatus")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetFenceStatus;
+    }
+    if (!strcmp(name, "WaitForFences")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->WaitForFences;
+    }
+    if (!strcmp(name, "CreateSemaphore")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateSemaphore;
+    }
+    if (!strcmp(name, "DestroySemaphore")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroySemaphore;
+    }
+    if (!strcmp(name, "CreateEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateEvent;
+    }
+    if (!strcmp(name, "DestroyEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyEvent;
+    }
+    if (!strcmp(name, "GetEventStatus")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetEventStatus;
+    }
+    if (!strcmp(name, "SetEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->SetEvent;
+    }
+    if (!strcmp(name, "ResetEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->ResetEvent;
+    }
+    if (!strcmp(name, "CreateQueryPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateQueryPool;
+    }
+    if (!strcmp(name, "DestroyQueryPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyQueryPool;
+    }
+    if (!strcmp(name, "GetQueryPoolResults")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetQueryPoolResults;
+    }
+    if (!strcmp(name, "CreateBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateBuffer;
+    }
+    if (!strcmp(name, "DestroyBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyBuffer;
+    }
+    if (!strcmp(name, "CreateBufferView")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateBufferView;
+    }
+    if (!strcmp(name, "DestroyBufferView")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyBufferView;
+    }
+    if (!strcmp(name, "CreateImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateImage;
+    }
+    if (!strcmp(name, "DestroyImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyImage;
+    }
+    if (!strcmp(name, "GetImageSubresourceLayout")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetImageSubresourceLayout;
+    }
+    if (!strcmp(name, "CreateImageView")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateImageView;
+    }
+    if (!strcmp(name, "DestroyImageView")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyImageView;
+    }
+    if (!strcmp(name, "CreateShaderModule")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateShaderModule;
+    }
+    if (!strcmp(name, "DestroyShaderModule")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyShaderModule;
+    }
+    if (!strcmp(name, "CreatePipelineCache")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreatePipelineCache;
+    }
+    if (!strcmp(name, "DestroyPipelineCache")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyPipelineCache;
+    }
+    if (!strcmp(name, "GetPipelineCacheData")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetPipelineCacheData;
+    }
+    if (!strcmp(name, "MergePipelineCaches")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->MergePipelineCaches;
+    }
+    if (!strcmp(name, "CreateGraphicsPipelines")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateGraphicsPipelines;
+    }
+    if (!strcmp(name, "CreateComputePipelines")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateComputePipelines;
+    }
+    if (!strcmp(name, "DestroyPipeline")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyPipeline;
+    }
+    if (!strcmp(name, "CreatePipelineLayout")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreatePipelineLayout;
+    }
+    if (!strcmp(name, "DestroyPipelineLayout")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyPipelineLayout;
+    }
+    if (!strcmp(name, "CreateSampler")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateSampler;
+    }
+    if (!strcmp(name, "DestroySampler")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroySampler;
+    }
+    if (!strcmp(name, "CreateDescriptorSetLayout")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateDescriptorSetLayout;
+    }
+    if (!strcmp(name, "DestroyDescriptorSetLayout")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyDescriptorSetLayout;
+    }
+    if (!strcmp(name, "CreateDescriptorPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateDescriptorPool;
+    }
+    if (!strcmp(name, "DestroyDescriptorPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyDescriptorPool;
+    }
+    if (!strcmp(name, "ResetDescriptorPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->ResetDescriptorPool;
+    }
+    if (!strcmp(name, "AllocateDescriptorSets")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->AllocateDescriptorSets;
+    }
+    if (!strcmp(name, "FreeDescriptorSets")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->FreeDescriptorSets;
+    }
+    if (!strcmp(name, "UpdateDescriptorSets")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->UpdateDescriptorSets;
+    }
+    if (!strcmp(name, "CreateFramebuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateFramebuffer;
+    }
+    if (!strcmp(name, "DestroyFramebuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyFramebuffer;
+    }
+    if (!strcmp(name, "CreateRenderPass")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateRenderPass;
+    }
+    if (!strcmp(name, "DestroyRenderPass")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyRenderPass;
+    }
+    if (!strcmp(name, "GetRenderAreaGranularity")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->GetRenderAreaGranularity;
+    }
+    if (!strcmp(name, "CreateCommandPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CreateCommandPool;
+    }
+    if (!strcmp(name, "DestroyCommandPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->DestroyCommandPool;
+    }
+    if (!strcmp(name, "ResetCommandPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->ResetCommandPool;
+    }
+    if (!strcmp(name, "AllocateCommandBuffers")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->AllocateCommandBuffers;
+    }
+    if (!strcmp(name, "FreeCommandBuffers")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->FreeCommandBuffers;
+    }
+    if (!strcmp(name, "BeginCommandBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->BeginCommandBuffer;
+    }
+    if (!strcmp(name, "EndCommandBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->EndCommandBuffer;
+    }
+    if (!strcmp(name, "ResetCommandBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->ResetCommandBuffer;
+    }
+    if (!strcmp(name, "CmdBindPipeline")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBindPipeline;
+    }
+    if (!strcmp(name, "CmdSetViewport")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetViewport;
+    }
+    if (!strcmp(name, "CmdSetScissor")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetScissor;
+    }
+    if (!strcmp(name, "CmdSetLineWidth")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetLineWidth;
+    }
+    if (!strcmp(name, "CmdSetDepthBias")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetDepthBias;
+    }
+    if (!strcmp(name, "CmdSetBlendConstants")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetBlendConstants;
+    }
+    if (!strcmp(name, "CmdSetDepthBounds")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetDepthBounds;
+    }
+    if (!strcmp(name, "CmdSetStencilCompareMask")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetStencilCompareMask;
+    }
+    if (!strcmp(name, "CmdSetStencilWriteMask")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetStencilWriteMask;
+    }
+    if (!strcmp(name, "CmdSetStencilReference")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetStencilReference;
+    }
+    if (!strcmp(name, "CmdBindDescriptorSets")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBindDescriptorSets;
+    }
+    if (!strcmp(name, "CmdBindIndexBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBindIndexBuffer;
+    }
+    if (!strcmp(name, "CmdBindVertexBuffers")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBindVertexBuffers;
+    }
+    if (!strcmp(name, "CmdDraw")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDraw;
+    }
+    if (!strcmp(name, "CmdDrawIndexed")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDrawIndexed;
+    }
+    if (!strcmp(name, "CmdDrawIndirect")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDrawIndirect;
+    }
+    if (!strcmp(name, "CmdDrawIndexedIndirect")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDrawIndexedIndirect;
+    }
+    if (!strcmp(name, "CmdDispatch")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDispatch;
+    }
+    if (!strcmp(name, "CmdDispatchIndirect")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdDispatchIndirect;
+    }
+    if (!strcmp(name, "CmdCopyBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdCopyBuffer;
+    }
+    if (!strcmp(name, "CmdCopyImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdCopyImage;
+    }
+    if (!strcmp(name, "CmdBlitImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBlitImage;
+    }
+    if (!strcmp(name, "CmdCopyBufferToImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdCopyBufferToImage;
+    }
+    if (!strcmp(name, "CmdCopyImageToBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdCopyImageToBuffer;
+    }
+    if (!strcmp(name, "CmdUpdateBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdUpdateBuffer;
+    }
+    if (!strcmp(name, "CmdFillBuffer")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdFillBuffer;
+    }
+    if (!strcmp(name, "CmdClearColorImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdClearColorImage;
+    }
+    if (!strcmp(name, "CmdClearDepthStencilImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdClearDepthStencilImage;
+    }
+    if (!strcmp(name, "CmdClearAttachments")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdClearAttachments;
+    }
+    if (!strcmp(name, "CmdResolveImage")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdResolveImage;
+    }
+    if (!strcmp(name, "CmdSetEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdSetEvent;
+    }
+    if (!strcmp(name, "CmdResetEvent")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdResetEvent;
+    }
+    if (!strcmp(name, "CmdWaitEvents")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdWaitEvents;
+    }
+    if (!strcmp(name, "CmdPipelineBarrier")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdPipelineBarrier;
+    }
+    if (!strcmp(name, "CmdBeginQuery")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBeginQuery;
+    }
+    if (!strcmp(name, "CmdEndQuery")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdEndQuery;
+    }
+    if (!strcmp(name, "CmdResetQueryPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdResetQueryPool;
+    }
+    if (!strcmp(name, "CmdWriteTimestamp")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdWriteTimestamp;
+    }
+    if (!strcmp(name, "CmdCopyQueryPoolResults")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdCopyQueryPoolResults;
+    }
+    if (!strcmp(name, "CmdPushConstants")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdPushConstants;
+    }
+    if (!strcmp(name, "CmdBeginRenderPass")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdBeginRenderPass;
+    }
+    if (!strcmp(name, "CmdNextSubpass")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdNextSubpass;
+    }
+    if (!strcmp(name, "CmdEndRenderPass")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdEndRenderPass;
+    }
+    if (!strcmp(name, "CmdExecuteCommands")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_0) return NULL;
+        return (void *)table->CmdExecuteCommands;
+    }
 
     // ---- Core 1_1 commands
-    if (!strcmp(name, "BindBufferMemory2")) return (void *)table->BindBufferMemory2;
-    if (!strcmp(name, "BindImageMemory2")) return (void *)table->BindImageMemory2;
-    if (!strcmp(name, "GetDeviceGroupPeerMemoryFeatures")) return (void *)table->GetDeviceGroupPeerMemoryFeatures;
-    if (!strcmp(name, "CmdSetDeviceMask")) return (void *)table->CmdSetDeviceMask;
-    if (!strcmp(name, "CmdDispatchBase")) return (void *)table->CmdDispatchBase;
-    if (!strcmp(name, "GetImageMemoryRequirements2")) return (void *)table->GetImageMemoryRequirements2;
-    if (!strcmp(name, "GetBufferMemoryRequirements2")) return (void *)table->GetBufferMemoryRequirements2;
-    if (!strcmp(name, "GetImageSparseMemoryRequirements2")) return (void *)table->GetImageSparseMemoryRequirements2;
-    if (!strcmp(name, "TrimCommandPool")) return (void *)table->TrimCommandPool;
-    if (!strcmp(name, "GetDeviceQueue2")) return (void *)table->GetDeviceQueue2;
-    if (!strcmp(name, "CreateSamplerYcbcrConversion")) return (void *)table->CreateSamplerYcbcrConversion;
-    if (!strcmp(name, "DestroySamplerYcbcrConversion")) return (void *)table->DestroySamplerYcbcrConversion;
-    if (!strcmp(name, "CreateDescriptorUpdateTemplate")) return (void *)table->CreateDescriptorUpdateTemplate;
-    if (!strcmp(name, "DestroyDescriptorUpdateTemplate")) return (void *)table->DestroyDescriptorUpdateTemplate;
-    if (!strcmp(name, "UpdateDescriptorSetWithTemplate")) return (void *)table->UpdateDescriptorSetWithTemplate;
-    if (!strcmp(name, "GetDescriptorSetLayoutSupport")) return (void *)table->GetDescriptorSetLayoutSupport;
+    if (!strcmp(name, "BindBufferMemory2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->BindBufferMemory2;
+    }
+    if (!strcmp(name, "BindImageMemory2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->BindImageMemory2;
+    }
+    if (!strcmp(name, "GetDeviceGroupPeerMemoryFeatures")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetDeviceGroupPeerMemoryFeatures;
+    }
+    if (!strcmp(name, "CmdSetDeviceMask")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->CmdSetDeviceMask;
+    }
+    if (!strcmp(name, "CmdDispatchBase")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->CmdDispatchBase;
+    }
+    if (!strcmp(name, "GetImageMemoryRequirements2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetImageMemoryRequirements2;
+    }
+    if (!strcmp(name, "GetBufferMemoryRequirements2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetBufferMemoryRequirements2;
+    }
+    if (!strcmp(name, "GetImageSparseMemoryRequirements2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetImageSparseMemoryRequirements2;
+    }
+    if (!strcmp(name, "TrimCommandPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->TrimCommandPool;
+    }
+    if (!strcmp(name, "GetDeviceQueue2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetDeviceQueue2;
+    }
+    if (!strcmp(name, "CreateSamplerYcbcrConversion")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->CreateSamplerYcbcrConversion;
+    }
+    if (!strcmp(name, "DestroySamplerYcbcrConversion")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->DestroySamplerYcbcrConversion;
+    }
+    if (!strcmp(name, "CreateDescriptorUpdateTemplate")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->CreateDescriptorUpdateTemplate;
+    }
+    if (!strcmp(name, "DestroyDescriptorUpdateTemplate")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->DestroyDescriptorUpdateTemplate;
+    }
+    if (!strcmp(name, "UpdateDescriptorSetWithTemplate")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->UpdateDescriptorSetWithTemplate;
+    }
+    if (!strcmp(name, "GetDescriptorSetLayoutSupport")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1) return NULL;
+        return (void *)table->GetDescriptorSetLayoutSupport;
+    }
 
     // ---- Core 1_2 commands
-    if (!strcmp(name, "CmdDrawIndirectCount")) return (void *)table->CmdDrawIndirectCount;
-    if (!strcmp(name, "CmdDrawIndexedIndirectCount")) return (void *)table->CmdDrawIndexedIndirectCount;
-    if (!strcmp(name, "CreateRenderPass2")) return (void *)table->CreateRenderPass2;
-    if (!strcmp(name, "CmdBeginRenderPass2")) return (void *)table->CmdBeginRenderPass2;
-    if (!strcmp(name, "CmdNextSubpass2")) return (void *)table->CmdNextSubpass2;
-    if (!strcmp(name, "CmdEndRenderPass2")) return (void *)table->CmdEndRenderPass2;
-    if (!strcmp(name, "ResetQueryPool")) return (void *)table->ResetQueryPool;
-    if (!strcmp(name, "GetSemaphoreCounterValue")) return (void *)table->GetSemaphoreCounterValue;
-    if (!strcmp(name, "WaitSemaphores")) return (void *)table->WaitSemaphores;
-    if (!strcmp(name, "SignalSemaphore")) return (void *)table->SignalSemaphore;
-    if (!strcmp(name, "GetBufferDeviceAddress")) return (void *)table->GetBufferDeviceAddress;
-    if (!strcmp(name, "GetBufferOpaqueCaptureAddress")) return (void *)table->GetBufferOpaqueCaptureAddress;
-    if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddress")) return (void *)table->GetDeviceMemoryOpaqueCaptureAddress;
+    if (!strcmp(name, "CmdDrawIndirectCount")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CmdDrawIndirectCount;
+    }
+    if (!strcmp(name, "CmdDrawIndexedIndirectCount")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CmdDrawIndexedIndirectCount;
+    }
+    if (!strcmp(name, "CreateRenderPass2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CreateRenderPass2;
+    }
+    if (!strcmp(name, "CmdBeginRenderPass2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CmdBeginRenderPass2;
+    }
+    if (!strcmp(name, "CmdNextSubpass2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CmdNextSubpass2;
+    }
+    if (!strcmp(name, "CmdEndRenderPass2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->CmdEndRenderPass2;
+    }
+    if (!strcmp(name, "ResetQueryPool")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->ResetQueryPool;
+    }
+    if (!strcmp(name, "GetSemaphoreCounterValue")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->GetSemaphoreCounterValue;
+    }
+    if (!strcmp(name, "WaitSemaphores")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->WaitSemaphores;
+    }
+    if (!strcmp(name, "SignalSemaphore")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->SignalSemaphore;
+    }
+    if (!strcmp(name, "GetBufferDeviceAddress")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->GetBufferDeviceAddress;
+    }
+    if (!strcmp(name, "GetBufferOpaqueCaptureAddress")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->GetBufferOpaqueCaptureAddress;
+    }
+    if (!strcmp(name, "GetDeviceMemoryOpaqueCaptureAddress")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_2) return NULL;
+        return (void *)table->GetDeviceMemoryOpaqueCaptureAddress;
+    }
 
     // ---- Core 1_3 commands
-    if (!strcmp(name, "CreatePrivateDataSlot")) return (void *)table->CreatePrivateDataSlot;
-    if (!strcmp(name, "DestroyPrivateDataSlot")) return (void *)table->DestroyPrivateDataSlot;
-    if (!strcmp(name, "SetPrivateData")) return (void *)table->SetPrivateData;
-    if (!strcmp(name, "GetPrivateData")) return (void *)table->GetPrivateData;
-    if (!strcmp(name, "CmdSetEvent2")) return (void *)table->CmdSetEvent2;
-    if (!strcmp(name, "CmdResetEvent2")) return (void *)table->CmdResetEvent2;
-    if (!strcmp(name, "CmdWaitEvents2")) return (void *)table->CmdWaitEvents2;
-    if (!strcmp(name, "CmdPipelineBarrier2")) return (void *)table->CmdPipelineBarrier2;
-    if (!strcmp(name, "CmdWriteTimestamp2")) return (void *)table->CmdWriteTimestamp2;
-    if (!strcmp(name, "QueueSubmit2")) return (void *)table->QueueSubmit2;
-    if (!strcmp(name, "CmdCopyBuffer2")) return (void *)table->CmdCopyBuffer2;
-    if (!strcmp(name, "CmdCopyImage2")) return (void *)table->CmdCopyImage2;
-    if (!strcmp(name, "CmdCopyBufferToImage2")) return (void *)table->CmdCopyBufferToImage2;
-    if (!strcmp(name, "CmdCopyImageToBuffer2")) return (void *)table->CmdCopyImageToBuffer2;
-    if (!strcmp(name, "CmdBlitImage2")) return (void *)table->CmdBlitImage2;
-    if (!strcmp(name, "CmdResolveImage2")) return (void *)table->CmdResolveImage2;
-    if (!strcmp(name, "CmdBeginRendering")) return (void *)table->CmdBeginRendering;
-    if (!strcmp(name, "CmdEndRendering")) return (void *)table->CmdEndRendering;
-    if (!strcmp(name, "CmdSetCullMode")) return (void *)table->CmdSetCullMode;
-    if (!strcmp(name, "CmdSetFrontFace")) return (void *)table->CmdSetFrontFace;
-    if (!strcmp(name, "CmdSetPrimitiveTopology")) return (void *)table->CmdSetPrimitiveTopology;
-    if (!strcmp(name, "CmdSetViewportWithCount")) return (void *)table->CmdSetViewportWithCount;
-    if (!strcmp(name, "CmdSetScissorWithCount")) return (void *)table->CmdSetScissorWithCount;
-    if (!strcmp(name, "CmdBindVertexBuffers2")) return (void *)table->CmdBindVertexBuffers2;
-    if (!strcmp(name, "CmdSetDepthTestEnable")) return (void *)table->CmdSetDepthTestEnable;
-    if (!strcmp(name, "CmdSetDepthWriteEnable")) return (void *)table->CmdSetDepthWriteEnable;
-    if (!strcmp(name, "CmdSetDepthCompareOp")) return (void *)table->CmdSetDepthCompareOp;
-    if (!strcmp(name, "CmdSetDepthBoundsTestEnable")) return (void *)table->CmdSetDepthBoundsTestEnable;
-    if (!strcmp(name, "CmdSetStencilTestEnable")) return (void *)table->CmdSetStencilTestEnable;
-    if (!strcmp(name, "CmdSetStencilOp")) return (void *)table->CmdSetStencilOp;
-    if (!strcmp(name, "CmdSetRasterizerDiscardEnable")) return (void *)table->CmdSetRasterizerDiscardEnable;
-    if (!strcmp(name, "CmdSetDepthBiasEnable")) return (void *)table->CmdSetDepthBiasEnable;
-    if (!strcmp(name, "CmdSetPrimitiveRestartEnable")) return (void *)table->CmdSetPrimitiveRestartEnable;
-    if (!strcmp(name, "GetDeviceBufferMemoryRequirements")) return (void *)table->GetDeviceBufferMemoryRequirements;
-    if (!strcmp(name, "GetDeviceImageMemoryRequirements")) return (void *)table->GetDeviceImageMemoryRequirements;
-    if (!strcmp(name, "GetDeviceImageSparseMemoryRequirements")) return (void *)table->GetDeviceImageSparseMemoryRequirements;
+    if (!strcmp(name, "CreatePrivateDataSlot")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CreatePrivateDataSlot;
+    }
+    if (!strcmp(name, "DestroyPrivateDataSlot")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->DestroyPrivateDataSlot;
+    }
+    if (!strcmp(name, "SetPrivateData")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->SetPrivateData;
+    }
+    if (!strcmp(name, "GetPrivateData")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->GetPrivateData;
+    }
+    if (!strcmp(name, "CmdSetEvent2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetEvent2;
+    }
+    if (!strcmp(name, "CmdResetEvent2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdResetEvent2;
+    }
+    if (!strcmp(name, "CmdWaitEvents2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdWaitEvents2;
+    }
+    if (!strcmp(name, "CmdPipelineBarrier2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdPipelineBarrier2;
+    }
+    if (!strcmp(name, "CmdWriteTimestamp2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdWriteTimestamp2;
+    }
+    if (!strcmp(name, "QueueSubmit2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->QueueSubmit2;
+    }
+    if (!strcmp(name, "CmdCopyBuffer2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdCopyBuffer2;
+    }
+    if (!strcmp(name, "CmdCopyImage2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdCopyImage2;
+    }
+    if (!strcmp(name, "CmdCopyBufferToImage2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdCopyBufferToImage2;
+    }
+    if (!strcmp(name, "CmdCopyImageToBuffer2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdCopyImageToBuffer2;
+    }
+    if (!strcmp(name, "CmdBlitImage2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdBlitImage2;
+    }
+    if (!strcmp(name, "CmdResolveImage2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdResolveImage2;
+    }
+    if (!strcmp(name, "CmdBeginRendering")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdBeginRendering;
+    }
+    if (!strcmp(name, "CmdEndRendering")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdEndRendering;
+    }
+    if (!strcmp(name, "CmdSetCullMode")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetCullMode;
+    }
+    if (!strcmp(name, "CmdSetFrontFace")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetFrontFace;
+    }
+    if (!strcmp(name, "CmdSetPrimitiveTopology")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetPrimitiveTopology;
+    }
+    if (!strcmp(name, "CmdSetViewportWithCount")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetViewportWithCount;
+    }
+    if (!strcmp(name, "CmdSetScissorWithCount")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetScissorWithCount;
+    }
+    if (!strcmp(name, "CmdBindVertexBuffers2")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdBindVertexBuffers2;
+    }
+    if (!strcmp(name, "CmdSetDepthTestEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetDepthTestEnable;
+    }
+    if (!strcmp(name, "CmdSetDepthWriteEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetDepthWriteEnable;
+    }
+    if (!strcmp(name, "CmdSetDepthCompareOp")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetDepthCompareOp;
+    }
+    if (!strcmp(name, "CmdSetDepthBoundsTestEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetDepthBoundsTestEnable;
+    }
+    if (!strcmp(name, "CmdSetStencilTestEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetStencilTestEnable;
+    }
+    if (!strcmp(name, "CmdSetStencilOp")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetStencilOp;
+    }
+    if (!strcmp(name, "CmdSetRasterizerDiscardEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetRasterizerDiscardEnable;
+    }
+    if (!strcmp(name, "CmdSetDepthBiasEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetDepthBiasEnable;
+    }
+    if (!strcmp(name, "CmdSetPrimitiveRestartEnable")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->CmdSetPrimitiveRestartEnable;
+    }
+    if (!strcmp(name, "GetDeviceBufferMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->GetDeviceBufferMemoryRequirements;
+    }
+    if (!strcmp(name, "GetDeviceImageMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->GetDeviceImageMemoryRequirements;
+    }
+    if (!strcmp(name, "GetDeviceImageSparseMemoryRequirements")) {
+        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_3) return NULL;
+        return (void *)table->GetDeviceImageSparseMemoryRequirements;
+    }
 
     // ---- VK_KHR_swapchain extension commands
     if (!strcmp(name, "CreateSwapchainKHR")) return (void *)table->CreateSwapchainKHR;
@@ -1600,41 +2269,19 @@
     if (!strcmp(name, "CreateSharedSwapchainsKHR")) return (void *)table->CreateSharedSwapchainsKHR;
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CreateVideoSessionKHR")) return (void *)table->CreateVideoSessionKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "DestroyVideoSessionKHR")) return (void *)table->DestroyVideoSessionKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "GetVideoSessionMemoryRequirementsKHR")) return (void *)table->GetVideoSessionMemoryRequirementsKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "BindVideoSessionMemoryKHR")) return (void *)table->BindVideoSessionMemoryKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CreateVideoSessionParametersKHR")) return (void *)table->CreateVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "UpdateVideoSessionParametersKHR")) return (void *)table->UpdateVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "DestroyVideoSessionParametersKHR")) return (void *)table->DestroyVideoSessionParametersKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CmdBeginVideoCodingKHR")) return (void *)table->CmdBeginVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CmdEndVideoCodingKHR")) return (void *)table->CmdEndVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CmdControlVideoCodingKHR")) return (void *)table->CmdControlVideoCodingKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_video_decode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "CmdDecodeVideoKHR")) return (void *)table->CmdDecodeVideoKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_dynamic_rendering extension commands
     if (!strcmp(name, "CmdBeginRenderingKHR")) return (void *)table->CmdBeginRenderingKHR;
@@ -1649,10 +2296,10 @@
     if (!strcmp(name, "TrimCommandPoolKHR")) return (void *)table->TrimCommandPoolKHR;
 
     // ---- VK_KHR_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetMemoryWin32HandleKHR")) return (void *)table->GetMemoryWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetMemoryWin32HandlePropertiesKHR")) return (void *)table->GetMemoryWin32HandlePropertiesKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1661,10 +2308,10 @@
     if (!strcmp(name, "GetMemoryFdPropertiesKHR")) return (void *)table->GetMemoryFdPropertiesKHR;
 
     // ---- VK_KHR_external_semaphore_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "ImportSemaphoreWin32HandleKHR")) return (void *)table->ImportSemaphoreWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetSemaphoreWin32HandleKHR")) return (void *)table->GetSemaphoreWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1691,10 +2338,10 @@
     if (!strcmp(name, "GetSwapchainStatusKHR")) return (void *)table->GetSwapchainStatusKHR;
 
     // ---- VK_KHR_external_fence_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "ImportFenceWin32HandleKHR")) return (void *)table->ImportFenceWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetFenceWin32HandleKHR")) return (void *)table->GetFenceWin32HandleKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1754,8 +2401,15 @@
     if (!strcmp(name, "GetPipelineExecutableStatisticsKHR")) return (void *)table->GetPipelineExecutableStatisticsKHR;
     if (!strcmp(name, "GetPipelineExecutableInternalRepresentationsKHR")) return (void *)table->GetPipelineExecutableInternalRepresentationsKHR;
 
+    // ---- VK_KHR_map_memory2 extension commands
+    if (!strcmp(name, "MapMemory2KHR")) return (void *)table->MapMemory2KHR;
+    if (!strcmp(name, "UnmapMemory2KHR")) return (void *)table->UnmapMemory2KHR;
+
     // ---- VK_KHR_video_encode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "GetEncodedVideoSessionParametersKHR")) return (void *)table->GetEncodedVideoSessionParametersKHR;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
     if (!strcmp(name, "CmdEncodeVideoKHR")) return (void *)table->CmdEncodeVideoKHR;
 #endif // VK_ENABLE_BETA_EXTENSIONS
 
@@ -1785,9 +2439,15 @@
     if (!strcmp(name, "GetDeviceImageMemoryRequirementsKHR")) return (void *)table->GetDeviceImageMemoryRequirementsKHR;
     if (!strcmp(name, "GetDeviceImageSparseMemoryRequirementsKHR")) return (void *)table->GetDeviceImageSparseMemoryRequirementsKHR;
 
+    // ---- VK_KHR_maintenance5 extension commands
+    if (!strcmp(name, "CmdBindIndexBuffer2KHR")) return (void *)table->CmdBindIndexBuffer2KHR;
+    if (!strcmp(name, "GetRenderingAreaGranularityKHR")) return (void *)table->GetRenderingAreaGranularityKHR;
+    if (!strcmp(name, "GetDeviceImageSubresourceLayoutKHR")) return (void *)table->GetDeviceImageSubresourceLayoutKHR;
+    if (!strcmp(name, "GetImageSubresourceLayout2KHR")) return (void *)table->GetImageSubresourceLayout2KHR;
+
     // ---- VK_EXT_debug_marker extension commands
-    if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) return (void *)table->DebugMarkerSetObjectTagEXT;
-    if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) return (void *)table->DebugMarkerSetObjectNameEXT;
+    if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) return dev->layer_extensions.ext_debug_marker_enabled ? (void *)DebugMarkerSetObjectTagEXT : NULL;
+    if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) return dev->layer_extensions.ext_debug_marker_enabled ? (void *)DebugMarkerSetObjectNameEXT : NULL;
     if (!strcmp(name, "CmdDebugMarkerBeginEXT")) return (void *)table->CmdDebugMarkerBeginEXT;
     if (!strcmp(name, "CmdDebugMarkerEndEXT")) return (void *)table->CmdDebugMarkerEndEXT;
     if (!strcmp(name, "CmdDebugMarkerInsertEXT")) return (void *)table->CmdDebugMarkerInsertEXT;
@@ -1819,7 +2479,7 @@
     if (!strcmp(name, "GetShaderInfoAMD")) return (void *)table->GetShaderInfoAMD;
 
     // ---- VK_NV_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetMemoryWin32HandleNV")) return (void *)table->GetMemoryWin32HandleNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1842,13 +2502,15 @@
 
     // ---- VK_EXT_discard_rectangles extension commands
     if (!strcmp(name, "CmdSetDiscardRectangleEXT")) return (void *)table->CmdSetDiscardRectangleEXT;
+    if (!strcmp(name, "CmdSetDiscardRectangleEnableEXT")) return (void *)table->CmdSetDiscardRectangleEnableEXT;
+    if (!strcmp(name, "CmdSetDiscardRectangleModeEXT")) return (void *)table->CmdSetDiscardRectangleModeEXT;
 
     // ---- VK_EXT_hdr_metadata extension commands
     if (!strcmp(name, "SetHdrMetadataEXT")) return (void *)table->SetHdrMetadataEXT;
 
     // ---- VK_EXT_debug_utils extension commands
-    if (!strcmp(name, "SetDebugUtilsObjectNameEXT")) return (void *)table->SetDebugUtilsObjectNameEXT;
-    if (!strcmp(name, "SetDebugUtilsObjectTagEXT")) return (void *)table->SetDebugUtilsObjectTagEXT;
+    if (!strcmp(name, "SetDebugUtilsObjectNameEXT")) return dev->layer_extensions.ext_debug_utils_enabled ? (void *)SetDebugUtilsObjectNameEXT : NULL;
+    if (!strcmp(name, "SetDebugUtilsObjectTagEXT")) return dev->layer_extensions.ext_debug_utils_enabled ? (void *)SetDebugUtilsObjectTagEXT : NULL;
     if (!strcmp(name, "QueueBeginDebugUtilsLabelEXT")) return (void *)table->QueueBeginDebugUtilsLabelEXT;
     if (!strcmp(name, "QueueEndDebugUtilsLabelEXT")) return (void *)table->QueueEndDebugUtilsLabelEXT;
     if (!strcmp(name, "QueueInsertDebugUtilsLabelEXT")) return (void *)table->QueueInsertDebugUtilsLabelEXT;
@@ -1857,13 +2519,36 @@
     if (!strcmp(name, "CmdInsertDebugUtilsLabelEXT")) return (void *)table->CmdInsertDebugUtilsLabelEXT;
 
     // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp(name, "GetAndroidHardwareBufferPropertiesANDROID")) return (void *)table->GetAndroidHardwareBufferPropertiesANDROID;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp(name, "GetMemoryAndroidHardwareBufferANDROID")) return (void *)table->GetMemoryAndroidHardwareBufferANDROID;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
+    // ---- VK_AMDX_shader_enqueue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "CreateExecutionGraphPipelinesAMDX")) return (void *)table->CreateExecutionGraphPipelinesAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "GetExecutionGraphPipelineScratchSizeAMDX")) return (void *)table->GetExecutionGraphPipelineScratchSizeAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "GetExecutionGraphPipelineNodeIndexAMDX")) return (void *)table->GetExecutionGraphPipelineNodeIndexAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "CmdInitializeGraphScratchMemoryAMDX")) return (void *)table->CmdInitializeGraphScratchMemoryAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "CmdDispatchGraphAMDX")) return (void *)table->CmdDispatchGraphAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "CmdDispatchGraphIndirectAMDX")) return (void *)table->CmdDispatchGraphIndirectAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "CmdDispatchGraphIndirectCountAMDX")) return (void *)table->CmdDispatchGraphIndirectCountAMDX;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
     // ---- VK_EXT_sample_locations extension commands
     if (!strcmp(name, "CmdSetSampleLocationsEXT")) return (void *)table->CmdSetSampleLocationsEXT;
 
@@ -1911,6 +2596,7 @@
     if (!strcmp(name, "CmdDrawMeshTasksIndirectCountNV")) return (void *)table->CmdDrawMeshTasksIndirectCountNV;
 
     // ---- VK_NV_scissor_exclusive extension commands
+    if (!strcmp(name, "CmdSetExclusiveScissorEnableNV")) return (void *)table->CmdSetExclusiveScissorEnableNV;
     if (!strcmp(name, "CmdSetExclusiveScissorNV")) return (void *)table->CmdSetExclusiveScissorNV;
 
     // ---- VK_NV_device_diagnostic_checkpoints extension commands
@@ -1935,13 +2621,13 @@
     if (!strcmp(name, "GetBufferDeviceAddressEXT")) return (void *)table->GetBufferDeviceAddressEXT;
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "AcquireFullScreenExclusiveModeEXT")) return (void *)table->AcquireFullScreenExclusiveModeEXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "ReleaseFullScreenExclusiveModeEXT")) return (void *)table->ReleaseFullScreenExclusiveModeEXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetDeviceGroupSurfacePresentModes2EXT")) return (void *)table->GetDeviceGroupSurfacePresentModes2EXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -1965,6 +2651,16 @@
     if (!strcmp(name, "CmdSetStencilTestEnableEXT")) return (void *)table->CmdSetStencilTestEnableEXT;
     if (!strcmp(name, "CmdSetStencilOpEXT")) return (void *)table->CmdSetStencilOpEXT;
 
+    // ---- VK_EXT_host_image_copy extension commands
+    if (!strcmp(name, "CopyMemoryToImageEXT")) return (void *)table->CopyMemoryToImageEXT;
+    if (!strcmp(name, "CopyImageToMemoryEXT")) return (void *)table->CopyImageToMemoryEXT;
+    if (!strcmp(name, "CopyImageToImageEXT")) return (void *)table->CopyImageToImageEXT;
+    if (!strcmp(name, "TransitionImageLayoutEXT")) return (void *)table->TransitionImageLayoutEXT;
+    if (!strcmp(name, "GetImageSubresourceLayout2EXT")) return (void *)table->GetImageSubresourceLayout2EXT;
+
+    // ---- VK_EXT_swapchain_maintenance1 extension commands
+    if (!strcmp(name, "ReleaseSwapchainImagesEXT")) return (void *)table->ReleaseSwapchainImagesEXT;
+
     // ---- VK_NV_device_generated_commands extension commands
     if (!strcmp(name, "GetGeneratedCommandsMemoryRequirementsNV")) return (void *)table->GetGeneratedCommandsMemoryRequirementsNV;
     if (!strcmp(name, "CmdPreprocessGeneratedCommandsNV")) return (void *)table->CmdPreprocessGeneratedCommandsNV;
@@ -1973,6 +2669,9 @@
     if (!strcmp(name, "CreateIndirectCommandsLayoutNV")) return (void *)table->CreateIndirectCommandsLayoutNV;
     if (!strcmp(name, "DestroyIndirectCommandsLayoutNV")) return (void *)table->DestroyIndirectCommandsLayoutNV;
 
+    // ---- VK_EXT_depth_bias_control extension commands
+    if (!strcmp(name, "CmdSetDepthBias2EXT")) return (void *)table->CmdSetDepthBias2EXT;
+
     // ---- VK_EXT_private_data extension commands
     if (!strcmp(name, "CreatePrivateDataSlotEXT")) return (void *)table->CreatePrivateDataSlotEXT;
     if (!strcmp(name, "DestroyPrivateDataSlotEXT")) return (void *)table->DestroyPrivateDataSlotEXT;
@@ -1980,16 +2679,26 @@
     if (!strcmp(name, "GetPrivateDataEXT")) return (void *)table->GetPrivateDataEXT;
 
     // ---- VK_EXT_metal_objects extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     if (!strcmp(name, "ExportMetalObjectsEXT")) return (void *)table->ExportMetalObjectsEXT;
 #endif // VK_USE_PLATFORM_METAL_EXT
 
+    // ---- VK_EXT_descriptor_buffer extension commands
+    if (!strcmp(name, "GetDescriptorSetLayoutSizeEXT")) return (void *)table->GetDescriptorSetLayoutSizeEXT;
+    if (!strcmp(name, "GetDescriptorSetLayoutBindingOffsetEXT")) return (void *)table->GetDescriptorSetLayoutBindingOffsetEXT;
+    if (!strcmp(name, "GetDescriptorEXT")) return (void *)table->GetDescriptorEXT;
+    if (!strcmp(name, "CmdBindDescriptorBuffersEXT")) return (void *)table->CmdBindDescriptorBuffersEXT;
+    if (!strcmp(name, "CmdSetDescriptorBufferOffsetsEXT")) return (void *)table->CmdSetDescriptorBufferOffsetsEXT;
+    if (!strcmp(name, "CmdBindDescriptorBufferEmbeddedSamplersEXT")) return (void *)table->CmdBindDescriptorBufferEmbeddedSamplersEXT;
+    if (!strcmp(name, "GetBufferOpaqueCaptureDescriptorDataEXT")) return (void *)table->GetBufferOpaqueCaptureDescriptorDataEXT;
+    if (!strcmp(name, "GetImageOpaqueCaptureDescriptorDataEXT")) return (void *)table->GetImageOpaqueCaptureDescriptorDataEXT;
+    if (!strcmp(name, "GetImageViewOpaqueCaptureDescriptorDataEXT")) return (void *)table->GetImageViewOpaqueCaptureDescriptorDataEXT;
+    if (!strcmp(name, "GetSamplerOpaqueCaptureDescriptorDataEXT")) return (void *)table->GetSamplerOpaqueCaptureDescriptorDataEXT;
+    if (!strcmp(name, "GetAccelerationStructureOpaqueCaptureDescriptorDataEXT")) return (void *)table->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
+
     // ---- VK_NV_fragment_shading_rate_enums extension commands
     if (!strcmp(name, "CmdSetFragmentShadingRateEnumNV")) return (void *)table->CmdSetFragmentShadingRateEnumNV;
 
-    // ---- VK_EXT_image_compression_control extension commands
-    if (!strcmp(name, "GetImageSubresourceLayout2EXT")) return (void *)table->GetImageSubresourceLayout2EXT;
-
     // ---- VK_EXT_device_fault extension commands
     if (!strcmp(name, "GetDeviceFaultInfoEXT")) return (void *)table->GetDeviceFaultInfoEXT;
 
@@ -1997,35 +2706,35 @@
     if (!strcmp(name, "CmdSetVertexInputEXT")) return (void *)table->CmdSetVertexInputEXT;
 
     // ---- VK_FUCHSIA_external_memory extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "GetMemoryZirconHandleFUCHSIA")) return (void *)table->GetMemoryZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "GetMemoryZirconHandlePropertiesFUCHSIA")) return (void *)table->GetMemoryZirconHandlePropertiesFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_external_semaphore extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "ImportSemaphoreZirconHandleFUCHSIA")) return (void *)table->ImportSemaphoreZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "GetSemaphoreZirconHandleFUCHSIA")) return (void *)table->GetSemaphoreZirconHandleFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_buffer_collection extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "CreateBufferCollectionFUCHSIA")) return (void *)table->CreateBufferCollectionFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "SetBufferCollectionImageConstraintsFUCHSIA")) return (void *)table->SetBufferCollectionImageConstraintsFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "SetBufferCollectionBufferConstraintsFUCHSIA")) return (void *)table->SetBufferCollectionBufferConstraintsFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "DestroyBufferCollectionFUCHSIA")) return (void *)table->DestroyBufferCollectionFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "GetBufferCollectionPropertiesFUCHSIA")) return (void *)table->GetBufferCollectionPropertiesFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
@@ -2072,6 +2781,10 @@
     if (!strcmp(name, "GetDeviceMicromapCompatibilityEXT")) return (void *)table->GetDeviceMicromapCompatibilityEXT;
     if (!strcmp(name, "GetMicromapBuildSizesEXT")) return (void *)table->GetMicromapBuildSizesEXT;
 
+    // ---- VK_HUAWEI_cluster_culling_shader extension commands
+    if (!strcmp(name, "CmdDrawClusterHUAWEI")) return (void *)table->CmdDrawClusterHUAWEI;
+    if (!strcmp(name, "CmdDrawClusterIndirectHUAWEI")) return (void *)table->CmdDrawClusterIndirectHUAWEI;
+
     // ---- VK_EXT_pageable_device_local_memory extension commands
     if (!strcmp(name, "SetDeviceMemoryPriorityEXT")) return (void *)table->SetDeviceMemoryPriorityEXT;
 
@@ -2079,6 +2792,19 @@
     if (!strcmp(name, "GetDescriptorSetLayoutHostMappingInfoVALVE")) return (void *)table->GetDescriptorSetLayoutHostMappingInfoVALVE;
     if (!strcmp(name, "GetDescriptorSetHostMappingVALVE")) return (void *)table->GetDescriptorSetHostMappingVALVE;
 
+    // ---- VK_NV_copy_memory_indirect extension commands
+    if (!strcmp(name, "CmdCopyMemoryIndirectNV")) return (void *)table->CmdCopyMemoryIndirectNV;
+    if (!strcmp(name, "CmdCopyMemoryToImageIndirectNV")) return (void *)table->CmdCopyMemoryToImageIndirectNV;
+
+    // ---- VK_NV_memory_decompression extension commands
+    if (!strcmp(name, "CmdDecompressMemoryNV")) return (void *)table->CmdDecompressMemoryNV;
+    if (!strcmp(name, "CmdDecompressMemoryIndirectCountNV")) return (void *)table->CmdDecompressMemoryIndirectCountNV;
+
+    // ---- VK_NV_device_generated_commands_compute extension commands
+    if (!strcmp(name, "GetPipelineIndirectMemoryRequirementsNV")) return (void *)table->GetPipelineIndirectMemoryRequirementsNV;
+    if (!strcmp(name, "CmdUpdatePipelineIndirectBufferNV")) return (void *)table->CmdUpdatePipelineIndirectBufferNV;
+    if (!strcmp(name, "GetPipelineIndirectDeviceAddressNV")) return (void *)table->GetPipelineIndirectDeviceAddressNV;
+
     // ---- VK_EXT_extended_dynamic_state3 extension commands
     if (!strcmp(name, "CmdSetTessellationDomainOriginEXT")) return (void *)table->CmdSetTessellationDomainOriginEXT;
     if (!strcmp(name, "CmdSetDepthClampEnableEXT")) return (void *)table->CmdSetDepthClampEnableEXT;
@@ -2122,10 +2848,31 @@
     if (!strcmp(name, "BindOpticalFlowSessionImageNV")) return (void *)table->BindOpticalFlowSessionImageNV;
     if (!strcmp(name, "CmdOpticalFlowExecuteNV")) return (void *)table->CmdOpticalFlowExecuteNV;
 
+    // ---- VK_EXT_shader_object extension commands
+    if (!strcmp(name, "CreateShadersEXT")) return (void *)table->CreateShadersEXT;
+    if (!strcmp(name, "DestroyShaderEXT")) return (void *)table->DestroyShaderEXT;
+    if (!strcmp(name, "GetShaderBinaryDataEXT")) return (void *)table->GetShaderBinaryDataEXT;
+    if (!strcmp(name, "CmdBindShadersEXT")) return (void *)table->CmdBindShadersEXT;
+
     // ---- VK_QCOM_tile_properties extension commands
     if (!strcmp(name, "GetFramebufferTilePropertiesQCOM")) return (void *)table->GetFramebufferTilePropertiesQCOM;
     if (!strcmp(name, "GetDynamicRenderingTilePropertiesQCOM")) return (void *)table->GetDynamicRenderingTilePropertiesQCOM;
 
+    // ---- VK_NV_low_latency2 extension commands
+    if (!strcmp(name, "SetLatencySleepModeNV")) return (void *)table->SetLatencySleepModeNV;
+    if (!strcmp(name, "LatencySleepNV")) return (void *)table->LatencySleepNV;
+    if (!strcmp(name, "SetLatencyMarkerNV")) return (void *)table->SetLatencyMarkerNV;
+    if (!strcmp(name, "GetLatencyTimingsNV")) return (void *)table->GetLatencyTimingsNV;
+    if (!strcmp(name, "QueueNotifyOutOfBandNV")) return (void *)table->QueueNotifyOutOfBandNV;
+
+    // ---- VK_EXT_attachment_feedback_loop_dynamic_state extension commands
+    if (!strcmp(name, "CmdSetAttachmentFeedbackLoopEnableEXT")) return (void *)table->CmdSetAttachmentFeedbackLoopEnableEXT;
+
+    // ---- VK_QNX_external_memory_screen_buffer extension commands
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    if (!strcmp(name, "GetScreenBufferPropertiesQNX")) return (void *)table->GetScreenBufferPropertiesQNX;
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+
     // ---- VK_KHR_acceleration_structure extension commands
     if (!strcmp(name, "CreateAccelerationStructureKHR")) return (void *)table->CreateAccelerationStructureKHR;
     if (!strcmp(name, "DestroyAccelerationStructureKHR")) return (void *)table->DestroyAccelerationStructureKHR;
@@ -2157,6 +2904,7 @@
     if (!strcmp(name, "CmdDrawMeshTasksIndirectEXT")) return (void *)table->CmdDrawMeshTasksIndirectEXT;
     if (!strcmp(name, "CmdDrawMeshTasksIndirectCountEXT")) return (void *)table->CmdDrawMeshTasksIndirectCountEXT;
 
+    *found_name = false;
     return NULL;
 }
 
@@ -2221,49 +2969,45 @@
     if (!strcmp(name, "CreateDisplayPlaneSurfaceKHR")) return (void *)table->CreateDisplayPlaneSurfaceKHR;
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     if (!strcmp(name, "CreateXlibSurfaceKHR")) return (void *)table->CreateXlibSurfaceKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     if (!strcmp(name, "GetPhysicalDeviceXlibPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceXlibPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     if (!strcmp(name, "CreateXcbSurfaceKHR")) return (void *)table->CreateXcbSurfaceKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     if (!strcmp(name, "GetPhysicalDeviceXcbPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceXcbPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     if (!strcmp(name, "CreateWaylandSurfaceKHR")) return (void *)table->CreateWaylandSurfaceKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     if (!strcmp(name, "GetPhysicalDeviceWaylandPresentationSupportKHR")) return (void *)table->GetPhysicalDeviceWaylandPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp(name, "CreateAndroidSurfaceKHR")) return (void *)table->CreateAndroidSurfaceKHR;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "CreateWin32SurfaceKHR")) return (void *)table->CreateWin32SurfaceKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetPhysicalDeviceWin32PresentationSupportKHR")) return (void *)table->GetPhysicalDeviceWin32PresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "GetPhysicalDeviceVideoCapabilitiesKHR")) return (void *)table->GetPhysicalDeviceVideoCapabilitiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp(name, "GetPhysicalDeviceVideoFormatPropertiesKHR")) return (void *)table->GetPhysicalDeviceVideoFormatPropertiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     if (!strcmp(name, "GetPhysicalDeviceFeatures2KHR")) return (void *)table->GetPhysicalDeviceFeatures2KHR;
@@ -2303,13 +3047,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     if (!strcmp(name, "GetPhysicalDeviceFragmentShadingRatesKHR")) return (void *)table->GetPhysicalDeviceFragmentShadingRatesKHR;
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp(name, "GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR")) return (void *)table->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    if (!strcmp(name, "GetPhysicalDeviceCooperativeMatrixPropertiesKHR")) return (void *)table->GetPhysicalDeviceCooperativeMatrixPropertiesKHR;
+
     // ---- VK_EXT_debug_report extension commands
     if (!strcmp(name, "CreateDebugReportCallbackEXT")) return (void *)table->CreateDebugReportCallbackEXT;
     if (!strcmp(name, "DestroyDebugReportCallbackEXT")) return (void *)table->DestroyDebugReportCallbackEXT;
     if (!strcmp(name, "DebugReportMessageEXT")) return (void *)table->DebugReportMessageEXT;
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     if (!strcmp(name, "CreateStreamDescriptorSurfaceGGP")) return (void *)table->CreateStreamDescriptorSurfaceGGP;
 #endif // VK_USE_PLATFORM_GGP
 
@@ -2317,7 +3069,7 @@
     if (!strcmp(name, "GetPhysicalDeviceExternalImageFormatPropertiesNV")) return (void *)table->GetPhysicalDeviceExternalImageFormatPropertiesNV;
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     if (!strcmp(name, "CreateViSurfaceNN")) return (void *)table->CreateViSurfaceNN;
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -2325,10 +3077,10 @@
     if (!strcmp(name, "ReleaseDisplayEXT")) return (void *)table->ReleaseDisplayEXT;
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     if (!strcmp(name, "AcquireXlibDisplayEXT")) return (void *)table->AcquireXlibDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     if (!strcmp(name, "GetRandROutputDisplayEXT")) return (void *)table->GetRandROutputDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -2336,12 +3088,12 @@
     if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2EXT")) return (void *)table->GetPhysicalDeviceSurfaceCapabilities2EXT;
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     if (!strcmp(name, "CreateIOSSurfaceMVK")) return (void *)table->CreateIOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     if (!strcmp(name, "CreateMacOSSurfaceMVK")) return (void *)table->CreateMacOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -2357,12 +3109,12 @@
     if (!strcmp(name, "GetPhysicalDeviceCalibrateableTimeDomainsEXT")) return (void *)table->GetPhysicalDeviceCalibrateableTimeDomainsEXT;
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp(name, "CreateImagePipeSurfaceFUCHSIA")) return (void *)table->CreateImagePipeSurfaceFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     if (!strcmp(name, "CreateMetalSurfaceEXT")) return (void *)table->CreateMetalSurfaceEXT;
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -2376,7 +3128,7 @@
     if (!strcmp(name, "GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV")) return (void *)table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModes2EXT")) return (void *)table->GetPhysicalDeviceSurfacePresentModes2EXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -2388,26 +3140,26 @@
     if (!strcmp(name, "GetDrmDisplayEXT")) return (void *)table->GetDrmDisplayEXT;
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "AcquireWinrtDisplayNV")) return (void *)table->AcquireWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "GetWinrtDisplayNV")) return (void *)table->GetWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     if (!strcmp(name, "CreateDirectFBSurfaceEXT")) return (void *)table->CreateDirectFBSurfaceEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     if (!strcmp(name, "GetPhysicalDeviceDirectFBPresentationSupportEXT")) return (void *)table->GetPhysicalDeviceDirectFBPresentationSupportEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     if (!strcmp(name, "CreateScreenSurfaceQNX")) return (void *)table->CreateScreenSurfaceQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     if (!strcmp(name, "GetPhysicalDeviceScreenPresentationSupportQNX")) return (void *)table->GetPhysicalDeviceScreenPresentationSupportQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -2421,7 +3173,6 @@
 
 // ---- VK_KHR_video_queue extension trampoline/terminators
 
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR(
     VkPhysicalDevice                            physicalDevice,
     const VkVideoProfileInfoKHR*                pVideoProfile,
@@ -2429,7 +3180,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceVideoCapabilitiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceVideoCapabilitiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2445,15 +3196,13 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceVideoCapabilitiesKHR) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceVideoCapabilitiesKHR");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     return icd_term->dispatch.GetPhysicalDeviceVideoCapabilitiesKHR(phys_dev_term->phys_dev, pVideoProfile, pCapabilities);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR(
     VkPhysicalDevice                            physicalDevice,
     const VkPhysicalDeviceVideoFormatInfoKHR*   pVideoFormatInfo,
@@ -2462,7 +3211,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceVideoFormatPropertiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceVideoFormatPropertiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2479,15 +3228,13 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceVideoFormatPropertiesKHR) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceVideoFormatPropertiesKHR");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     return icd_term->dispatch.GetPhysicalDeviceVideoFormatPropertiesKHR(phys_dev_term->phys_dev, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR(
     VkDevice                                    device,
     const VkVideoSessionCreateInfoKHR*          pCreateInfo,
@@ -2495,7 +3242,7 @@
     VkVideoSessionKHR*                          pVideoSession) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateVideoSessionKHR: Invalid device "
                    "[VUID-vkCreateVideoSessionKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2503,15 +3250,13 @@
     return disp->CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR(
     VkDevice                                    device,
     VkVideoSessionKHR                           videoSession,
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyVideoSessionKHR: Invalid device "
                    "[VUID-vkDestroyVideoSessionKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2519,8 +3264,6 @@
     disp->DestroyVideoSessionKHR(device, videoSession, pAllocator);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR(
     VkDevice                                    device,
     VkVideoSessionKHR                           videoSession,
@@ -2528,7 +3271,7 @@
     VkVideoSessionMemoryRequirementsKHR*        pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetVideoSessionMemoryRequirementsKHR: Invalid device "
                    "[VUID-vkGetVideoSessionMemoryRequirementsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2536,8 +3279,6 @@
     return disp->GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, pMemoryRequirements);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR(
     VkDevice                                    device,
     VkVideoSessionKHR                           videoSession,
@@ -2545,7 +3286,7 @@
     const VkBindVideoSessionMemoryInfoKHR*      pBindSessionMemoryInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindVideoSessionMemoryKHR: Invalid device "
                    "[VUID-vkBindVideoSessionMemoryKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2553,8 +3294,6 @@
     return disp->BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR(
     VkDevice                                    device,
     const VkVideoSessionParametersCreateInfoKHR* pCreateInfo,
@@ -2562,7 +3301,7 @@
     VkVideoSessionParametersKHR*                pVideoSessionParameters) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateVideoSessionParametersKHR: Invalid device "
                    "[VUID-vkCreateVideoSessionParametersKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2570,15 +3309,13 @@
     return disp->CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR(
     VkDevice                                    device,
     VkVideoSessionParametersKHR                 videoSessionParameters,
     const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUpdateVideoSessionParametersKHR: Invalid device "
                    "[VUID-vkUpdateVideoSessionParametersKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2586,15 +3323,13 @@
     return disp->UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR(
     VkDevice                                    device,
     VkVideoSessionParametersKHR                 videoSessionParameters,
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyVideoSessionParametersKHR: Invalid device "
                    "[VUID-vkDestroyVideoSessionParametersKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2602,14 +3337,12 @@
     disp->DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR(
     VkCommandBuffer                             commandBuffer,
     const VkVideoBeginCodingInfoKHR*            pBeginInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginVideoCodingKHR: Invalid commandBuffer "
                    "[VUID-vkCmdBeginVideoCodingKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2617,14 +3350,12 @@
     disp->CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR(
     VkCommandBuffer                             commandBuffer,
     const VkVideoEndCodingInfoKHR*              pEndCodingInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndVideoCodingKHR: Invalid commandBuffer "
                    "[VUID-vkCmdEndVideoCodingKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2632,14 +3363,12 @@
     disp->CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR(
     VkCommandBuffer                             commandBuffer,
     const VkVideoCodingControlInfoKHR*          pCodingControlInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdControlVideoCodingKHR: Invalid commandBuffer "
                    "[VUID-vkCmdControlVideoCodingKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2647,17 +3376,15 @@
     disp->CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
 // ---- VK_KHR_video_decode_queue extension trampoline/terminators
 
-#ifdef VK_ENABLE_BETA_EXTENSIONS
 VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR(
     VkCommandBuffer                             commandBuffer,
     const VkVideoDecodeInfoKHR*                 pDecodeInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDecodeVideoKHR: Invalid commandBuffer "
                    "[VUID-vkCmdDecodeVideoKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2665,7 +3392,6 @@
     disp->CmdDecodeVideoKHR(commandBuffer, pDecodeInfo);
 }
 
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
 // ---- VK_KHR_dynamic_rendering extension trampoline/terminators
 
@@ -2674,7 +3400,7 @@
     const VkRenderingInfo*                      pRenderingInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginRenderingKHR: Invalid commandBuffer "
                    "[VUID-vkCmdBeginRenderingKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2686,7 +3412,7 @@
     VkCommandBuffer                             commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndRenderingKHR: Invalid commandBuffer "
                    "[VUID-vkCmdEndRenderingKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2705,7 +3431,7 @@
     VkPeerMemoryFeatureFlags*                   pPeerMemoryFeatures) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupPeerMemoryFeaturesKHR: Invalid device "
                    "[VUID-vkGetDeviceGroupPeerMemoryFeaturesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2718,7 +3444,7 @@
     uint32_t                                    deviceMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDeviceMaskKHR: Invalid commandBuffer "
                    "[VUID-vkCmdSetDeviceMaskKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2736,7 +3462,7 @@
     uint32_t                                    groupCountZ) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDispatchBaseKHR: Invalid commandBuffer "
                    "[VUID-vkCmdDispatchBaseKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2753,7 +3479,7 @@
     VkCommandPoolTrimFlags                      flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkTrimCommandPoolKHR: Invalid device "
                    "[VUID-vkTrimCommandPoolKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2764,14 +3490,14 @@
 
 // ---- VK_KHR_external_memory_win32 extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR(
     VkDevice                                    device,
     const VkMemoryGetWin32HandleInfoKHR*        pGetWin32HandleInfo,
     HANDLE*                                     pHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryWin32HandleKHR: Invalid device "
                    "[VUID-vkGetMemoryWin32HandleKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2780,7 +3506,7 @@
 }
 
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR(
     VkDevice                                    device,
     VkExternalMemoryHandleTypeFlagBits          handleType,
@@ -2788,7 +3514,7 @@
     VkMemoryWin32HandlePropertiesKHR*           pMemoryWin32HandleProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryWin32HandlePropertiesKHR: Invalid device "
                    "[VUID-vkGetMemoryWin32HandlePropertiesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2806,7 +3532,7 @@
     int*                                        pFd) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryFdKHR: Invalid device "
                    "[VUID-vkGetMemoryFdKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2821,7 +3547,7 @@
     VkMemoryFdPropertiesKHR*                    pMemoryFdProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryFdPropertiesKHR: Invalid device "
                    "[VUID-vkGetMemoryFdPropertiesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2832,13 +3558,13 @@
 
 // ---- VK_KHR_external_semaphore_win32 extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR(
     VkDevice                                    device,
     const VkImportSemaphoreWin32HandleInfoKHR*  pImportSemaphoreWin32HandleInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkImportSemaphoreWin32HandleKHR: Invalid device "
                    "[VUID-vkImportSemaphoreWin32HandleKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2847,14 +3573,14 @@
 }
 
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(
     VkDevice                                    device,
     const VkSemaphoreGetWin32HandleInfoKHR*     pGetWin32HandleInfo,
     HANDLE*                                     pHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSemaphoreWin32HandleKHR: Invalid device "
                    "[VUID-vkGetSemaphoreWin32HandleKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2871,7 +3597,7 @@
     const VkImportSemaphoreFdInfoKHR*           pImportSemaphoreFdInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkImportSemaphoreFdKHR: Invalid device "
                    "[VUID-vkImportSemaphoreFdKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2885,7 +3611,7 @@
     int*                                        pFd) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSemaphoreFdKHR: Invalid device "
                    "[VUID-vkGetSemaphoreFdKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2905,7 +3631,7 @@
     const VkWriteDescriptorSet*                 pDescriptorWrites) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPushDescriptorSetKHR: Invalid commandBuffer "
                    "[VUID-vkCmdPushDescriptorSetKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2921,7 +3647,7 @@
     const void*                                 pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPushDescriptorSetWithTemplateKHR: Invalid commandBuffer "
                    "[VUID-vkCmdPushDescriptorSetWithTemplateKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2939,7 +3665,7 @@
     VkDescriptorUpdateTemplate*                 pDescriptorUpdateTemplate) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDescriptorUpdateTemplateKHR: Invalid device "
                    "[VUID-vkCreateDescriptorUpdateTemplateKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2953,7 +3679,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDescriptorUpdateTemplateKHR: Invalid device "
                    "[VUID-vkDestroyDescriptorUpdateTemplateKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2968,7 +3694,7 @@
     const void*                                 pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUpdateDescriptorSetWithTemplateKHR: Invalid device "
                    "[VUID-vkUpdateDescriptorSetWithTemplateKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2986,7 +3712,7 @@
     VkRenderPass*                               pRenderPass) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateRenderPass2KHR: Invalid device "
                    "[VUID-vkCreateRenderPass2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3000,7 +3726,7 @@
     const VkSubpassBeginInfo*                   pSubpassBeginInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginRenderPass2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdBeginRenderPass2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3014,7 +3740,7 @@
     const VkSubpassEndInfo*                     pSubpassEndInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdNextSubpass2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdNextSubpass2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3027,7 +3753,7 @@
     const VkSubpassEndInfo*                     pSubpassEndInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndRenderPass2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdEndRenderPass2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3043,7 +3769,7 @@
     VkSwapchainKHR                              swapchain) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSwapchainStatusKHR: Invalid device "
                    "[VUID-vkGetSwapchainStatusKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3054,13 +3780,13 @@
 
 // ---- VK_KHR_external_fence_win32 extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR(
     VkDevice                                    device,
     const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkImportFenceWin32HandleKHR: Invalid device "
                    "[VUID-vkImportFenceWin32HandleKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3069,14 +3795,14 @@
 }
 
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(
     VkDevice                                    device,
     const VkFenceGetWin32HandleInfoKHR*         pGetWin32HandleInfo,
     HANDLE*                                     pHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetFenceWin32HandleKHR: Invalid device "
                    "[VUID-vkGetFenceWin32HandleKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3093,7 +3819,7 @@
     const VkImportFenceFdInfoKHR*               pImportFenceFdInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkImportFenceFdKHR: Invalid device "
                    "[VUID-vkImportFenceFdKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3107,7 +3833,7 @@
     int*                                        pFd) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetFenceFdKHR: Invalid device "
                    "[VUID-vkGetFenceFdKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3127,7 +3853,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR: Invalid physicalDevice "
                    "[VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3145,7 +3871,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -3159,7 +3885,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3175,7 +3901,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -3187,7 +3913,7 @@
     const VkAcquireProfilingLockInfoKHR*        pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireProfilingLockKHR: Invalid device "
                    "[VUID-vkAcquireProfilingLockKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3199,7 +3925,7 @@
     VkDevice                                    device) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkReleaseProfilingLockKHR: Invalid device "
                    "[VUID-vkReleaseProfilingLockKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3216,7 +3942,7 @@
     VkMemoryRequirements2*                      pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageMemoryRequirements2KHR: Invalid device "
                    "[VUID-vkGetImageMemoryRequirements2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3230,7 +3956,7 @@
     VkMemoryRequirements2*                      pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferMemoryRequirements2KHR: Invalid device "
                    "[VUID-vkGetBufferMemoryRequirements2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3245,7 +3971,7 @@
     VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageSparseMemoryRequirements2KHR: Invalid device "
                    "[VUID-vkGetImageSparseMemoryRequirements2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3263,7 +3989,7 @@
     VkSamplerYcbcrConversion*                   pYcbcrConversion) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSamplerYcbcrConversionKHR: Invalid device "
                    "[VUID-vkCreateSamplerYcbcrConversionKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3277,7 +4003,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySamplerYcbcrConversionKHR: Invalid device "
                    "[VUID-vkDestroySamplerYcbcrConversionKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3294,7 +4020,7 @@
     const VkBindBufferMemoryInfo*               pBindInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindBufferMemory2KHR: Invalid device "
                    "[VUID-vkBindBufferMemory2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3308,7 +4034,7 @@
     const VkBindImageMemoryInfo*                pBindInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindImageMemory2KHR: Invalid device "
                    "[VUID-vkBindImageMemory2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3325,7 +4051,7 @@
     VkDescriptorSetLayoutSupport*               pSupport) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDescriptorSetLayoutSupportKHR: Invalid device "
                    "[VUID-vkGetDescriptorSetLayoutSupportKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3346,7 +4072,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndirectCountKHR: Invalid commandBuffer "
                    "[VUID-vkCmdDrawIndirectCountKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3364,7 +4090,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndexedIndirectCountKHR: Invalid commandBuffer "
                    "[VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3381,7 +4107,7 @@
     uint64_t*                                   pValue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSemaphoreCounterValueKHR: Invalid device "
                    "[VUID-vkGetSemaphoreCounterValueKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3395,7 +4121,7 @@
     uint64_t                                    timeout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWaitSemaphoresKHR: Invalid device "
                    "[VUID-vkWaitSemaphoresKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3408,7 +4134,7 @@
     const VkSemaphoreSignalInfo*                pSignalInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSignalSemaphoreKHR: Invalid device "
                    "[VUID-vkSignalSemaphoreKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3426,7 +4152,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceFragmentShadingRatesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceFragmentShadingRatesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3442,7 +4168,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceFragmentShadingRatesKHR) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceFragmentShadingRatesKHR");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -3455,7 +4181,7 @@
     const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetFragmentShadingRateKHR: Invalid commandBuffer "
                    "[VUID-vkCmdSetFragmentShadingRateKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3473,7 +4199,7 @@
     uint64_t                                    timeout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWaitForPresentKHR: Invalid device "
                    "[VUID-vkWaitForPresentKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3489,7 +4215,7 @@
     const VkBufferDeviceAddressInfo*            pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferDeviceAddressKHR: Invalid device "
                    "[VUID-vkGetBufferDeviceAddressKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3502,7 +4228,7 @@
     const VkBufferDeviceAddressInfo*            pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferOpaqueCaptureAddressKHR: Invalid device "
                    "[VUID-vkGetBufferOpaqueCaptureAddressKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3515,7 +4241,7 @@
     const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceMemoryOpaqueCaptureAddressKHR: Invalid device "
                    "[VUID-vkGetDeviceMemoryOpaqueCaptureAddressKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3532,7 +4258,7 @@
     VkDeferredOperationKHR*                     pDeferredOperation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDeferredOperationKHR: Invalid device "
                    "[VUID-vkCreateDeferredOperationKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3546,7 +4272,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDeferredOperationKHR: Invalid device "
                    "[VUID-vkDestroyDeferredOperationKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3559,7 +4285,7 @@
     VkDeferredOperationKHR                      operation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeferredOperationMaxConcurrencyKHR: Invalid device "
                    "[VUID-vkGetDeferredOperationMaxConcurrencyKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3572,7 +4298,7 @@
     VkDeferredOperationKHR                      operation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeferredOperationResultKHR: Invalid device "
                    "[VUID-vkGetDeferredOperationResultKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3585,7 +4311,7 @@
     VkDeferredOperationKHR                      operation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDeferredOperationJoinKHR: Invalid device "
                    "[VUID-vkDeferredOperationJoinKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3603,7 +4329,7 @@
     VkPipelineExecutablePropertiesKHR*          pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPipelineExecutablePropertiesKHR: Invalid device "
                    "[VUID-vkGetPipelineExecutablePropertiesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3618,7 +4344,7 @@
     VkPipelineExecutableStatisticKHR*           pStatistics) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPipelineExecutableStatisticsKHR: Invalid device "
                    "[VUID-vkGetPipelineExecutableStatisticsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3633,7 +4359,7 @@
     VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPipelineExecutableInternalRepresentationsKHR: Invalid device "
                    "[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3642,15 +4368,95 @@
 }
 
 
+// ---- VK_KHR_map_memory2 extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR(
+    VkDevice                                    device,
+    const VkMemoryMapInfoKHR*                   pMemoryMapInfo,
+    void**                                      ppData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkMapMemory2KHR: Invalid device "
+                   "[VUID-vkMapMemory2KHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->MapMemory2KHR(device, pMemoryMapInfo, ppData);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR(
+    VkDevice                                    device,
+    const VkMemoryUnmapInfoKHR*                 pMemoryUnmapInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkUnmapMemory2KHR: Invalid device "
+                   "[VUID-vkUnmapMemory2KHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->UnmapMemory2KHR(device, pMemoryUnmapInfo);
+}
+
+
 // ---- VK_KHR_video_encode_queue extension trampoline/terminators
 
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
+    VkPhysicalDevice                            physicalDevice,
+    const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo,
+    VkVideoEncodeQualityLevelPropertiesKHR*     pQualityLevelProperties) {
+    const VkLayerInstanceDispatchTable *disp;
+    VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+    if (VK_NULL_HANDLE == unwrapped_phys_dev) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR: Invalid physicalDevice "
+                   "[VUID-vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR-physicalDevice-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp = loader_get_instance_layer_dispatch(physicalDevice);
+    return disp->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(unwrapped_phys_dev, pQualityLevelInfo, pQualityLevelProperties);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
+    VkPhysicalDevice                            physicalDevice,
+    const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo,
+    VkVideoEncodeQualityLevelPropertiesKHR*     pQualityLevelProperties) {
+    struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
+    struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
+    if (NULL == icd_term->dispatch.GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR) {
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return icd_term->dispatch.GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(phys_dev_term->phys_dev, pQualityLevelInfo, pQualityLevelProperties);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR VkResult VKAPI_CALL GetEncodedVideoSessionParametersKHR(
+    VkDevice                                    device,
+    const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo,
+    VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo,
+    size_t*                                     pDataSize,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetEncodedVideoSessionParametersKHR: Invalid device "
+                   "[VUID-vkGetEncodedVideoSessionParametersKHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
 VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR(
     VkCommandBuffer                             commandBuffer,
     const VkVideoEncodeInfoKHR*                 pEncodeInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEncodeVideoKHR: Invalid commandBuffer "
                    "[VUID-vkCmdEncodeVideoKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3668,7 +4474,7 @@
     const VkDependencyInfo*                     pDependencyInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetEvent2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdSetEvent2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3682,7 +4488,7 @@
     VkPipelineStageFlags2                       stageMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdResetEvent2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdResetEvent2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3697,7 +4503,7 @@
     const VkDependencyInfo*                     pDependencyInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWaitEvents2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdWaitEvents2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3710,7 +4516,7 @@
     const VkDependencyInfo*                     pDependencyInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPipelineBarrier2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdPipelineBarrier2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3725,7 +4531,7 @@
     uint32_t                                    query) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteTimestamp2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdWriteTimestamp2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3740,7 +4546,7 @@
     VkFence                                     fence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueSubmit2KHR: Invalid queue "
                    "[VUID-vkQueueSubmit2KHR-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3756,7 +4562,7 @@
     uint32_t                                    marker) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteBufferMarker2AMD: Invalid commandBuffer "
                    "[VUID-vkCmdWriteBufferMarker2AMD-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3770,7 +4576,7 @@
     VkCheckpointData2NV*                        pCheckpointData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetQueueCheckpointData2NV: Invalid queue "
                    "[VUID-vkGetQueueCheckpointData2NV-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3786,7 +4592,7 @@
     const VkCopyBufferInfo2*                    pCopyBufferInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyBuffer2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyBuffer2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3799,7 +4605,7 @@
     const VkCopyImageInfo2*                     pCopyImageInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyImage2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyImage2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3812,7 +4618,7 @@
     const VkCopyBufferToImageInfo2*             pCopyBufferToImageInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyBufferToImage2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyBufferToImage2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3825,7 +4631,7 @@
     const VkCopyImageToBufferInfo2*             pCopyImageToBufferInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyImageToBuffer2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyImageToBuffer2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3838,7 +4644,7 @@
     const VkBlitImageInfo2*                     pBlitImageInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBlitImage2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdBlitImage2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3851,7 +4657,7 @@
     const VkResolveImageInfo2*                  pResolveImageInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdResolveImage2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdResolveImage2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3867,7 +4673,7 @@
     VkDeviceAddress                             indirectDeviceAddress) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdTraceRaysIndirect2KHR: Invalid commandBuffer "
                    "[VUID-vkCmdTraceRaysIndirect2KHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3884,7 +4690,7 @@
     VkMemoryRequirements2*                      pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceBufferMemoryRequirementsKHR: Invalid device "
                    "[VUID-vkGetDeviceBufferMemoryRequirementsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3898,7 +4704,7 @@
     VkMemoryRequirements2*                      pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceImageMemoryRequirementsKHR: Invalid device "
                    "[VUID-vkGetDeviceImageMemoryRequirementsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3913,7 +4719,7 @@
     VkSparseImageMemoryRequirements2*           pSparseMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceImageSparseMemoryRequirementsKHR: Invalid device "
                    "[VUID-vkGetDeviceImageSparseMemoryRequirementsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3922,6 +4728,101 @@
 }
 
 
+// ---- VK_KHR_maintenance5 extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer2KHR(
+    VkCommandBuffer                             commandBuffer,
+    VkBuffer                                    buffer,
+    VkDeviceSize                                offset,
+    VkDeviceSize                                size,
+    VkIndexType                                 indexType) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdBindIndexBuffer2KHR: Invalid commandBuffer "
+                   "[VUID-vkCmdBindIndexBuffer2KHR-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetRenderingAreaGranularityKHR(
+    VkDevice                                    device,
+    const VkRenderingAreaInfoKHR*               pRenderingAreaInfo,
+    VkExtent2D*                                 pGranularity) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetRenderingAreaGranularityKHR: Invalid device "
+                   "[VUID-vkGetRenderingAreaGranularityKHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetDeviceImageSubresourceLayoutKHR(
+    VkDevice                                    device,
+    const VkDeviceImageSubresourceInfoKHR*      pInfo,
+    VkSubresourceLayout2KHR*                    pLayout) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetDeviceImageSubresourceLayoutKHR: Invalid device "
+                   "[VUID-vkGetDeviceImageSubresourceLayoutKHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2KHR(
+    VkDevice                                    device,
+    VkImage                                     image,
+    const VkImageSubresource2KHR*               pSubresource,
+    VkSubresourceLayout2KHR*                    pLayout) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetImageSubresourceLayout2KHR: Invalid device "
+                   "[VUID-vkGetImageSubresourceLayout2KHR-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout);
+}
+
+
+// ---- VK_KHR_cooperative_matrix extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(
+    VkPhysicalDevice                            physicalDevice,
+    uint32_t*                                   pPropertyCount,
+    VkCooperativeMatrixPropertiesKHR*           pProperties) {
+    const VkLayerInstanceDispatchTable *disp;
+    VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+    if (VK_NULL_HANDLE == unwrapped_phys_dev) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR: Invalid physicalDevice "
+                   "[VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR-physicalDevice-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp = loader_get_instance_layer_dispatch(physicalDevice);
+    return disp->GetPhysicalDeviceCooperativeMatrixPropertiesKHR(unwrapped_phys_dev, pPropertyCount, pProperties);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceCooperativeMatrixPropertiesKHR(
+    VkPhysicalDevice                            physicalDevice,
+    uint32_t*                                   pPropertyCount,
+    VkCooperativeMatrixPropertiesKHR*           pProperties) {
+    struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
+    struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
+    if (NULL == icd_term->dispatch.GetPhysicalDeviceCooperativeMatrixPropertiesKHR) {
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCooperativeMatrixPropertiesKHR");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return icd_term->dispatch.GetPhysicalDeviceCooperativeMatrixPropertiesKHR(phys_dev_term->phys_dev, pPropertyCount, pProperties);
+}
+
+
 // ---- VK_EXT_debug_marker extension trampoline/terminators
 
 VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(
@@ -3929,7 +4830,7 @@
     const VkDebugMarkerObjectTagInfoEXT*        pTagInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDebugMarkerSetObjectTagEXT: Invalid device "
                    "[VUID-vkDebugMarkerSetObjectTagEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3941,6 +4842,10 @@
         struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->object;
         local_tag_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
     }
+    if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pTagInfo->object;
+        local_tag_info.object = (uint64_t)(uintptr_t)instance->instance;
+    }
     return disp->DebugMarkerSetObjectTagEXT(device, &local_tag_info);
 }
 
@@ -3951,7 +4856,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "DebugMarkerSetObjectTagEXT: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "DebugMarkerSetObjectTagEXT: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     VkDebugMarkerObjectTagInfoEXT local_tag_info;
@@ -3968,6 +4873,9 @@
                 local_tag_info.object = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
             }
         }
+    // If this is an instance we have to replace it with the proper one for the next call.
+    } else if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        local_tag_info.object = (uint64_t)(uintptr_t)icd_term->instance;
     }
     // Exit early if the driver does not support the function - this can happen as a layer or the loader itself supports
     // debug utils but the driver does not.
@@ -3981,7 +4889,7 @@
     const VkDebugMarkerObjectNameInfoEXT*       pNameInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDebugMarkerSetObjectNameEXT: Invalid device "
                    "[VUID-vkDebugMarkerSetObjectNameEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -3993,6 +4901,10 @@
         struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->object;
         local_name_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
     }
+    if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pNameInfo->object;
+        local_name_info.object = (uint64_t)(uintptr_t)instance->instance;
+    }
     return disp->DebugMarkerSetObjectNameEXT(device, &local_name_info);
 }
 
@@ -4003,7 +4915,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "DebugMarkerSetObjectNameEXT: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "DebugMarkerSetObjectNameEXT: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     VkDebugMarkerObjectNameInfoEXT local_name_info;
@@ -4020,6 +4932,9 @@
                 local_name_info.object = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
             }
         }
+    // If this is an instance we have to replace it with the proper one for the next call.
+    } else if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        local_name_info.object = (uint64_t)(uintptr_t)icd_term->instance;
     }
     // Exit early if the driver does not support the function - this can happen as a layer or the loader itself supports
     // debug utils but the driver does not.
@@ -4033,7 +4948,7 @@
     const VkDebugMarkerMarkerInfoEXT*           pMarkerInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDebugMarkerBeginEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDebugMarkerBeginEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4045,7 +4960,7 @@
     VkCommandBuffer                             commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDebugMarkerEndEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDebugMarkerEndEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4058,7 +4973,7 @@
     const VkDebugMarkerMarkerInfoEXT*           pMarkerInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDebugMarkerInsertEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDebugMarkerInsertEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4078,7 +4993,7 @@
     const VkDeviceSize*                         pSizes) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindTransformFeedbackBuffersEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBindTransformFeedbackBuffersEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4094,7 +5009,7 @@
     const VkDeviceSize*                         pCounterBufferOffsets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginTransformFeedbackEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBeginTransformFeedbackEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4110,7 +5025,7 @@
     const VkDeviceSize*                         pCounterBufferOffsets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndTransformFeedbackEXT: Invalid commandBuffer "
                    "[VUID-vkCmdEndTransformFeedbackEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4126,7 +5041,7 @@
     uint32_t                                    index) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginQueryIndexedEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4141,7 +5056,7 @@
     uint32_t                                    index) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndQueryIndexedEXT: Invalid commandBuffer "
                    "[VUID-vkCmdEndQueryIndexedEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4159,7 +5074,7 @@
     uint32_t                                    vertexStride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndirectByteCountEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4177,7 +5092,7 @@
     VkCuModuleNVX*                              pModule) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateCuModuleNVX: Invalid device "
                    "[VUID-vkCreateCuModuleNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4192,7 +5107,7 @@
     VkCuFunctionNVX*                            pFunction) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateCuFunctionNVX: Invalid device "
                    "[VUID-vkCreateCuFunctionNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4206,7 +5121,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyCuModuleNVX: Invalid device "
                    "[VUID-vkDestroyCuModuleNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4220,7 +5135,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyCuFunctionNVX: Invalid device "
                    "[VUID-vkDestroyCuFunctionNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4233,7 +5148,7 @@
     const VkCuLaunchInfoNVX*                    pLaunchInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCuLaunchKernelNVX: Invalid commandBuffer "
                    "[VUID-vkCmdCuLaunchKernelNVX-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4249,7 +5164,7 @@
     const VkImageViewHandleInfoNVX*             pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageViewHandleNVX: Invalid device "
                    "[VUID-vkGetImageViewHandleNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4263,7 +5178,7 @@
     VkImageViewAddressPropertiesNVX*            pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageViewAddressNVX: Invalid device "
                    "[VUID-vkGetImageViewAddressNVX-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4284,7 +5199,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndirectCountAMD: Invalid commandBuffer "
                    "[VUID-vkCmdDrawIndirectCountAMD-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4302,7 +5217,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndexedIndirectCountAMD: Invalid commandBuffer "
                    "[VUID-vkCmdDrawIndexedIndirectCountAMD-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4322,7 +5237,7 @@
     void*                                       pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetShaderInfoAMD: Invalid device "
                    "[VUID-vkGetShaderInfoAMD-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4333,7 +5248,7 @@
 
 // ---- VK_NV_external_memory_win32 extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(
     VkDevice                                    device,
     VkDeviceMemory                              memory,
@@ -4341,7 +5256,7 @@
     HANDLE*                                     pHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryWin32HandleNV: Invalid device "
                    "[VUID-vkGetMemoryWin32HandleNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4358,7 +5273,7 @@
     const VkConditionalRenderingBeginInfoEXT*   pConditionalRenderingBegin) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginConditionalRenderingEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBeginConditionalRenderingEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4370,7 +5285,7 @@
     VkCommandBuffer                             commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndConditionalRenderingEXT: Invalid commandBuffer "
                    "[VUID-vkCmdEndConditionalRenderingEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4388,7 +5303,7 @@
     const VkViewportWScalingNV*                 pViewportWScalings) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewportWScalingNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetViewportWScalingNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4405,7 +5320,7 @@
     const VkDisplayPowerInfoEXT*                pDisplayPowerInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDisplayPowerControlEXT: Invalid device "
                    "[VUID-vkDisplayPowerControlEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4420,7 +5335,7 @@
     VkFence*                                    pFence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkRegisterDeviceEventEXT: Invalid device "
                    "[VUID-vkRegisterDeviceEventEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4436,7 +5351,7 @@
     VkFence*                                    pFence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkRegisterDisplayEventEXT: Invalid device "
                    "[VUID-vkRegisterDisplayEventEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4451,7 +5366,7 @@
     uint64_t*                                   pCounterValue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSwapchainCounterEXT: Invalid device "
                    "[VUID-vkGetSwapchainCounterEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4468,7 +5383,7 @@
     VkRefreshCycleDurationGOOGLE*               pDisplayTimingProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRefreshCycleDurationGOOGLE: Invalid device "
                    "[VUID-vkGetRefreshCycleDurationGOOGLE-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4483,7 +5398,7 @@
     VkPastPresentationTimingGOOGLE*             pPresentationTimings) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPastPresentationTimingGOOGLE: Invalid device "
                    "[VUID-vkGetPastPresentationTimingGOOGLE-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4501,7 +5416,7 @@
     const VkRect2D*                             pDiscardRectangles) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDiscardRectangleEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4509,6 +5424,32 @@
     disp->CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles);
 }
 
+VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEnableEXT(
+    VkCommandBuffer                             commandBuffer,
+    VkBool32                                    discardRectangleEnable) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetDiscardRectangleEnableEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdSetDiscardRectangleEnableEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleModeEXT(
+    VkCommandBuffer                             commandBuffer,
+    VkDiscardRectangleModeEXT                   discardRectangleMode) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetDiscardRectangleModeEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdSetDiscardRectangleModeEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode);
+}
+
 
 // ---- VK_EXT_hdr_metadata extension trampoline/terminators
 
@@ -4519,7 +5460,7 @@
     const VkHdrMetadataEXT*                     pMetadata) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetHdrMetadataEXT: Invalid device "
                    "[VUID-vkSetHdrMetadataEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4535,7 +5476,7 @@
     const VkDebugUtilsObjectNameInfoEXT*        pNameInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetDebugUtilsObjectNameEXT: Invalid device "
                    "[VUID-vkSetDebugUtilsObjectNameEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4547,6 +5488,10 @@
         struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->objectHandle;
         local_name_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
     }
+    if (pNameInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pNameInfo->objectHandle;
+        local_name_info.objectHandle = (uint64_t)(uintptr_t)instance->instance;
+    }
     if (disp->SetDebugUtilsObjectNameEXT != NULL) {
         return disp->SetDebugUtilsObjectNameEXT(device, &local_name_info);
     } else {
@@ -4561,7 +5506,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "SetDebugUtilsObjectNameEXT: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "SetDebugUtilsObjectNameEXT: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     VkDebugUtilsObjectNameInfoEXT local_name_info;
@@ -4578,6 +5523,9 @@
                 local_name_info.objectHandle = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
             }
         }
+    // If this is an instance we have to replace it with the proper one for the next call.
+    } else if (pNameInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        local_name_info.objectHandle = (uint64_t)(uintptr_t)icd_term->instance;
     }
     // Exit early if the driver does not support the function - this can happen as a layer or the loader itself supports
     // debug utils but the driver does not.
@@ -4591,7 +5539,7 @@
     const VkDebugUtilsObjectTagInfoEXT*         pTagInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetDebugUtilsObjectTagEXT: Invalid device "
                    "[VUID-vkSetDebugUtilsObjectTagEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4603,6 +5551,10 @@
         struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->objectHandle;
         local_tag_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;
     }
+    if (pTagInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pTagInfo->objectHandle;
+        local_tag_info.objectHandle = (uint64_t)(uintptr_t)instance->instance;
+    }
     if (disp->SetDebugUtilsObjectTagEXT != NULL) {
         return disp->SetDebugUtilsObjectTagEXT(device, &local_tag_info);
     } else {
@@ -4617,7 +5569,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "SetDebugUtilsObjectTagEXT: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "SetDebugUtilsObjectTagEXT: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     VkDebugUtilsObjectTagInfoEXT local_tag_info;
@@ -4634,6 +5586,9 @@
                 local_tag_info.objectHandle = (uint64_t)icd_surface->real_icd_surfaces[icd_index];
             }
         }
+    // If this is an instance we have to replace it with the proper one for the next call.
+    } else if (pTagInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        local_tag_info.objectHandle = (uint64_t)(uintptr_t)icd_term->instance;
     }
     // Exit early if the driver does not support the function - this can happen as a layer or the loader itself supports
     // debug utils but the driver does not.
@@ -4647,7 +5602,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueBeginDebugUtilsLabelEXT: Invalid queue "
                    "[VUID-vkQueueBeginDebugUtilsLabelEXT-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4662,7 +5617,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(queue);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4674,7 +5629,7 @@
     VkQueue                                     queue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueEndDebugUtilsLabelEXT: Invalid queue "
                    "[VUID-vkQueueEndDebugUtilsLabelEXT-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4688,7 +5643,7 @@
     VkQueue                                     queue) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(queue);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4701,7 +5656,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueInsertDebugUtilsLabelEXT: Invalid queue "
                    "[VUID-vkQueueInsertDebugUtilsLabelEXT-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4716,7 +5671,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(queue);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4729,7 +5684,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginDebugUtilsLabelEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBeginDebugUtilsLabelEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4744,7 +5699,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(commandBuffer);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4756,7 +5711,7 @@
     VkCommandBuffer                             commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndDebugUtilsLabelEXT: Invalid commandBuffer "
                    "[VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4770,7 +5725,7 @@
     VkCommandBuffer                             commandBuffer) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(commandBuffer);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4783,7 +5738,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdInsertDebugUtilsLabelEXT: Invalid commandBuffer "
                    "[VUID-vkCmdInsertDebugUtilsLabelEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4798,7 +5753,7 @@
     const VkDebugUtilsLabelEXT*                 pLabelInfo) {
     struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch(commandBuffer);
     if (NULL == dispatch_table) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "VK_EXT_debug_utils: Invalid device handle");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Only call down if the device supports the function
@@ -4809,14 +5764,14 @@
 
 // ---- VK_ANDROID_external_memory_android_hardware_buffer extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID(
     VkDevice                                    device,
     const struct AHardwareBuffer*               buffer,
     VkAndroidHardwareBufferPropertiesANDROID*   pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetAndroidHardwareBufferPropertiesANDROID: Invalid device "
                    "[VUID-vkGetAndroidHardwareBufferPropertiesANDROID-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4825,14 +5780,14 @@
 }
 
 #endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID(
     VkDevice                                    device,
     const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
     struct AHardwareBuffer**                    pBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryAndroidHardwareBufferANDROID: Invalid device "
                    "[VUID-vkGetMemoryAndroidHardwareBufferANDROID-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4842,6 +5797,124 @@
 
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
+// ---- VK_AMDX_shader_enqueue extension trampoline/terminators
+
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR VkResult VKAPI_CALL CreateExecutionGraphPipelinesAMDX(
+    VkDevice                                    device,
+    VkPipelineCache                             pipelineCache,
+    uint32_t                                    createInfoCount,
+    const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos,
+    const VkAllocationCallbacks*                pAllocator,
+    VkPipeline*                                 pPipelines) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCreateExecutionGraphPipelinesAMDX: Invalid device "
+                   "[VUID-vkCreateExecutionGraphPipelinesAMDX-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineScratchSizeAMDX(
+    VkDevice                                    device,
+    VkPipeline                                  executionGraph,
+    VkExecutionGraphPipelineScratchSizeAMDX*    pSizeInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetExecutionGraphPipelineScratchSizeAMDX: Invalid device "
+                   "[VUID-vkGetExecutionGraphPipelineScratchSizeAMDX-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineNodeIndexAMDX(
+    VkDevice                                    device,
+    VkPipeline                                  executionGraph,
+    const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo,
+    uint32_t*                                   pNodeIndex) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetExecutionGraphPipelineNodeIndexAMDX: Invalid device "
+                   "[VUID-vkGetExecutionGraphPipelineNodeIndexAMDX-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR void VKAPI_CALL CmdInitializeGraphScratchMemoryAMDX(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             scratch) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdInitializeGraphScratchMemoryAMDX: Invalid commandBuffer "
+                   "[VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdInitializeGraphScratchMemoryAMDX(commandBuffer, scratch);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphAMDX(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             scratch,
+    const VkDispatchGraphCountInfoAMDX*         pCountInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDispatchGraphAMDX: Invalid commandBuffer "
+                   "[VUID-vkCmdDispatchGraphAMDX-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDispatchGraphAMDX(commandBuffer, scratch, pCountInfo);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectAMDX(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             scratch,
+    const VkDispatchGraphCountInfoAMDX*         pCountInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDispatchGraphIndirectAMDX: Invalid commandBuffer "
+                   "[VUID-vkCmdDispatchGraphIndirectAMDX-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, pCountInfo);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectCountAMDX(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             scratch,
+    VkDeviceAddress                             countInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDispatchGraphIndirectCountAMDX: Invalid commandBuffer "
+                   "[VUID-vkCmdDispatchGraphIndirectCountAMDX-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, countInfo);
+}
+
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
 // ---- VK_EXT_sample_locations extension trampoline/terminators
 
 VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT(
@@ -4849,7 +5922,7 @@
     const VkSampleLocationsInfoEXT*             pSampleLocationsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetSampleLocationsEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4864,7 +5937,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceMultisamplePropertiesEXT: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceMultisamplePropertiesEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4880,7 +5953,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceMultisamplePropertiesEXT) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceMultisamplePropertiesEXT");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -4896,7 +5969,7 @@
     VkImageDrmFormatModifierPropertiesEXT*      pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageDrmFormatModifierPropertiesEXT: Invalid device "
                    "[VUID-vkGetImageDrmFormatModifierPropertiesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4914,7 +5987,7 @@
     VkValidationCacheEXT*                       pValidationCache) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateValidationCacheEXT: Invalid device "
                    "[VUID-vkCreateValidationCacheEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4928,7 +6001,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyValidationCacheEXT: Invalid device "
                    "[VUID-vkDestroyValidationCacheEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4943,7 +6016,7 @@
     const VkValidationCacheEXT*                 pSrcCaches) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkMergeValidationCachesEXT: Invalid device "
                    "[VUID-vkMergeValidationCachesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4958,7 +6031,7 @@
     void*                                       pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetValidationCacheDataEXT: Invalid device "
                    "[VUID-vkGetValidationCacheDataEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4975,7 +6048,7 @@
     VkImageLayout                               imageLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindShadingRateImageNV: Invalid commandBuffer "
                    "[VUID-vkCmdBindShadingRateImageNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -4990,7 +6063,7 @@
     const VkShadingRatePaletteNV*               pShadingRatePalettes) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewportShadingRatePaletteNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetViewportShadingRatePaletteNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5005,7 +6078,7 @@
     const VkCoarseSampleOrderCustomNV*          pCustomSampleOrders) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoarseSampleOrderNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoarseSampleOrderNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5023,7 +6096,7 @@
     VkAccelerationStructureNV*                  pAccelerationStructure) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateAccelerationStructureNV: Invalid device "
                    "[VUID-vkCreateAccelerationStructureNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5037,7 +6110,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyAccelerationStructureNV: Invalid device "
                    "[VUID-vkDestroyAccelerationStructureNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5051,7 +6124,7 @@
     VkMemoryRequirements2KHR*                   pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetAccelerationStructureMemoryRequirementsNV: Invalid device "
                    "[VUID-vkGetAccelerationStructureMemoryRequirementsNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5065,7 +6138,7 @@
     const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindAccelerationStructureMemoryNV: Invalid device "
                    "[VUID-vkBindAccelerationStructureMemoryNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5085,7 +6158,7 @@
     VkDeviceSize                                scratchOffset) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBuildAccelerationStructureNV: Invalid commandBuffer "
                    "[VUID-vkCmdBuildAccelerationStructureNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5100,7 +6173,7 @@
     VkCopyAccelerationStructureModeKHR          mode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyAccelerationStructureNV: Invalid commandBuffer "
                    "[VUID-vkCmdCopyAccelerationStructureNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5126,7 +6199,7 @@
     uint32_t                                    depth) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdTraceRaysNV: Invalid commandBuffer "
                    "[VUID-vkCmdTraceRaysNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5143,7 +6216,7 @@
     VkPipeline*                                 pPipelines) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateRayTracingPipelinesNV: Invalid device "
                    "[VUID-vkCreateRayTracingPipelinesNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5160,7 +6233,7 @@
     void*                                       pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRayTracingShaderGroupHandlesKHR: Invalid device "
                    "[VUID-vkGetRayTracingShaderGroupHandlesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5177,7 +6250,7 @@
     void*                                       pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRayTracingShaderGroupHandlesNV: Invalid device "
                    "[VUID-vkGetRayTracingShaderGroupHandlesNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5192,7 +6265,7 @@
     void*                                       pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetAccelerationStructureHandleNV: Invalid device "
                    "[VUID-vkGetAccelerationStructureHandleNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5209,7 +6282,7 @@
     uint32_t                                    firstQuery) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteAccelerationStructuresPropertiesNV: Invalid commandBuffer "
                    "[VUID-vkCmdWriteAccelerationStructuresPropertiesNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5223,7 +6296,7 @@
     uint32_t                                    shader) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCompileDeferredNV: Invalid device "
                    "[VUID-vkCompileDeferredNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5241,7 +6314,7 @@
     VkMemoryHostPointerPropertiesEXT*           pMemoryHostPointerProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryHostPointerPropertiesEXT: Invalid device "
                    "[VUID-vkGetMemoryHostPointerPropertiesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5260,7 +6333,7 @@
     uint32_t                                    marker) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteBufferMarkerAMD: Invalid commandBuffer "
                    "[VUID-vkCmdWriteBufferMarkerAMD-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5278,7 +6351,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceCalibrateableTimeDomainsEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5294,7 +6367,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceCalibrateableTimeDomainsEXT) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCalibrateableTimeDomainsEXT");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -5309,7 +6382,7 @@
     uint64_t*                                   pMaxDeviation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetCalibratedTimestampsEXT: Invalid device "
                    "[VUID-vkGetCalibratedTimestampsEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5326,7 +6399,7 @@
     uint32_t                                    firstTask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksNV: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5342,7 +6415,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksIndirectNV: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksIndirectNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5360,7 +6433,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksIndirectCountNV: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksIndirectCountNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5371,6 +6444,21 @@
 
 // ---- VK_NV_scissor_exclusive extension trampoline/terminators
 
+VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorEnableNV(
+    VkCommandBuffer                             commandBuffer,
+    uint32_t                                    firstExclusiveScissor,
+    uint32_t                                    exclusiveScissorCount,
+    const VkBool32*                             pExclusiveScissorEnables) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetExclusiveScissorEnableNV: Invalid commandBuffer "
+                   "[VUID-vkCmdSetExclusiveScissorEnableNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables);
+}
+
 VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV(
     VkCommandBuffer                             commandBuffer,
     uint32_t                                    firstExclusiveScissor,
@@ -5378,7 +6466,7 @@
     const VkRect2D*                             pExclusiveScissors) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetExclusiveScissorNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetExclusiveScissorNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5394,7 +6482,7 @@
     const void*                                 pCheckpointMarker) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCheckpointNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCheckpointNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5408,7 +6496,7 @@
     VkCheckpointDataNV*                         pCheckpointData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetQueueCheckpointDataNV: Invalid queue "
                    "[VUID-vkGetQueueCheckpointDataNV-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5424,7 +6512,7 @@
     const VkInitializePerformanceApiInfoINTEL*  pInitializeInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkInitializePerformanceApiINTEL: Invalid device "
                    "[VUID-vkInitializePerformanceApiINTEL-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5436,7 +6524,7 @@
     VkDevice                                    device) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUninitializePerformanceApiINTEL: Invalid device "
                    "[VUID-vkUninitializePerformanceApiINTEL-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5449,7 +6537,7 @@
     const VkPerformanceMarkerInfoINTEL*         pMarkerInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPerformanceMarkerINTEL: Invalid commandBuffer "
                    "[VUID-vkCmdSetPerformanceMarkerINTEL-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5462,7 +6550,7 @@
     const VkPerformanceStreamMarkerInfoINTEL*   pMarkerInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPerformanceStreamMarkerINTEL: Invalid commandBuffer "
                    "[VUID-vkCmdSetPerformanceStreamMarkerINTEL-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5475,7 +6563,7 @@
     const VkPerformanceOverrideInfoINTEL*       pOverrideInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPerformanceOverrideINTEL: Invalid commandBuffer "
                    "[VUID-vkCmdSetPerformanceOverrideINTEL-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5489,7 +6577,7 @@
     VkPerformanceConfigurationINTEL*            pConfiguration) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquirePerformanceConfigurationINTEL: Invalid device "
                    "[VUID-vkAcquirePerformanceConfigurationINTEL-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5502,7 +6590,7 @@
     VkPerformanceConfigurationINTEL             configuration) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkReleasePerformanceConfigurationINTEL: Invalid device "
                    "[VUID-vkReleasePerformanceConfigurationINTEL-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5515,7 +6603,7 @@
     VkPerformanceConfigurationINTEL             configuration) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueSetPerformanceConfigurationINTEL: Invalid queue "
                    "[VUID-vkQueueSetPerformanceConfigurationINTEL-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5529,7 +6617,7 @@
     VkPerformanceValueINTEL*                    pValue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPerformanceParameterINTEL: Invalid device "
                    "[VUID-vkGetPerformanceParameterINTEL-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5546,7 +6634,7 @@
     VkBool32                                    localDimmingEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetLocalDimmingAMD: Invalid device "
                    "[VUID-vkSetLocalDimmingAMD-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5562,7 +6650,7 @@
     const VkBufferDeviceAddressInfo*            pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferDeviceAddressEXT: Invalid device "
                    "[VUID-vkGetBufferDeviceAddressEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5580,7 +6668,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceCooperativeMatrixPropertiesNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5596,7 +6684,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceCooperativeMatrixPropertiesNV) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCooperativeMatrixPropertiesNV");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -5613,7 +6701,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5629,7 +6717,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -5639,13 +6727,13 @@
 
 // ---- VK_EXT_full_screen_exclusive extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT(
     VkDevice                                    device,
     VkSwapchainKHR                              swapchain) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireFullScreenExclusiveModeEXT: Invalid device "
                    "[VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5654,13 +6742,13 @@
 }
 
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT(
     VkDevice                                    device,
     VkSwapchainKHR                              swapchain) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkReleaseFullScreenExclusiveModeEXT: Invalid device "
                    "[VUID-vkReleaseFullScreenExclusiveModeEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5678,7 +6766,7 @@
     uint16_t                                    lineStipplePattern) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLineStippleEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetLineStippleEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5696,7 +6784,7 @@
     uint32_t                                    queryCount) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetQueryPoolEXT: Invalid device "
                    "[VUID-vkResetQueryPoolEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5712,7 +6800,7 @@
     VkCullModeFlags                             cullMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCullModeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetCullModeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5725,7 +6813,7 @@
     VkFrontFace                                 frontFace) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetFrontFaceEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetFrontFaceEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5738,7 +6826,7 @@
     VkPrimitiveTopology                         primitiveTopology) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPrimitiveTopologyEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetPrimitiveTopologyEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5752,7 +6840,7 @@
     const VkViewport*                           pViewports) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewportWithCountEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetViewportWithCountEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5766,7 +6854,7 @@
     const VkRect2D*                             pScissors) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetScissorWithCountEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetScissorWithCountEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5784,7 +6872,7 @@
     const VkDeviceSize*                         pStrides) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindVertexBuffers2EXT: Invalid commandBuffer "
                    "[VUID-vkCmdBindVertexBuffers2EXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5797,7 +6885,7 @@
     VkBool32                                    depthTestEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthTestEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthTestEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5810,7 +6898,7 @@
     VkBool32                                    depthWriteEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthWriteEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthWriteEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5823,7 +6911,7 @@
     VkCompareOp                                 depthCompareOp) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthCompareOpEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthCompareOpEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5836,7 +6924,7 @@
     VkBool32                                    depthBoundsTestEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthBoundsTestEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthBoundsTestEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5849,7 +6937,7 @@
     VkBool32                                    stencilTestEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetStencilTestEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetStencilTestEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5866,7 +6954,7 @@
     VkCompareOp                                 compareOp) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetStencilOpEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetStencilOpEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5875,6 +6963,93 @@
 }
 
 
+// ---- VK_EXT_host_image_copy extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT(
+    VkDevice                                    device,
+    const VkCopyMemoryToImageInfoEXT*           pCopyMemoryToImageInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCopyMemoryToImageEXT: Invalid device "
+                   "[VUID-vkCopyMemoryToImageEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT(
+    VkDevice                                    device,
+    const VkCopyImageToMemoryInfoEXT*           pCopyImageToMemoryInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCopyImageToMemoryEXT: Invalid device "
+                   "[VUID-vkCopyImageToMemoryEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL CopyImageToImageEXT(
+    VkDevice                                    device,
+    const VkCopyImageToImageInfoEXT*            pCopyImageToImageInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCopyImageToImageEXT: Invalid device "
+                   "[VUID-vkCopyImageToImageEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->CopyImageToImageEXT(device, pCopyImageToImageInfo);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL TransitionImageLayoutEXT(
+    VkDevice                                    device,
+    uint32_t                                    transitionCount,
+    const VkHostImageLayoutTransitionInfoEXT*   pTransitions) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkTransitionImageLayoutEXT: Invalid device "
+                   "[VUID-vkTransitionImageLayoutEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->TransitionImageLayoutEXT(device, transitionCount, pTransitions);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(
+    VkDevice                                    device,
+    VkImage                                     image,
+    const VkImageSubresource2KHR*               pSubresource,
+    VkSubresourceLayout2KHR*                    pLayout) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetImageSubresourceLayout2EXT: Invalid device "
+                   "[VUID-vkGetImageSubresourceLayout2EXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout);
+}
+
+
+// ---- VK_EXT_swapchain_maintenance1 extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT(
+    VkDevice                                    device,
+    const VkReleaseSwapchainImagesInfoEXT*      pReleaseInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkReleaseSwapchainImagesEXT: Invalid device "
+                   "[VUID-vkReleaseSwapchainImagesEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->ReleaseSwapchainImagesEXT(device, pReleaseInfo);
+}
+
+
 // ---- VK_NV_device_generated_commands extension trampoline/terminators
 
 VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV(
@@ -5883,7 +7058,7 @@
     VkMemoryRequirements2*                      pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetGeneratedCommandsMemoryRequirementsNV: Invalid device "
                    "[VUID-vkGetGeneratedCommandsMemoryRequirementsNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5896,7 +7071,7 @@
     const VkGeneratedCommandsInfoNV*            pGeneratedCommandsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPreprocessGeneratedCommandsNV: Invalid commandBuffer "
                    "[VUID-vkCmdPreprocessGeneratedCommandsNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5910,7 +7085,7 @@
     const VkGeneratedCommandsInfoNV*            pGeneratedCommandsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdExecuteGeneratedCommandsNV: Invalid commandBuffer "
                    "[VUID-vkCmdExecuteGeneratedCommandsNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5925,7 +7100,7 @@
     uint32_t                                    groupIndex) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindPipelineShaderGroupNV: Invalid commandBuffer "
                    "[VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5940,7 +7115,7 @@
     VkIndirectCommandsLayoutNV*                 pIndirectCommandsLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateIndirectCommandsLayoutNV: Invalid device "
                    "[VUID-vkCreateIndirectCommandsLayoutNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5954,7 +7129,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyIndirectCommandsLayoutNV: Invalid device "
                    "[VUID-vkDestroyIndirectCommandsLayoutNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -5963,6 +7138,22 @@
 }
 
 
+// ---- VK_EXT_depth_bias_control extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT(
+    VkCommandBuffer                             commandBuffer,
+    const VkDepthBiasInfoEXT*                   pDepthBiasInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetDepthBias2EXT: Invalid commandBuffer "
+                   "[VUID-vkCmdSetDepthBias2EXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo);
+}
+
+
 // ---- VK_EXT_acquire_drm_display extension trampoline/terminators
 
 VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT(
@@ -5972,7 +7163,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireDrmDisplayEXT: Invalid physicalDevice "
                    "[VUID-vkAcquireDrmDisplayEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6003,7 +7194,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDrmDisplayEXT: Invalid physicalDevice "
                    "[VUID-vkGetDrmDisplayEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6037,7 +7228,7 @@
     VkPrivateDataSlot*                          pPrivateDataSlot) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreatePrivateDataSlotEXT: Invalid device "
                    "[VUID-vkCreatePrivateDataSlotEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6051,7 +7242,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyPrivateDataSlotEXT: Invalid device "
                    "[VUID-vkDestroyPrivateDataSlotEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6067,7 +7258,7 @@
     uint64_t                                    data) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetPrivateDataEXT: Invalid device "
                    "[VUID-vkSetPrivateDataEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6083,7 +7274,7 @@
     uint64_t*                                   pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPrivateDataEXT: Invalid device "
                    "[VUID-vkGetPrivateDataEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6094,13 +7285,13 @@
 
 // ---- VK_EXT_metal_objects extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
 VKAPI_ATTR void VKAPI_CALL ExportMetalObjectsEXT(
     VkDevice                                    device,
     VkExportMetalObjectsInfoEXT*                pMetalObjectsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkExportMetalObjectsEXT: Invalid device "
                    "[VUID-vkExportMetalObjectsEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6110,6 +7301,170 @@
 
 #endif // VK_USE_PLATFORM_METAL_EXT
 
+// ---- VK_EXT_descriptor_buffer extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSizeEXT(
+    VkDevice                                    device,
+    VkDescriptorSetLayout                       layout,
+    VkDeviceSize*                               pLayoutSizeInBytes) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetDescriptorSetLayoutSizeEXT: Invalid device "
+                   "[VUID-vkGetDescriptorSetLayoutSizeEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutBindingOffsetEXT(
+    VkDevice                                    device,
+    VkDescriptorSetLayout                       layout,
+    uint32_t                                    binding,
+    VkDeviceSize*                               pOffset) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetDescriptorSetLayoutBindingOffsetEXT: Invalid device "
+                   "[VUID-vkGetDescriptorSetLayoutBindingOffsetEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetDescriptorEXT(
+    VkDevice                                    device,
+    const VkDescriptorGetInfoEXT*               pDescriptorInfo,
+    size_t                                      dataSize,
+    void*                                       pDescriptor) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetDescriptorEXT: Invalid device "
+                   "[VUID-vkGetDescriptorEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBuffersEXT(
+    VkCommandBuffer                             commandBuffer,
+    uint32_t                                    bufferCount,
+    const VkDescriptorBufferBindingInfoEXT*     pBindingInfos) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdBindDescriptorBuffersEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdBindDescriptorBuffersEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsetsEXT(
+    VkCommandBuffer                             commandBuffer,
+    VkPipelineBindPoint                         pipelineBindPoint,
+    VkPipelineLayout                            layout,
+    uint32_t                                    firstSet,
+    uint32_t                                    setCount,
+    const uint32_t*                             pBufferIndices,
+    const VkDeviceSize*                         pOffsets) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetDescriptorBufferOffsetsEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdSetDescriptorBufferOffsetsEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, pOffsets);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplersEXT(
+    VkCommandBuffer                             commandBuffer,
+    VkPipelineBindPoint                         pipelineBindPoint,
+    VkPipelineLayout                            layout,
+    uint32_t                                    set) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdBindDescriptorBufferEmbeddedSamplersEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdBindDescriptorBufferEmbeddedSamplersEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetBufferOpaqueCaptureDescriptorDataEXT(
+    VkDevice                                    device,
+    const VkBufferCaptureDescriptorDataInfoEXT* pInfo,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetBufferOpaqueCaptureDescriptorDataEXT: Invalid device "
+                   "[VUID-vkGetBufferOpaqueCaptureDescriptorDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetImageOpaqueCaptureDescriptorDataEXT(
+    VkDevice                                    device,
+    const VkImageCaptureDescriptorDataInfoEXT*  pInfo,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetImageOpaqueCaptureDescriptorDataEXT: Invalid device "
+                   "[VUID-vkGetImageOpaqueCaptureDescriptorDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetImageViewOpaqueCaptureDescriptorDataEXT(
+    VkDevice                                    device,
+    const VkImageViewCaptureDescriptorDataInfoEXT* pInfo,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetImageViewOpaqueCaptureDescriptorDataEXT: Invalid device "
+                   "[VUID-vkGetImageViewOpaqueCaptureDescriptorDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetSamplerOpaqueCaptureDescriptorDataEXT(
+    VkDevice                                    device,
+    const VkSamplerCaptureDescriptorDataInfoEXT* pInfo,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetSamplerOpaqueCaptureDescriptorDataEXT: Invalid device "
+                   "[VUID-vkGetSamplerOpaqueCaptureDescriptorDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(
+    VkDevice                                    device,
+    const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT: Invalid device "
+                   "[VUID-vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData);
+}
+
+
 // ---- VK_NV_fragment_shading_rate_enums extension trampoline/terminators
 
 VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV(
@@ -6118,7 +7473,7 @@
     const VkFragmentShadingRateCombinerOpKHR    combinerOps[2]) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetFragmentShadingRateEnumNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetFragmentShadingRateEnumNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6127,24 +7482,6 @@
 }
 
 
-// ---- VK_EXT_image_compression_control extension trampoline/terminators
-
-VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(
-    VkDevice                                    device,
-    VkImage                                     image,
-    const VkImageSubresource2EXT*               pSubresource,
-    VkSubresourceLayout2EXT*                    pLayout) {
-    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
-    if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
-                   "vkGetImageSubresourceLayout2EXT: Invalid device "
-                   "[VUID-vkGetImageSubresourceLayout2EXT-device-parameter]");
-        abort(); /* Intentionally fail so user can correct issue. */
-    }
-    disp->GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout);
-}
-
-
 // ---- VK_EXT_device_fault extension trampoline/terminators
 
 VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT(
@@ -6153,7 +7490,7 @@
     VkDeviceFaultInfoEXT*                       pFaultInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceFaultInfoEXT: Invalid device "
                    "[VUID-vkGetDeviceFaultInfoEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6164,14 +7501,14 @@
 
 // ---- VK_NV_acquire_winrt_display extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV(
     VkPhysicalDevice                            physicalDevice,
     VkDisplayKHR                                display) {
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireWinrtDisplayNV: Invalid physicalDevice "
                    "[VUID-vkAcquireWinrtDisplayNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6186,7 +7523,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.AcquireWinrtDisplayNV) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support AcquireWinrtDisplayNV");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -6194,7 +7531,7 @@
 }
 
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV(
     VkPhysicalDevice                            physicalDevice,
     uint32_t                                    deviceRelativeId,
@@ -6202,7 +7539,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetWinrtDisplayNV: Invalid physicalDevice "
                    "[VUID-vkGetWinrtDisplayNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6218,7 +7555,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetWinrtDisplayNV) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetWinrtDisplayNV");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -6237,7 +7574,7 @@
     const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetVertexInputEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetVertexInputEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6248,14 +7585,14 @@
 
 // ---- VK_FUCHSIA_external_memory extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA(
     VkDevice                                    device,
     const VkMemoryGetZirconHandleInfoFUCHSIA*   pGetZirconHandleInfo,
     zx_handle_t*                                pZirconHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryZirconHandleFUCHSIA: Invalid device "
                    "[VUID-vkGetMemoryZirconHandleFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6264,7 +7601,7 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandlePropertiesFUCHSIA(
     VkDevice                                    device,
     VkExternalMemoryHandleTypeFlagBits          handleType,
@@ -6272,7 +7609,7 @@
     VkMemoryZirconHandlePropertiesFUCHSIA*      pMemoryZirconHandleProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryZirconHandlePropertiesFUCHSIA: Invalid device "
                    "[VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6284,13 +7621,13 @@
 
 // ---- VK_FUCHSIA_external_semaphore extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA(
     VkDevice                                    device,
     const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkImportSemaphoreZirconHandleFUCHSIA: Invalid device "
                    "[VUID-vkImportSemaphoreZirconHandleFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6299,14 +7636,14 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA(
     VkDevice                                    device,
     const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
     zx_handle_t*                                pZirconHandle) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSemaphoreZirconHandleFUCHSIA: Invalid device "
                    "[VUID-vkGetSemaphoreZirconHandleFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6318,7 +7655,7 @@
 
 // ---- VK_FUCHSIA_buffer_collection extension trampoline/terminators
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL CreateBufferCollectionFUCHSIA(
     VkDevice                                    device,
     const VkBufferCollectionCreateInfoFUCHSIA*  pCreateInfo,
@@ -6326,7 +7663,7 @@
     VkBufferCollectionFUCHSIA*                  pCollection) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateBufferCollectionFUCHSIA: Invalid device "
                    "[VUID-vkCreateBufferCollectionFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6335,14 +7672,14 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionImageConstraintsFUCHSIA(
     VkDevice                                    device,
     VkBufferCollectionFUCHSIA                   collection,
     const VkImageConstraintsInfoFUCHSIA*        pImageConstraintsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetBufferCollectionImageConstraintsFUCHSIA: Invalid device "
                    "[VUID-vkSetBufferCollectionImageConstraintsFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6351,14 +7688,14 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionBufferConstraintsFUCHSIA(
     VkDevice                                    device,
     VkBufferCollectionFUCHSIA                   collection,
     const VkBufferConstraintsInfoFUCHSIA*       pBufferConstraintsInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetBufferCollectionBufferConstraintsFUCHSIA: Invalid device "
                    "[VUID-vkSetBufferCollectionBufferConstraintsFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6367,14 +7704,14 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR void VKAPI_CALL DestroyBufferCollectionFUCHSIA(
     VkDevice                                    device,
     VkBufferCollectionFUCHSIA                   collection,
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyBufferCollectionFUCHSIA: Invalid device "
                    "[VUID-vkDestroyBufferCollectionFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6383,14 +7720,14 @@
 }
 
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL GetBufferCollectionPropertiesFUCHSIA(
     VkDevice                                    device,
     VkBufferCollectionFUCHSIA                   collection,
     VkBufferCollectionPropertiesFUCHSIA*        pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferCollectionPropertiesFUCHSIA: Invalid device "
                    "[VUID-vkGetBufferCollectionPropertiesFUCHSIA-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6408,7 +7745,7 @@
     VkExtent2D*                                 pMaxWorkgroupSize) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI: Invalid device "
                    "[VUID-vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6420,7 +7757,7 @@
     VkCommandBuffer                             commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSubpassShadingHUAWEI: Invalid commandBuffer "
                    "[VUID-vkCmdSubpassShadingHUAWEI-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6437,7 +7774,7 @@
     VkImageLayout                               imageLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindInvocationMaskHUAWEI: Invalid commandBuffer "
                    "[VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6454,7 +7791,7 @@
     VkRemoteAddressNV*                          pAddress) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMemoryRemoteAddressNV: Invalid device "
                    "[VUID-vkGetMemoryRemoteAddressNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6471,7 +7808,7 @@
     VkBaseOutStructure*                         pPipelineProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPipelinePropertiesEXT: Invalid device "
                    "[VUID-vkGetPipelinePropertiesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6487,7 +7824,7 @@
     uint32_t                                    patchControlPoints) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPatchControlPointsEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetPatchControlPointsEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6500,7 +7837,7 @@
     VkBool32                                    rasterizerDiscardEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetRasterizerDiscardEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetRasterizerDiscardEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6513,7 +7850,7 @@
     VkBool32                                    depthBiasEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthBiasEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthBiasEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6526,7 +7863,7 @@
     VkLogicOp                                   logicOp) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLogicOpEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetLogicOpEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6539,7 +7876,7 @@
     VkBool32                                    primitiveRestartEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPrimitiveRestartEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetPrimitiveRestartEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6556,7 +7893,7 @@
     const VkBool32*                             pColorWriteEnables) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetColorWriteEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6576,7 +7913,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMultiEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMultiEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6594,7 +7931,7 @@
     const int32_t*                              pVertexOffset) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMultiIndexedEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6612,7 +7949,7 @@
     VkMicromapEXT*                              pMicromap) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateMicromapEXT: Invalid device "
                    "[VUID-vkCreateMicromapEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6626,7 +7963,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyMicromapEXT: Invalid device "
                    "[VUID-vkDestroyMicromapEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6640,7 +7977,7 @@
     const VkMicromapBuildInfoEXT*               pInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBuildMicromapsEXT: Invalid commandBuffer "
                    "[VUID-vkCmdBuildMicromapsEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6655,7 +7992,7 @@
     const VkMicromapBuildInfoEXT*               pInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBuildMicromapsEXT: Invalid device "
                    "[VUID-vkBuildMicromapsEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6669,7 +8006,7 @@
     const VkCopyMicromapInfoEXT*                pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyMicromapEXT: Invalid device "
                    "[VUID-vkCopyMicromapEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6683,7 +8020,7 @@
     const VkCopyMicromapToMemoryInfoEXT*        pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyMicromapToMemoryEXT: Invalid device "
                    "[VUID-vkCopyMicromapToMemoryEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6697,7 +8034,7 @@
     const VkCopyMemoryToMicromapInfoEXT*        pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyMemoryToMicromapEXT: Invalid device "
                    "[VUID-vkCopyMemoryToMicromapEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6715,7 +8052,7 @@
     size_t                                      stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWriteMicromapsPropertiesEXT: Invalid device "
                    "[VUID-vkWriteMicromapsPropertiesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6728,7 +8065,7 @@
     const VkCopyMicromapInfoEXT*                pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyMicromapEXT: Invalid commandBuffer "
                    "[VUID-vkCmdCopyMicromapEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6741,7 +8078,7 @@
     const VkCopyMicromapToMemoryInfoEXT*        pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyMicromapToMemoryEXT: Invalid commandBuffer "
                    "[VUID-vkCmdCopyMicromapToMemoryEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6754,7 +8091,7 @@
     const VkCopyMemoryToMicromapInfoEXT*        pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyMemoryToMicromapEXT: Invalid commandBuffer "
                    "[VUID-vkCmdCopyMemoryToMicromapEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6771,7 +8108,7 @@
     uint32_t                                    firstQuery) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteMicromapsPropertiesEXT: Invalid commandBuffer "
                    "[VUID-vkCmdWriteMicromapsPropertiesEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6785,7 +8122,7 @@
     VkAccelerationStructureCompatibilityKHR*    pCompatibility) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceMicromapCompatibilityEXT: Invalid device "
                    "[VUID-vkGetDeviceMicromapCompatibilityEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6800,7 +8137,7 @@
     VkMicromapBuildSizesInfoEXT*                pSizeInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetMicromapBuildSizesEXT: Invalid device "
                    "[VUID-vkGetMicromapBuildSizesEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6809,6 +8146,38 @@
 }
 
 
+// ---- VK_HUAWEI_cluster_culling_shader extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI(
+    VkCommandBuffer                             commandBuffer,
+    uint32_t                                    groupCountX,
+    uint32_t                                    groupCountY,
+    uint32_t                                    groupCountZ) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDrawClusterHUAWEI: Invalid commandBuffer "
+                   "[VUID-vkCmdDrawClusterHUAWEI-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI(
+    VkCommandBuffer                             commandBuffer,
+    VkBuffer                                    buffer,
+    VkDeviceSize                                offset) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDrawClusterIndirectHUAWEI: Invalid commandBuffer "
+                   "[VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset);
+}
+
+
 // ---- VK_EXT_pageable_device_local_memory extension trampoline/terminators
 
 VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT(
@@ -6817,7 +8186,7 @@
     float                                       priority) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetDeviceMemoryPriorityEXT: Invalid device "
                    "[VUID-vkSetDeviceMemoryPriorityEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6834,7 +8203,7 @@
     VkDescriptorSetLayoutHostMappingInfoVALVE*  pHostMapping) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDescriptorSetLayoutHostMappingInfoVALVE: Invalid device "
                    "[VUID-vkGetDescriptorSetLayoutHostMappingInfoVALVE-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6848,7 +8217,7 @@
     void**                                      ppData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDescriptorSetHostMappingVALVE: Invalid device "
                    "[VUID-vkGetDescriptorSetHostMappingVALVE-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6857,6 +8226,118 @@
 }
 
 
+// ---- VK_NV_copy_memory_indirect extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryIndirectNV(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             copyBufferAddress,
+    uint32_t                                    copyCount,
+    uint32_t                                    stride) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdCopyMemoryIndirectNV: Invalid commandBuffer "
+                   "[VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToImageIndirectNV(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             copyBufferAddress,
+    uint32_t                                    copyCount,
+    uint32_t                                    stride,
+    VkImage                                     dstImage,
+    VkImageLayout                               dstImageLayout,
+    const VkImageSubresourceLayers*             pImageSubresources) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdCopyMemoryToImageIndirectNV: Invalid commandBuffer "
+                   "[VUID-vkCmdCopyMemoryToImageIndirectNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, pImageSubresources);
+}
+
+
+// ---- VK_NV_memory_decompression extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryNV(
+    VkCommandBuffer                             commandBuffer,
+    uint32_t                                    decompressRegionCount,
+    const VkDecompressMemoryRegionNV*           pDecompressMemoryRegions) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDecompressMemoryNV: Invalid commandBuffer "
+                   "[VUID-vkCmdDecompressMemoryNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryIndirectCountNV(
+    VkCommandBuffer                             commandBuffer,
+    VkDeviceAddress                             indirectCommandsAddress,
+    VkDeviceAddress                             indirectCommandsCountAddress,
+    uint32_t                                    stride) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDecompressMemoryIndirectCountNV: Invalid commandBuffer "
+                   "[VUID-vkCmdDecompressMemoryIndirectCountNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride);
+}
+
+
+// ---- VK_NV_device_generated_commands_compute extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL GetPipelineIndirectMemoryRequirementsNV(
+    VkDevice                                    device,
+    const VkComputePipelineCreateInfo*          pCreateInfo,
+    VkMemoryRequirements2*                      pMemoryRequirements) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetPipelineIndirectMemoryRequirementsNV: Invalid device "
+                   "[VUID-vkGetPipelineIndirectMemoryRequirementsNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdUpdatePipelineIndirectBufferNV(
+    VkCommandBuffer                             commandBuffer,
+    VkPipelineBindPoint                         pipelineBindPoint,
+    VkPipeline                                  pipeline) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdUpdatePipelineIndirectBufferNV: Invalid commandBuffer "
+                   "[VUID-vkCmdUpdatePipelineIndirectBufferNV-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline);
+}
+
+VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV(
+    VkDevice                                    device,
+    const VkPipelineIndirectDeviceAddressInfoNV* pInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetPipelineIndirectDeviceAddressNV: Invalid device "
+                   "[VUID-vkGetPipelineIndirectDeviceAddressNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetPipelineIndirectDeviceAddressNV(device, pInfo);
+}
+
+
 // ---- VK_EXT_extended_dynamic_state3 extension trampoline/terminators
 
 VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT(
@@ -6864,7 +8345,7 @@
     VkTessellationDomainOrigin                  domainOrigin) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetTessellationDomainOriginEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetTessellationDomainOriginEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6877,7 +8358,7 @@
     VkBool32                                    depthClampEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthClampEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthClampEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6890,7 +8371,7 @@
     VkPolygonMode                               polygonMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetPolygonModeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetPolygonModeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6903,7 +8384,7 @@
     VkSampleCountFlagBits                       rasterizationSamples) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetRasterizationSamplesEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetRasterizationSamplesEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6917,7 +8398,7 @@
     const VkSampleMask*                         pSampleMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetSampleMaskEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetSampleMaskEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6930,7 +8411,7 @@
     VkBool32                                    alphaToCoverageEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetAlphaToCoverageEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetAlphaToCoverageEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6943,7 +8424,7 @@
     VkBool32                                    alphaToOneEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetAlphaToOneEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetAlphaToOneEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6956,7 +8437,7 @@
     VkBool32                                    logicOpEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLogicOpEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetLogicOpEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6971,7 +8452,7 @@
     const VkBool32*                             pColorBlendEnables) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetColorBlendEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetColorBlendEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -6986,7 +8467,7 @@
     const VkColorBlendEquationEXT*              pColorBlendEquations) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetColorBlendEquationEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetColorBlendEquationEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7001,7 +8482,7 @@
     const VkColorComponentFlags*                pColorWriteMasks) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetColorWriteMaskEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetColorWriteMaskEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7014,7 +8495,7 @@
     uint32_t                                    rasterizationStream) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetRasterizationStreamEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetRasterizationStreamEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7027,7 +8508,7 @@
     VkConservativeRasterizationModeEXT          conservativeRasterizationMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetConservativeRasterizationModeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetConservativeRasterizationModeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7040,7 +8521,7 @@
     float                                       extraPrimitiveOverestimationSize) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetExtraPrimitiveOverestimationSizeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetExtraPrimitiveOverestimationSizeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7053,7 +8534,7 @@
     VkBool32                                    depthClipEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthClipEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthClipEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7066,7 +8547,7 @@
     VkBool32                                    sampleLocationsEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetSampleLocationsEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetSampleLocationsEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7081,7 +8562,7 @@
     const VkColorBlendAdvancedEXT*              pColorBlendAdvanced) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetColorBlendAdvancedEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetColorBlendAdvancedEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7094,7 +8575,7 @@
     VkProvokingVertexModeEXT                    provokingVertexMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetProvokingVertexModeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetProvokingVertexModeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7107,7 +8588,7 @@
     VkLineRasterizationModeEXT                  lineRasterizationMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLineRasterizationModeEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetLineRasterizationModeEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7120,7 +8601,7 @@
     VkBool32                                    stippledLineEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLineStippleEnableEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetLineStippleEnableEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7133,7 +8614,7 @@
     VkBool32                                    negativeOneToOne) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthClipNegativeOneToOneEXT: Invalid commandBuffer "
                    "[VUID-vkCmdSetDepthClipNegativeOneToOneEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7146,7 +8627,7 @@
     VkBool32                                    viewportWScalingEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewportWScalingEnableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetViewportWScalingEnableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7161,7 +8642,7 @@
     const VkViewportSwizzleNV*                  pViewportSwizzles) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewportSwizzleNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetViewportSwizzleNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7174,7 +8655,7 @@
     VkBool32                                    coverageToColorEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageToColorEnableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageToColorEnableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7187,7 +8668,7 @@
     uint32_t                                    coverageToColorLocation) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageToColorLocationNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageToColorLocationNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7200,7 +8681,7 @@
     VkCoverageModulationModeNV                  coverageModulationMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageModulationModeNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageModulationModeNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7213,7 +8694,7 @@
     VkBool32                                    coverageModulationTableEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageModulationTableEnableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageModulationTableEnableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7227,7 +8708,7 @@
     const float*                                pCoverageModulationTable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageModulationTableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageModulationTableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7240,7 +8721,7 @@
     VkBool32                                    shadingRateImageEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetShadingRateImageEnableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetShadingRateImageEnableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7253,7 +8734,7 @@
     VkBool32                                    representativeFragmentTestEnable) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetRepresentativeFragmentTestEnableNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetRepresentativeFragmentTestEnableNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7266,7 +8747,7 @@
     VkCoverageReductionModeNV                   coverageReductionMode) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetCoverageReductionModeNV: Invalid commandBuffer "
                    "[VUID-vkCmdSetCoverageReductionModeNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7283,7 +8764,7 @@
     VkShaderModuleIdentifierEXT*                pIdentifier) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetShaderModuleIdentifierEXT: Invalid device "
                    "[VUID-vkGetShaderModuleIdentifierEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7297,7 +8778,7 @@
     VkShaderModuleIdentifierEXT*                pIdentifier) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetShaderModuleCreateInfoIdentifierEXT: Invalid device "
                    "[VUID-vkGetShaderModuleCreateInfoIdentifierEXT-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7316,7 +8797,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceOpticalFlowImageFormatsNV: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceOpticalFlowImageFormatsNV-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7333,7 +8814,7 @@
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     if (NULL == icd_term->dispatch.GetPhysicalDeviceOpticalFlowImageFormatsNV) {
-        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+        loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
                    "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceOpticalFlowImageFormatsNV");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -7347,7 +8828,7 @@
     VkOpticalFlowSessionNV*                     pSession) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateOpticalFlowSessionNV: Invalid device "
                    "[VUID-vkCreateOpticalFlowSessionNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7361,7 +8842,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyOpticalFlowSessionNV: Invalid device "
                    "[VUID-vkDestroyOpticalFlowSessionNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7377,7 +8858,7 @@
     VkImageLayout                               layout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindOpticalFlowSessionImageNV: Invalid device "
                    "[VUID-vkBindOpticalFlowSessionImageNV-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7391,7 +8872,7 @@
     const VkOpticalFlowExecuteInfoNV*           pExecuteInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdOpticalFlowExecuteNV: Invalid commandBuffer "
                    "[VUID-vkCmdOpticalFlowExecuteNV-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7400,6 +8881,69 @@
 }
 
 
+// ---- VK_EXT_shader_object extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(
+    VkDevice                                    device,
+    uint32_t                                    createInfoCount,
+    const VkShaderCreateInfoEXT*                pCreateInfos,
+    const VkAllocationCallbacks*                pAllocator,
+    VkShaderEXT*                                pShaders) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCreateShadersEXT: Invalid device "
+                   "[VUID-vkCreateShadersEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->CreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders);
+}
+
+VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT(
+    VkDevice                                    device,
+    VkShaderEXT                                 shader,
+    const VkAllocationCallbacks*                pAllocator) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkDestroyShaderEXT: Invalid device "
+                   "[VUID-vkDestroyShaderEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->DestroyShaderEXT(device, shader, pAllocator);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL GetShaderBinaryDataEXT(
+    VkDevice                                    device,
+    VkShaderEXT                                 shader,
+    size_t*                                     pDataSize,
+    void*                                       pData) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetShaderBinaryDataEXT: Invalid device "
+                   "[VUID-vkGetShaderBinaryDataEXT-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetShaderBinaryDataEXT(device, shader, pDataSize, pData);
+}
+
+VKAPI_ATTR void VKAPI_CALL CmdBindShadersEXT(
+    VkCommandBuffer                             commandBuffer,
+    uint32_t                                    stageCount,
+    const VkShaderStageFlagBits*                pStages,
+    const VkShaderEXT*                          pShaders) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdBindShadersEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdBindShadersEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders);
+}
+
+
 // ---- VK_QCOM_tile_properties extension trampoline/terminators
 
 VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM(
@@ -7409,7 +8953,7 @@
     VkTilePropertiesQCOM*                       pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetFramebufferTilePropertiesQCOM: Invalid device "
                    "[VUID-vkGetFramebufferTilePropertiesQCOM-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7423,7 +8967,7 @@
     VkTilePropertiesQCOM*                       pProperties) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDynamicRenderingTilePropertiesQCOM: Invalid device "
                    "[VUID-vkGetDynamicRenderingTilePropertiesQCOM-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7432,6 +8976,114 @@
 }
 
 
+// ---- VK_NV_low_latency2 extension trampoline/terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV(
+    VkDevice                                    device,
+    VkSwapchainKHR                              swapchain,
+    const VkLatencySleepModeInfoNV*             pSleepModeInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkSetLatencySleepModeNV: Invalid device "
+                   "[VUID-vkSetLatencySleepModeNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->SetLatencySleepModeNV(device, swapchain, pSleepModeInfo);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL LatencySleepNV(
+    VkDevice                                    device,
+    VkSwapchainKHR                              swapchain,
+    const VkLatencySleepInfoNV*                 pSleepInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkLatencySleepNV: Invalid device "
+                   "[VUID-vkLatencySleepNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->LatencySleepNV(device, swapchain, pSleepInfo);
+}
+
+VKAPI_ATTR void VKAPI_CALL SetLatencyMarkerNV(
+    VkDevice                                    device,
+    VkSwapchainKHR                              swapchain,
+    const VkSetLatencyMarkerInfoNV*             pLatencyMarkerInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkSetLatencyMarkerNV: Invalid device "
+                   "[VUID-vkSetLatencyMarkerNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo);
+}
+
+VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV(
+    VkDevice                                    device,
+    VkSwapchainKHR                              swapchain,
+    uint32_t*                                   pTimingCount,
+    VkGetLatencyMarkerInfoNV*                   pLatencyMarkerInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetLatencyTimingsNV: Invalid device "
+                   "[VUID-vkGetLatencyTimingsNV-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->GetLatencyTimingsNV(device, swapchain, pTimingCount, pLatencyMarkerInfo);
+}
+
+VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV(
+    VkQueue                                     queue,
+    const VkOutOfBandQueueTypeInfoNV*           pQueueTypeInfo) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkQueueNotifyOutOfBandNV: Invalid queue "
+                   "[VUID-vkQueueNotifyOutOfBandNV-queue-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->QueueNotifyOutOfBandNV(queue, pQueueTypeInfo);
+}
+
+
+// ---- VK_EXT_attachment_feedback_loop_dynamic_state extension trampoline/terminators
+
+VKAPI_ATTR void VKAPI_CALL CmdSetAttachmentFeedbackLoopEnableEXT(
+    VkCommandBuffer                             commandBuffer,
+    VkImageAspectFlags                          aspectMask) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdSetAttachmentFeedbackLoopEnableEXT: Invalid commandBuffer "
+                   "[VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    disp->CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask);
+}
+
+
+// ---- VK_QNX_external_memory_screen_buffer extension trampoline/terminators
+
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+VKAPI_ATTR VkResult VKAPI_CALL GetScreenBufferPropertiesQNX(
+    VkDevice                                    device,
+    const struct _screen_buffer*                buffer,
+    VkScreenBufferPropertiesQNX*                pProperties) {
+    const VkLayerDispatchTable *disp = loader_get_dispatch(device);
+    if (NULL == disp) {
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetScreenBufferPropertiesQNX: Invalid device "
+                   "[VUID-vkGetScreenBufferPropertiesQNX-device-parameter]");
+        abort(); /* Intentionally fail so user can correct issue. */
+    }
+    return disp->GetScreenBufferPropertiesQNX(device, buffer, pProperties);
+}
+
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+
 // ---- VK_KHR_acceleration_structure extension trampoline/terminators
 
 VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR(
@@ -7441,7 +9093,7 @@
     VkAccelerationStructureKHR*                 pAccelerationStructure) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateAccelerationStructureKHR: Invalid device "
                    "[VUID-vkCreateAccelerationStructureKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7455,7 +9107,7 @@
     const VkAllocationCallbacks*                pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyAccelerationStructureKHR: Invalid device "
                    "[VUID-vkDestroyAccelerationStructureKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7470,7 +9122,7 @@
     const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBuildAccelerationStructuresKHR: Invalid commandBuffer "
                    "[VUID-vkCmdBuildAccelerationStructuresKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7487,7 +9139,7 @@
     const uint32_t* const*                      ppMaxPrimitiveCounts) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBuildAccelerationStructuresIndirectKHR: Invalid commandBuffer "
                    "[VUID-vkCmdBuildAccelerationStructuresIndirectKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7503,7 +9155,7 @@
     const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBuildAccelerationStructuresKHR: Invalid device "
                    "[VUID-vkBuildAccelerationStructuresKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7517,7 +9169,7 @@
     const VkCopyAccelerationStructureInfoKHR*   pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyAccelerationStructureKHR: Invalid device "
                    "[VUID-vkCopyAccelerationStructureKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7531,7 +9183,7 @@
     const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyAccelerationStructureToMemoryKHR: Invalid device "
                    "[VUID-vkCopyAccelerationStructureToMemoryKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7545,7 +9197,7 @@
     const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCopyMemoryToAccelerationStructureKHR: Invalid device "
                    "[VUID-vkCopyMemoryToAccelerationStructureKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7563,7 +9215,7 @@
     size_t                                      stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWriteAccelerationStructuresPropertiesKHR: Invalid device "
                    "[VUID-vkWriteAccelerationStructuresPropertiesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7576,7 +9228,7 @@
     const VkCopyAccelerationStructureInfoKHR*   pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyAccelerationStructureKHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7589,7 +9241,7 @@
     const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyAccelerationStructureToMemoryKHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyAccelerationStructureToMemoryKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7602,7 +9254,7 @@
     const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyMemoryToAccelerationStructureKHR: Invalid commandBuffer "
                    "[VUID-vkCmdCopyMemoryToAccelerationStructureKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7615,7 +9267,7 @@
     const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetAccelerationStructureDeviceAddressKHR: Invalid device "
                    "[VUID-vkGetAccelerationStructureDeviceAddressKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7632,7 +9284,7 @@
     uint32_t                                    firstQuery) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteAccelerationStructuresPropertiesKHR: Invalid commandBuffer "
                    "[VUID-vkCmdWriteAccelerationStructuresPropertiesKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7646,7 +9298,7 @@
     VkAccelerationStructureCompatibilityKHR*    pCompatibility) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceAccelerationStructureCompatibilityKHR: Invalid device "
                    "[VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7662,7 +9314,7 @@
     VkAccelerationStructureBuildSizesInfoKHR*   pSizeInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetAccelerationStructureBuildSizesKHR: Invalid device "
                    "[VUID-vkGetAccelerationStructureBuildSizesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7684,7 +9336,7 @@
     uint32_t                                    depth) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdTraceRaysKHR: Invalid commandBuffer "
                    "[VUID-vkCmdTraceRaysKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7702,7 +9354,7 @@
     VkPipeline*                                 pPipelines) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateRayTracingPipelinesKHR: Invalid device "
                    "[VUID-vkCreateRayTracingPipelinesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7719,7 +9371,7 @@
     void*                                       pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR: Invalid device "
                    "[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7736,7 +9388,7 @@
     VkDeviceAddress                             indirectDeviceAddress) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdTraceRaysIndirectKHR: Invalid commandBuffer "
                    "[VUID-vkCmdTraceRaysIndirectKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7751,7 +9403,7 @@
     VkShaderGroupShaderKHR                      groupShader) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRayTracingShaderGroupStackSizeKHR: Invalid device "
                    "[VUID-vkGetRayTracingShaderGroupStackSizeKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7764,7 +9416,7 @@
     uint32_t                                    pipelineStackSize) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetRayTracingPipelineStackSizeKHR: Invalid commandBuffer "
                    "[VUID-vkCmdSetRayTracingPipelineStackSizeKHR-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7782,7 +9434,7 @@
     uint32_t                                    groupCountZ) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7798,7 +9450,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksIndirectEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksIndirectEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7816,7 +9468,7 @@
     uint32_t                                    stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawMeshTasksIndirectCountEXT: Invalid commandBuffer "
                    "[VUID-vkCmdDrawMeshTasksIndirectCountEXT-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -7830,86 +9482,60 @@
 
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkGetPhysicalDeviceVideoCapabilitiesKHR", name)) {
         *addr = (void *)GetPhysicalDeviceVideoCapabilitiesKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkGetPhysicalDeviceVideoFormatPropertiesKHR", name)) {
         *addr = (void *)GetPhysicalDeviceVideoFormatPropertiesKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCreateVideoSessionKHR", name)) {
         *addr = (void *)CreateVideoSessionKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkDestroyVideoSessionKHR", name)) {
         *addr = (void *)DestroyVideoSessionKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkGetVideoSessionMemoryRequirementsKHR", name)) {
         *addr = (void *)GetVideoSessionMemoryRequirementsKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkBindVideoSessionMemoryKHR", name)) {
         *addr = (void *)BindVideoSessionMemoryKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCreateVideoSessionParametersKHR", name)) {
         *addr = (void *)CreateVideoSessionParametersKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkUpdateVideoSessionParametersKHR", name)) {
         *addr = (void *)UpdateVideoSessionParametersKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkDestroyVideoSessionParametersKHR", name)) {
         *addr = (void *)DestroyVideoSessionParametersKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCmdBeginVideoCodingKHR", name)) {
         *addr = (void *)CmdBeginVideoCodingKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCmdEndVideoCodingKHR", name)) {
         *addr = (void *)CmdEndVideoCodingKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCmdControlVideoCodingKHR", name)) {
         *addr = (void *)CmdControlVideoCodingKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_video_decode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     if (!strcmp("vkCmdDecodeVideoKHR", name)) {
         *addr = (void *)CmdDecodeVideoKHR;
         return true;
     }
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_dynamic_rendering extension commands
     if (!strcmp("vkCmdBeginRenderingKHR", name)) {
@@ -8002,13 +9628,13 @@
     }
 
     // ---- VK_KHR_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetMemoryWin32HandleKHR", name)) {
         *addr = (void *)GetMemoryWin32HandleKHR;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetMemoryWin32HandlePropertiesKHR", name)) {
         *addr = (void *)GetMemoryWin32HandlePropertiesKHR;
         return true;
@@ -8034,13 +9660,13 @@
     }
 
     // ---- VK_KHR_external_semaphore_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkImportSemaphoreWin32HandleKHR", name)) {
         *addr = (void *)ImportSemaphoreWin32HandleKHR;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetSemaphoreWin32HandleKHR", name)) {
         *addr = (void *)GetSemaphoreWin32HandleKHR;
         return true;
@@ -8114,13 +9740,13 @@
     }
 
     // ---- VK_KHR_external_fence_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkImportFenceWin32HandleKHR", name)) {
         *addr = (void *)ImportFenceWin32HandleKHR;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetFenceWin32HandleKHR", name)) {
         *addr = (void *)GetFenceWin32HandleKHR;
         return true;
@@ -8285,8 +9911,30 @@
         return true;
     }
 
+    // ---- VK_KHR_map_memory2 extension commands
+    if (!strcmp("vkMapMemory2KHR", name)) {
+        *addr = (void *)MapMemory2KHR;
+        return true;
+    }
+    if (!strcmp("vkUnmapMemory2KHR", name)) {
+        *addr = (void *)UnmapMemory2KHR;
+        return true;
+    }
+
     // ---- VK_KHR_video_encode_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR", name)) {
+        *addr = (void *)GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkGetEncodedVideoSessionParametersKHR", name)) {
+        *addr = (void *)GetEncodedVideoSessionParametersKHR;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
     if (!strcmp("vkCmdEncodeVideoKHR", name)) {
         *addr = (void *)CmdEncodeVideoKHR;
         return true;
@@ -8373,6 +10021,30 @@
         return true;
     }
 
+    // ---- VK_KHR_maintenance5 extension commands
+    if (!strcmp("vkCmdBindIndexBuffer2KHR", name)) {
+        *addr = (void *)CmdBindIndexBuffer2KHR;
+        return true;
+    }
+    if (!strcmp("vkGetRenderingAreaGranularityKHR", name)) {
+        *addr = (void *)GetRenderingAreaGranularityKHR;
+        return true;
+    }
+    if (!strcmp("vkGetDeviceImageSubresourceLayoutKHR", name)) {
+        *addr = (void *)GetDeviceImageSubresourceLayoutKHR;
+        return true;
+    }
+    if (!strcmp("vkGetImageSubresourceLayout2KHR", name)) {
+        *addr = (void *)GetImageSubresourceLayout2KHR;
+        return true;
+    }
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    if (!strcmp("vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", name)) {
+        *addr = (void *)GetPhysicalDeviceCooperativeMatrixPropertiesKHR;
+        return true;
+    }
+
     // ---- VK_EXT_debug_marker extension commands
     if (!strcmp("vkDebugMarkerSetObjectTagEXT", name)) {
         *addr = (void *)DebugMarkerSetObjectTagEXT;
@@ -8478,7 +10150,7 @@
     }
 
     // ---- VK_NV_external_memory_win32 extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetMemoryWin32HandleNV", name)) {
         *addr = (void *)GetMemoryWin32HandleNV;
         return true;
@@ -8510,7 +10182,7 @@
     }
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     if (!strcmp("vkAcquireXlibDisplayEXT", name)) {
         *addr = (ptr_instance->enabled_known_extensions.ext_acquire_xlib_display == 1)
                      ? (void *)AcquireXlibDisplayEXT
@@ -8518,7 +10190,7 @@
         return true;
     }
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     if (!strcmp("vkGetRandROutputDisplayEXT", name)) {
         *addr = (ptr_instance->enabled_known_extensions.ext_acquire_xlib_display == 1)
                      ? (void *)GetRandROutputDisplayEXT
@@ -8568,6 +10240,14 @@
         *addr = (void *)CmdSetDiscardRectangleEXT;
         return true;
     }
+    if (!strcmp("vkCmdSetDiscardRectangleEnableEXT", name)) {
+        *addr = (void *)CmdSetDiscardRectangleEnableEXT;
+        return true;
+    }
+    if (!strcmp("vkCmdSetDiscardRectangleModeEXT", name)) {
+        *addr = (void *)CmdSetDiscardRectangleModeEXT;
+        return true;
+    }
 
     // ---- VK_EXT_hdr_metadata extension commands
     if (!strcmp("vkSetHdrMetadataEXT", name)) {
@@ -8626,19 +10306,63 @@
     }
 
     // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp("vkGetAndroidHardwareBufferPropertiesANDROID", name)) {
         *addr = (void *)GetAndroidHardwareBufferPropertiesANDROID;
         return true;
     }
 #endif // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp("vkGetMemoryAndroidHardwareBufferANDROID", name)) {
         *addr = (void *)GetMemoryAndroidHardwareBufferANDROID;
         return true;
     }
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
+    // ---- VK_AMDX_shader_enqueue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkCreateExecutionGraphPipelinesAMDX", name)) {
+        *addr = (void *)CreateExecutionGraphPipelinesAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkGetExecutionGraphPipelineScratchSizeAMDX", name)) {
+        *addr = (void *)GetExecutionGraphPipelineScratchSizeAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkGetExecutionGraphPipelineNodeIndexAMDX", name)) {
+        *addr = (void *)GetExecutionGraphPipelineNodeIndexAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkCmdInitializeGraphScratchMemoryAMDX", name)) {
+        *addr = (void *)CmdInitializeGraphScratchMemoryAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkCmdDispatchGraphAMDX", name)) {
+        *addr = (void *)CmdDispatchGraphAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkCmdDispatchGraphIndirectAMDX", name)) {
+        *addr = (void *)CmdDispatchGraphIndirectAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    if (!strcmp("vkCmdDispatchGraphIndirectCountAMDX", name)) {
+        *addr = (void *)CmdDispatchGraphIndirectCountAMDX;
+        return true;
+    }
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
     // ---- VK_EXT_sample_locations extension commands
     if (!strcmp("vkCmdSetSampleLocationsEXT", name)) {
         *addr = (void *)CmdSetSampleLocationsEXT;
@@ -8778,6 +10502,10 @@
     }
 
     // ---- VK_NV_scissor_exclusive extension commands
+    if (!strcmp("vkCmdSetExclusiveScissorEnableNV", name)) {
+        *addr = (void *)CmdSetExclusiveScissorEnableNV;
+        return true;
+    }
     if (!strcmp("vkCmdSetExclusiveScissorNV", name)) {
         *addr = (void *)CmdSetExclusiveScissorNV;
         return true;
@@ -8862,25 +10590,25 @@
     }
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetPhysicalDeviceSurfacePresentModes2EXT", name)) {
         *addr = (void *)GetPhysicalDeviceSurfacePresentModes2EXT;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkAcquireFullScreenExclusiveModeEXT", name)) {
         *addr = (void *)AcquireFullScreenExclusiveModeEXT;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkReleaseFullScreenExclusiveModeEXT", name)) {
         *addr = (void *)ReleaseFullScreenExclusiveModeEXT;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetDeviceGroupSurfacePresentModes2EXT", name)) {
         *addr = (void *)GetDeviceGroupSurfacePresentModes2EXT;
         return true;
@@ -8949,6 +10677,34 @@
         return true;
     }
 
+    // ---- VK_EXT_host_image_copy extension commands
+    if (!strcmp("vkCopyMemoryToImageEXT", name)) {
+        *addr = (void *)CopyMemoryToImageEXT;
+        return true;
+    }
+    if (!strcmp("vkCopyImageToMemoryEXT", name)) {
+        *addr = (void *)CopyImageToMemoryEXT;
+        return true;
+    }
+    if (!strcmp("vkCopyImageToImageEXT", name)) {
+        *addr = (void *)CopyImageToImageEXT;
+        return true;
+    }
+    if (!strcmp("vkTransitionImageLayoutEXT", name)) {
+        *addr = (void *)TransitionImageLayoutEXT;
+        return true;
+    }
+    if (!strcmp("vkGetImageSubresourceLayout2EXT", name)) {
+        *addr = (void *)GetImageSubresourceLayout2EXT;
+        return true;
+    }
+
+    // ---- VK_EXT_swapchain_maintenance1 extension commands
+    if (!strcmp("vkReleaseSwapchainImagesEXT", name)) {
+        *addr = (void *)ReleaseSwapchainImagesEXT;
+        return true;
+    }
+
     // ---- VK_NV_device_generated_commands extension commands
     if (!strcmp("vkGetGeneratedCommandsMemoryRequirementsNV", name)) {
         *addr = (void *)GetGeneratedCommandsMemoryRequirementsNV;
@@ -8975,6 +10731,12 @@
         return true;
     }
 
+    // ---- VK_EXT_depth_bias_control extension commands
+    if (!strcmp("vkCmdSetDepthBias2EXT", name)) {
+        *addr = (void *)CmdSetDepthBias2EXT;
+        return true;
+    }
+
     // ---- VK_EXT_acquire_drm_display extension commands
     if (!strcmp("vkAcquireDrmDisplayEXT", name)) {
         *addr = (ptr_instance->enabled_known_extensions.ext_acquire_drm_display == 1)
@@ -9008,22 +10770,62 @@
     }
 
     // ---- VK_EXT_metal_objects extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     if (!strcmp("vkExportMetalObjectsEXT", name)) {
         *addr = (void *)ExportMetalObjectsEXT;
         return true;
     }
 #endif // VK_USE_PLATFORM_METAL_EXT
 
-    // ---- VK_NV_fragment_shading_rate_enums extension commands
-    if (!strcmp("vkCmdSetFragmentShadingRateEnumNV", name)) {
-        *addr = (void *)CmdSetFragmentShadingRateEnumNV;
+    // ---- VK_EXT_descriptor_buffer extension commands
+    if (!strcmp("vkGetDescriptorSetLayoutSizeEXT", name)) {
+        *addr = (void *)GetDescriptorSetLayoutSizeEXT;
+        return true;
+    }
+    if (!strcmp("vkGetDescriptorSetLayoutBindingOffsetEXT", name)) {
+        *addr = (void *)GetDescriptorSetLayoutBindingOffsetEXT;
+        return true;
+    }
+    if (!strcmp("vkGetDescriptorEXT", name)) {
+        *addr = (void *)GetDescriptorEXT;
+        return true;
+    }
+    if (!strcmp("vkCmdBindDescriptorBuffersEXT", name)) {
+        *addr = (void *)CmdBindDescriptorBuffersEXT;
+        return true;
+    }
+    if (!strcmp("vkCmdSetDescriptorBufferOffsetsEXT", name)) {
+        *addr = (void *)CmdSetDescriptorBufferOffsetsEXT;
+        return true;
+    }
+    if (!strcmp("vkCmdBindDescriptorBufferEmbeddedSamplersEXT", name)) {
+        *addr = (void *)CmdBindDescriptorBufferEmbeddedSamplersEXT;
+        return true;
+    }
+    if (!strcmp("vkGetBufferOpaqueCaptureDescriptorDataEXT", name)) {
+        *addr = (void *)GetBufferOpaqueCaptureDescriptorDataEXT;
+        return true;
+    }
+    if (!strcmp("vkGetImageOpaqueCaptureDescriptorDataEXT", name)) {
+        *addr = (void *)GetImageOpaqueCaptureDescriptorDataEXT;
+        return true;
+    }
+    if (!strcmp("vkGetImageViewOpaqueCaptureDescriptorDataEXT", name)) {
+        *addr = (void *)GetImageViewOpaqueCaptureDescriptorDataEXT;
+        return true;
+    }
+    if (!strcmp("vkGetSamplerOpaqueCaptureDescriptorDataEXT", name)) {
+        *addr = (void *)GetSamplerOpaqueCaptureDescriptorDataEXT;
+        return true;
+    }
+    if (!strcmp("vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT", name)) {
+        *addr = (void *)GetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
         return true;
     }
 
-    // ---- VK_EXT_image_compression_control extension commands
-    if (!strcmp("vkGetImageSubresourceLayout2EXT", name)) {
-        *addr = (void *)GetImageSubresourceLayout2EXT;
+    // ---- VK_NV_fragment_shading_rate_enums extension commands
+    if (!strcmp("vkCmdSetFragmentShadingRateEnumNV", name)) {
+        *addr = (void *)CmdSetFragmentShadingRateEnumNV;
         return true;
     }
 
@@ -9034,13 +10836,13 @@
     }
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkAcquireWinrtDisplayNV", name)) {
         *addr = (void *)AcquireWinrtDisplayNV;
         return true;
     }
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp("vkGetWinrtDisplayNV", name)) {
         *addr = (void *)GetWinrtDisplayNV;
         return true;
@@ -9054,13 +10856,13 @@
     }
 
     // ---- VK_FUCHSIA_external_memory extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkGetMemoryZirconHandleFUCHSIA", name)) {
         *addr = (void *)GetMemoryZirconHandleFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkGetMemoryZirconHandlePropertiesFUCHSIA", name)) {
         *addr = (void *)GetMemoryZirconHandlePropertiesFUCHSIA;
         return true;
@@ -9068,13 +10870,13 @@
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_external_semaphore extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkImportSemaphoreZirconHandleFUCHSIA", name)) {
         *addr = (void *)ImportSemaphoreZirconHandleFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkGetSemaphoreZirconHandleFUCHSIA", name)) {
         *addr = (void *)GetSemaphoreZirconHandleFUCHSIA;
         return true;
@@ -9082,31 +10884,31 @@
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_FUCHSIA_buffer_collection extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkCreateBufferCollectionFUCHSIA", name)) {
         *addr = (void *)CreateBufferCollectionFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkSetBufferCollectionImageConstraintsFUCHSIA", name)) {
         *addr = (void *)SetBufferCollectionImageConstraintsFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkSetBufferCollectionBufferConstraintsFUCHSIA", name)) {
         *addr = (void *)SetBufferCollectionBufferConstraintsFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkDestroyBufferCollectionFUCHSIA", name)) {
         *addr = (void *)DestroyBufferCollectionFUCHSIA;
         return true;
     }
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     if (!strcmp("vkGetBufferCollectionPropertiesFUCHSIA", name)) {
         *addr = (void *)GetBufferCollectionPropertiesFUCHSIA;
         return true;
@@ -9237,6 +11039,16 @@
         return true;
     }
 
+    // ---- VK_HUAWEI_cluster_culling_shader extension commands
+    if (!strcmp("vkCmdDrawClusterHUAWEI", name)) {
+        *addr = (void *)CmdDrawClusterHUAWEI;
+        return true;
+    }
+    if (!strcmp("vkCmdDrawClusterIndirectHUAWEI", name)) {
+        *addr = (void *)CmdDrawClusterIndirectHUAWEI;
+        return true;
+    }
+
     // ---- VK_EXT_pageable_device_local_memory extension commands
     if (!strcmp("vkSetDeviceMemoryPriorityEXT", name)) {
         *addr = (void *)SetDeviceMemoryPriorityEXT;
@@ -9253,6 +11065,40 @@
         return true;
     }
 
+    // ---- VK_NV_copy_memory_indirect extension commands
+    if (!strcmp("vkCmdCopyMemoryIndirectNV", name)) {
+        *addr = (void *)CmdCopyMemoryIndirectNV;
+        return true;
+    }
+    if (!strcmp("vkCmdCopyMemoryToImageIndirectNV", name)) {
+        *addr = (void *)CmdCopyMemoryToImageIndirectNV;
+        return true;
+    }
+
+    // ---- VK_NV_memory_decompression extension commands
+    if (!strcmp("vkCmdDecompressMemoryNV", name)) {
+        *addr = (void *)CmdDecompressMemoryNV;
+        return true;
+    }
+    if (!strcmp("vkCmdDecompressMemoryIndirectCountNV", name)) {
+        *addr = (void *)CmdDecompressMemoryIndirectCountNV;
+        return true;
+    }
+
+    // ---- VK_NV_device_generated_commands_compute extension commands
+    if (!strcmp("vkGetPipelineIndirectMemoryRequirementsNV", name)) {
+        *addr = (void *)GetPipelineIndirectMemoryRequirementsNV;
+        return true;
+    }
+    if (!strcmp("vkCmdUpdatePipelineIndirectBufferNV", name)) {
+        *addr = (void *)CmdUpdatePipelineIndirectBufferNV;
+        return true;
+    }
+    if (!strcmp("vkGetPipelineIndirectDeviceAddressNV", name)) {
+        *addr = (void *)GetPipelineIndirectDeviceAddressNV;
+        return true;
+    }
+
     // ---- VK_EXT_extended_dynamic_state3 extension commands
     if (!strcmp("vkCmdSetTessellationDomainOriginEXT", name)) {
         *addr = (void *)CmdSetTessellationDomainOriginEXT;
@@ -9411,6 +11257,24 @@
         return true;
     }
 
+    // ---- VK_EXT_shader_object extension commands
+    if (!strcmp("vkCreateShadersEXT", name)) {
+        *addr = (void *)CreateShadersEXT;
+        return true;
+    }
+    if (!strcmp("vkDestroyShaderEXT", name)) {
+        *addr = (void *)DestroyShaderEXT;
+        return true;
+    }
+    if (!strcmp("vkGetShaderBinaryDataEXT", name)) {
+        *addr = (void *)GetShaderBinaryDataEXT;
+        return true;
+    }
+    if (!strcmp("vkCmdBindShadersEXT", name)) {
+        *addr = (void *)CmdBindShadersEXT;
+        return true;
+    }
+
     // ---- VK_QCOM_tile_properties extension commands
     if (!strcmp("vkGetFramebufferTilePropertiesQCOM", name)) {
         *addr = (void *)GetFramebufferTilePropertiesQCOM;
@@ -9421,6 +11285,42 @@
         return true;
     }
 
+    // ---- VK_NV_low_latency2 extension commands
+    if (!strcmp("vkSetLatencySleepModeNV", name)) {
+        *addr = (void *)SetLatencySleepModeNV;
+        return true;
+    }
+    if (!strcmp("vkLatencySleepNV", name)) {
+        *addr = (void *)LatencySleepNV;
+        return true;
+    }
+    if (!strcmp("vkSetLatencyMarkerNV", name)) {
+        *addr = (void *)SetLatencyMarkerNV;
+        return true;
+    }
+    if (!strcmp("vkGetLatencyTimingsNV", name)) {
+        *addr = (void *)GetLatencyTimingsNV;
+        return true;
+    }
+    if (!strcmp("vkQueueNotifyOutOfBandNV", name)) {
+        *addr = (void *)QueueNotifyOutOfBandNV;
+        return true;
+    }
+
+    // ---- VK_EXT_attachment_feedback_loop_dynamic_state extension commands
+    if (!strcmp("vkCmdSetAttachmentFeedbackLoopEnableEXT", name)) {
+        *addr = (void *)CmdSetAttachmentFeedbackLoopEnableEXT;
+        return true;
+    }
+
+    // ---- VK_QNX_external_memory_screen_buffer extension commands
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    if (!strcmp("vkGetScreenBufferPropertiesQNX", name)) {
+        *addr = (void *)GetScreenBufferPropertiesQNX;
+        return true;
+    }
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+
     // ---- VK_KHR_acceleration_structure extension commands
     if (!strcmp("vkCreateAccelerationStructureKHR", name)) {
         *addr = (void *)CreateAccelerationStructureKHR;
@@ -9562,7 +11462,7 @@
             ptr_instance->enabled_known_extensions.ext_direct_mode_display = 1;
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
         } else if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME)) {
             ptr_instance->enabled_known_extensions.ext_acquire_xlib_display = 1;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
@@ -9594,80 +11494,80 @@
     // ---- VK_KHR_swapchain extension commands
     if (!strcmp(name, "CreateSwapchainKHR")) {
         *found_name = true;
-        return dev->extensions.khr_swapchain_enabled ?
+        return dev->driver_extensions.khr_swapchain_enabled ?
             (PFN_vkVoidFunction)terminator_CreateSwapchainKHR : NULL;
     }
     if (!strcmp(name, "GetDeviceGroupSurfacePresentModesKHR")) {
         *found_name = true;
-        return dev->extensions.khr_swapchain_enabled ?
+        return dev->driver_extensions.khr_swapchain_enabled ?
             (PFN_vkVoidFunction)terminator_GetDeviceGroupSurfacePresentModesKHR : NULL;
     }
     // ---- VK_KHR_display_swapchain extension commands
     if (!strcmp(name, "CreateSharedSwapchainsKHR")) {
         *found_name = true;
-        return dev->extensions.khr_display_swapchain_enabled ?
+        return dev->driver_extensions.khr_display_swapchain_enabled ?
             (PFN_vkVoidFunction)terminator_CreateSharedSwapchainsKHR : NULL;
     }
     // ---- VK_EXT_debug_marker extension commands
     if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_marker_enabled ?
+        return dev->driver_extensions.ext_debug_marker_enabled ?
             (PFN_vkVoidFunction)terminator_DebugMarkerSetObjectTagEXT : NULL;
     }
     if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_marker_enabled ?
+        return dev->driver_extensions.ext_debug_marker_enabled ?
             (PFN_vkVoidFunction)terminator_DebugMarkerSetObjectNameEXT : NULL;
     }
     // ---- VK_EXT_debug_utils extension commands
     if (!strcmp(name, "SetDebugUtilsObjectNameEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT : NULL;
     }
     if (!strcmp(name, "SetDebugUtilsObjectTagEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT : NULL;
     }
     if (!strcmp(name, "QueueBeginDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT : NULL;
     }
     if (!strcmp(name, "QueueEndDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT : NULL;
     }
     if (!strcmp(name, "QueueInsertDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT : NULL;
     }
     if (!strcmp(name, "CmdBeginDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT : NULL;
     }
     if (!strcmp(name, "CmdEndDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT : NULL;
     }
     if (!strcmp(name, "CmdInsertDebugUtilsLabelEXT")) {
         *found_name = true;
-        return dev->extensions.ext_debug_utils_enabled ?
+        return dev->driver_extensions.ext_debug_utils_enabled ?
             (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT : NULL;
     }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     // ---- VK_EXT_full_screen_exclusive extension commands
     if (!strcmp(name, "GetDeviceGroupSurfacePresentModes2EXT")) {
         *found_name = true;
-        return dev->extensions.ext_full_screen_exclusive_enabled && dev->extensions.khr_device_group_enabled ?
+        return dev->driver_extensions.ext_full_screen_exclusive_enabled && dev->driver_extensions.khr_device_group_enabled ?
             (PFN_vkVoidFunction)terminator_GetDeviceGroupSurfacePresentModes2EXT : NULL;
     }
-#endif // None
+#endif // VK_USE_PLATFORM_WIN32_KHR
     return NULL;
 }
 
@@ -9726,49 +11626,45 @@
     .CreateDisplayPlaneSurfaceKHR = terminator_CreateDisplayPlaneSurfaceKHR,
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     .CreateXlibSurfaceKHR = terminator_CreateXlibSurfaceKHR,
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     .GetPhysicalDeviceXlibPresentationSupportKHR = terminator_GetPhysicalDeviceXlibPresentationSupportKHR,
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     .CreateXcbSurfaceKHR = terminator_CreateXcbSurfaceKHR,
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     .GetPhysicalDeviceXcbPresentationSupportKHR = terminator_GetPhysicalDeviceXcbPresentationSupportKHR,
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     .CreateWaylandSurfaceKHR = terminator_CreateWaylandSurfaceKHR,
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     .GetPhysicalDeviceWaylandPresentationSupportKHR = terminator_GetPhysicalDeviceWaylandPresentationSupportKHR,
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     .CreateAndroidSurfaceKHR = terminator_CreateAndroidSurfaceKHR,
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     .CreateWin32SurfaceKHR = terminator_CreateWin32SurfaceKHR,
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     .GetPhysicalDeviceWin32PresentationSupportKHR = terminator_GetPhysicalDeviceWin32PresentationSupportKHR,
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     .GetPhysicalDeviceVideoCapabilitiesKHR = terminator_GetPhysicalDeviceVideoCapabilitiesKHR,
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     .GetPhysicalDeviceVideoFormatPropertiesKHR = terminator_GetPhysicalDeviceVideoFormatPropertiesKHR,
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     .GetPhysicalDeviceFeatures2KHR = terminator_GetPhysicalDeviceFeatures2,
@@ -9808,13 +11704,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     .GetPhysicalDeviceFragmentShadingRatesKHR = terminator_GetPhysicalDeviceFragmentShadingRatesKHR,
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    .GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = terminator_GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR,
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    .GetPhysicalDeviceCooperativeMatrixPropertiesKHR = terminator_GetPhysicalDeviceCooperativeMatrixPropertiesKHR,
+
     // ---- VK_EXT_debug_report extension commands
     .CreateDebugReportCallbackEXT = terminator_CreateDebugReportCallbackEXT,
     .DestroyDebugReportCallbackEXT = terminator_DestroyDebugReportCallbackEXT,
     .DebugReportMessageEXT = terminator_DebugReportMessageEXT,
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     .CreateStreamDescriptorSurfaceGGP = terminator_CreateStreamDescriptorSurfaceGGP,
 #endif // VK_USE_PLATFORM_GGP
 
@@ -9822,7 +11726,7 @@
     .GetPhysicalDeviceExternalImageFormatPropertiesNV = terminator_GetPhysicalDeviceExternalImageFormatPropertiesNV,
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     .CreateViSurfaceNN = terminator_CreateViSurfaceNN,
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -9830,10 +11734,10 @@
     .ReleaseDisplayEXT = terminator_ReleaseDisplayEXT,
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     .AcquireXlibDisplayEXT = terminator_AcquireXlibDisplayEXT,
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     .GetRandROutputDisplayEXT = terminator_GetRandROutputDisplayEXT,
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -9841,12 +11745,12 @@
     .GetPhysicalDeviceSurfaceCapabilities2EXT = terminator_GetPhysicalDeviceSurfaceCapabilities2EXT,
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     .CreateIOSSurfaceMVK = terminator_CreateIOSSurfaceMVK,
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     .CreateMacOSSurfaceMVK = terminator_CreateMacOSSurfaceMVK,
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -9862,12 +11766,12 @@
     .GetPhysicalDeviceCalibrateableTimeDomainsEXT = terminator_GetPhysicalDeviceCalibrateableTimeDomainsEXT,
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     .CreateImagePipeSurfaceFUCHSIA = terminator_CreateImagePipeSurfaceFUCHSIA,
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     .CreateMetalSurfaceEXT = terminator_CreateMetalSurfaceEXT,
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -9881,7 +11785,7 @@
     .GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = terminator_GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV,
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     .GetPhysicalDeviceSurfacePresentModes2EXT = terminator_GetPhysicalDeviceSurfacePresentModes2EXT,
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -9893,26 +11797,26 @@
     .GetDrmDisplayEXT = terminator_GetDrmDisplayEXT,
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     .AcquireWinrtDisplayNV = terminator_AcquireWinrtDisplayNV,
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     .GetWinrtDisplayNV = terminator_GetWinrtDisplayNV,
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     .CreateDirectFBSurfaceEXT = terminator_CreateDirectFBSurfaceEXT,
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     .GetPhysicalDeviceDirectFBPresentationSupportEXT = terminator_GetPhysicalDeviceDirectFBPresentationSupportEXT,
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     .CreateScreenSurfaceQNX = terminator_CreateScreenSurfaceQNX,
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     .GetPhysicalDeviceScreenPresentationSupportQNX = terminator_GetPhysicalDeviceScreenPresentationSupportQNX,
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -9927,16 +11831,16 @@
 const char *const LOADER_INSTANCE_EXTENSIONS[] = {
                                                   VK_KHR_SURFACE_EXTENSION_NAME,
                                                   VK_KHR_DISPLAY_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
                                                   VK_KHR_XLIB_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
                                                   VK_KHR_XCB_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
                                                   VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
                                                   VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_WIN32_KHR
                                                   VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
@@ -9949,42 +11853,44 @@
                                                   VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME,
                                                   VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
                                                   VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
                                                   VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_GGP
                                                   VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
                                                   VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
                                                   VK_NN_VI_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_VI_NN
                                                   VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
                                                   VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
                                                   VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME,
                                                   VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
                                                   VK_MVK_IOS_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
                                                   VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_MACOS_MVK
                                                   VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
                                                   VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
                                                   VK_EXT_METAL_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_METAL_EXT
                                                   VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME,
                                                   VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME,
+                                                  VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME,
                                                   VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME,
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
                                                   VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
                                                   VK_QNX_SCREEN_SURFACE_EXTENSION_NAME,
 #endif // VK_USE_PLATFORM_SCREEN_QNX
                                                   VK_GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME,
+                                                  VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME,
                                                   NULL };
 
diff --git a/loader/generated/vk_loader_extensions.h b/loader/generated/vk_loader_extensions.h
index dfdb42b..ca8bbd2 100644
--- a/loader/generated/vk_loader_extensions.h
+++ b/loader/generated/vk_loader_extensions.h
@@ -77,7 +77,7 @@
                                                                          VkInstance inst);
 
 // Device command lookup function
-VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name);
+VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name, bool* name_found);
 
 // Instance command lookup function
 VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table, const char *name,
@@ -262,49 +262,45 @@
     PFN_vkCreateDisplayPlaneSurfaceKHR CreateDisplayPlaneSurfaceKHR;
 
     // ---- VK_KHR_xlib_surface extension commands
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     PFN_vkCreateXlibSurfaceKHR CreateXlibSurfaceKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XLIB_KHR
 
     // ---- VK_KHR_xcb_surface extension commands
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     PFN_vkCreateXcbSurfaceKHR CreateXcbSurfaceKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_XCB_KHR
 
     // ---- VK_KHR_wayland_surface extension commands
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     PFN_vkCreateWaylandSurfaceKHR CreateWaylandSurfaceKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR GetPhysicalDeviceWaylandPresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WAYLAND_KHR
 
     // ---- VK_KHR_android_surface extension commands
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR;
 #endif // VK_USE_PLATFORM_ANDROID_KHR
 
     // ---- VK_KHR_win32_surface extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkCreateWin32SurfaceKHR CreateWin32SurfaceKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_KHR_video_queue extension commands
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR GetPhysicalDeviceVideoCapabilitiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
-#ifdef VK_ENABLE_BETA_EXTENSIONS
     PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR GetPhysicalDeviceVideoFormatPropertiesKHR;
-#endif // VK_ENABLE_BETA_EXTENSIONS
 
     // ---- VK_KHR_get_physical_device_properties2 extension commands
     PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR;
@@ -344,13 +340,21 @@
     // ---- VK_KHR_fragment_shading_rate extension commands
     PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR GetPhysicalDeviceFragmentShadingRatesKHR;
 
+    // ---- VK_KHR_video_encode_queue extension commands
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR;
+#endif // VK_ENABLE_BETA_EXTENSIONS
+
+    // ---- VK_KHR_cooperative_matrix extension commands
+    PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR GetPhysicalDeviceCooperativeMatrixPropertiesKHR;
+
     // ---- VK_EXT_debug_report extension commands
     PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
     PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
     PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
 
     // ---- VK_GGP_stream_descriptor_surface extension commands
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     PFN_vkCreateStreamDescriptorSurfaceGGP CreateStreamDescriptorSurfaceGGP;
 #endif // VK_USE_PLATFORM_GGP
 
@@ -358,7 +362,7 @@
     PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV GetPhysicalDeviceExternalImageFormatPropertiesNV;
 
     // ---- VK_NN_vi_surface extension commands
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     PFN_vkCreateViSurfaceNN CreateViSurfaceNN;
 #endif // VK_USE_PLATFORM_VI_NN
 
@@ -366,10 +370,10 @@
     PFN_vkReleaseDisplayEXT ReleaseDisplayEXT;
 
     // ---- VK_EXT_acquire_xlib_display extension commands
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     PFN_vkAcquireXlibDisplayEXT AcquireXlibDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
     PFN_vkGetRandROutputDisplayEXT GetRandROutputDisplayEXT;
 #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
@@ -377,12 +381,12 @@
     PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT GetPhysicalDeviceSurfaceCapabilities2EXT;
 
     // ---- VK_MVK_ios_surface extension commands
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     PFN_vkCreateIOSSurfaceMVK CreateIOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_IOS_MVK
 
     // ---- VK_MVK_macos_surface extension commands
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK;
 #endif // VK_USE_PLATFORM_MACOS_MVK
 
@@ -398,12 +402,12 @@
     PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT GetPhysicalDeviceCalibrateableTimeDomainsEXT;
 
     // ---- VK_FUCHSIA_imagepipe_surface extension commands
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkCreateImagePipeSurfaceFUCHSIA CreateImagePipeSurfaceFUCHSIA;
 #endif // VK_USE_PLATFORM_FUCHSIA
 
     // ---- VK_EXT_metal_surface extension commands
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     PFN_vkCreateMetalSurfaceEXT CreateMetalSurfaceEXT;
 #endif // VK_USE_PLATFORM_METAL_EXT
 
@@ -417,7 +421,7 @@
     PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
 
     // ---- VK_EXT_full_screen_exclusive extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT GetPhysicalDeviceSurfacePresentModes2EXT;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
@@ -429,26 +433,26 @@
     PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT;
 
     // ---- VK_NV_acquire_winrt_display extension commands
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkAcquireWinrtDisplayNV AcquireWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkGetWinrtDisplayNV GetWinrtDisplayNV;
 #endif // VK_USE_PLATFORM_WIN32_KHR
 
     // ---- VK_EXT_directfb_surface extension commands
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     PFN_vkCreateDirectFBSurfaceEXT CreateDirectFBSurfaceEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT GetPhysicalDeviceDirectFBPresentationSupportEXT;
 #endif // VK_USE_PLATFORM_DIRECTFB_EXT
 
     // ---- VK_QNX_screen_surface extension commands
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     PFN_vkCreateScreenSurfaceQNX CreateScreenSurfaceQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX GetPhysicalDeviceScreenPresentationSupportQNX;
 #endif // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -491,10 +495,10 @@
     PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT;
     PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT;
     PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     // ---- VK_EXT_full_screen_exclusive extension commands
     PFN_vkGetDeviceGroupSurfacePresentModes2EXT GetDeviceGroupSurfacePresentModes2EXT;
-#endif // None
+#endif // VK_USE_PLATFORM_WIN32_KHR
 }; 
 
 
diff --git a/loader/generated/vk_object_types.h b/loader/generated/vk_object_types.h
index 5c18a2c..86a48a9 100644
--- a/loader/generated/vk_object_types.h
+++ b/loader/generated/vk_object_types.h
@@ -80,11 +80,12 @@
     kVulkanObjectTypeAccelerationStructureNV = 41,
     kVulkanObjectTypePerformanceConfigurationINTEL = 42,
     kVulkanObjectTypeIndirectCommandsLayoutNV = 43,
-    kVulkanObjectTypeBufferCollectionFUCHSIA = 44,
-    kVulkanObjectTypeMicromapEXT = 45,
-    kVulkanObjectTypeOpticalFlowSessionNV = 46,
-    kVulkanObjectTypeAccelerationStructureKHR = 47,
-    kVulkanObjectTypeMax = 48,
+    kVulkanObjectTypeAccelerationStructureKHR = 44,
+    kVulkanObjectTypeBufferCollectionFUCHSIA = 45,
+    kVulkanObjectTypeMicromapEXT = 46,
+    kVulkanObjectTypeOpticalFlowSessionNV = 47,
+    kVulkanObjectTypeShaderEXT = 48,
+    kVulkanObjectTypeMax = 49,
     // Aliases for backwards compatibilty of "promoted" types
     kVulkanObjectTypeDescriptorUpdateTemplateKHR = kVulkanObjectTypeDescriptorUpdateTemplate,
     kVulkanObjectTypeSamplerYcbcrConversionKHR = kVulkanObjectTypeSamplerYcbcrConversion,
@@ -137,10 +138,11 @@
     "AccelerationStructureNV",
     "PerformanceConfigurationINTEL",
     "IndirectCommandsLayoutNV",
+    "AccelerationStructureKHR",
     "BufferCollectionFUCHSIA",
     "MicromapEXT",
     "OpticalFlowSessionNV",
-    "AccelerationStructureKHR",
+    "ShaderEXT",
 };
 
 // Helper array to get Vulkan VK_EXT_debug_report object type enum from the internal layers version
@@ -189,10 +191,11 @@
     VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT,   // kVulkanObjectTypeAccelerationStructureNV
     VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,   // kVulkanObjectTypePerformanceConfigurationINTEL
     VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,   // kVulkanObjectTypeIndirectCommandsLayoutNV
+    VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT,   // kVulkanObjectTypeAccelerationStructureKHR
     VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT,   // kVulkanObjectTypeBufferCollectionFUCHSIA
     VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,   // kVulkanObjectTypeMicromapEXT
     VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,   // kVulkanObjectTypeOpticalFlowSessionNV
-    VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT,   // kVulkanObjectTypeAccelerationStructureKHR
+    VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT,   // kVulkanObjectTypeShaderEXT
 };
 
 // Helper array to get Official Vulkan VkObjectType enum from the internal layers version
@@ -241,10 +244,11 @@
     VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV,   // kVulkanObjectTypeAccelerationStructureNV
     VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL,   // kVulkanObjectTypePerformanceConfigurationINTEL
     VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV,   // kVulkanObjectTypeIndirectCommandsLayoutNV
+    VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR,   // kVulkanObjectTypeAccelerationStructureKHR
     VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA,   // kVulkanObjectTypeBufferCollectionFUCHSIA
     VK_OBJECT_TYPE_MICROMAP_EXT,   // kVulkanObjectTypeMicromapEXT
     VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV,   // kVulkanObjectTypeOpticalFlowSessionNV
-    VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR,   // kVulkanObjectTypeAccelerationStructureKHR
+    VK_OBJECT_TYPE_SHADER_EXT,   // kVulkanObjectTypeShaderEXT
 };
 
 // Helper function to convert from VkDebugReportObjectTypeEXT to VkObjectType
diff --git a/loader/gpa_helper.c b/loader/gpa_helper.c
index 2dea285..b0aeb5c 100644
--- a/loader/gpa_helper.c
+++ b/loader/gpa_helper.c
@@ -278,17 +278,3 @@
 
     return NULL;
 }
-
-void *loader_non_passthrough_gdpa(const char *name) {
-    if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
-
-    name += 2;
-
-    if (!strcmp(name, "GetDeviceProcAddr")) return vkGetDeviceProcAddr;
-    if (!strcmp(name, "DestroyDevice")) return vkDestroyDevice;
-    if (!strcmp(name, "GetDeviceQueue")) return vkGetDeviceQueue;
-    if (!strcmp(name, "GetDeviceQueue2")) return vkGetDeviceQueue2;
-    if (!strcmp(name, "AllocateCommandBuffers")) return vkAllocateCommandBuffers;
-
-    return NULL;
-}
diff --git a/loader/gpa_helper.h b/loader/gpa_helper.h
index ecc5ec3..12f1d6a 100644
--- a/loader/gpa_helper.h
+++ b/loader/gpa_helper.h
@@ -27,5 +27,3 @@
 void *trampoline_get_proc_addr(struct loader_instance *inst, const char *funcName);
 
 void *globalGetProcAddr(const char *name);
-
-void *loader_non_passthrough_gdpa(const char *name);
\ No newline at end of file
diff --git a/loader/loader.aps b/loader/loader.aps
deleted file mode 100644
index 1ba7f21..0000000
--- a/loader/loader.aps
+++ /dev/null
Binary files differ
diff --git a/loader/loader.c b/loader/loader.c
index 320e0a7..29eac46 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1,8 +1,8 @@
 /*
  *
- * Copyright (c) 2014-2022 The Khronos Group Inc.
- * Copyright (c) 2014-2022 Valve Corporation
- * Copyright (c) 2014-2022 LunarG, Inc.
+ * Copyright (c) 2014-2023 The Khronos Group Inc.
+ * Copyright (c) 2014-2023 Valve Corporation
+ * Copyright (c) 2014-2023 LunarG, Inc.
  * Copyright (C) 2015 Google Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -46,8 +46,10 @@
 #include <sys/types.h>
 #if defined(_WIN32)
 #include "dirent_on_windows.h"
-#else  // _WIN32
+#elif COMMON_UNIX_PLATFORMS
 #include <dirent.h>
+#else
+#warning dirent.h not available on this platform
 #endif  // _WIN32
 
 #include "allocation.h"
@@ -63,7 +65,7 @@
 #if defined(WIN32)
 #include "loader_windows.h"
 #endif
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
 // This header is currently only used when sorting Linux devices, so don't include it otherwise.
 #include "loader_linux.h"
 #endif  // LOADER_ENABLE_LINUX_SORT
@@ -89,7 +91,6 @@
 // all entrypoints on the instance chain need to be locked except GPA
 // additionally CreateDevice and DestroyDevice needs to be locked
 loader_platform_thread_mutex loader_lock;
-loader_platform_thread_mutex loader_json_lock;
 loader_platform_thread_mutex loader_preload_icd_lock;
 loader_platform_thread_mutex loader_global_instance_list_lock;
 
@@ -98,7 +99,11 @@
 // functionality, but the fact that the libraries already been loaded causes any call that needs to load ICD libraries to speed up
 // significantly. This can have a huge impact when making repeated calls to vkEnumerateInstanceExtensionProperties and
 // vkCreateInstance.
-static struct loader_icd_tramp_list scanned_icds;
+struct loader_icd_tramp_list scanned_icds;
+
+// controls whether loader_platform_close_library() closes the libraries or not - controlled by an environment
+// variables - this is just the definition of the variable, usage is in vk_loader_platform.h
+bool loader_disable_dynamic_library_unloading;
 
 LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_init);
 
@@ -132,7 +137,7 @@
 bool loader_check_version_meets_required(loader_api_version required, loader_api_version version) {
     // major version is satisfied
     return (version.major > required.major) ||
-           // major version is equal, minor version is patch version is gerater to minimum minor
+           // major version is equal, minor version is patch version is greater to minimum minor
            (version.major == required.major && version.minor > required.minor) ||
            // major and minor version are equal, patch version is greater or equal to minimum patch
            (version.major == required.major && version.minor == required.minor && version.patch >= required.patch);
@@ -143,19 +148,25 @@
 DIR *loader_opendir(const struct loader_instance *instance, const char *name) {
 #if defined(_WIN32)
     return opendir(instance ? &instance->alloc_callbacks : NULL, name);
-#else   // _WIN32
+#elif COMMON_UNIX_PLATFORMS
+    (void)instance;
     return opendir(name);
+#else
+#warning dirent.h - opendir not available on this platform
 #endif  // _WIN32
 }
 int loader_closedir(const struct loader_instance *instance, DIR *dir) {
 #if defined(_WIN32)
     return closedir(instance ? &instance->alloc_callbacks : NULL, dir);
-#else   // _WIN32
+#elif COMMON_UNIX_PLATFORMS
+    (void)instance;
     return closedir(dir);
+#else
+#warning dirent.h - closedir not available on this platform
 #endif  // _WIN32
 }
 
-static bool is_json(const char *path, size_t len) {
+bool is_json(const char *path, size_t len) {
     if (len < 5) {
         return false;
     }
@@ -175,6 +186,14 @@
         if (NULL != lib_status) {
             *lib_status = LOADER_LAYER_LIB_ERROR_WRONG_BIT_TYPE;
         }
+    }
+    // Check if the error is due to lack of memory
+    // "with error 8" is the windows error code for OOM cases, aka ERROR_NOT_ENOUGH_MEMORY
+    // Linux doesn't have such a nice error message - only if there are reported issues should this be called
+    else if (strstr(error_message, " with error 8") != NULL) {
+        if (NULL != lib_status) {
+            *lib_status = LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY;
+        }
     } else if (NULL != lib_status) {
         *lib_status = LOADER_LAYER_LIB_ERROR_FAILED_TO_LOAD;
     }
@@ -203,95 +222,140 @@
 }
 
 void loader_free_layer_properties(const struct loader_instance *inst, struct loader_layer_properties *layer_properties) {
-    loader_instance_heap_free(inst, layer_properties->component_layer_names);
-    loader_instance_heap_free(inst, layer_properties->override_paths);
-    loader_instance_heap_free(inst, layer_properties->blacklist_layer_names);
-    loader_instance_heap_free(inst, layer_properties->app_key_paths);
-
+    loader_instance_heap_free(inst, layer_properties->manifest_file_name);
+    loader_instance_heap_free(inst, layer_properties->lib_name);
+    loader_instance_heap_free(inst, layer_properties->functions.str_gipa);
+    loader_instance_heap_free(inst, layer_properties->functions.str_gdpa);
+    loader_instance_heap_free(inst, layer_properties->functions.str_negotiate_interface);
     loader_destroy_generic_list(inst, (struct loader_generic_list *)&layer_properties->instance_extension_list);
-
     if (layer_properties->device_extension_list.capacity > 0 && NULL != layer_properties->device_extension_list.list) {
         for (uint32_t i = 0; i < layer_properties->device_extension_list.count; i++) {
-            struct loader_dev_ext_props *ext_props = &layer_properties->device_extension_list.list[i];
-            if (ext_props->entrypoint_count > 0) {
-                for (uint32_t j = 0; j < ext_props->entrypoint_count; j++) {
-                    loader_instance_heap_free(inst, ext_props->entrypoints[j]);
-                }
-                loader_instance_heap_free(inst, ext_props->entrypoints);
-            }
+            free_string_list(inst, &layer_properties->device_extension_list.list[i].entrypoints);
         }
     }
     loader_destroy_generic_list(inst, (struct loader_generic_list *)&layer_properties->device_extension_list);
+    loader_instance_heap_free(inst, layer_properties->disable_env_var.name);
+    loader_instance_heap_free(inst, layer_properties->disable_env_var.value);
+    loader_instance_heap_free(inst, layer_properties->enable_env_var.name);
+    loader_instance_heap_free(inst, layer_properties->enable_env_var.value);
+    free_string_list(inst, &layer_properties->component_layer_names);
+    loader_instance_heap_free(inst, layer_properties->pre_instance_functions.enumerate_instance_extension_properties);
+    loader_instance_heap_free(inst, layer_properties->pre_instance_functions.enumerate_instance_layer_properties);
+    loader_instance_heap_free(inst, layer_properties->pre_instance_functions.enumerate_instance_version);
+    free_string_list(inst, &layer_properties->override_paths);
+    free_string_list(inst, &layer_properties->blacklist_layer_names);
+    free_string_list(inst, &layer_properties->app_key_paths);
 
     // Make sure to clear out the removed layer, in case new layers are added in the previous location
     memset(layer_properties, 0, sizeof(struct loader_layer_properties));
 }
 
-// Combine path elements, separating each element with the platform-specific
-// directory separator, and save the combined string to a destination buffer,
-// not exceeding the given length. Path elements are given as variable args,
-// with a NULL element terminating the list.
-//
-// \returns the total length of the combined string, not including an ASCII
-// NUL termination character. This length may exceed the available storage:
-// in this case, the written string will be truncated to avoid a buffer
-// overrun, and the return value will greater than or equal to the storage
-// size. A NULL argument may be provided as the destination buffer in order
-// to determine the required string length without actually writing a string.
-static size_t loader_platform_combine_path(char *dest, size_t len, ...) {
-    size_t required_len = 0;
-    va_list ap;
-    const char *component;
-
-    va_start(ap, len);
-    component = va_arg(ap, const char *);
-    while (component) {
-        if (required_len > 0) {
-            // This path element is not the first non-empty element; prepend
-            // a directory separator if space allows
-            if (dest && required_len + 1 < len) {
-                (void)snprintf(dest + required_len, len - required_len, "%c", DIRECTORY_SYMBOL);
-            }
-            required_len++;
+VkResult loader_init_library_list(struct loader_layer_list *instance_layers, loader_platform_dl_handle **libs) {
+    if (instance_layers->count > 0) {
+        *libs = loader_calloc(NULL, sizeof(loader_platform_dl_handle) * instance_layers->count, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+        if (*libs == NULL) {
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
         }
+    }
+    return VK_SUCCESS;
+}
 
-        if (dest && required_len < len) {
-            strncpy(dest + required_len, component, len - required_len);
+VkResult loader_copy_to_new_str(const struct loader_instance *inst, const char *source_str, char **dest_str) {
+    assert(source_str && dest_str);
+    size_t str_len = strlen(source_str) + 1;
+    *dest_str = loader_instance_heap_calloc(inst, str_len, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == *dest_str) return VK_ERROR_OUT_OF_HOST_MEMORY;
+    loader_strncpy(*dest_str, str_len, source_str, str_len);
+    (*dest_str)[str_len - 1] = 0;
+    return VK_SUCCESS;
+}
+
+VkResult create_string_list(const struct loader_instance *inst, uint32_t allocated_count, struct loader_string_list *string_list) {
+    assert(string_list);
+    string_list->list = loader_instance_heap_calloc(inst, sizeof(char *) * allocated_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == string_list->list) {
+        return VK_ERROR_OUT_OF_HOST_MEMORY;
+    }
+    string_list->allocated_count = allocated_count;
+    string_list->count = 0;
+    return VK_SUCCESS;
+}
+
+VkResult append_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, char *str) {
+    assert(string_list && str);
+    if (string_list->allocated_count == 0) {
+        string_list->allocated_count = 32;
+        string_list->list =
+            loader_instance_heap_calloc(inst, sizeof(char *) * string_list->allocated_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+        if (NULL == string_list->list) {
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
         }
-        required_len += strlen(component);
-        component = va_arg(ap, const char *);
+    } else if (string_list->count + 1 > string_list->allocated_count) {
+        uint32_t new_allocated_count = string_list->allocated_count * 2;
+        string_list->list = loader_instance_heap_realloc(inst, string_list->list, sizeof(char *) * string_list->allocated_count,
+                                                         sizeof(char *) * new_allocated_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+        if (NULL == string_list->list) {
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
+        }
+        // Null out the new space
+        memset(string_list->list + string_list->allocated_count, 0, string_list->allocated_count);
+        string_list->allocated_count *= 2;
     }
+    string_list->list[string_list->count++] = str;
+    return VK_SUCCESS;
+}
 
-    va_end(ap);
-
-    // strncpy(3) won't add a NUL terminating byte in the event of truncation.
-    if (dest && required_len >= len) {
-        dest[len - 1] = '\0';
+VkResult copy_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, const char *str,
+                                 size_t str_len) {
+    assert(string_list && str);
+    char *new_str = loader_instance_heap_calloc(inst, sizeof(char *) * str_len + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == new_str) {
+        return VK_ERROR_OUT_OF_HOST_MEMORY;
     }
+    loader_strncpy(new_str, sizeof(char *) * str_len + 1, str, str_len);
+    new_str[str_len] = '\0';
+    VkResult res = append_str_to_string_list(inst, string_list, new_str);
+    if (res != VK_SUCCESS) {
+        // Cleanup new_str if the append failed - as append_str_to_string_list takes ownership but not if the function fails
+        loader_instance_heap_free(inst, new_str);
+    }
+    return res;
+}
 
-    return required_len;
+void free_string_list(const struct loader_instance *inst, struct loader_string_list *string_list) {
+    assert(string_list);
+    if (string_list->list) {
+        for (uint32_t i = 0; i < string_list->count; i++) {
+            loader_instance_heap_free(inst, string_list->list[i]);
+            string_list->list[i] = NULL;
+        }
+        loader_instance_heap_free(inst, string_list->list);
+        string_list->list = NULL;
+    }
+    string_list->count = 0;
+    string_list->allocated_count = 0;
 }
 
 // Given string of three part form "maj.min.pat" convert to a vulkan version number.
 // Also can understand four part form "variant.major.minor.patch" if provided.
-static uint32_t loader_parse_version_string(char *vers_str) {
+uint32_t loader_parse_version_string(char *vers_str) {
     uint32_t variant = 0, major = 0, minor = 0, patch = 0;
     char *vers_tok;
-
+    char *context = NULL;
     if (!vers_str) {
         return 0;
     }
 
-    vers_tok = strtok(vers_str, ".\"\n\r");
+    vers_tok = thread_safe_strtok(vers_str, ".\"\n\r", &context);
     if (NULL != vers_tok) {
         major = (uint16_t)atoi(vers_tok);
-        vers_tok = strtok(NULL, ".\"\n\r");
+        vers_tok = thread_safe_strtok(NULL, ".\"\n\r", &context);
         if (NULL != vers_tok) {
             minor = (uint16_t)atoi(vers_tok);
-            vers_tok = strtok(NULL, ".\"\n\r");
+            vers_tok = thread_safe_strtok(NULL, ".\"\n\r", &context);
             if (NULL != vers_tok) {
                 patch = (uint16_t)atoi(vers_tok);
-                vers_tok = strtok(NULL, ".\"\n\r");
+                vers_tok = thread_safe_strtok(NULL, ".\"\n\r", &context);
                 // check that we are using a 4 part version string
                 if (NULL != vers_tok) {
                     // if we are, move the values over into the correct place
@@ -336,18 +400,14 @@
     return false;
 }
 
-// Get the next unused layer property in the list. Init the property to zero.
-static struct loader_layer_properties *loader_get_next_layer_property_slot(const struct loader_instance *inst,
-                                                                           struct loader_layer_list *layer_list) {
+VkResult loader_append_layer_property(const struct loader_instance *inst, struct loader_layer_list *layer_list,
+                                      struct loader_layer_properties *layer_property) {
+    VkResult res = VK_SUCCESS;
     if (layer_list->capacity == 0) {
-        layer_list->list =
-            loader_instance_heap_calloc(inst, sizeof(struct loader_layer_properties) * 64, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-        if (layer_list->list == NULL) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "loader_get_next_layer_property_slot: Out of memory can not add any layer properties to list");
-            return NULL;
+        res = loader_init_generic_list(inst, (struct loader_generic_list *)layer_list, sizeof(struct loader_layer_properties));
+        if (VK_SUCCESS != res) {
+            goto out;
         }
-        layer_list->capacity = sizeof(struct loader_layer_properties) * 64;
     }
 
     // Ensure enough room to add an entry
@@ -355,20 +415,26 @@
         void *new_ptr = loader_instance_heap_realloc(inst, layer_list->list, layer_list->capacity, layer_list->capacity * 2,
                                                      VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
         if (NULL == new_ptr) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_next_layer_property_slot: realloc failed for layer list");
-            return NULL;
+            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_append_layer_property: realloc failed for layer list");
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
         }
         layer_list->list = new_ptr;
         memset((uint8_t *)layer_list->list + layer_list->capacity, 0, layer_list->capacity);
         layer_list->capacity *= 2;
     }
-
+    memcpy(&layer_list->list[layer_list->count], layer_property, sizeof(struct loader_layer_properties));
     layer_list->count++;
-    return &(layer_list->list[layer_list->count - 1]);
+    memset(layer_property, 0, sizeof(struct loader_layer_properties));
+out:
+    if (res != VK_SUCCESS) {
+        loader_free_layer_properties(inst, layer_property);
+    }
+    return res;
 }
 
 // Search the given layer list for a layer property matching the given layer name
-static struct loader_layer_properties *loader_find_layer_property(const char *name, const struct loader_layer_list *layer_list) {
+struct loader_layer_properties *loader_find_layer_property(const char *name, const struct loader_layer_list *layer_list) {
     for (uint32_t i = 0; i < layer_list->count; i++) {
         const VkLayerProperties *item = &layer_list->list[i].info;
         if (strcmp(name, item->layerName) == 0) return &layer_list->list[i];
@@ -376,27 +442,35 @@
     return NULL;
 }
 
+struct loader_layer_properties *loader_find_pointer_layer_property(const char *name,
+                                                                   const struct loader_pointer_layer_list *layer_list) {
+    for (uint32_t i = 0; i < layer_list->count; i++) {
+        const VkLayerProperties *item = &layer_list->list[i]->info;
+        if (strcmp(name, item->layerName) == 0) return layer_list->list[i];
+    }
+    return NULL;
+}
+
 // Search the given layer list for a layer matching the given layer name
-static bool loader_find_layer_name_in_list(const char *name, const struct loader_layer_list *layer_list) {
+bool loader_find_layer_name_in_list(const char *name, const struct loader_pointer_layer_list *layer_list) {
     if (NULL == layer_list) {
         return false;
     }
-    if (NULL != loader_find_layer_property(name, layer_list)) {
+    if (NULL != loader_find_pointer_layer_property(name, layer_list)) {
         return true;
     }
     return false;
 }
 
 // Search the given meta-layer's component list for a layer matching the given layer name
-static bool loader_find_layer_name_in_meta_layer(const struct loader_instance *inst, const char *layer_name,
-                                                 struct loader_layer_list *layer_list,
-                                                 struct loader_layer_properties *meta_layer_props) {
-    for (uint32_t comp_layer = 0; comp_layer < meta_layer_props->num_component_layers; comp_layer++) {
-        if (!strcmp(meta_layer_props->component_layer_names[comp_layer], layer_name)) {
+bool loader_find_layer_name_in_meta_layer(const struct loader_instance *inst, const char *layer_name,
+                                          struct loader_layer_list *layer_list, struct loader_layer_properties *meta_layer_props) {
+    for (uint32_t comp_layer = 0; comp_layer < meta_layer_props->component_layer_names.count; comp_layer++) {
+        if (!strcmp(meta_layer_props->component_layer_names.list[comp_layer], layer_name)) {
             return true;
         }
         struct loader_layer_properties *comp_layer_props =
-            loader_find_layer_property(meta_layer_props->component_layer_names[comp_layer], layer_list);
+            loader_find_layer_property(meta_layer_props->component_layer_names.list[comp_layer], layer_list);
         if (comp_layer_props->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
             return loader_find_layer_name_in_meta_layer(inst, layer_name, layer_list, comp_layer_props);
         }
@@ -405,11 +479,9 @@
 }
 
 // Search the override layer's blacklist for a layer matching the given layer name
-static bool loader_find_layer_name_in_blacklist(const struct loader_instance *inst, const char *layer_name,
-                                                struct loader_layer_list *layer_list,
-                                                struct loader_layer_properties *meta_layer_props) {
-    for (uint32_t black_layer = 0; black_layer < meta_layer_props->num_blacklist_layers; ++black_layer) {
-        if (!strcmp(meta_layer_props->blacklist_layer_names[black_layer], layer_name)) {
+bool loader_find_layer_name_in_blacklist(const char *layer_name, struct loader_layer_properties *meta_layer_props) {
+    for (uint32_t black_layer = 0; black_layer < meta_layer_props->blacklist_layer_names.count; ++black_layer) {
+        if (!strcmp(meta_layer_props->blacklist_layer_names.list[black_layer], layer_name)) {
             return true;
         }
     }
@@ -422,6 +494,12 @@
     if (!layer_list) return;
 
     for (i = 0; i < layer_list->count; i++) {
+        if (layer_list->list[i].lib_handle) {
+            loader_platform_close_library(layer_list->list[i].lib_handle);
+            loader_log(inst, VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Unloading layer library %s",
+                       layer_list->list[i].lib_name);
+            layer_list->list[i].lib_handle = NULL;
+        }
         loader_free_layer_properties(inst, &(layer_list->list[i]));
     }
     layer_list->count = 0;
@@ -467,7 +545,7 @@
         }
 
         // If found in the override layer's blacklist, remove it
-        if (loader_find_layer_name_in_blacklist(inst, cur_layer_name, layer_list, override_prop)) {
+        if (loader_find_layer_name_in_blacklist(cur_layer_name, override_prop)) {
             loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0,
                        "loader_remove_layers_in_blacklist: Override layer is active and layer %s is in the blacklist inside of it. "
                        "Removing that layer from current layer list.",
@@ -530,9 +608,9 @@
     }
 }
 
-static VkResult loader_add_instance_extensions(const struct loader_instance *inst,
-                                               const PFN_vkEnumerateInstanceExtensionProperties fp_get_props, const char *lib_name,
-                                               struct loader_extension_list *ext_list) {
+VkResult loader_add_instance_extensions(const struct loader_instance *inst,
+                                        const PFN_vkEnumerateInstanceExtensionProperties fp_get_props, const char *lib_name,
+                                        struct loader_extension_list *ext_list) {
     uint32_t i, count = 0;
     VkExtensionProperties *ext_props;
     VkResult res = VK_SUCCESS;
@@ -644,15 +722,13 @@
     loader_instance_heap_free(inst, list->list);
     list->count = 0;
     list->capacity = 0;
+    list->list = NULL;
 }
 
 // Append non-duplicate extension properties defined in props to the given ext_list.
 // Return - Vk_SUCCESS on success
 VkResult loader_add_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list,
                                 uint32_t prop_list_count, const VkExtensionProperties *props) {
-    uint32_t i;
-    const VkExtensionProperties *cur_ext;
-
     if (ext_list->list == NULL || ext_list->capacity == 0) {
         VkResult res = loader_init_generic_list(inst, (struct loader_generic_list *)ext_list, sizeof(VkExtensionProperties));
         if (VK_SUCCESS != res) {
@@ -660,8 +736,8 @@
         }
     }
 
-    for (i = 0; i < prop_list_count; i++) {
-        cur_ext = &props[i];
+    for (uint32_t i = 0; i < prop_list_count; i++) {
+        const VkExtensionProperties *cur_ext = &props[i];
 
         // look for duplicates
         if (has_vk_extension_property(cur_ext, ext_list)) {
@@ -692,23 +768,25 @@
 
 // Append one extension property defined in props with entrypoints defined in entries to the given
 // ext_list. Do not append if a duplicate.
-// Return - Vk_SUCCESS on success
+// If this is a duplicate, this function free's the passed in entries - as in it takes ownership over that list (if it is not
+// NULL) Return - Vk_SUCCESS on success
 VkResult loader_add_to_dev_ext_list(const struct loader_instance *inst, struct loader_device_extension_list *ext_list,
-                                    const VkExtensionProperties *props, uint32_t entry_count, char **entrys) {
-    uint32_t idx;
+                                    const VkExtensionProperties *props, struct loader_string_list *entrys) {
+    VkResult res = VK_SUCCESS;
+    bool should_free_entrys = true;
     if (ext_list->list == NULL || ext_list->capacity == 0) {
-        VkResult res = loader_init_generic_list(inst, (struct loader_generic_list *)ext_list, sizeof(struct loader_dev_ext_props));
+        res = loader_init_generic_list(inst, (struct loader_generic_list *)ext_list, sizeof(struct loader_dev_ext_props));
         if (VK_SUCCESS != res) {
-            return res;
+            goto out;
         }
     }
 
     // look for duplicates
     if (has_vk_dev_ext_property(props, ext_list)) {
-        return VK_SUCCESS;
+        goto out;
     }
 
-    idx = ext_list->count;
+    uint32_t idx = ext_list->count;
     // add to list at end
     // check for enough capacity
     if (idx * sizeof(struct loader_dev_ext_props) >= ext_list->capacity) {
@@ -718,7 +796,8 @@
         if (NULL == new_ptr) {
             loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                        "loader_add_to_dev_ext_list: Failed to reallocate space for device extension list");
-            return VK_ERROR_OUT_OF_HOST_MEMORY;
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
         }
         ext_list->list = new_ptr;
 
@@ -727,43 +806,21 @@
     }
 
     memcpy(&ext_list->list[idx].props, props, sizeof(*props));
-    ext_list->list[idx].entrypoint_count = entry_count;
-    if (entry_count == 0) {
-        ext_list->list[idx].entrypoints = NULL;
-    } else {
-        ext_list->list[idx].entrypoints =
-            loader_instance_heap_alloc(inst, sizeof(char *) * entry_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-        if (ext_list->list[idx].entrypoints == NULL) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "loader_add_to_dev_ext_list: Failed to allocate space for device extension entrypoint list in list %d", idx);
-            ext_list->list[idx].entrypoint_count = 0;
-            return VK_ERROR_OUT_OF_HOST_MEMORY;
-        }
-        for (uint32_t i = 0; i < entry_count; i++) {
-            ext_list->list[idx].entrypoints[i] =
-                loader_instance_heap_alloc(inst, strlen(entrys[i]) + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-            if (ext_list->list[idx].entrypoints[i] == NULL) {
-                for (uint32_t j = 0; j < i; j++) {
-                    loader_instance_heap_free(inst, ext_list->list[idx].entrypoints[j]);
-                }
-                loader_instance_heap_free(inst, ext_list->list[idx].entrypoints);
-                ext_list->list[idx].entrypoint_count = 0;
-                ext_list->list[idx].entrypoints = NULL;
-                loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                           "loader_add_to_dev_ext_list: Failed to allocate space for device extension entrypoint %d name", i);
-                return VK_ERROR_OUT_OF_HOST_MEMORY;
-            }
-            strcpy(ext_list->list[idx].entrypoints[i], entrys[i]);
-        }
+    if (entrys) {
+        ext_list->list[idx].entrypoints = *entrys;
+        should_free_entrys = false;
     }
     ext_list->count++;
-
-    return VK_SUCCESS;
+out:
+    if (NULL != entrys && should_free_entrys) {
+        free_string_list(inst, entrys);
+    }
+    return res;
 }
 
-// Manage lists of VkLayerProperties
-static bool loader_init_layer_list(const struct loader_instance *inst, struct loader_layer_list *list) {
-    list->capacity = 32 * sizeof(struct loader_layer_properties);
+// Create storage for pointers to loader_layer_properties
+bool loader_init_pointer_layer_list(const struct loader_instance *inst, struct loader_pointer_layer_list *list) {
+    list->capacity = 32 * sizeof(void *);
     list->list = loader_instance_heap_calloc(inst, list->capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
     if (list->list == NULL) {
         return false;
@@ -783,70 +840,53 @@
     return false;
 }
 
-void loader_destroy_layer_list(const struct loader_instance *inst, struct loader_device *device,
-                               struct loader_layer_list *layer_list) {
-    if (device) {
-        loader_device_heap_free(device, layer_list->list);
-    } else {
-        loader_instance_heap_free(inst, layer_list->list);
-    }
+void loader_destroy_pointer_layer_list(const struct loader_instance *inst, struct loader_pointer_layer_list *layer_list) {
+    loader_instance_heap_free(inst, layer_list->list);
     layer_list->count = 0;
     layer_list->capacity = 0;
     layer_list->list = NULL;
 }
 
 // Append layer properties defined in prop_list to the given layer_info list
-VkResult loader_add_layer_properties_to_list(const struct loader_instance *inst, struct loader_layer_list *list,
-                                             uint32_t prop_list_count, const struct loader_layer_properties *props) {
-    uint32_t i;
-    struct loader_layer_properties *layer;
-
+VkResult loader_add_layer_properties_to_list(const struct loader_instance *inst, struct loader_pointer_layer_list *list,
+                                             struct loader_layer_properties *props) {
     if (list->list == NULL || list->capacity == 0) {
-        if (!loader_init_layer_list(inst, list)) {
+        if (!loader_init_pointer_layer_list(inst, list)) {
             return VK_ERROR_OUT_OF_HOST_MEMORY;
         }
     }
 
-    if (list->list == NULL) return VK_SUCCESS;
-
-    for (i = 0; i < prop_list_count; i++) {
-        layer = (struct loader_layer_properties *)&props[i];
-
-        // Check for enough capacity
-        if (((list->count + 1) * sizeof(struct loader_layer_properties)) >= list->capacity) {
-            size_t new_capacity = list->capacity * 2;
-            void *new_ptr =
-                loader_instance_heap_realloc(inst, list->list, list->capacity, new_capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-            if (NULL == new_ptr) {
-                loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                           "loader_add_layer_properties_to_list: Realloc failed for when attempting to add new layer");
-                return VK_ERROR_OUT_OF_HOST_MEMORY;
-            }
-            list->list = new_ptr;
-            list->capacity = new_capacity;
+    // Check for enough capacity
+    if (((list->count + 1) * sizeof(struct loader_layer_properties)) >= list->capacity) {
+        size_t new_capacity = list->capacity * 2;
+        void *new_ptr =
+            loader_instance_heap_realloc(inst, list->list, list->capacity, new_capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+        if (NULL == new_ptr) {
+            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                       "loader_add_layer_properties_to_list: Realloc failed for when attempting to add new layer");
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
         }
-
-        memcpy(&list->list[list->count], layer, sizeof(struct loader_layer_properties));
-        list->count++;
+        list->list = new_ptr;
+        list->capacity = new_capacity;
     }
+    list->list[list->count++] = props;
 
     return VK_SUCCESS;
 }
 
 // Determine if the provided explicit layer should be available by querying the appropriate environmental variables.
-bool loader_layer_is_available(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                               const struct loader_envvar_disable_layers_filter *disable_filter,
+bool loader_layer_is_available(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
                                const struct loader_layer_properties *prop) {
     bool available = true;
-    if (NULL != disable_filter) {
-        bool is_implicit = (0 == (prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER));
-        bool disabled_by_type = (is_implicit) ? (disable_filter->disable_all_implicit) : (disable_filter->disable_all_explicit);
-        if (disable_filter->disable_all || disabled_by_type ||
-            check_name_matches_filter_environment_var(inst, prop->info.layerName, &disable_filter->additional_filters)) {
-            available = false;
-        }
+    bool is_implicit = (0 == (prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER));
+    bool disabled_by_type =
+        (is_implicit) ? (filters->disable_filter.disable_all_implicit) : (filters->disable_filter.disable_all_explicit);
+    if ((filters->disable_filter.disable_all || disabled_by_type ||
+         check_name_matches_filter_environment_var(prop->info.layerName, &filters->disable_filter.additional_filters)) &&
+        !check_name_matches_filter_environment_var(prop->info.layerName, &filters->allow_filter)) {
+        available = false;
     }
-    if (NULL != enable_filter && check_name_matches_filter_environment_var(inst, prop->info.layerName, enable_filter)) {
+    if (check_name_matches_filter_environment_var(prop->info.layerName, &filters->enable_filter)) {
         available = true;
     } else if (!available) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
@@ -859,18 +899,16 @@
 
 // Search the given search_list for any layers in the props list.  Add these to the
 // output layer_list.
-static VkResult loader_add_layer_names_to_list(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                                               const struct loader_envvar_disable_layers_filter *disable_filter,
-                                               struct loader_layer_list *output_list,
-                                               struct loader_layer_list *expanded_output_list, uint32_t name_count,
-                                               const char *const *names, const struct loader_layer_list *source_list) {
-    struct loader_layer_properties *layer_prop;
+VkResult loader_add_layer_names_to_list(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                                        struct loader_pointer_layer_list *output_list,
+                                        struct loader_pointer_layer_list *expanded_output_list, uint32_t name_count,
+                                        const char *const *names, const struct loader_layer_list *source_list) {
     VkResult err = VK_SUCCESS;
 
     for (uint32_t i = 0; i < name_count; i++) {
         const char *source_name = names[i];
 
-        layer_prop = loader_find_layer_property(source_name, source_list);
+        struct loader_layer_properties *layer_prop = loader_find_layer_property(source_name, source_list);
         if (NULL == layer_prop) {
             loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                        "loader_add_layer_names_to_list: Unable to find layer \"%s\"", source_name);
@@ -883,19 +921,18 @@
             continue;
         }
 
-        if (!loader_layer_is_available(inst, enable_filter, disable_filter, layer_prop)) {
+        if (!loader_layer_is_available(inst, filters, layer_prop)) {
             continue;
         }
 
         // If not a meta-layer, simply add it.
         if (0 == (layer_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) {
-            err = loader_add_layer_properties_to_list(inst, output_list, 1, layer_prop);
+            err = loader_add_layer_properties_to_list(inst, output_list, layer_prop);
             if (err == VK_ERROR_OUT_OF_HOST_MEMORY) return err;
-            err = loader_add_layer_properties_to_list(inst, expanded_output_list, 1, layer_prop);
+            err = loader_add_layer_properties_to_list(inst, expanded_output_list, layer_prop);
             if (err == VK_ERROR_OUT_OF_HOST_MEMORY) return err;
         } else {
-            err = loader_add_meta_layer(inst, enable_filter, disable_filter, layer_prop, output_list, expanded_output_list,
-                                        source_list, NULL);
+            err = loader_add_meta_layer(inst, filters, layer_prop, output_list, expanded_output_list, source_list, NULL);
             if (err == VK_ERROR_OUT_OF_HOST_MEMORY) return err;
         }
     }
@@ -905,28 +942,26 @@
 
 // Determine if the provided implicit layer should be enabled by querying the appropriate environmental variables.
 // For an implicit layer, at least a disable environment variable is required.
-bool loader_implicit_layer_is_enabled(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                                      const struct loader_envvar_disable_layers_filter *disable_filter,
+bool loader_implicit_layer_is_enabled(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
                                       const struct loader_layer_properties *prop) {
     bool enable = false;
     bool forced_disabled = false;
     bool forced_enabled = false;
-    char *env_value = NULL;
 
-    if ((NULL != disable_filter &&
-         (disable_filter->disable_all || disable_filter->disable_all_implicit ||
-          check_name_matches_filter_environment_var(inst, prop->info.layerName, &disable_filter->additional_filters)))) {
+    if ((filters->disable_filter.disable_all || filters->disable_filter.disable_all_implicit ||
+         check_name_matches_filter_environment_var(prop->info.layerName, &filters->disable_filter.additional_filters)) &&
+        !check_name_matches_filter_environment_var(prop->info.layerName, &filters->allow_filter)) {
         forced_disabled = true;
     }
-    if (NULL != enable_filter && check_name_matches_filter_environment_var(inst, prop->info.layerName, enable_filter)) {
+    if (check_name_matches_filter_environment_var(prop->info.layerName, &filters->enable_filter)) {
         forced_enabled = true;
     }
 
     // If no enable_environment variable is specified, this implicit layer is always be enabled by default.
-    if (prop->enable_env_var.name[0] == 0) {
+    if (NULL == prop->enable_env_var.name) {
         enable = true;
     } else {
-        env_value = loader_getenv(prop->enable_env_var.name, inst);
+        char *env_value = loader_getenv(prop->enable_env_var.name, inst);
         if (env_value && !strcmp(prop->enable_env_var.value, env_value)) {
             enable = true;
         }
@@ -950,16 +985,21 @@
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                    "Implicit layer \"%s\" forced disabled because name matches filter of env var \'%s\'.", prop->info.layerName,
                    VK_LAYERS_DISABLE_ENV_VAR);
-        return false;
+        return enable;
     }
 
     // The disable_environment has priority over everything else.  If it is defined, the layer is always
     // disabled.
-    env_value = loader_getenv(prop->disable_env_var.name, inst);
-    if (NULL != env_value) {
-        enable = false;
+    if (NULL != prop->disable_env_var.name) {
+        char *env_value = loader_getenv(prop->disable_env_var.name, inst);
+        if (NULL != env_value) {
+            enable = false;
+        }
+        loader_free_getenv(env_value, inst);
+    } else if ((prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER) == 0) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
+                   "Implicit layer \"%s\" missing disabled environment variable!", prop->info.layerName, VK_LAYERS_DISABLE_ENV_VAR);
     }
-    loader_free_getenv(env_value, inst);
 
     // Enable this layer if it is included in the override layer
     if (inst != NULL && inst->override_layer_present) {
@@ -971,8 +1011,8 @@
             }
         }
         if (override != NULL) {
-            for (uint32_t i = 0; i < override->num_component_layers; ++i) {
-                if (strcmp(override->component_layer_names[i], prop->info.layerName) == 0) {
+            for (uint32_t i = 0; i < override->component_layer_names.count; ++i) {
+                if (strcmp(override->component_layer_names.list[i], prop->info.layerName) == 0) {
                     enable = true;
                     break;
                 }
@@ -984,42 +1024,45 @@
 }
 
 // Check the individual implicit layer for the enable/disable environment variable settings.  Only add it after
-// every check has passed indicating it should be used.
-static VkResult loader_add_implicit_layer(const struct loader_instance *inst, const struct loader_layer_properties *prop,
-                                          const struct loader_envvar_filter *enable_filter,
-                                          const struct loader_envvar_disable_layers_filter *disable_filter,
-                                          struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
-                                          const struct loader_layer_list *source_list) {
+// every check has passed indicating it should be used, including making sure a layer of the same name hasn't already been
+// added.
+VkResult loader_add_implicit_layer(const struct loader_instance *inst, struct loader_layer_properties *prop,
+                                   const struct loader_envvar_all_filters *filters, struct loader_pointer_layer_list *target_list,
+                                   struct loader_pointer_layer_list *expanded_target_list,
+                                   const struct loader_layer_list *source_list) {
     VkResult result = VK_SUCCESS;
-    if (loader_implicit_layer_is_enabled(inst, enable_filter, disable_filter, prop)) {
+    if (loader_implicit_layer_is_enabled(inst, filters, prop)) {
         if (0 == (prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) {
-            result = loader_add_layer_properties_to_list(inst, target_list, 1, prop);
+            // Make sure the layer isn't already in the output_list, skip adding it if it is.
+            if (loader_find_layer_name_in_list(&prop->info.layerName[0], target_list)) {
+                return result;
+            }
+
+            result = loader_add_layer_properties_to_list(inst, target_list, prop);
             if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
             if (NULL != expanded_target_list) {
-                result = loader_add_layer_properties_to_list(inst, expanded_target_list, 1, prop);
+                result = loader_add_layer_properties_to_list(inst, expanded_target_list, prop);
             }
         } else {
-            result = loader_add_meta_layer(inst, enable_filter, disable_filter, prop, target_list, expanded_target_list,
-                                           source_list, NULL);
+            result = loader_add_meta_layer(inst, filters, prop, target_list, expanded_target_list, source_list, NULL);
         }
     }
     return result;
 }
 
 // Add the component layers of a meta-layer to the active list of layers
-VkResult loader_add_meta_layer(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                               const struct loader_envvar_disable_layers_filter *disable_filter,
-                               const struct loader_layer_properties *prop, struct loader_layer_list *target_list,
-                               struct loader_layer_list *expanded_target_list, const struct loader_layer_list *source_list,
+VkResult loader_add_meta_layer(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                               struct loader_layer_properties *prop, struct loader_pointer_layer_list *target_list,
+                               struct loader_pointer_layer_list *expanded_target_list, const struct loader_layer_list *source_list,
                                bool *out_found_all_component_layers) {
     VkResult result = VK_SUCCESS;
     bool found_all_component_layers = true;
 
     // We need to add all the individual component layers
     loader_api_version meta_layer_api_version = loader_make_version(prop->info.specVersion);
-    for (uint32_t comp_layer = 0; comp_layer < prop->num_component_layers; comp_layer++) {
-        const struct loader_layer_properties *search_prop =
-            loader_find_layer_property(prop->component_layer_names[comp_layer], source_list);
+    for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
+        struct loader_layer_properties *search_prop =
+            loader_find_layer_property(prop->component_layer_names.list[comp_layer], source_list);
         if (search_prop != NULL) {
             loader_api_version search_prop_version = loader_make_version(prop->info.specVersion);
             if (!loader_check_version_meets_required(meta_layer_api_version, search_prop_version)) {
@@ -1030,7 +1073,7 @@
                            search_prop->info.layerName, search_prop_version.major, search_prop_version.minor);
             }
 
-            if (!loader_layer_is_available(inst, enable_filter, disable_filter, search_prop)) {
+            if (!loader_layer_is_available(inst, filters, search_prop)) {
                 loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                            "Meta Layer \"%s\" component layer \"%s\" disabled.", prop->info.layerName, search_prop->info.layerName);
                 continue;
@@ -1039,21 +1082,21 @@
             // If the component layer is itself an implicit layer, we need to do the implicit layer enable
             // checks
             if (0 == (search_prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) {
-                result = loader_add_implicit_layer(inst, search_prop, enable_filter, disable_filter, target_list,
-                                                   expanded_target_list, source_list);
+                result = loader_add_implicit_layer(inst, search_prop, filters, target_list, expanded_target_list, source_list);
                 if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
             } else {
                 if (0 != (search_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) {
                     bool found_layers_in_component_meta_layer = true;
-                    result = loader_add_meta_layer(inst, enable_filter, disable_filter, search_prop, target_list,
-                                                   expanded_target_list, source_list, &found_layers_in_component_meta_layer);
+                    result = loader_add_meta_layer(inst, filters, search_prop, target_list, expanded_target_list, source_list,
+                                                   &found_layers_in_component_meta_layer);
                     if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
                     if (!found_layers_in_component_meta_layer) found_all_component_layers = false;
-                } else {
-                    result = loader_add_layer_properties_to_list(inst, target_list, 1, search_prop);
+                } else if (!loader_find_layer_name_in_list(&search_prop->info.layerName[0], target_list)) {
+                    // Make sure the layer isn't already in the output_list, skip adding it if it is.
+                    result = loader_add_layer_properties_to_list(inst, target_list, search_prop);
                     if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
                     if (NULL != expanded_target_list) {
-                        result = loader_add_layer_properties_to_list(inst, expanded_target_list, 1, search_prop);
+                        result = loader_add_layer_properties_to_list(inst, expanded_target_list, search_prop);
                         if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
                     }
                 }
@@ -1061,14 +1104,14 @@
         } else {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                        "Failed to find layer name \"%s\" component layer \"%s\" to activate (Policy #LLP_LAYER_7)",
-                       prop->component_layer_names[comp_layer], prop->component_layer_names[comp_layer]);
+                       prop->component_layer_names.list[comp_layer], prop->component_layer_names.list[comp_layer]);
             found_all_component_layers = false;
         }
     }
 
     // Add this layer to the overall target list (not the expanded one)
     if (found_all_component_layers) {
-        result = loader_add_layer_properties_to_list(inst, target_list, 1, prop);
+        result = loader_add_layer_properties_to_list(inst, target_list, prop);
         if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
         // Write the result to out_found_all_component_layers in case this function is being recursed
         if (out_found_all_component_layers) *out_found_all_component_layers = found_all_component_layers;
@@ -1077,14 +1120,14 @@
     return result;
 }
 
-static VkExtensionProperties *get_extension_property(const char *name, const struct loader_extension_list *list) {
+VkExtensionProperties *get_extension_property(const char *name, const struct loader_extension_list *list) {
     for (uint32_t i = 0; i < list->count; i++) {
         if (strcmp(name, list->list[i].extensionName) == 0) return &list->list[i];
     }
     return NULL;
 }
 
-static VkExtensionProperties *get_dev_extension_property(const char *name, const struct loader_device_extension_list *list) {
+VkExtensionProperties *get_dev_extension_property(const char *name, const struct loader_device_extension_list *list) {
     for (uint32_t i = 0; i < list->count; i++) {
         if (strcmp(name, list->list[i].props.extensionName) == 0) return &list->list[i].props;
     }
@@ -1165,30 +1208,50 @@
     };
 
     // Traverse loader's extensions, adding non-duplicate extensions to the list
-    add_debug_extensions_to_ext_list(inst, inst_exts);
-
-    static const VkExtensionProperties portability_enumeration_extension_info[] = {
+    res = add_debug_extensions_to_ext_list(inst, inst_exts);
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        goto out;
+    }
+    const VkExtensionProperties portability_enumeration_extension_info[] = {
         {VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION}};
 
     // Add VK_KHR_portability_subset
-    loader_add_to_ext_list(inst, inst_exts, sizeof(portability_enumeration_extension_info) / sizeof(VkExtensionProperties),
-                           portability_enumeration_extension_info);
+    res = loader_add_to_ext_list(inst, inst_exts, sizeof(portability_enumeration_extension_info) / sizeof(VkExtensionProperties),
+                                 portability_enumeration_extension_info);
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        goto out;
+    }
+
+    const VkExtensionProperties direct_driver_loading_extension_info[] = {
+        {VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME, VK_LUNARG_DIRECT_DRIVER_LOADING_SPEC_VERSION}};
+
+    // Add VK_LUNARG_direct_driver_loading
+    res = loader_add_to_ext_list(inst, inst_exts, sizeof(direct_driver_loading_extension_info) / sizeof(VkExtensionProperties),
+                                 direct_driver_loading_extension_info);
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        goto out;
+    }
 
 out:
     return res;
 }
 
 struct loader_icd_term *loader_get_icd_and_device(const void *device, struct loader_device **found_dev, uint32_t *icd_index) {
+    VkLayerDispatchTable *dispatch_table_device = loader_get_dispatch(device);
+    if (NULL == dispatch_table_device) {
+        *found_dev = NULL;
+        return NULL;
+    }
     loader_platform_thread_lock_mutex(&loader_global_instance_list_lock);
     *found_dev = NULL;
+
     for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) {
         uint32_t index = 0;
         for (struct loader_icd_term *icd_term = inst->icd_terms; icd_term; icd_term = icd_term->next) {
-            for (struct loader_device *dev = icd_term->logical_device_list; dev; dev = dev->next)
+            for (struct loader_device *dev = icd_term->logical_device_list; dev; dev = dev->next) {
                 // Value comparison of device prevents object wrapping by layers
-                if (loader_get_dispatch(dev->icd_device) == loader_get_dispatch(device) ||
-                    (dev->chain_device != VK_NULL_HANDLE &&
-                     loader_get_dispatch(dev->chain_device) == loader_get_dispatch(device))) {
+                if (loader_get_dispatch(dev->icd_device) == dispatch_table_device ||
+                    (dev->chain_device != VK_NULL_HANDLE && loader_get_dispatch(dev->chain_device) == dispatch_table_device)) {
                     *found_dev = dev;
                     if (NULL != icd_index) {
                         *icd_index = index;
@@ -1196,6 +1259,7 @@
                     loader_platform_thread_unlock_mutex(&loader_global_instance_list_lock);
                     return icd_term;
                 }
+            }
             index++;
         }
     }
@@ -1203,13 +1267,10 @@
     return NULL;
 }
 
-void loader_destroy_logical_device(const struct loader_instance *inst, struct loader_device *dev,
-                                   const VkAllocationCallbacks *pAllocator) {
+void loader_destroy_logical_device(struct loader_device *dev, const VkAllocationCallbacks *pAllocator) {
     if (pAllocator) {
         dev->alloc_callbacks = *pAllocator;
     }
-    loader_destroy_layer_list(inst, dev, &dev->expanded_activated_layer_list);
-    loader_destroy_layer_list(inst, dev, &dev->app_activated_layer_list);
     loader_device_heap_free(dev, dev);
 }
 
@@ -1222,6 +1283,8 @@
         return NULL;
     }
 
+    new_dev->loader_dispatch.core_dispatch.magic = DEVICE_DISP_TABLE_MAGIC_NUMBER;
+
     if (pAllocator) {
         new_dev->alloc_callbacks = *pAllocator;
     }
@@ -1229,13 +1292,13 @@
     return new_dev;
 }
 
-void loader_add_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term, struct loader_device *dev) {
+void loader_add_logical_device(struct loader_icd_term *icd_term, struct loader_device *dev) {
     dev->next = icd_term->logical_device_list;
     icd_term->logical_device_list = dev;
 }
 
-void loader_remove_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term,
-                                  struct loader_device *found_dev, const VkAllocationCallbacks *pAllocator) {
+void loader_remove_logical_device(struct loader_icd_term *icd_term, struct loader_device *found_dev,
+                                  const VkAllocationCallbacks *pAllocator) {
     struct loader_device *dev, *prev_dev;
 
     if (!icd_term || !found_dev) return;
@@ -1251,7 +1314,7 @@
         prev_dev->next = found_dev->next;
     else
         icd_term->logical_device_list = found_dev->next;
-    loader_destroy_logical_device(inst, found_dev, pAllocator);
+    loader_destroy_logical_device(found_dev, pAllocator);
 }
 
 void loader_icd_destroy(struct loader_instance *ptr_inst, struct loader_icd_term *icd_term,
@@ -1259,14 +1322,14 @@
     ptr_inst->total_icd_count--;
     for (struct loader_device *dev = icd_term->logical_device_list; dev;) {
         struct loader_device *next_dev = dev->next;
-        loader_destroy_logical_device(ptr_inst, dev, pAllocator);
+        loader_destroy_logical_device(dev, pAllocator);
         dev = next_dev;
     }
 
     loader_instance_heap_free(ptr_inst, icd_term);
 }
 
-static struct loader_icd_term *loader_icd_add(struct loader_instance *ptr_inst, const struct loader_scanned_icd *scanned_icd) {
+struct loader_icd_term *loader_icd_add(struct loader_instance *ptr_inst, const struct loader_scanned_icd *scanned_icd) {
     struct loader_icd_term *icd_term;
 
     icd_term = loader_instance_heap_calloc(ptr_inst, sizeof(struct loader_icd_term), VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
@@ -1320,43 +1383,261 @@
 }
 
 void loader_scanned_icd_clear(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list) {
-    if (0 != icd_tramp_list->capacity) {
+    if (0 != icd_tramp_list->capacity && icd_tramp_list->scanned_list) {
         for (uint32_t i = 0; i < icd_tramp_list->count; i++) {
-            loader_platform_close_library(icd_tramp_list->scanned_list[i].handle);
+            if (icd_tramp_list->scanned_list[i].handle) {
+                loader_platform_close_library(icd_tramp_list->scanned_list[i].handle);
+                icd_tramp_list->scanned_list[i].handle = NULL;
+            }
             loader_instance_heap_free(inst, icd_tramp_list->scanned_list[i].lib_name);
         }
         loader_instance_heap_free(inst, icd_tramp_list->scanned_list);
-        icd_tramp_list->capacity = 0;
-        icd_tramp_list->count = 0;
-        icd_tramp_list->scanned_list = NULL;
     }
+    icd_tramp_list->capacity = 0;
+    icd_tramp_list->count = 0;
+    icd_tramp_list->scanned_list = NULL;
 }
 
-static VkResult loader_scanned_icd_init(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list) {
-    VkResult err = VK_SUCCESS;
+VkResult loader_scanned_icd_init(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list) {
+    VkResult res = VK_SUCCESS;
     loader_scanned_icd_clear(inst, icd_tramp_list);
     icd_tramp_list->capacity = 8 * sizeof(struct loader_scanned_icd);
     icd_tramp_list->scanned_list = loader_instance_heap_alloc(inst, icd_tramp_list->capacity, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
     if (NULL == icd_tramp_list->scanned_list) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                    "loader_scanned_icd_init: Realloc failed for layer list when attempting to add new layer");
-        err = VK_ERROR_OUT_OF_HOST_MEMORY;
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
     }
-    return err;
+    return res;
 }
 
-static VkResult loader_scanned_icd_add(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
-                                       const char *filename, uint32_t api_version, enum loader_layer_library_status *lib_status) {
-    loader_platform_dl_handle handle = NULL;
-    PFN_vkCreateInstance fp_create_inst;
-    PFN_vkEnumerateInstanceExtensionProperties fp_get_inst_ext_props;
-    PFN_vkGetInstanceProcAddr fp_get_proc_addr;
+VkResult loader_add_direct_driver(const struct loader_instance *inst, uint32_t index,
+                                  const VkDirectDriverLoadingInfoLUNARG *pDriver, struct loader_icd_tramp_list *icd_tramp_list) {
+    // Assume pDriver is valid, since there is no real way to check it. Calling code should make sure the pointer to the array
+    // of VkDirectDriverLoadingInfoLUNARG structures is non-null.
+    if (NULL == pDriver->pfnGetInstanceProcAddr) {
+        loader_log(
+            inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+            "loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index %d contains a NULL pointer for the "
+            "pfnGetInstanceProcAddr member, skipping.",
+            index);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    PFN_vkGetInstanceProcAddr fp_get_proc_addr = pDriver->pfnGetInstanceProcAddr;
+    PFN_vkCreateInstance fp_create_inst = NULL;
+    PFN_vkEnumerateInstanceExtensionProperties fp_get_inst_ext_props = NULL;
     PFN_GetPhysicalDeviceProcAddr fp_get_phys_dev_proc_addr = NULL;
-    PFN_vkNegotiateLoaderICDInterfaceVersion fp_negotiate_icd_version;
+    PFN_vkNegotiateLoaderICDInterfaceVersion fp_negotiate_icd_version = NULL;
 #if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vk_icdEnumerateAdapterPhysicalDevices fp_enum_dxgi_adapter_phys_devs = NULL;
 #endif
     struct loader_scanned_icd *new_scanned_icd;
+    uint32_t interface_version = 0;
+
+    // Try to get the negotiate ICD interface version function
+    fp_negotiate_icd_version = (PFN_vk_icdNegotiateLoaderICDInterfaceVersion)pDriver->pfnGetInstanceProcAddr(
+        NULL, "vk_icdNegotiateLoaderICDInterfaceVersion");
+
+    if (NULL == fp_negotiate_icd_version) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_add_direct_driver: Could not get 'vk_icdNegotiateLoaderICDInterfaceVersion' from "
+                   "VkDirectDriverLoadingInfoLUNARG structure at "
+                   "index %d, skipping.",
+                   index);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    if (!loader_get_icd_interface_version(fp_negotiate_icd_version, &interface_version)) {
+        loader_log(
+            inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+            "loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index %d supports interface version %d, "
+            "which is incompatible with the Loader Driver Interface version that supports the VK_LUNARG_direct_driver_loading "
+            "extension, skipping.",
+            index, interface_version);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    if (interface_version < 7) {
+        loader_log(
+            inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+            "loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index %d supports interface version %d, "
+            "which is incompatible with the Loader Driver Interface version that supports the VK_LUNARG_direct_driver_loading "
+            "extension, skipping.",
+            index, interface_version);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    fp_create_inst = (PFN_vkCreateInstance)pDriver->pfnGetInstanceProcAddr(NULL, "vkCreateInstance");
+    if (NULL == fp_create_inst) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_add_direct_driver: Could not get 'vkCreateInstance' from VkDirectDriverLoadingInfoLUNARG structure at "
+                   "index %d, skipping.",
+                   index);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+    fp_get_inst_ext_props =
+        (PFN_vkEnumerateInstanceExtensionProperties)pDriver->pfnGetInstanceProcAddr(NULL, "vkEnumerateInstanceExtensionProperties");
+    if (NULL == fp_get_inst_ext_props) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_add_direct_driver: Could not get 'vkEnumerateInstanceExtensionProperties' from "
+                   "VkDirectDriverLoadingInfoLUNARG structure at index %d, skipping.",
+                   index);
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    fp_get_phys_dev_proc_addr =
+        (PFN_vk_icdGetPhysicalDeviceProcAddr)pDriver->pfnGetInstanceProcAddr(NULL, "vk_icdGetPhysicalDeviceProcAddr");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    // Query "vk_icdEnumerateAdapterPhysicalDevices" with vk_icdGetInstanceProcAddr if the library reports interface version
+    // 7 or greater, otherwise fallback to loading it from the platform dynamic linker
+    fp_enum_dxgi_adapter_phys_devs =
+        (PFN_vk_icdEnumerateAdapterPhysicalDevices)pDriver->pfnGetInstanceProcAddr(NULL, "vk_icdEnumerateAdapterPhysicalDevices");
+#endif
+
+    // check for enough capacity
+    if ((icd_tramp_list->count * sizeof(struct loader_scanned_icd)) >= icd_tramp_list->capacity) {
+        void *new_ptr = loader_instance_heap_realloc(inst, icd_tramp_list->scanned_list, icd_tramp_list->capacity,
+                                                     icd_tramp_list->capacity * 2, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+        if (NULL == new_ptr) {
+            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                       "loader_add_direct_driver: Realloc failed on icd library list for ICD index %u", index);
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
+        }
+        icd_tramp_list->scanned_list = new_ptr;
+
+        // double capacity
+        icd_tramp_list->capacity *= 2;
+    }
+
+    // Driver must be 1.1 to support version 7
+    uint32_t api_version = VK_API_VERSION_1_1;
+    PFN_vkEnumerateInstanceVersion icd_enumerate_instance_version =
+        (PFN_vkEnumerateInstanceVersion)pDriver->pfnGetInstanceProcAddr(NULL, "vkEnumerateInstanceVersion");
+
+    if (icd_enumerate_instance_version) {
+        VkResult res = icd_enumerate_instance_version(&api_version);
+        if (res != VK_SUCCESS) {
+            return res;
+        }
+    }
+
+    new_scanned_icd = &(icd_tramp_list->scanned_list[icd_tramp_list->count]);
+    new_scanned_icd->handle = NULL;
+    new_scanned_icd->api_version = api_version;
+    new_scanned_icd->GetInstanceProcAddr = fp_get_proc_addr;
+    new_scanned_icd->GetPhysicalDeviceProcAddr = fp_get_phys_dev_proc_addr;
+    new_scanned_icd->EnumerateInstanceExtensionProperties = fp_get_inst_ext_props;
+    new_scanned_icd->CreateInstance = fp_create_inst;
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    new_scanned_icd->EnumerateAdapterPhysicalDevices = fp_enum_dxgi_adapter_phys_devs;
+#endif
+    new_scanned_icd->interface_version = interface_version;
+
+    new_scanned_icd->lib_name = NULL;
+    icd_tramp_list->count++;
+
+    loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+               "loader_add_direct_driver: Adding driver found in index %d of "
+               "VkDirectDriverLoadingListLUNARG::pDrivers structure. pfnGetInstanceProcAddr was set to %p",
+               index, pDriver->pfnGetInstanceProcAddr);
+
+    return VK_SUCCESS;
+}
+
+// Search through VkInstanceCreateInfo's pNext chain for any drivers from the direct driver loading extension and load them.
+VkResult loader_scan_for_direct_drivers(const struct loader_instance *inst, const VkInstanceCreateInfo *pCreateInfo,
+                                        struct loader_icd_tramp_list *icd_tramp_list, bool *direct_driver_loading_exclusive_mode) {
+    if (NULL == pCreateInfo) {
+        // Don't do this logic unless we are being called from vkCreateInstance, when pCreateInfo will be non-null
+        return VK_SUCCESS;
+    }
+    bool direct_driver_loading_enabled = false;
+    // Try to if VK_LUNARG_direct_driver_loading is enabled and if we are using it exclusively
+    // Skip this step if inst is NULL, aka when this function is being called before instance creation
+    if (inst != NULL && pCreateInfo->ppEnabledExtensionNames && pCreateInfo->enabledExtensionCount > 0) {
+        // Look through the enabled extension list, make sure VK_LUNARG_direct_driver_loading is present
+        for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
+            if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME) == 0) {
+                direct_driver_loading_enabled = true;
+                break;
+            }
+        }
+    }
+    const VkDirectDriverLoadingListLUNARG *ddl_list = NULL;
+    // Find the VkDirectDriverLoadingListLUNARG struct in the pNext chain of vkInstanceCreateInfo
+    const VkBaseOutStructure *chain = pCreateInfo->pNext;
+    while (chain) {
+        if (chain->sType == VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG) {
+            ddl_list = (VkDirectDriverLoadingListLUNARG *)chain;
+            break;
+        }
+        chain = (const VkBaseOutStructure *)chain->pNext;
+    }
+    if (NULL == ddl_list) {
+        if (direct_driver_loading_enabled) {
+            loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                       "loader_scan_for_direct_drivers: The VK_LUNARG_direct_driver_loading extension was enabled but the "
+                       "pNext chain of "
+                       "VkInstanceCreateInfo did not contain the "
+                       "VkDirectDriverLoadingListLUNARG structure.");
+        }
+        // Always want to exit early if there was no VkDirectDriverLoadingListLUNARG in the pNext chain
+        return VK_SUCCESS;
+    }
+
+    if (!direct_driver_loading_enabled) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_scan_for_direct_drivers: The pNext chain of VkInstanceCreateInfo contained the "
+                   "VkDirectDriverLoadingListLUNARG structure, but the VK_LUNARG_direct_driver_loading extension was "
+                   "not enabled.");
+        return VK_SUCCESS;
+    }
+    // If we are using exclusive mode, skip looking for any more drivers from system or environment variables
+    if (ddl_list->mode == VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG) {
+        *direct_driver_loading_exclusive_mode = true;
+        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_scan_for_direct_drivers: The VK_LUNARG_direct_driver_loading extension is active and specified "
+                   "VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG, skipping system and environment "
+                   "variable driver search mechanisms.");
+    }
+    if (NULL == ddl_list->pDrivers) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_scan_for_direct_drivers: The VkDirectDriverLoadingListLUNARG structure in the pNext chain of "
+                   "VkInstanceCreateInfo has a NULL pDrivers member.");
+        return VK_SUCCESS;
+    }
+    if (ddl_list->driverCount == 0) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                   "loader_scan_for_direct_drivers: The VkDirectDriverLoadingListLUNARG structure in the pNext chain of "
+                   "VkInstanceCreateInfo has a non-null pDrivers member but a driverCount member with a value "
+                   "of zero.");
+        return VK_SUCCESS;
+    }
+    // Go through all VkDirectDriverLoadingInfoLUNARG entries and add each driver
+    // Because icd_tramp's are prepended, this will result in the drivers appearing at the end
+    for (uint32_t i = 0; i < ddl_list->driverCount; i++) {
+        VkResult res = loader_add_direct_driver(inst, i, &ddl_list->pDrivers[i], icd_tramp_list);
+        if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            return res;
+        }
+    }
+
+    return VK_SUCCESS;
+}
+
+VkResult loader_scanned_icd_add(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
+                                const char *filename, uint32_t api_version, enum loader_layer_library_status *lib_status) {
+    loader_platform_dl_handle handle = NULL;
+    PFN_vkCreateInstance fp_create_inst = NULL;
+    PFN_vkEnumerateInstanceExtensionProperties fp_get_inst_ext_props = NULL;
+    PFN_vkGetInstanceProcAddr fp_get_proc_addr = NULL;
+    PFN_GetPhysicalDeviceProcAddr fp_get_phys_dev_proc_addr = NULL;
+    PFN_vkNegotiateLoaderICDInterfaceVersion fp_negotiate_icd_version = NULL;
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    PFN_vk_icdEnumerateAdapterPhysicalDevices fp_enum_dxgi_adapter_phys_devs = NULL;
+#endif
+    struct loader_scanned_icd *new_scanned_icd = NULL;
     uint32_t interface_vers;
     VkResult res = VK_SUCCESS;
 
@@ -1369,8 +1650,8 @@
         goto out;
     }
 
-    // TODO implement smarter opening/closing of libraries. For now this
-    // function leaves libraries open and the scanned_icd_clear closes them
+// TODO implement smarter opening/closing of libraries. For now this
+// function leaves libraries open and the scanned_icd_clear closes them
 #if defined(__Fuchsia__)
     handle = loader_platform_open_driver(filename);
 #else
@@ -1378,7 +1659,11 @@
 #endif
     if (NULL == handle) {
         loader_handle_load_library_error(inst, filename, lib_status);
-        res = VK_ERROR_INCOMPATIBLE_DRIVER;
+        if (lib_status && *lib_status == LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        } else {
+            res = VK_ERROR_INCOMPATIBLE_DRIVER;
+        }
         goto out;
     }
 
@@ -1387,8 +1672,25 @@
 #endif
 
     // Get and settle on an ICD interface version
+    // Try to load the driver's exported vk_icdNegotiateLoaderICDInterfaceVersion
     fp_negotiate_icd_version = loader_platform_get_proc_address(handle, "vk_icdNegotiateLoaderICDInterfaceVersion");
 
+    // If it isn't exported, we are dealing with either a v0, v1, or a v7 and up driver
+    if (NULL == fp_negotiate_icd_version) {
+        // Try to load the driver's exported vk_icdGetInstanceProcAddr - if this is a v7 or up driver, we can use it to get
+        // the driver's vk_icdNegotiateLoaderICDInterfaceVersion function
+        fp_get_proc_addr = loader_platform_get_proc_address(handle, "vk_icdGetInstanceProcAddr");
+
+        // If we successfully loaded vk_icdGetInstanceProcAddr, try to get vk_icdNegotiateLoaderICDInterfaceVersion
+        if (fp_get_proc_addr) {
+            fp_negotiate_icd_version =
+                (PFN_vk_icdNegotiateLoaderICDInterfaceVersion)fp_get_proc_addr(NULL, "vk_icdNegotiateLoaderICDInterfaceVersion");
+        }
+    }
+
+    // Try to negotiate the Loader and Driver Interface Versions
+    // loader_get_icd_interface_version will check if fp_negotiate_icd_version is NULL, so we don't have to.
+    // If it *is* NULL, that means this driver uses interface version 0 or 1
     if (!loader_get_icd_interface_version(fp_negotiate_icd_version, &interface_vers)) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                    "loader_scanned_icd_add: ICD %s doesn't support interface version compatible with loader, skip this ICD.",
@@ -1396,13 +1698,19 @@
         goto out;
     }
 
-    fp_get_proc_addr = loader_platform_get_proc_address(handle, "vk_icdGetInstanceProcAddr");
+    // If we didn't already query vk_icdGetInstanceProcAddr, try now
     if (NULL == fp_get_proc_addr) {
+        fp_get_proc_addr = loader_platform_get_proc_address(handle, "vk_icdGetInstanceProcAddr");
+    }
+
+    // If vk_icdGetInstanceProcAddr is NULL, this ICD is using version 0 and so we should respond accordingly.
+    if (NULL == fp_get_proc_addr) {
+        // Exporting vk_icdNegotiateLoaderICDInterfaceVersion but not vk_icdGetInstanceProcAddr violates Version 2's
+        // requirements, as for Version 2 to be supported Version 1 must also be supported
         if (interface_vers != 0) {
             loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                        "loader_scanned_icd_add: ICD %s reports an interface version of %d but doesn't export "
-                       "vk_icdGetInstanceProcAddr, skip "
-                       "this ICD.",
+                       "vk_icdGetInstanceProcAddr, skip this ICD.",
                        filename, interface_vers);
             goto out;
         }
@@ -1435,7 +1743,9 @@
             goto out;
         }
     } else {
-        // Use newer interface version 1 or later
+        // vk_icdGetInstanceProcAddr was successfully found, we can assume the version is at least one
+        // If vk_icdNegotiateLoaderICDInterfaceVersion was also found, interface_vers must be 2 or greater, so this check is
+        // fine
         if (interface_vers == 0) {
             interface_vers = 1;
         }
@@ -1456,9 +1766,23 @@
                        filename);
             goto out;
         }
-        fp_get_phys_dev_proc_addr = loader_platform_get_proc_address(handle, "vk_icdGetPhysicalDeviceProcAddr");
+        // Query "vk_icdGetPhysicalDeviceProcAddr" with vk_icdGetInstanceProcAddr if the library reports interface version 7 or
+        // greater, otherwise fallback to loading it from the platform dynamic linker
+        if (interface_vers >= 7) {
+            fp_get_phys_dev_proc_addr =
+                (PFN_vk_icdGetPhysicalDeviceProcAddr)fp_get_proc_addr(NULL, "vk_icdGetPhysicalDeviceProcAddr");
+        }
+        if (NULL == fp_get_phys_dev_proc_addr && interface_vers >= 3) {
+            fp_get_phys_dev_proc_addr = loader_platform_get_proc_address(handle, "vk_icdGetPhysicalDeviceProcAddr");
+        }
 #if defined(VK_USE_PLATFORM_WIN32_KHR)
-        if (interface_vers >= 6) {
+        // Query "vk_icdEnumerateAdapterPhysicalDevices" with vk_icdGetInstanceProcAddr if the library reports interface version
+        // 7 or greater, otherwise fallback to loading it from the platform dynamic linker
+        if (interface_vers >= 7) {
+            fp_enum_dxgi_adapter_phys_devs =
+                (PFN_vk_icdEnumerateAdapterPhysicalDevices)fp_get_proc_addr(NULL, "vk_icdEnumerateAdapterPhysicalDevices");
+        }
+        if (NULL == fp_enum_dxgi_adapter_phys_devs && interface_vers >= 6) {
             fp_enum_dxgi_adapter_phys_devs = loader_platform_get_proc_address(handle, "vk_icdEnumerateAdapterPhysicalDevices");
         }
 #endif
@@ -1500,13 +1824,11 @@
 #endif
     new_scanned_icd->interface_version = interface_vers;
 
-    new_scanned_icd->lib_name = (char *)loader_instance_heap_alloc(inst, strlen(filename) + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-    if (NULL == new_scanned_icd->lib_name) {
+    res = loader_copy_to_new_str(inst, filename, &new_scanned_icd->lib_name);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_scanned_icd_add: Out of memory can't add ICD %s", filename);
-        res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
     }
-    strcpy(new_scanned_icd->lib_name, filename);
     icd_tramp_list->count++;
 
 out:
@@ -1517,12 +1839,12 @@
 void loader_initialize(void) {
     // initialize mutexes
     loader_platform_thread_create_mutex(&loader_lock);
-    loader_platform_thread_create_mutex(&loader_json_lock);
     loader_platform_thread_create_mutex(&loader_preload_icd_lock);
     loader_platform_thread_create_mutex(&loader_global_instance_list_lock);
+    init_global_loader_settings();
 
     // initialize logging
-    loader_debug_init();
+    loader_init_global_debug_level();
 #if defined(_WIN32)
     windows_initialization();
 #endif
@@ -1536,6 +1858,19 @@
 #if defined(GIT_BRANCH_NAME) && defined(GIT_TAG_INFO)
     loader_log(NULL, VULKAN_LOADER_INFO_BIT, 0, "[Vulkan Loader Git - Tag: " GIT_BRANCH_NAME ", Branch/Commit: " GIT_TAG_INFO "]");
 #endif
+
+    char *loader_disable_dynamic_library_unloading_env_var = loader_getenv("VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING", NULL);
+    if (loader_disable_dynamic_library_unloading_env_var &&
+        0 == strncmp(loader_disable_dynamic_library_unloading_env_var, "1", 2)) {
+        loader_disable_dynamic_library_unloading = true;
+        loader_log(NULL, VULKAN_LOADER_WARN_BIT, 0, "Vulkan Loader: library unloading is disabled");
+    } else {
+        loader_disable_dynamic_library_unloading = false;
+    }
+    loader_free_getenv(loader_disable_dynamic_library_unloading_env_var, NULL);
+#if defined(LOADER_USE_UNSAFE_FILE_SEARCH)
+    loader_log(NULL, VULKAN_LOADER_WARN_BIT, 0, "Vulkan Loader: unsafe searching is enabled");
+#endif
 }
 
 void loader_release() {
@@ -1547,8 +1882,8 @@
 #endif
 
     // release mutexes
+    teardown_global_loader_settings();
     loader_platform_thread_delete_mutex(&loader_lock);
-    loader_platform_thread_delete_mutex(&loader_json_lock);
     loader_platform_thread_delete_mutex(&loader_preload_icd_lock);
     loader_platform_thread_delete_mutex(&loader_global_instance_list_lock);
 }
@@ -1563,8 +1898,7 @@
         return;
     }
 
-    memset(&scanned_icds, 0, sizeof(scanned_icds));
-    VkResult result = loader_icd_scan(NULL, &scanned_icds, NULL);
+    VkResult result = loader_icd_scan(NULL, &scanned_icds, NULL, NULL);
     if (result != VK_SUCCESS) {
         loader_scanned_icd_clear(NULL, &scanned_icds);
     }
@@ -1607,37 +1941,90 @@
     return next;
 }
 
-// Given a path which is absolute or relative, expand the path if relative or
-// leave the path unmodified if absolute. The base path to prepend to relative
-// paths is given in rel_base.
-//
-// @return - A string in out_fullpath of the full absolute path
-static void loader_expand_path(const char *path, const char *rel_base, size_t out_size, char *out_fullpath) {
-    if (loader_platform_is_path_absolute(path)) {
-        // do not prepend a base to an absolute path
-        rel_base = "";
+/* Processes a json manifest's library_path and the location of the json manifest to create the path of the library
+ * The output is stored in out_fullpath by allocating a string - so its the caller's repsonsibility to free it
+ * The output is the combination of the base path of manifest_file_path concatenated with library path
+ * If library_path is an absolute path, we do not prepend the base path of manifest_file_path
+ *
+ * This function takes ownership of library_path - caller does not need to worry about freeing it.
+ */
+VkResult combine_manifest_directory_and_library_path(const struct loader_instance *inst, char *library_path,
+                                                     const char *manifest_file_path, char **out_fullpath) {
+    assert(library_path && manifest_file_path && out_fullpath);
+    if (loader_platform_is_path_absolute(library_path)) {
+        *out_fullpath = library_path;
+        return VK_SUCCESS;
     }
+    VkResult res = VK_SUCCESS;
 
-    loader_platform_combine_path(out_fullpath, out_size, rel_base, path, NULL);
+    size_t library_path_len = strlen(library_path);
+    size_t manifest_file_path_str_len = strlen(manifest_file_path);
+    bool library_path_contains_directory_symbol = false;
+    for (size_t i = 0; i < library_path_len; i++) {
+        if (library_path[i] == DIRECTORY_SYMBOL) {
+            library_path_contains_directory_symbol = true;
+            break;
+        }
+    }
+    // Means that the library_path is neither absolute nor relative - thus we should not modify it at all
+    if (!library_path_contains_directory_symbol) {
+        *out_fullpath = library_path;
+        return VK_SUCCESS;
+    }
+    // must include both a directory symbol and the null terminator
+    size_t new_str_len = library_path_len + manifest_file_path_str_len + 1 + 1;
+
+    *out_fullpath = loader_instance_heap_calloc(inst, new_str_len, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == *out_fullpath) {
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+    size_t cur_loc_in_out_fullpath = 0;
+    // look for the last occurance of DIRECTORY_SYMBOL in manifest_file_path
+    size_t last_directory_symbol = 0;
+    bool found_directory_symbol = false;
+    for (size_t i = 0; i < manifest_file_path_str_len; i++) {
+        if (manifest_file_path[i] == DIRECTORY_SYMBOL) {
+            last_directory_symbol = i + 1;  // we want to include the symbol
+            found_directory_symbol = true;
+            // dont break because we want to find the last occurance
+        }
+    }
+    // Add manifest_file_path up to the last directory symbol
+    if (found_directory_symbol) {
+        loader_strncpy(*out_fullpath, new_str_len, manifest_file_path, last_directory_symbol);
+        cur_loc_in_out_fullpath += last_directory_symbol;
+    }
+    loader_strncpy(&(*out_fullpath)[cur_loc_in_out_fullpath], new_str_len - cur_loc_in_out_fullpath, library_path,
+                   library_path_len);
+    cur_loc_in_out_fullpath += library_path_len + 1;
+    (*out_fullpath)[cur_loc_in_out_fullpath] = '\0';
+
+out:
+    loader_instance_heap_free(inst, library_path);
+
+    return res;
 }
 
-// Given a filename (file)  and a list of paths (dir), try to find an existing
+// Given a filename (file)  and a list of paths (in_dirs), try to find an existing
 // file in the paths.  If filename already is a path then no searching in the given paths.
 //
 // @return - A string in out_fullpath of either the full path or file.
-static void loader_get_fullpath(const char *file, const char *in_dirs, size_t out_size, char *out_fullpath) {
+void loader_get_fullpath(const char *file, const char *in_dirs, size_t out_size, char *out_fullpath) {
     if (!loader_platform_is_path(file) && *in_dirs) {
-        char *dirs_copy, *dir, *next_dir;
-
-        dirs_copy = loader_stack_alloc(strlen(in_dirs) + 1);
-        strcpy(dirs_copy, in_dirs);
+        size_t dirs_copy_len = strlen(in_dirs) + 1;
+        char *dirs_copy = loader_stack_alloc(dirs_copy_len);
+        loader_strncpy(dirs_copy, dirs_copy_len, in_dirs, dirs_copy_len);
 
         // find if file exists after prepending paths in given list
         // for (dir = dirs_copy; *dir && (next_dir = loader_get_next_path(dir)); dir = next_dir) {
-        dir = dirs_copy;
-        next_dir = loader_get_next_path(dir);
+        char *dir = dirs_copy;
+        char *next_dir = loader_get_next_path(dir);
         while (*dir && next_dir) {
-            loader_platform_combine_path(out_fullpath, out_size, dir, file, NULL);
+            int path_concat_ret = snprintf(out_fullpath, out_size, "%s%c%s", dir, DIRECTORY_SYMBOL, file);
+            if (path_concat_ret < 0) {
+                continue;
+            }
             if (loader_platform_file_exists(out_fullpath)) {
                 return;
             }
@@ -1649,113 +2036,21 @@
     (void)snprintf(out_fullpath, out_size, "%s", file);
 }
 
-// Read a JSON file into a buffer.
-//
-// @return -  A pointer to a cJSON object representing the JSON parse tree.
-//            This returned buffer should be freed by caller.
-static VkResult loader_get_json(const struct loader_instance *inst, int dir_fd, const char *filename, cJSON **json) {
-    FILE *file = NULL;
-    char *json_buf = NULL;
-    size_t len;
-    VkResult res = VK_SUCCESS;
-
-    assert(json != NULL);
-
-    *json = NULL;
-
-#if defined(_WIN32)
-    int filename_utf16_size = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
-    if (filename_utf16_size > 0) {
-        wchar_t *filename_utf16 = (wchar_t *)loader_stack_alloc(filename_utf16_size * sizeof(wchar_t));
-        if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, filename_utf16, filename_utf16_size) == filename_utf16_size) {
-            file = _wfopen(filename_utf16, L"rb");
-        }
-    }
-#else
-#if !defined(__Fuchsia__)
-    assert(dir_fd < 0);
-#endif
-
-    if (dir_fd >= 0) {
-        int file_fd = openat(dir_fd, filename, O_RDONLY);
-        if (file_fd < 0) {
-            loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_get_json: Failed to open JSON file \"%s\"", filename);
-            res = VK_ERROR_INITIALIZATION_FAILED;
-            goto out;
-        }
-        file = fdopen(file_fd, "rb");
-    } else {
-        file = fopen(filename, "rb");
-    }
-#endif
-
-    if (!file) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to open JSON file %s", filename);
-        res = VK_ERROR_INITIALIZATION_FAILED;
-        goto out;
-    }
-    // NOTE: We can't just use fseek(file, 0, SEEK_END) because that isn't guaranteed to be supported on all systems
-    size_t fread_ret_count = 0;
-    do {
-        char buffer[256];
-        fread_ret_count = fread(buffer, 1, 256, file);
-    } while (fread_ret_count == 256 && !feof(file));
-    len = ftell(file);
-    fseek(file, 0, SEEK_SET);
-    json_buf = (char *)loader_instance_heap_alloc(inst, len + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-    if (json_buf == NULL) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "loader_get_json: Failed to allocate space for JSON file %s buffer of length %d", filename, len);
-        res = VK_ERROR_OUT_OF_HOST_MEMORY;
-        goto out;
-    }
-    if (fread(json_buf, sizeof(char), len, file) != len) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "loader_get_json: Failed to read JSON file %s.", filename);
-        res = VK_ERROR_INITIALIZATION_FAILED;
-        goto out;
-    }
-    json_buf[len] = '\0';
-
-    // Can't be a valid json if the string is of length zero
-    if (len == 0) {
-        res = VK_ERROR_INITIALIZATION_FAILED;
-        goto out;
-    }
-    // Parse text from file
-    *json = cJSON_Parse(inst ? &inst->alloc_callbacks : NULL, json_buf);
-    if (*json == NULL) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "loader_get_json: Failed to parse JSON file %s, this is usually because something ran out of memory.", filename);
-        res = VK_ERROR_OUT_OF_HOST_MEMORY;
-        goto out;
-    }
-
-out:
-    loader_instance_heap_free(inst, json_buf);
-    if (NULL != file) {
-        fclose(file);
-    }
-
-    return res;
-}
-
 // Verify that all component layers in a meta-layer are valid.
-static bool verify_meta_layer_component_layers(const struct loader_instance *inst, struct loader_layer_properties *prop,
-                                               struct loader_layer_list *instance_layers) {
-    bool success = true;
+bool verify_meta_layer_component_layers(const struct loader_instance *inst, struct loader_layer_properties *prop,
+                                        struct loader_layer_list *instance_layers) {
     loader_api_version meta_layer_version = loader_make_version(prop->info.specVersion);
 
-    for (uint32_t comp_layer = 0; comp_layer < prop->num_component_layers; comp_layer++) {
+    for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
         struct loader_layer_properties *comp_prop =
-            loader_find_layer_property(prop->component_layer_names[comp_layer], instance_layers);
+            loader_find_layer_property(prop->component_layer_names.list[comp_layer], instance_layers);
         if (comp_prop == NULL) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                        "verify_meta_layer_component_layers: Meta-layer %s can't find component layer %s at index %d."
                        "  Skipping this layer.",
-                       prop->info.layerName, prop->component_layer_names[comp_layer], comp_layer);
+                       prop->info.layerName, prop->component_layer_names.list[comp_layer], comp_layer);
 
-            success = false;
-            break;
+            return false;
         }
 
         // Check the version of each layer, they need to be at least MAJOR and MINOR
@@ -1767,19 +2062,17 @@
                        meta_layer_version.major, meta_layer_version.minor, comp_layer, comp_prop_version.major,
                        comp_prop_version.minor);
 
-            success = false;
-            break;
+            return false;
         }
 
         // Make sure the layer isn't using it's own name
-        if (!strcmp(prop->info.layerName, prop->component_layer_names[comp_layer])) {
+        if (!strcmp(prop->info.layerName, prop->component_layer_names.list[comp_layer])) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                        "verify_meta_layer_component_layers: Meta-layer %s lists itself in its component layer "
                        "list at index %d.  Skipping this layer.",
                        prop->info.layerName, comp_layer);
 
-            success = false;
-            break;
+            return false;
         }
         if (comp_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
             loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
@@ -1791,88 +2084,111 @@
                 loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                            "Meta-layer %s component layer %s can not find all component layers."
                            "  Skipping this layer.",
-                           prop->info.layerName, prop->component_layer_names[comp_layer]);
-                success = false;
-                break;
-            }
-        }
-
-        // Add any instance and device extensions from component layers to this layer
-        // list, so that anyone querying extensions will only need to look at the meta-layer
-        for (uint32_t ext = 0; ext < comp_prop->instance_extension_list.count; ext++) {
-            loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Meta-layer %s component layer %s adding instance extension %s",
-                       prop->info.layerName, prop->component_layer_names[comp_layer],
-                       comp_prop->instance_extension_list.list[ext].extensionName);
-
-            if (!has_vk_extension_property(&comp_prop->instance_extension_list.list[ext], &prop->instance_extension_list)) {
-                loader_add_to_ext_list(inst, &prop->instance_extension_list, 1, &comp_prop->instance_extension_list.list[ext]);
-            }
-        }
-
-        for (uint32_t ext = 0; ext < comp_prop->device_extension_list.count; ext++) {
-            loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Meta-layer %s component layer %s adding device extension %s",
-                       prop->info.layerName, prop->component_layer_names[comp_layer],
-                       comp_prop->device_extension_list.list[ext].props.extensionName);
-
-            if (!has_vk_dev_ext_property(&comp_prop->device_extension_list.list[ext].props, &prop->device_extension_list)) {
-                loader_add_to_dev_ext_list(inst, &prop->device_extension_list, &comp_prop->device_extension_list.list[ext].props, 0,
-                                           NULL);
+                           prop->info.layerName, prop->component_layer_names.list[comp_layer]);
+                return false;
             }
         }
     }
-    if (success) {
-        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0,
-                   "Meta-layer \"%s\" all %d component layers appear to be valid.", prop->info.layerName,
-                   prop->num_component_layers);
+    // Didn't exit early so that means it passed all checks
+    loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0,
+               "Meta-layer \"%s\" all %d component layers appear to be valid.", prop->info.layerName,
+               prop->component_layer_names.count);
 
-        // If layer logging is on, list the internals included in the meta-layer
-        if ((loader_get_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
-            for (uint32_t comp_layer = 0; comp_layer < prop->num_component_layers; comp_layer++) {
-                loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "  [%d] %s", comp_layer, prop->component_layer_names[comp_layer]);
-            }
+    // If layer logging is on, list the internals included in the meta-layer
+    if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
+        for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
+            loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "  [%d] %s", comp_layer, prop->component_layer_names.list[comp_layer]);
         }
     }
-    return success;
+    return true;
 }
 
-// Verify that all meta-layers in a layer list are valid.
-static void verify_all_meta_layers(struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                                   const struct loader_envvar_disable_layers_filter *disable_filter,
-                                   struct loader_layer_list *instance_layers, bool *override_layer_present) {
+// Add any instance and device extensions from component layers to this layer
+// list, so that anyone querying extensions will only need to look at the meta-layer
+bool update_meta_layer_extensions_from_component_layers(const struct loader_instance *inst, struct loader_layer_properties *prop,
+                                                        struct loader_layer_list *instance_layers) {
+    VkResult res = VK_SUCCESS;
+    for (uint32_t comp_layer = 0; comp_layer < prop->component_layer_names.count; comp_layer++) {
+        struct loader_layer_properties *comp_prop =
+            loader_find_layer_property(prop->component_layer_names.list[comp_layer], instance_layers);
+
+        if (NULL != comp_prop->instance_extension_list.list) {
+            for (uint32_t ext = 0; ext < comp_prop->instance_extension_list.count; ext++) {
+                loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Meta-layer %s component layer %s adding instance extension %s",
+                           prop->info.layerName, prop->component_layer_names.list[comp_layer],
+                           comp_prop->instance_extension_list.list[ext].extensionName);
+
+                if (!has_vk_extension_property(&comp_prop->instance_extension_list.list[ext], &prop->instance_extension_list)) {
+                    res = loader_add_to_ext_list(inst, &prop->instance_extension_list, 1,
+                                                 &comp_prop->instance_extension_list.list[ext]);
+                    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                        return res;
+                    }
+                }
+            }
+        }
+        if (NULL != comp_prop->device_extension_list.list) {
+            for (uint32_t ext = 0; ext < comp_prop->device_extension_list.count; ext++) {
+                loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Meta-layer %s component layer %s adding device extension %s",
+                           prop->info.layerName, prop->component_layer_names.list[comp_layer],
+                           comp_prop->device_extension_list.list[ext].props.extensionName);
+
+                if (!has_vk_dev_ext_property(&comp_prop->device_extension_list.list[ext].props, &prop->device_extension_list)) {
+                    loader_add_to_dev_ext_list(inst, &prop->device_extension_list,
+                                               &comp_prop->device_extension_list.list[ext].props, NULL);
+                    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                        return res;
+                    }
+                }
+            }
+        }
+    }
+    return res;
+}
+
+// Verify that all meta-layers in a layer verify_meta_layer_component_layerslist are valid.
+VkResult verify_all_meta_layers(struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                                struct loader_layer_list *instance_layers, bool *override_layer_present) {
+    VkResult res = VK_SUCCESS;
     *override_layer_present = false;
     for (int32_t i = 0; i < (int32_t)instance_layers->count; i++) {
         struct loader_layer_properties *prop = &instance_layers->list[i];
 
         // If this is a meta-layer, make sure it is valid
-        if ((prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) &&
-            !verify_meta_layer_component_layers(inst, prop, instance_layers)) {
-            loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0,
-                       "Removing meta-layer %s from instance layer list since it appears invalid.", prop->info.layerName);
+        if (prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
+            if (verify_meta_layer_component_layers(inst, prop, instance_layers)) {
+                // If any meta layer is valid, update its extension list to include the extensions from its component layers.
+                res = update_meta_layer_extensions_from_component_layers(inst, prop, instance_layers);
+                if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                    return res;
+                }
+                if (prop->is_override && loader_implicit_layer_is_enabled(inst, filters, prop)) {
+                    *override_layer_present = true;
+                }
+            } else {
+                loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0,
+                           "Removing meta-layer %s from instance layer list since it appears invalid.", prop->info.layerName);
 
-            loader_remove_layer_in_list(inst, instance_layers, i);
-            i--;
-
-        } else if (prop->is_override && loader_implicit_layer_is_enabled(inst, enable_filter, disable_filter, prop)) {
-            *override_layer_present = true;
+                loader_remove_layer_in_list(inst, instance_layers, i);
+                i--;
+            }
         }
     }
+    return res;
 }
 
 // If the current working directory matches any app_key_path of the layers, remove all other override layers.
 // Otherwise if no matching app_key was found, remove all but the global override layer, which has no app_key_path.
-static void remove_all_non_valid_override_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers) {
+void remove_all_non_valid_override_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers) {
     if (instance_layers == NULL) {
         return;
     }
 
-    char cur_path[MAX_STRING_SIZE];
-    char *ret = loader_platform_executable_path(cur_path, sizeof(cur_path));
-    if (ret == NULL) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "remove_all_non_valid_override_layers: Failed to get executable path and name");
+    char cur_path[1024];
+    char *ret = loader_platform_executable_path(cur_path, 1024);
+    if (NULL == ret) {
         return;
     }
-
     // Find out if there is an override layer with same the app_key_path as the path to the current executable.
     // If more than one is found, remove it and use the first layer
     // Remove any layers which aren't global and do not have the same app_key_path as the path to the current executable.
@@ -1881,11 +2197,11 @@
     for (uint32_t i = 0; i < instance_layers->count; i++) {
         struct loader_layer_properties *props = &instance_layers->list[i];
         if (strcmp(props->info.layerName, VK_OVERRIDE_LAYER_NAME) == 0) {
-            if (props->num_app_key_paths > 0) {  // not the global layer
-                                                 // cur_path is unset on Fuchsia, so app_key_path is not supported.
+            if (props->app_key_paths.count > 0) {  // not the global layer
+                                                   // cur_path is unset on Fuchsia, so app_key_path is not supported.
 #if !defined(__Fuchsia__)
-                for (uint32_t j = 0; j < props->num_app_key_paths; j++) {
-                    if (strcmp(props->app_key_paths[j], cur_path) == 0) {
+                for (uint32_t j = 0; j < props->app_key_paths.count; j++) {
+                    if (strcmp(props->app_key_paths.list[j], cur_path) == 0) {
                         if (!found_active_override_layer) {
                             found_active_override_layer = true;
                         } else {
@@ -1935,377 +2251,263 @@
     }
 }
 
-static VkResult loader_read_layer_json(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list,
-                                       cJSON *layer_node, loader_api_version version, cJSON *item, bool is_implicit,
-                                       char *filename) {
-    char *temp;
-    char *name, *type, *library_path_str, *api_version;
-    char *implementation_version, *description;
-    cJSON *ext_item;
-    cJSON *library_path;
-    cJSON *component_layers;
-    cJSON *override_paths;
-    cJSON *blacklisted_layers;
-    cJSON *disable_environment = NULL;
-    VkExtensionProperties ext_prop;
-    VkResult result = VK_ERROR_INITIALIZATION_FAILED;
-    struct loader_layer_properties *props = NULL;
-    uint32_t props_index = 0;
-    int i, j;
+/* The following are required in the "layer" object:
+ * "name"
+ * "type"
+ * (for non-meta layers) "library_path"
+ * (for meta layers) "component_layers"
+ * "api_version"
+ * "implementation_version"
+ * "description"
+ * (for implicit layers) "disable_environment"
+ */
 
-// The following are required in the "layer" object:
-// (required) "name"
-// (required) "type"
-// (required) "library_path"
-// (required) "api_version"
-// (required) "implementation_version"
-// (required) "description"
-// (required for implicit layers) "disable_environment"
-#define GET_JSON_OBJECT(node, var)                                         \
-    {                                                                      \
-        var = cJSON_GetObjectItem(node, #var);                             \
-        if (var == NULL) {                                                 \
-            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,                    \
-                       "Didn't find required layer object %s in manifest " \
-                       "JSON file, skipping this layer",                   \
-                       #var);                                              \
-            goto out;                                                      \
-        }                                                                  \
-    }
-#define GET_JSON_ITEM(inst, node, var)                                         \
-    {                                                                          \
-        item = cJSON_GetObjectItem(node, #var);                                \
-        if (item == NULL) {                                                    \
-            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,                        \
-                       "Didn't find required layer value %s in manifest JSON " \
-                       "file, skipping this layer",                            \
-                       #var);                                                  \
-            goto out;                                                          \
-        }                                                                      \
-        temp = cJSON_Print(item);                                              \
-        if (temp == NULL) {                                                    \
-            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,                        \
-                       "Problem accessing layer value %s in manifest JSON "    \
-                       "file, skipping this layer",                            \
-                       #var);                                                  \
-            result = VK_ERROR_OUT_OF_HOST_MEMORY;                              \
-            goto out;                                                          \
-        }                                                                      \
-        temp[strlen(temp) - 1] = '\0';                                         \
-        var = loader_stack_alloc(strlen(temp) + 1);                            \
-        strcpy(var, &temp[1]);                                                 \
-        loader_instance_heap_free(inst, temp);                                 \
-    }
-    GET_JSON_ITEM(inst, layer_node, name)
-    GET_JSON_ITEM(inst, layer_node, type)
-    GET_JSON_ITEM(inst, layer_node, api_version)
-    GET_JSON_ITEM(inst, layer_node, implementation_version)
-    GET_JSON_ITEM(inst, layer_node, description)
+VkResult loader_read_layer_json(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list,
+                                cJSON *layer_node, loader_api_version version, bool is_implicit, char *filename) {
+    assert(layer_instance_list);
+    char *type = NULL;
+    char *api_version = NULL;
+    char *implementation_version = NULL;
+    VkResult result = VK_SUCCESS;
+    struct loader_layer_properties props = {0};
 
-    // Add list entry
-    if (!strcmp(type, "DEVICE")) {
-        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Device layers are deprecated. Skipping this layer");
-        goto out;
-    }
+    // Parse name
 
-    // Allow either GLOBAL or INSTANCE type interchangeably to handle
-    // layers that must work with older loaders
-    if (!strcmp(type, "INSTANCE") || !strcmp(type, "GLOBAL")) {
-        if (layer_instance_list == NULL) {
-            goto out;
-        }
-        props = loader_get_next_layer_property_slot(inst, layer_instance_list);
-        if (NULL == props) {
-            // Error already triggered in loader_get_next_layer_property_slot.
-            result = VK_ERROR_OUT_OF_HOST_MEMORY;
-            goto out;
-        }
-        props_index = layer_instance_list->count - 1;
-        props->type_flags = VK_LAYER_TYPE_FLAG_INSTANCE_LAYER;
-        if (!is_implicit) {
-            props->type_flags |= VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER;
-        }
-    } else {
+    result = loader_parse_json_string_to_existing_str(inst, layer_node, "name", VK_MAX_EXTENSION_NAME_SIZE, props.info.layerName);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) goto out;
+    if (VK_ERROR_INITIALIZATION_FAILED == result) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                   "Layer located at %s didn't find required layer value \"name\" in manifest JSON file, skipping this layer",
+                   filename);
         goto out;
     }
 
     // Check if this layer's name matches the override layer name, set is_override to true if so.
-    if (!strcmp(name, VK_OVERRIDE_LAYER_NAME)) {
-        props->is_override = true;
+    if (!strcmp(props.info.layerName, VK_OVERRIDE_LAYER_NAME)) {
+        props.is_override = true;
     }
 
+    if (0 != strncmp(props.info.layerName, "VK_LAYER_", 9)) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0, "Layer name %s does not conform to naming standard (Policy #LLP_LAYER_3)",
+                   props.info.layerName);
+    }
+
+    // Parse type
+
+    result = loader_parse_json_string(layer_node, "type", &type);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) goto out;
+    if (VK_ERROR_INITIALIZATION_FAILED == result) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                   "Layer located at %s didn't find required layer value \"type\" in manifest JSON file, skipping this layer",
+                   filename);
+        goto out;
+    }
+
+    // Add list entry
+    if (!strcmp(type, "DEVICE")) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Device layers are deprecated. Skipping this layer");
+        result = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+
+    // Allow either GLOBAL or INSTANCE type interchangeably to handle layers that must work with older loaders
+    if (!strcmp(type, "INSTANCE") || !strcmp(type, "GLOBAL")) {
+        props.type_flags = VK_LAYER_TYPE_FLAG_INSTANCE_LAYER;
+        if (!is_implicit) {
+            props.type_flags |= VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER;
+        }
+    } else {
+        result = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+
+    // Parse api_version
+
+    result = loader_parse_json_string(layer_node, "api_version", &api_version);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) goto out;
+    if (VK_ERROR_INITIALIZATION_FAILED == result) {
+        loader_log(
+            inst, VULKAN_LOADER_WARN_BIT, 0,
+            "Layer located at %s didn't find required layer value \"api_version\" in manifest JSON file, skipping this layer",
+            filename);
+        goto out;
+    }
+
+    props.info.specVersion = loader_parse_version_string(api_version);
+
+    // Make sure the layer's manifest doesn't contain a non zero variant value
+    if (VK_API_VERSION_VARIANT(props.info.specVersion) != 0) {
+        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0,
+                   "Layer \"%s\" has an \'api_version\' field which contains a non-zero variant value of %d. "
+                   " Skipping Layer.",
+                   props.info.layerName, VK_API_VERSION_VARIANT(props.info.specVersion));
+        result = VK_ERROR_INITIALIZATION_FAILED;
+        goto out;
+    }
+
+    // Parse implementation_version
+
+    result = loader_parse_json_string(layer_node, "implementation_version", &implementation_version);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) goto out;
+    if (VK_ERROR_INITIALIZATION_FAILED == result) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                   "Layer located at %s didn't find required layer value \"implementation_version\" in manifest JSON file, "
+                   "skipping this layer",
+                   filename);
+        goto out;
+    }
+    props.info.implementationVersion = atoi(implementation_version);
+
+    // Parse description
+
+    result = loader_parse_json_string_to_existing_str(inst, layer_node, "description", VK_MAX_EXTENSION_NAME_SIZE,
+                                                      props.info.description);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) goto out;
+    if (VK_ERROR_INITIALIZATION_FAILED == result) {
+        loader_log(
+            inst, VULKAN_LOADER_WARN_BIT, 0,
+            "Layer located at %s didn't find required layer value \"description\" in manifest JSON file, skipping this layer",
+            filename);
+        goto out;
+    }
+
+    // Parse library_path
+
     // Library path no longer required unless component_layers is also not defined
-    library_path = cJSON_GetObjectItem(layer_node, "library_path");
-    component_layers = cJSON_GetObjectItem(layer_node, "component_layers");
+    cJSON *library_path = loader_cJSON_GetObjectItem(layer_node, "library_path");
+
     if (NULL != library_path) {
-        if (NULL != component_layers) {
+        if (NULL != loader_cJSON_GetObjectItem(layer_node, "component_layers")) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                        "Indicating meta-layer-specific component_layers, but also defining layer library path.  Both are not "
                        "compatible, so skipping this layer");
+            result = VK_ERROR_INITIALIZATION_FAILED;
             goto out;
         }
-        props->num_component_layers = 0;
-        props->component_layer_names = NULL;
 
-        temp = cJSON_Print(library_path);
-        if (NULL == temp) {
+        result = loader_copy_to_new_str(inst, filename, &props.manifest_file_name);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+
+        char *library_path_str = loader_cJSON_Print(library_path);
+        if (NULL == library_path_str) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
-                       "Problem accessing layer value library_path in manifest JSON file, skipping this layer");
+                       "Skipping layer due to problem accessing the library_path value in manifest JSON file %s", filename);
             result = VK_ERROR_OUT_OF_HOST_MEMORY;
             goto out;
         }
-        temp[strlen(temp) - 1] = '\0';
-        library_path_str = loader_stack_alloc(strlen(temp) + 1);
-        strcpy(library_path_str, &temp[1]);
-        loader_instance_heap_free(inst, temp);
 
-        strncpy(props->manifest_file_name, filename, MAX_STRING_SIZE);
-        char *fullpath = props->lib_name;
-        char *rel_base;
-        if (NULL != library_path_str) {
-            if (loader_platform_is_path(library_path_str)) {
-                // A relative or absolute path
-                char *name_copy = loader_stack_alloc(strlen(filename) + 1);
-                strcpy(name_copy, filename);
-                rel_base = loader_platform_dirname(name_copy);
-                loader_expand_path(library_path_str, rel_base, MAX_STRING_SIZE, fullpath);
-            } else {
-                // A filename which is assumed in a system directory
-                loader_get_fullpath(library_path_str, "", MAX_STRING_SIZE, fullpath);
-            }
-        }
-    } else if (NULL != component_layers) {
+        // This function takes ownership of library_path_str - so we don't need to clean it up
+        result = combine_manifest_directory_and_library_path(inst, library_path_str, filename, &props.lib_name);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+    }
+
+    // Parse component_layers
+
+    if (NULL == library_path) {
         if (!loader_check_version_meets_required(LOADER_VERSION_1_1_0, version)) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                        "Indicating meta-layer-specific component_layers, but using older JSON file version.");
         }
-        int count = cJSON_GetArraySize(component_layers);
-        props->num_component_layers = count;
 
-        // Allocate buffer for layer names
-        props->component_layer_names =
-            loader_instance_heap_alloc(inst, sizeof(char[MAX_STRING_SIZE]) * count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-        if (NULL == props->component_layer_names && count > 0) {
-            result = VK_ERROR_OUT_OF_HOST_MEMORY;
+        result = loader_parse_json_array_of_strings(inst, layer_node, "component_layers", &(props.component_layer_names));
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == result) {
+            goto out;
+        }
+        if (VK_ERROR_INITIALIZATION_FAILED == result) {
+            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                       "Layer missing both library_path and component_layers fields.  One or the other MUST be defined.  Skipping "
+                       "this layer");
+            goto out;
+        }
+        // This is now, officially, a meta-layer
+        props.type_flags |= VK_LAYER_TYPE_FLAG_META_LAYER;
+        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Encountered meta-layer \"%s\"",
+                   props.info.layerName);
+    }
+
+    // Parse blacklisted_layers
+
+    if (props.is_override) {
+        result = loader_parse_json_array_of_strings(inst, layer_node, "blacklisted_layers", &(props.blacklist_layer_names));
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == result) {
+            goto out;
+        }
+    }
+
+    // Parse override_paths
+
+    result = loader_parse_json_array_of_strings(inst, layer_node, "override_paths", &(props.override_paths));
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == result) {
+        goto out;
+    }
+    if (NULL != props.override_paths.list && !loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
+        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                   "Indicating meta-layer-specific override paths, but using older JSON file version.");
+    }
+
+    // Parse disable_environment
+
+    if (is_implicit) {
+        cJSON *disable_environment = loader_cJSON_GetObjectItem(layer_node, "disable_environment");
+        if (disable_environment == NULL) {
+            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
+                       "Didn't find required layer object disable_environment in manifest JSON file, skipping this layer");
+            result = VK_ERROR_INITIALIZATION_FAILED;
             goto out;
         }
 
-        // Copy the component layers into the array
-        for (i = 0; i < count; i++) {
-            cJSON *comp_layer = cJSON_GetArrayItem(component_layers, i);
-            if (NULL != comp_layer) {
-                temp = cJSON_Print(comp_layer);
-                if (NULL == temp) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-                temp[strlen(temp) - 1] = '\0';
-                strncpy(props->component_layer_names[i], temp + 1, MAX_STRING_SIZE - 1);
-                props->component_layer_names[i][MAX_STRING_SIZE - 1] = '\0';
-                loader_instance_heap_free(inst, temp);
-            }
-        }
-
-        // This is now, officially, a meta-layer
-        props->type_flags |= VK_LAYER_TYPE_FLAG_META_LAYER;
-        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Encountered meta-layer \"%s\"", name);
-
-        // Make sure we set up other things so we head down the correct branches below
-        library_path_str = NULL;
-    } else {
-        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "Layer missing both library_path and component_layers fields.  One or the other MUST be defined.  Skipping "
-                   "this layer");
-        goto out;
-    }
-
-    props->num_blacklist_layers = 0;
-    props->blacklist_layer_names = NULL;
-    blacklisted_layers = cJSON_GetObjectItem(layer_node, "blacklisted_layers");
-    if (blacklisted_layers != NULL) {
-        if (strcmp(name, VK_OVERRIDE_LAYER_NAME)) {
-            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
-                       "Layer \"%s\" contains a blacklist, but a blacklist can only be provided by the override metalayer. This "
-                       "blacklist will be ignored.",
-                       name);
-        } else {
-            props->num_blacklist_layers = cJSON_GetArraySize(blacklisted_layers);
-            if (props->num_blacklist_layers > 0) {
-                // Allocate the blacklist array
-                props->blacklist_layer_names = loader_instance_heap_alloc(
-                    inst, sizeof(char[MAX_STRING_SIZE]) * props->num_blacklist_layers, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-                if (props->blacklist_layer_names == NULL && props->num_blacklist_layers > 0) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-
-                // Copy the blacklisted layers into the array
-                for (i = 0; i < (int)props->num_blacklist_layers; ++i) {
-                    cJSON *black_layer = cJSON_GetArrayItem(blacklisted_layers, i);
-                    if (black_layer == NULL) {
-                        continue;
-                    }
-                    temp = cJSON_Print(black_layer);
-                    if (temp == NULL) {
-                        result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                        goto out;
-                    }
-                    temp[strlen(temp) - 1] = '\0';
-                    strncpy(props->blacklist_layer_names[i], temp + 1, MAX_STRING_SIZE - 1);
-                    props->blacklist_layer_names[i][MAX_STRING_SIZE - 1] = '\0';
-                    loader_instance_heap_free(inst, temp);
-                }
-            }
-        }
-    }
-
-    override_paths = cJSON_GetObjectItem(layer_node, "override_paths");
-    if (NULL != override_paths) {
-        if (!loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
-            loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
-                       "Indicating meta-layer-specific override paths, but using older JSON file version.");
-        }
-        int count = cJSON_GetArraySize(override_paths);
-        props->num_override_paths = count;
-        if (count > 0) {
-            // Allocate buffer for override paths
-            props->override_paths =
-                loader_instance_heap_alloc(inst, sizeof(char[MAX_STRING_SIZE]) * count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-            if (NULL == props->override_paths && count > 0) {
-                result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            }
-
-            // Copy the override paths into the array
-            for (i = 0; i < count; i++) {
-                cJSON *override_path = cJSON_GetArrayItem(override_paths, i);
-                if (NULL != override_path) {
-                    temp = cJSON_Print(override_path);
-                    if (NULL == temp) {
-                        result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                        goto out;
-                    }
-                    temp[strlen(temp) - 1] = '\0';
-                    strncpy(props->override_paths[i], temp + 1, MAX_STRING_SIZE - 1);
-                    props->override_paths[i][MAX_STRING_SIZE - 1] = '\0';
-                    loader_instance_heap_free(inst, temp);
-                }
-            }
-        }
-    }
-
-    if (is_implicit) {
-        GET_JSON_OBJECT(layer_node, disable_environment)
-    }
-#undef GET_JSON_ITEM
-#undef GET_JSON_OBJECT
-
-    strncpy(props->info.layerName, name, sizeof(props->info.layerName));
-    props->info.layerName[sizeof(props->info.layerName) - 1] = '\0';
-    if (0 != strncmp(props->info.layerName, "VK_LAYER_", 9)) {
-        loader_log(inst, VULKAN_LOADER_WARN_BIT, 0, "Layer name %s does not conform to naming standard (Policy #LLP_LAYER_3)",
-                   props->info.layerName);
-    }
-    props->info.specVersion = loader_parse_version_string(api_version);
-    props->info.implementationVersion = atoi(implementation_version);
-    strncpy((char *)props->info.description, description, sizeof(props->info.description));
-    props->info.description[sizeof(props->info.description) - 1] = '\0';
-    if (is_implicit) {
-        if (!disable_environment || !disable_environment->child) {
+        if (!disable_environment->child || disable_environment->child->type != cJSON_String) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT, 0,
                        "Didn't find required layer child value disable_environment in manifest JSON file, skipping this layer "
                        "(Policy #LLP_LAYER_9)");
+            result = VK_ERROR_INITIALIZATION_FAILED;
             goto out;
         }
-        strncpy(props->disable_env_var.name, disable_environment->child->string, sizeof(props->disable_env_var.name));
-        props->disable_env_var.name[sizeof(props->disable_env_var.name) - 1] = '\0';
-        strncpy(props->disable_env_var.value, disable_environment->child->valuestring, sizeof(props->disable_env_var.value));
-        props->disable_env_var.value[sizeof(props->disable_env_var.value) - 1] = '\0';
+        result = loader_copy_to_new_str(inst, disable_environment->child->string, &(props.disable_env_var.name));
+        if (VK_SUCCESS != result) goto out;
+        result = loader_copy_to_new_str(inst, disable_environment->child->valuestring, &(props.disable_env_var.value));
+        if (VK_SUCCESS != result) goto out;
     }
 
-    // Make sure the layer's manifest doesn't contain a non zero variant value
-    if (VK_API_VERSION_VARIANT(props->info.specVersion) != 0) {
-        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0,
-                   "Layer \"%s\" has an \'api_version\' field which contains a non-zero variant value of %d. "
-                   " Skipping Layer.",
-                   props->info.layerName, VK_API_VERSION_VARIANT(props->info.specVersion));
-        goto out;
-    }
-
-// Now get all optional items and objects and put in list:
-// functions
-// instance_extensions
-// device_extensions
-// enable_environment (implicit layers only)
-// library_arch
-#define GET_JSON_OBJECT(node, var) \
-    { var = cJSON_GetObjectItem(node, #var); }
-#define GET_JSON_ITEM(inst, node, var)                      \
-    {                                                       \
-        item = cJSON_GetObjectItem(node, #var);             \
-        if (item != NULL) {                                 \
-            temp = cJSON_Print(item);                       \
-            if (temp != NULL) {                             \
-                temp[strlen(temp) - 1] = '\0';              \
-                var = loader_stack_alloc(strlen(temp) + 1); \
-                strcpy(var, &temp[1]);                      \
-                loader_instance_heap_free(inst, temp);      \
-            } else {                                        \
-                result = VK_ERROR_OUT_OF_HOST_MEMORY;       \
-                goto out;                                   \
-            }                                               \
-        }                                                   \
-    }
-
-    cJSON *instance_extensions, *device_extensions, *functions, *enable_environment;
-    cJSON *entrypoints = NULL;
-    char *vkGetInstanceProcAddr = NULL;
-    char *vkGetDeviceProcAddr = NULL;
-    char *vkNegotiateLoaderLayerInterfaceVersion = NULL;
-    char *spec_version = NULL;
-    char **entry_array = NULL;
-    char *library_arch = NULL;
-    cJSON *app_keys = NULL;
+    // Now get all optional items and objects and put in list:
+    // functions
+    // instance_extensions
+    // device_extensions
+    // enable_environment (implicit layers only)
+    // library_arch
 
     // Layer interface functions
     //    vkGetInstanceProcAddr
     //    vkGetDeviceProcAddr
     //    vkNegotiateLoaderLayerInterfaceVersion (starting with JSON file 1.1.0)
-    GET_JSON_OBJECT(layer_node, functions)
+    cJSON *functions = loader_cJSON_GetObjectItem(layer_node, "functions");
     if (functions != NULL) {
         if (loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
-            GET_JSON_ITEM(inst, functions, vkNegotiateLoaderLayerInterfaceVersion)
-            if (vkNegotiateLoaderLayerInterfaceVersion != NULL)
-                strncpy(props->functions.str_negotiate_interface, vkNegotiateLoaderLayerInterfaceVersion,
-                        sizeof(props->functions.str_negotiate_interface));
-            props->functions.str_negotiate_interface[sizeof(props->functions.str_negotiate_interface) - 1] = '\0';
-        } else {
-            props->functions.str_negotiate_interface[0] = '\0';
+            result = loader_parse_json_string(functions, "vkNegotiateLoaderLayerInterfaceVersion",
+                                              &props.functions.str_negotiate_interface);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
         }
-        GET_JSON_ITEM(inst, functions, vkGetInstanceProcAddr)
-        GET_JSON_ITEM(inst, functions, vkGetDeviceProcAddr)
-        if (vkGetInstanceProcAddr != NULL) {
-            strncpy(props->functions.str_gipa, vkGetInstanceProcAddr, sizeof(props->functions.str_gipa));
-            if (loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
-                loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
-                           "Layer \"%s\" using deprecated \'vkGetInstanceProcAddr\' tag which was deprecated starting with JSON "
-                           "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
-                           "compatibility reasons it may be desirable to continue using the deprecated tag.",
-                           name);
-            }
+        result = loader_parse_json_string(functions, "vkGetInstanceProcAddr", &props.functions.str_gipa);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+
+        if (props.functions.str_gipa && loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
+            loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
+                       "Layer \"%s\" using deprecated \'vkGetInstanceProcAddr\' tag which was deprecated starting with JSON "
+                       "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
+                       "compatibility reasons it may be desirable to continue using the deprecated tag.",
+                       props.info.layerName);
         }
-        props->functions.str_gipa[sizeof(props->functions.str_gipa) - 1] = '\0';
-        if (vkGetDeviceProcAddr != NULL) {
-            strncpy(props->functions.str_gdpa, vkGetDeviceProcAddr, sizeof(props->functions.str_gdpa));
-            if (loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
-                loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
-                           "Layer \"%s\" using deprecated \'vkGetDeviceProcAddr\' tag which was deprecated starting with JSON "
-                           "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
-                           "compatibility reasons it may be desirable to continue using the deprecated tag.",
-                           name);
-            }
+
+        result = loader_parse_json_string(functions, "vkGetDeviceProcAddr", &props.functions.str_gdpa);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+
+        if (props.functions.str_gdpa && loader_check_version_meets_required(loader_combine_version(1, 1, 0), version)) {
+            loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
+                       "Layer \"%s\" using deprecated \'vkGetDeviceProcAddr\' tag which was deprecated starting with JSON "
+                       "file version 1.1.0. The new vkNegotiateLoaderLayerInterfaceVersion function is preferred, though for "
+                       "compatibility reasons it may be desirable to continue using the deprecated tag.",
+                       props.info.layerName);
         }
-        props->functions.str_gdpa[sizeof(props->functions.str_gdpa) - 1] = '\0';
     }
 
     // instance_extensions
@@ -2313,25 +2515,27 @@
     //     name
     //     spec_version
     //   }
-    GET_JSON_OBJECT(layer_node, instance_extensions)
+
+    cJSON *instance_extensions = loader_cJSON_GetObjectItem(layer_node, "instance_extensions");
     if (instance_extensions != NULL) {
-        int count = cJSON_GetArraySize(instance_extensions);
-        for (i = 0; i < count; i++) {
-            ext_item = cJSON_GetArrayItem(instance_extensions, i);
-            GET_JSON_ITEM(inst, ext_item, name)
-            if (name != NULL) {
-                strncpy(ext_prop.extensionName, name, sizeof(ext_prop.extensionName));
-                ext_prop.extensionName[sizeof(ext_prop.extensionName) - 1] = '\0';
-            }
-            GET_JSON_ITEM(inst, ext_item, spec_version)
+        int count = loader_cJSON_GetArraySize(instance_extensions);
+        for (int i = 0; i < count; i++) {
+            VkExtensionProperties ext_prop = {0};
+            cJSON *ext_item = loader_cJSON_GetArrayItem(instance_extensions, i);
+            result = loader_parse_json_string_to_existing_str(inst, ext_item, "name", VK_MAX_EXTENSION_NAME_SIZE,
+                                                              ext_prop.extensionName);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+            if (result == VK_ERROR_INITIALIZATION_FAILED) continue;
+            char *spec_version = NULL;
+            result = loader_parse_json_string(ext_item, "spec_version", &spec_version);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
             if (NULL != spec_version) {
                 ext_prop.specVersion = atoi(spec_version);
-            } else {
-                ext_prop.specVersion = 0;
             }
+            loader_instance_heap_free(inst, spec_version);
             bool ext_unsupported = wsi_unsupported_instance_extension(&ext_prop);
             if (!ext_unsupported) {
-                loader_add_to_ext_list(inst, &props->instance_extension_list, 1, &ext_prop);
+                loader_add_to_ext_list(inst, &props.instance_extension_list, 1, &ext_prop);
             }
         }
     }
@@ -2342,65 +2546,54 @@
     //     spec_version
     //     entrypoints
     //   }
-    GET_JSON_OBJECT(layer_node, device_extensions)
+    cJSON *device_extensions = loader_cJSON_GetObjectItem(layer_node, "device_extensions");
     if (device_extensions != NULL) {
-        int count = cJSON_GetArraySize(device_extensions);
-        for (i = 0; i < count; i++) {
-            ext_item = cJSON_GetArrayItem(device_extensions, i);
-            GET_JSON_ITEM(inst, ext_item, name)
-            GET_JSON_ITEM(inst, ext_item, spec_version)
-            if (name != NULL) {
-                strncpy(ext_prop.extensionName, name, sizeof(ext_prop.extensionName));
-                ext_prop.extensionName[sizeof(ext_prop.extensionName) - 1] = '\0';
-            }
+        int count = loader_cJSON_GetArraySize(device_extensions);
+        for (int i = 0; i < count; i++) {
+            VkExtensionProperties ext_prop = {0};
+
+            cJSON *ext_item = loader_cJSON_GetArrayItem(device_extensions, i);
+
+            result = loader_parse_json_string_to_existing_str(inst, ext_item, "name", VK_MAX_EXTENSION_NAME_SIZE,
+                                                              ext_prop.extensionName);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+
+            char *spec_version = NULL;
+            result = loader_parse_json_string(ext_item, "spec_version", &spec_version);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
             if (NULL != spec_version) {
                 ext_prop.specVersion = atoi(spec_version);
-            } else {
-                ext_prop.specVersion = 0;
             }
-            // entrypoints = cJSON_GetObjectItem(ext_item, "entrypoints");
-            GET_JSON_OBJECT(ext_item, entrypoints)
-            int entry_count;
+            loader_instance_heap_free(inst, spec_version);
+
+            cJSON *entrypoints = loader_cJSON_GetObjectItem(ext_item, "entrypoints");
             if (entrypoints == NULL) {
-                loader_add_to_dev_ext_list(inst, &props->device_extension_list, &ext_prop, 0, NULL);
+                result = loader_add_to_dev_ext_list(inst, &props.device_extension_list, &ext_prop, NULL);
+                if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
                 continue;
             }
-            entry_count = cJSON_GetArraySize(entrypoints);
-            if (entry_count) {
-                entry_array = (char **)loader_stack_alloc(sizeof(char *) * entry_count);
-            }
-            for (j = 0; j < entry_count; j++) {
-                ext_item = cJSON_GetArrayItem(entrypoints, j);
-                if (ext_item != NULL) {
-                    temp = cJSON_Print(ext_item);
-                    if (NULL == temp) {
-                        entry_array[j] = NULL;
-                        result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                        goto out;
-                    }
-                    temp[strlen(temp) - 1] = '\0';
-                    entry_array[j] = loader_stack_alloc(strlen(temp) + 1);
-                    strcpy(entry_array[j], &temp[1]);
-                    loader_instance_heap_free(inst, temp);
-                }
-            }
-            loader_add_to_dev_ext_list(inst, &props->device_extension_list, &ext_prop, entry_count, entry_array);
+
+            struct loader_string_list entrys = {0};
+            result = loader_parse_json_array_of_strings(inst, ext_item, "entrypoints", &entrys);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+            result = loader_add_to_dev_ext_list(inst, &props.device_extension_list, &ext_prop, &entrys);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
         }
     }
     if (is_implicit) {
-        GET_JSON_OBJECT(layer_node, enable_environment)
+        cJSON *enable_environment = loader_cJSON_GetObjectItem(layer_node, "enable_environment");
 
         // enable_environment is optional
-        if (enable_environment) {
-            strncpy(props->enable_env_var.name, enable_environment->child->string, sizeof(props->enable_env_var.name));
-            props->enable_env_var.name[sizeof(props->enable_env_var.name) - 1] = '\0';
-            strncpy(props->enable_env_var.value, enable_environment->child->valuestring, sizeof(props->enable_env_var.value));
-            props->enable_env_var.value[sizeof(props->enable_env_var.value) - 1] = '\0';
+        if (enable_environment && enable_environment->child && enable_environment->child->type == cJSON_String) {
+            result = loader_copy_to_new_str(inst, enable_environment->child->string, &(props.enable_env_var.name));
+            if (VK_SUCCESS != result) goto out;
+            result = loader_copy_to_new_str(inst, enable_environment->child->valuestring, &(props.enable_env_var.value));
+            if (VK_SUCCESS != result) goto out;
         }
     }
 
     // Read in the pre-instance stuff
-    cJSON *pre_instance = cJSON_GetObjectItem(layer_node, "pre_instance_functions");
+    cJSON *pre_instance = loader_cJSON_GetObjectItem(layer_node, "pre_instance_functions");
     if (NULL != pre_instance) {
         // Supported versions started in 1.1.2, so anything newer
         if (!loader_check_version_meets_required(loader_combine_version(1, 1, 2), version)) {
@@ -2414,111 +2607,65 @@
                        "layers. The section will be ignored",
                        filename);
         } else {
-            cJSON *inst_ext_json = cJSON_GetObjectItem(pre_instance, "vkEnumerateInstanceExtensionProperties");
-            if (NULL != inst_ext_json) {
-                char *inst_ext_name = cJSON_Print(inst_ext_json);
-                if (NULL == inst_ext_name) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-                size_t len = strlen(inst_ext_name) >= MAX_STRING_SIZE ? MAX_STRING_SIZE - 3 : strlen(inst_ext_name) - 2;
-                strncpy(props->pre_instance_functions.enumerate_instance_extension_properties, inst_ext_name + 1, len);
-                props->pre_instance_functions.enumerate_instance_extension_properties[len] = '\0';
-                loader_instance_heap_free(inst, inst_ext_name);
-            }
+            result = loader_parse_json_string(pre_instance, "vkEnumerateInstanceExtensionProperties",
+                                              &props.pre_instance_functions.enumerate_instance_extension_properties);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
 
-            cJSON *inst_layer_json = cJSON_GetObjectItem(pre_instance, "vkEnumerateInstanceLayerProperties");
-            if (NULL != inst_layer_json) {
-                char *inst_layer_name = cJSON_Print(inst_layer_json);
-                if (NULL == inst_layer_name) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-                size_t len = strlen(inst_layer_name) >= MAX_STRING_SIZE ? MAX_STRING_SIZE - 3 : strlen(inst_layer_name) - 2;
-                strncpy(props->pre_instance_functions.enumerate_instance_layer_properties, inst_layer_name + 1, len);
-                props->pre_instance_functions.enumerate_instance_layer_properties[len] = '\0';
-                loader_instance_heap_free(inst, inst_layer_name);
-            }
+            result = loader_parse_json_string(pre_instance, "vkEnumerateInstanceLayerProperties",
+                                              &props.pre_instance_functions.enumerate_instance_layer_properties);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
 
-            cJSON *inst_version_json = cJSON_GetObjectItem(pre_instance, "vkEnumerateInstanceVersion");
-            if (NULL != inst_version_json) {
-                char *inst_version_name = cJSON_Print(inst_version_json);
-                if (NULL == inst_version_name) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-                size_t len = strlen(inst_version_name) >= MAX_STRING_SIZE ? MAX_STRING_SIZE - 3 : strlen(inst_version_name) - 2;
-                strncpy(props->pre_instance_functions.enumerate_instance_version, inst_version_name + 1, len);
-                props->pre_instance_functions.enumerate_instance_version[len] = '\0';
-                loader_instance_heap_free(inst, inst_version_name);
-            }
+            result = loader_parse_json_string(pre_instance, "vkEnumerateInstanceVersion",
+                                              &props.pre_instance_functions.enumerate_instance_version);
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
         }
     }
 
-    props->num_app_key_paths = 0;
-    props->app_key_paths = NULL;
-    app_keys = cJSON_GetObjectItem(layer_node, "app_keys");
-    if (app_keys != NULL) {
-        if (strcmp(name, VK_OVERRIDE_LAYER_NAME)) {
+    if (loader_cJSON_GetObjectItem(layer_node, "app_keys")) {
+        if (!props.is_override) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                        "Layer %s contains app_keys, but any app_keys can only be provided by the override metalayer. "
                        "These will be ignored.",
-                       name);
-        } else {
-            props->num_app_key_paths = cJSON_GetArraySize(app_keys);
-
-            // Allocate the blacklist array
-            props->app_key_paths = loader_instance_heap_alloc(inst, sizeof(char[MAX_STRING_SIZE]) * props->num_app_key_paths,
-                                                              VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-            if (props->app_key_paths == NULL) {
-                result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            }
-
-            // Copy the app_key_paths into the array
-            for (i = 0; i < (int)props->num_app_key_paths; ++i) {
-                cJSON *app_key_path = cJSON_GetArrayItem(app_keys, i);
-                if (app_key_path == NULL) {
-                    continue;
-                }
-                temp = cJSON_Print(app_key_path);
-                if (temp == NULL) {
-                    result = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-                temp[strlen(temp) - 1] = '\0';
-                strncpy(props->app_key_paths[i], temp + 1, MAX_STRING_SIZE - 1);
-                props->app_key_paths[i][MAX_STRING_SIZE - 1] = '\0';
-                loader_instance_heap_free(inst, temp);
-            }
+                       props.info.layerName);
         }
+
+        result = loader_parse_json_array_of_strings(inst, layer_node, "app_keys", &props.app_key_paths);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
     }
 
-    GET_JSON_ITEM(inst, layer_node, library_arch)
+    char *library_arch = NULL;
+    result = loader_parse_json_string(layer_node, "library_arch", &library_arch);
+    if (result == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
     if (library_arch != NULL) {
         if ((strncmp(library_arch, "32", 2) == 0 && sizeof(void *) != 4) ||
             (strncmp(library_arch, "64", 2) == 0 && sizeof(void *) != 8)) {
             loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
                        "Layer library architecture doesn't match the current running architecture, skipping this layer");
+            loader_instance_heap_free(inst, library_arch);
+            result = VK_ERROR_INITIALIZATION_FAILED;
             goto out;
         }
+        loader_instance_heap_free(inst, library_arch);
     }
 
     result = VK_SUCCESS;
 
 out:
-#undef GET_JSON_ITEM
-#undef GET_JSON_OBJECT
-
-    if (VK_SUCCESS != result && NULL != props) {
-        // Make sure to free anything that was allocated
-        loader_remove_layer_in_list(inst, layer_instance_list, props_index);
+    // Try to append the layer property
+    if (VK_SUCCESS == result) {
+        result = loader_append_layer_property(inst, layer_instance_list, &props);
     }
-
+    // If appending fails - free all the memory allocated in it
+    if (VK_SUCCESS != result) {
+        loader_free_layer_properties(inst, &props);
+    }
+    loader_instance_heap_free(inst, type);
+    loader_instance_heap_free(inst, api_version);
+    loader_instance_heap_free(inst, implementation_version);
     return result;
 }
 
-static inline bool is_valid_layer_json_version(const loader_api_version *layer_json) {
+bool is_valid_layer_json_version(const loader_api_version *layer_json) {
     // Supported versions are: 1.0.0, 1.0.1, 1.1.0 - 1.1.2, and 1.2.0 - 1.2.1.
     if ((layer_json->major == 1 && layer_json->minor == 2 && layer_json->patch < 2) ||
         (layer_json->major == 1 && layer_json->minor == 1 && layer_json->patch < 3) ||
@@ -2537,8 +2684,8 @@
 // layer_list has a new entry and initialized accordingly.
 // If the json input object does not have all the required fields no entry
 // is added to the list.
-static VkResult loader_add_layer_properties(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list,
-                                            cJSON *json, bool is_implicit, char *filename) {
+VkResult loader_add_layer_properties(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list, cJSON *json,
+                                     bool is_implicit, char *filename) {
     // The following Fields in layer manifest file that are required:
     //   - "file_format_version"
     //   - If more than one "layer" object are used, then the "layers" array is
@@ -2551,11 +2698,11 @@
     if (!json || json->type != 6) {
         goto out;
     }
-    item = cJSON_GetObjectItem(json, "file_format_version");
+    item = loader_cJSON_GetObjectItem(json, "file_format_version");
     if (item == NULL) {
         goto out;
     }
-    file_vers = cJSON_PrintUnformatted(item);
+    file_vers = loader_cJSON_PrintUnformatted(item);
     if (NULL == file_vers) {
         result = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
@@ -2571,9 +2718,9 @@
     }
 
     // If "layers" is present, read in the array of layer objects
-    layers_node = cJSON_GetObjectItem(json, "layers");
+    layers_node = loader_cJSON_GetObjectItem(json, "layers");
     if (layers_node != NULL) {
-        int numItems = cJSON_GetArraySize(layers_node);
+        int numItems = loader_cJSON_GetArraySize(layers_node);
         // Supported versions started in 1.0.1, so anything newer
         if (!loader_check_version_meets_required(loader_combine_version(1, 0, 1), json_version)) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
@@ -2582,7 +2729,7 @@
                        filename, file_vers);
         }
         for (int curLayer = 0; curLayer < numItems; curLayer++) {
-            layer_node = cJSON_GetArrayItem(layers_node, curLayer);
+            layer_node = loader_cJSON_GetArrayItem(layers_node, curLayer);
             if (layer_node == NULL) {
                 loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                            "loader_add_layer_properties: Can not find 'layers' array element %d object in manifest JSON file %s.  "
@@ -2590,11 +2737,11 @@
                            curLayer, filename);
                 goto out;
             }
-            result = loader_read_layer_json(inst, layer_instance_list, layer_node, json_version, item, is_implicit, filename);
+            result = loader_read_layer_json(inst, layer_instance_list, layer_node, json_version, is_implicit, filename);
         }
     } else {
         // Otherwise, try to read in individual layers
-        layer_node = cJSON_GetObjectItem(json, "layer");
+        layer_node = loader_cJSON_GetObjectItem(json, "layer");
         if (layer_node == NULL) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                        "loader_add_layer_properties: Can not find 'layer' object in manifest JSON file %s.  Skipping this file.",
@@ -2620,7 +2767,7 @@
                        filename);
         } else {
             do {
-                result = loader_read_layer_json(inst, layer_instance_list, layer_node, json_version, item, is_implicit, filename);
+                result = loader_read_layer_json(inst, layer_instance_list, layer_node, json_version, is_implicit, filename);
                 layer_node = layer_node->next;
             } while (layer_node != NULL);
         }
@@ -2632,7 +2779,7 @@
     return result;
 }
 
-static inline size_t determine_data_file_path_size(const char *cur_path, size_t relative_path_size) {
+size_t determine_data_file_path_size(const char *cur_path, size_t relative_path_size) {
     size_t path_size = 0;
 
     if (NULL != cur_path) {
@@ -2651,8 +2798,7 @@
     return path_size;
 }
 
-static inline void copy_data_file_info(const char *cur_path, const char *relative_path, size_t relative_path_size,
-                                       char **output_path) {
+void copy_data_file_info(const char *cur_path, const char *relative_path, size_t relative_path_size, char **output_path) {
     if (NULL != cur_path) {
         uint32_t start = 0;
         uint32_t stop = 0;
@@ -2693,60 +2839,8 @@
     }
 }
 
-// Check to see if there's enough space in the data file list.  If not, add some.
-static inline VkResult check_and_adjust_data_file_list(const struct loader_instance *inst, struct loader_data_files *out_files) {
-    if (out_files->count == 0) {
-        out_files->filename_list = loader_instance_heap_alloc(inst, 64 * sizeof(char *), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-        if (NULL == out_files->filename_list) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "check_and_adjust_data_file_list: Failed to allocate space for manifest file name list");
-            return VK_ERROR_OUT_OF_HOST_MEMORY;
-        }
-        out_files->alloc_count = 64;
-    } else if (out_files->count == out_files->alloc_count) {
-        size_t new_size = out_files->alloc_count * sizeof(char *) * 2;
-        void *new_ptr = loader_instance_heap_realloc(inst, out_files->filename_list, out_files->alloc_count * sizeof(char *),
-                                                     new_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-        if (NULL == new_ptr) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "check_and_adjust_data_file_list: Failed to reallocate space for manifest file name list");
-            return VK_ERROR_OUT_OF_HOST_MEMORY;
-        }
-        out_files->filename_list = new_ptr;
-        out_files->alloc_count *= 2;
-    }
-
-    return VK_SUCCESS;
-}
-
-// add file_name to the out_files manifest list. Assumes its a valid manifest file name
-static VkResult add_manifest_file(const struct loader_instance *inst, const char *file_name, struct loader_data_files *out_files) {
-    VkResult vk_result = VK_SUCCESS;
-
-    // Check and allocate space in the manifest list if necessary
-    vk_result = check_and_adjust_data_file_list(inst, out_files);
-    if (VK_SUCCESS != vk_result) {
-        goto out;
-    }
-
-    out_files->filename_list[out_files->count] =
-        loader_instance_heap_alloc(inst, strlen(file_name) + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-    if (out_files->filename_list[out_files->count] == NULL) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "add_manifest_file: Failed to allocate space for manifest file %d list",
-                   out_files->count);
-        vk_result = VK_ERROR_OUT_OF_HOST_MEMORY;
-        goto out;
-    }
-
-    strcpy(out_files->filename_list[out_files->count++], file_name);
-
-out:
-    return vk_result;
-}
-
 // If the file found is a manifest file name, add it to the out_files manifest list.
-static VkResult add_if_manifest_file(const struct loader_instance *inst, const char *file_name,
-                                     struct loader_data_files *out_files) {
+VkResult add_if_manifest_file(const struct loader_instance *inst, const char *file_name, struct loader_string_list *out_files) {
     VkResult vk_result = VK_SUCCESS;
 
     assert(NULL != file_name && "add_if_manifest_file: Received NULL pointer for file_name");
@@ -2761,7 +2855,7 @@
         goto out;
     }
 
-    vk_result = add_manifest_file(inst, file_name, out_files);
+    vk_result = copy_str_to_string_list(inst, out_files, file_name, name_len);
 
 out:
 
@@ -2770,7 +2864,7 @@
 
 // Add any files found in the search_path.  If any path in the search path points to a specific JSON, attempt to
 // only open that one JSON.  Otherwise, if the path is a folder, search the folder for JSON files.
-VkResult add_data_files(const struct loader_instance *inst, int dir_fd, char *search_path, struct loader_data_files *out_files,
+VkResult add_data_files(const struct loader_instance *inst, int dir_fd, char *search_path, struct loader_string_list *out_files,
                         bool use_first_found_manifest) {
     VkResult vk_result = VK_SUCCESS;
     DIR *dir_stream = NULL;
@@ -2779,7 +2873,7 @@
     char *next_file;
     char *name;
     char full_path[2048];
-#ifndef _WIN32
+#if !defined(_WIN32)
     char temp_path[2048];
 #endif
 #if !defined(__Fuchsia__)
@@ -2796,9 +2890,9 @@
         // Is this a JSON file, then try to open it.
         size_t len = strlen(cur_file);
         if (is_json(cur_file + len - 5, len)) {
-#ifdef _WIN32
+#if defined(_WIN32)
             name = cur_file;
-#else
+#elif COMMON_UNIX_PLATFORMS
             // Only Linux has relative paths, make a copy of location so it isn't modified
             size_t str_len;
             if (NULL != next_file) {
@@ -2807,11 +2901,13 @@
                 str_len = strlen(cur_file) + 1;
             }
             if (str_len > sizeof(temp_path)) {
-                loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "add_data_files: Path to %s too long\n", cur_file);
+                loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "add_data_files: Path to %s too long", cur_file);
                 continue;
             }
-            strcpy(temp_path, cur_file);
+            strncpy(temp_path, cur_file, str_len);
             name = temp_path;
+#else
+#warning add_data_files must define relative path copy for this platform
 #endif
             loader_get_fullpath(cur_file, name, sizeof(full_path), full_path);
             name = full_path;
@@ -2874,32 +2970,31 @@
 
 // Look for data files in the provided paths, but first check the environment override to determine if we should use that
 // instead.
-static VkResult read_data_files_in_search_paths(const struct loader_instance *inst, enum loader_data_files_type manifest_type,
-                                                const char *path_override, bool *override_active,
-                                                struct loader_data_files *out_files) {
+VkResult read_data_files_in_search_paths(const struct loader_instance *inst, enum loader_data_files_type manifest_type,
+                                         const char *path_override, bool *override_active, struct loader_string_list *out_files) {
     VkResult vk_result = VK_SUCCESS;
     char *override_env = NULL;
     const char *override_path = NULL;
-    char *relative_location = NULL;
     char *additional_env = NULL;
     size_t search_path_size = 0;
     char *search_path = NULL;
     char *cur_path_ptr = NULL;
     bool use_first_found_manifest = false;
-#ifndef _WIN32
-    size_t rel_size = 0;  // unused in windows, dont declare so no compiler warnings are generated
+#if COMMON_UNIX_PLATFORMS
+    char *relative_location = NULL;  // Only used on unix platforms
+    size_t rel_size = 0;             // unused in windows, dont declare so no compiler warnings are generated
 #endif
     int dir_fd = -1;
 
 #if defined(_WIN32)
     char *package_path = NULL;
-#else
+#elif COMMON_UNIX_PLATFORMS
     // Determine how much space is needed to generate the full search path
     // for the current manifest files.
     char *xdg_config_home = loader_secure_getenv("XDG_CONFIG_HOME", inst);
     char *xdg_config_dirs = loader_secure_getenv("XDG_CONFIG_DIRS", inst);
 
-#if !defined(__Fuchsia__) && !defined(__QNXNTO__)
+#if !defined(__Fuchsia__) && !defined(__QNX__)
     if (NULL == xdg_config_dirs || '\0' == xdg_config_dirs[0]) {
         xdg_config_dirs = FALLBACK_CONFIG_DIRS;
     }
@@ -2908,7 +3003,7 @@
     char *xdg_data_home = loader_secure_getenv("XDG_DATA_HOME", inst);
     char *xdg_data_dirs = loader_secure_getenv("XDG_DATA_DIRS", inst);
 
-#if !defined(__Fuchsia__) && !defined(__QNXNTO__)
+#if !defined(__Fuchsia__) && !defined(__QNX__)
     if (NULL == xdg_data_dirs || '\0' == xdg_data_dirs[0]) {
         xdg_data_dirs = FALLBACK_DATA_DIRS;
     }
@@ -2925,25 +3020,25 @@
     if (home != NULL) {
         if (NULL == xdg_config_home || '\0' == xdg_config_home[0]) {
             const char config_suffix[] = "/.config";
-            default_config_home =
-                loader_instance_heap_alloc(inst, strlen(home) + strlen(config_suffix) + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+            size_t default_config_home_len = strlen(home) + sizeof(config_suffix) + 1;
+            default_config_home = loader_instance_heap_calloc(inst, default_config_home_len, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
             if (default_config_home == NULL) {
                 vk_result = VK_ERROR_OUT_OF_HOST_MEMORY;
                 goto out;
             }
-            strcpy(default_config_home, home);
-            strcat(default_config_home, config_suffix);
+            strncpy(default_config_home, home, default_config_home_len);
+            strncat(default_config_home, config_suffix, default_config_home_len);
         }
         if (NULL == xdg_data_home || '\0' == xdg_data_home[0]) {
             const char data_suffix[] = "/.local/share";
-            default_data_home =
-                loader_instance_heap_alloc(inst, strlen(home) + strlen(data_suffix) + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+            size_t default_data_home_len = strlen(home) + sizeof(data_suffix) + 1;
+            default_data_home = loader_instance_heap_calloc(inst, default_data_home_len, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
             if (default_data_home == NULL) {
                 vk_result = VK_ERROR_OUT_OF_HOST_MEMORY;
                 goto out;
             }
-            strcpy(default_data_home, home);
-            strcat(default_data_home, data_suffix);
+            strncpy(default_data_home, home, default_data_home_len);
+            strncat(default_data_home, data_suffix, default_data_home_len);
         }
     }
 
@@ -2957,7 +3052,9 @@
     } else {
         home_data_dir = xdg_data_home;
     }
-#endif  // !_WIN32
+#else
+#warning read_data_files_in_search_paths unsupported platform
+#endif
 
     switch (manifest_type) {
         case LOADER_DATA_FILE_MANIFEST_DRIVER:
@@ -2967,24 +3064,38 @@
                 override_env = loader_secure_getenv(VK_ICD_FILENAMES_ENV_VAR, inst);
             }
             additional_env = loader_secure_getenv(VK_ADDITIONAL_DRIVER_FILES_ENV_VAR, inst);
+#if COMMON_UNIX_PLATFORMS
             relative_location = VK_DRIVERS_INFO_RELATIVE_DIR;
+#endif
 #if defined(_WIN32)
             package_path = windows_get_app_package_manifest_path(inst);
 #endif
             break;
         case LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER:
+#if COMMON_UNIX_PLATFORMS
             relative_location = VK_ILAYERS_INFO_RELATIVE_DIR;
+#endif
             break;
         case LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER:
             override_env = loader_secure_getenv(VK_LAYER_PATH_ENV_VAR, inst);
             additional_env = loader_secure_getenv(VK_ADDITIONAL_LAYER_PATH_ENV_VAR, inst);
+#if COMMON_UNIX_PLATFORMS
             relative_location = VK_ELAYERS_INFO_RELATIVE_DIR;
+#endif
             break;
         default:
             assert(false && "Shouldn't get here!");
             break;
     }
 
+    // Log a message when VK_LAYER_PATH is set but the override layer paths take priority
+    if (manifest_type == LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER && NULL != override_env && NULL != path_override) {
+        loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_LAYER_BIT, 0,
+                   "Ignoring VK_LAYER_PATH. The Override layer is active and has override paths set, which takes priority. "
+                   "VK_LAYER_PATH is set to %s",
+                   override_env);
+    }
+
     if (path_override != NULL) {
         override_path = path_override;
     } else if (override_env != NULL) {
@@ -3019,7 +3130,7 @@
         if (search_path_size == 2) {
             goto out;
         }
-#else  // !_WIN32
+#elif COMMON_UNIX_PLATFORMS
         }
 
         // Add the general search folders (with the appropriate relative folder added)
@@ -3043,7 +3154,9 @@
             }
             search_path_size += determine_data_file_path_size(xdg_data_dirs, rel_size);
         }
-#endif  // !_WIN32
+#else
+#warning read_data_files_in_search_paths unsupported platform
+#endif
     }
 
     // Allocate the required space
@@ -3060,8 +3173,9 @@
 
     // Add the remaining paths to the list
     if (NULL != override_path) {
-        strcpy(cur_path_ptr, override_path);
-        cur_path_ptr += strlen(override_path);
+        size_t override_path_len = strlen(override_path);
+        loader_strncpy(cur_path_ptr, search_path_size, override_path, override_path_len);
+        cur_path_ptr += override_path_len;
     } else {
         // Add any additional search paths defined in the additive environment variable
         if (NULL != additional_env) {
@@ -3072,11 +3186,13 @@
         if (NULL != package_path) {
             copy_data_file_info(package_path, NULL, 0, &cur_path_ptr);
         }
-#else
+#elif COMMON_UNIX_PLATFORMS
         if (rel_size > 0) {
 #if defined(__APPLE__)
             // Add the bundle's Resources dir to the beginning of the search path.
             // Looks for manifests in the bundle first, before any system directories.
+            // This also appears to work unmodified for iOS, it finds the app bundle on the devices
+            // file system. (RSW)
             CFBundleRef main_bundle = CFBundleGetMainBundle();
             if (NULL != main_bundle) {
                 CFURLRef ref = CFBundleCopyResourcesDirectoryURL(main_bundle);
@@ -3087,8 +3203,7 @@
                         memcpy(cur_path_ptr, relative_location, rel_size);
                         cur_path_ptr += rel_size;
                         *cur_path_ptr++ = PATH_SEPARATOR;
-                        // only for ICD manifests
-                        if (override_env != NULL && manifest_type == LOADER_DATA_FILE_MANIFEST_DRIVER) {
+                        if (manifest_type == LOADER_DATA_FILE_MANIFEST_DRIVER) {
                             use_first_found_manifest = true;
                         }
                     }
@@ -3119,7 +3234,9 @@
 
         assert(cur_path_ptr - search_path < (ptrdiff_t)search_path_size);
         *cur_path_ptr = '\0';
-#endif  // !_WIN32
+#else
+#warning read_data_files_in_search_paths unsupported platform
+#endif
     }
 
     // Remove duplicate paths, or it would result in duplicate extensions, duplicate devices, etc.
@@ -3160,7 +3277,7 @@
     if (search_path_size > 0) {
         char *tmp_search_path = loader_instance_heap_alloc(inst, search_path_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
         if (NULL != tmp_search_path) {
-            strncpy(tmp_search_path, search_path, search_path_size);
+            loader_strncpy(tmp_search_path, search_path_size + 1, search_path, search_path_size);
             tmp_search_path[search_path_size] = '\0';
             if (manifest_type == LOADER_DATA_FILE_MANIFEST_DRIVER) {
                 log_flags = VULKAN_LOADER_DRIVER_BIT;
@@ -3187,7 +3304,7 @@
     if (log_flags != 0 && out_files->count > 0) {
         loader_log(inst, log_flags, 0, "   Found the following files:");
         for (uint32_t cur_file = 0; cur_file < out_files->count; ++cur_file) {
-            loader_log(inst, log_flags, 0, "      %s", out_files->filename_list[cur_file]);
+            loader_log(inst, log_flags, 0, "      %s", out_files->list[cur_file]);
         }
     } else {
         loader_log(inst, log_flags, 0, "   Found no files");
@@ -3205,7 +3322,7 @@
     loader_free_getenv(override_env, inst);
 #if defined(_WIN32)
     loader_instance_heap_free(inst, package_path);
-#else
+#elif COMMON_UNIX_PLATFORMS
     loader_free_getenv(xdg_config_home, inst);
     loader_free_getenv(xdg_config_dirs, inst);
     loader_free_getenv(xdg_data_home, inst);
@@ -3214,6 +3331,8 @@
     loader_free_getenv(home, inst);
     loader_instance_heap_free(inst, default_data_home);
     loader_instance_heap_free(inst, default_config_home);
+#else
+#warning read_data_files_in_search_paths unsupported platform
 #endif
 
     loader_instance_heap_free(inst, search_path);
@@ -3245,30 +3364,19 @@
 // Linux Layer| dirs     | dirs
 
 VkResult loader_get_data_files(const struct loader_instance *inst, enum loader_data_files_type manifest_type,
-                               const char *path_override, struct loader_data_files *out_files) {
+                               const char *path_override, struct loader_string_list *out_files) {
     VkResult res = VK_SUCCESS;
     bool override_active = false;
 
     // Free and init the out_files information so there's no false data left from uninitialized variables.
-    if (out_files->filename_list != NULL) {
-        for (uint32_t i = 0; i < out_files->count; i++) {
-            if (NULL != out_files->filename_list[i]) {
-                loader_instance_heap_free(inst, out_files->filename_list[i]);
-                out_files->filename_list[i] = NULL;
-            }
-        }
-        loader_instance_heap_free(inst, out_files->filename_list);
-    }
-    out_files->count = 0;
-    out_files->alloc_count = 0;
-    out_files->filename_list = NULL;
+    free_string_list(inst, out_files);
 
     res = read_data_files_in_search_paths(inst, manifest_type, path_override, &override_active, out_files);
     if (VK_SUCCESS != res) {
         goto out;
     }
 
-#ifdef _WIN32
+#if defined(_WIN32)
     // Read the registry if the override wasn't active.
     if (!override_active) {
         bool warn_if_not_present = false;
@@ -3301,21 +3409,15 @@
 
 out:
 
-    if (VK_SUCCESS != res && NULL != out_files->filename_list) {
-        for (uint32_t remove = 0; remove < out_files->count; remove++) {
-            loader_instance_heap_free(inst, out_files->filename_list[remove]);
-        }
-        loader_instance_heap_free(inst, out_files->filename_list);
-        out_files->count = 0;
-        out_files->alloc_count = 0;
-        out_files->filename_list = NULL;
+    if (VK_SUCCESS != res) {
+        free_string_list(inst, out_files);
     }
 
     return res;
 }
 
 struct ICDManifestInfo {
-    char full_library_path[MAX_STRING_SIZE];
+    char *full_library_path;
     uint32_t version;
 };
 
@@ -3325,10 +3427,7 @@
                                    bool *skipped_portability_drivers) {
     VkResult res = VK_SUCCESS;
     cJSON *json = NULL;
-    cJSON *item = NULL, *itemICD = NULL;
-
     char *file_vers_str = NULL;
-    char *library_path = NULL;
     char *library_arch_str = NULL;
     char *version_str = NULL;
 
@@ -3345,7 +3444,7 @@
         goto out;
     }
 
-    item = cJSON_GetObjectItem(json, "file_format_version");
+    cJSON *item = loader_cJSON_GetObjectItem(json, "file_format_version");
     if (item == NULL) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                    "loader_parse_icd_manifest: ICD JSON %s does not have a \'file_format_version\' field. Skipping ICD JSON.",
@@ -3354,7 +3453,7 @@
         goto out;
     }
 
-    file_vers_str = cJSON_Print(item);
+    file_vers_str = loader_cJSON_Print(item);
     if (NULL == file_vers_str) {
         // Only reason the print can fail is if there was an allocation issue
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
@@ -3375,7 +3474,7 @@
                    json_file_version.major, json_file_version.minor, json_file_version.patch);
     }
 
-    itemICD = cJSON_GetObjectItem(json, "ICD");
+    cJSON *itemICD = loader_cJSON_GetObjectItem(json, "ICD");
     if (itemICD == NULL) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                    "loader_parse_icd_manifest: Can not find \'ICD\' object in ICD JSON file %s. Skipping ICD JSON", file_str);
@@ -3383,7 +3482,7 @@
         goto out;
     }
 
-    item = cJSON_GetObjectItem(itemICD, "library_path");
+    item = loader_cJSON_GetObjectItem(itemICD, "library_path");
     if (item == NULL) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                    "loader_parse_icd_manifest: Failed to find \'library_path\' object in ICD JSON file %s. Skipping ICD JSON.",
@@ -3391,19 +3490,13 @@
         res = VK_ERROR_INCOMPATIBLE_DRIVER;
         goto out;
     }
-    library_path = cJSON_Print(item);
-    if (!library_path || strlen(library_path) == 0) {
+    char *library_path = loader_cJSON_Print(item);
+    if (!library_path) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                    "loader_parse_icd_manifest: Failed retrieving ICD JSON %s \'library_path\' field. Skipping ICD JSON.", file_str);
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
     }
-    size_t library_path_len = strlen(library_path);
-    // cJSON prints everything with quotes so they need to be removed.
-    // move every char forward one, so the leading quote is replaced.
-    memmove(library_path, &library_path[1], library_path_len - 2);
-    // replace end quote with null terminator
-    library_path[library_path_len - 2] = '\0';
 
     if (strlen(library_path) == 0) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
@@ -3414,30 +3507,20 @@
 
     // Print out the paths being searched if debugging is enabled
     loader_log(inst, VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "Searching for ICD drivers named %s", library_path);
-    if (loader_platform_is_path(library_path)) {
-        // a relative or absolute path
-        char *name_copy = loader_stack_alloc(strlen(file_str) + 1);
-        char *rel_base;
-        strcpy(name_copy, file_str);
-        rel_base = loader_platform_dirname(name_copy);
-        loader_expand_path(library_path, rel_base, MAX_STRING_SIZE, &icd->full_library_path[0]);
-    } else {
-// a filename which is assumed in a system directory
-#if defined(DEFAULT_VK_DRIVERS_PATH)
-        loader_get_fullpath(library_path, DEFAULT_VK_DRIVERS_PATH, MAX_STRING_SIZE, &icd->full_library_path[0]);
-#else
-        loader_get_fullpath(library_path, "", MAX_STRING_SIZE, &icd->full_library_path[0]);
-#endif
+    // This function takes ownership of library_path - so we don't need to clean it up
+    res = combine_manifest_directory_and_library_path(inst, library_path, file_str, &icd->full_library_path);
+    if (VK_SUCCESS != res) {
+        goto out;
     }
 
-    item = cJSON_GetObjectItem(itemICD, "api_version");
+    item = loader_cJSON_GetObjectItem(itemICD, "api_version");
     if (item == NULL) {
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                    "loader_parse_icd_manifest: ICD JSON %s does not have an \'api_version\' field. Skipping ICD JSON.", file_str);
         res = VK_ERROR_INCOMPATIBLE_DRIVER;
         goto out;
     }
-    version_str = cJSON_Print(item);
+    version_str = loader_cJSON_Print(item);
     if (NULL == version_str) {
         // Only reason the print can fail is if there was an allocation issue
         loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
@@ -3459,7 +3542,7 @@
 
     // Skip over ICD's which contain a true "is_portability_driver" value whenever the application doesn't enable
     // portability enumeration.
-    item = cJSON_GetObjectItem(itemICD, "is_portability_driver");
+    item = loader_cJSON_GetObjectItem(itemICD, "is_portability_driver");
     if (item != NULL && item->type == cJSON_True && inst && !inst->portability_enumeration_enabled) {
         if (skipped_portability_drivers) {
             *skipped_portability_drivers = true;
@@ -3468,13 +3551,13 @@
         goto out;
     }
 
-    item = cJSON_GetObjectItem(itemICD, "library_arch");
+    item = loader_cJSON_GetObjectItem(itemICD, "library_arch");
     if (item != NULL) {
-        library_arch_str = cJSON_Print(item);
+        library_arch_str = loader_cJSON_Print(item);
         if (NULL != library_arch_str) {
             // cJSON includes the quotes by default, so we need to look for those here
-            if ((strncmp(library_arch_str, "\"32\"", 4) == 0 && sizeof(void *) != 4) ||
-                (strncmp(library_arch_str, "\"64\"", 4) == 0 && sizeof(void *) != 8)) {
+            if ((strncmp(library_arch_str, "32", 4) == 0 && sizeof(void *) != 4) ||
+                (strncmp(library_arch_str, "64", 4) == 0 && sizeof(void *) != 8)) {
                 loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
                            "loader_parse_icd_manifest: Driver library architecture doesn't match the current running "
                            "architecture, skipping this driver");
@@ -3487,9 +3570,8 @@
         }
     }
 out:
-    cJSON_Delete(json);
+    loader_cJSON_Delete(json);
     loader_instance_heap_free(inst, file_vers_str);
-    loader_instance_heap_free(inst, library_path);
     loader_instance_heap_free(inst, version_str);
     loader_instance_heap_free(inst, library_arch_str);
     return res;
@@ -3510,16 +3592,29 @@
 // Vulkan result
 // (on result == VK_SUCCESS) a list of icds that were discovered
 VkResult loader_icd_scan(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
-                         bool *skipped_portability_drivers) {
-    struct loader_data_files manifest_files;
+                         const VkInstanceCreateInfo *pCreateInfo, bool *skipped_portability_drivers) {
     VkResult res = VK_SUCCESS;
-    bool lockedMutex = false;
-    struct loader_envvar_filter select_filter;
-    struct loader_envvar_filter disable_filter;
+    struct loader_string_list manifest_files = {0};
+    struct loader_envvar_filter select_filter = {0};
+    struct loader_envvar_filter disable_filter = {0};
+    struct ICDManifestInfo *icd_details = NULL;
 
-    // Before we begin anything, init manifest_files to avoid a delete of garbage memory if
-    // a failure occurs before allocating the manifest filename_list.
-    memset(&manifest_files, 0, sizeof(struct loader_data_files));
+    // Set up the ICD Trampoline list so elements can be written into it.
+    res = loader_scanned_icd_init(inst, icd_tramp_list);
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        return res;
+    }
+
+    bool direct_driver_loading_exclusive_mode = false;
+    res = loader_scan_for_direct_drivers(inst, pCreateInfo, icd_tramp_list, &direct_driver_loading_exclusive_mode);
+    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        goto out;
+    }
+    if (direct_driver_loading_exclusive_mode) {
+        // Make sure to jump over the system & env-var driver discovery mechanisms if exclusive mode is set, even if no drivers
+        // were successfully found through the direct driver loading mechanism
+        goto out;
+    }
 
     // Parse the filter environment variables to determine if we have any special behavior
     res = parse_generic_filter_environment_var(inst, VK_DRIVERS_SELECT_ENV_VAR, &select_filter);
@@ -3531,28 +3626,27 @@
         goto out;
     }
 
-    res = loader_scanned_icd_init(inst, icd_tramp_list);
+    // Get a list of manifest files for ICDs
+    res = loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_DRIVER, NULL, &manifest_files);
     if (VK_SUCCESS != res) {
         goto out;
     }
 
-    // Get a list of manifest files for ICDs
-    res = loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_DRIVER, NULL, &manifest_files);
-    if (VK_SUCCESS != res || manifest_files.count == 0) {
+    icd_details = loader_stack_alloc(sizeof(struct ICDManifestInfo) * manifest_files.count);
+    if (NULL == icd_details) {
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
     }
+    memset(icd_details, 0, sizeof(struct ICDManifestInfo) * manifest_files.count);
 
-    loader_platform_thread_lock_mutex(&loader_json_lock);
-    lockedMutex = true;
     for (uint32_t i = 0; i < manifest_files.count; i++) {
         int dir_fd = -1;
 #if defined(__Fuchsia__)
         dir_fd = get_manifest_fs_fd();
 #endif
         VkResult icd_res = VK_SUCCESS;
-        struct ICDManifestInfo icd;
-        memset(&icd, 0, sizeof(struct ICDManifestInfo));
-        icd_res = loader_parse_icd_manifest(inst, dir_fd, manifest_files.filename_list[i], &icd, skipped_portability_drivers);
+
+        icd_res = loader_parse_icd_manifest(inst, dir_fd, manifest_files.list[i], &icd_details[i], skipped_portability_drivers);
         if (VK_ERROR_OUT_OF_HOST_MEMORY == icd_res) {
             res = icd_res;
             goto out;
@@ -3562,19 +3656,19 @@
 
         if (select_filter.count > 0 || disable_filter.count > 0) {
             // Get only the filename for comparing to the filters
-            char *just_filename_str = strrchr(manifest_files.filename_list[i], DIRECTORY_SYMBOL);
+            char *just_filename_str = strrchr(manifest_files.list[i], DIRECTORY_SYMBOL);
 
             // No directory symbol, just the filename
             if (NULL == just_filename_str) {
-                just_filename_str = manifest_files.filename_list[i];
+                just_filename_str = manifest_files.list[i];
             } else {
                 just_filename_str++;
             }
 
             bool name_matches_select =
-                (select_filter.count > 0 && check_name_matches_filter_environment_var(inst, just_filename_str, &select_filter));
+                (select_filter.count > 0 && check_name_matches_filter_environment_var(just_filename_str, &select_filter));
             bool name_matches_disable =
-                (disable_filter.count > 0 && check_name_matches_filter_environment_var(inst, just_filename_str, &disable_filter));
+                (disable_filter.count > 0 && check_name_matches_filter_environment_var(just_filename_str, &disable_filter));
 
             if (name_matches_disable && !name_matches_select) {
                 loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
@@ -3591,7 +3685,8 @@
         }
 
         enum loader_layer_library_status lib_status;
-        icd_res = loader_scanned_icd_add(inst, icd_tramp_list, icd.full_library_path, icd.version, &lib_status);
+        icd_res =
+            loader_scanned_icd_add(inst, icd_tramp_list, icd_details[i].full_library_path, icd_details[i].version, &lib_status);
         if (VK_ERROR_OUT_OF_HOST_MEMORY == icd_res) {
             res = icd_res;
             goto out;
@@ -3601,295 +3696,230 @@
                 case LOADER_LAYER_LIB_ERROR_FAILED_TO_LOAD:
                     loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                                "loader_icd_scan: Failed loading library associated with ICD JSON %s. Ignoring this JSON",
-                               icd.full_library_path);
+                               icd_details[i].full_library_path);
                     break;
                 case LOADER_LAYER_LIB_ERROR_WRONG_BIT_TYPE: {
-                    loader_log(inst, VULKAN_LOADER_DRIVER_BIT, 0, "Requested layer %s was wrong bit-type. Ignoring this JSON",
-                               icd.full_library_path);
+                    loader_log(inst, VULKAN_LOADER_DRIVER_BIT, 0, "Requested ICD %s was wrong bit-type. Ignoring this JSON",
+                               icd_details[i].full_library_path);
                     break;
                 }
                 case LOADER_LAYER_LIB_SUCCESS_LOADED:
+                case LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY:
                     // Shouldn't be able to reach this but if it is, best to report a debug
                     loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
                                "Shouldn't reach this. A valid version of requested ICD %s was loaded but something bad "
                                "happened afterwards.",
-                               icd.full_library_path);
+                               icd_details[i].full_library_path);
                     break;
             }
         }
     }
 
 out:
-    if (NULL != manifest_files.filename_list) {
+    if (NULL != icd_details) {
+        // Successfully got the icd_details structure, which means we need to free the paths contained within
         for (uint32_t i = 0; i < manifest_files.count; i++) {
-            loader_instance_heap_free(inst, manifest_files.filename_list[i]);
+            loader_instance_heap_free(inst, icd_details[i].full_library_path);
         }
-        loader_instance_heap_free(inst, manifest_files.filename_list);
     }
-    if (lockedMutex) {
-        loader_platform_thread_unlock_mutex(&loader_json_lock);
+    free_string_list(inst, &manifest_files);
+    return res;
+}
+
+// Gets the layer data files corresponding to manifest_type & path_override, then parses the resulting json objects
+// into instance_layers
+// Manifest type must be either implicit or explicit
+VkResult loader_parse_instance_layers(struct loader_instance *inst, enum loader_data_files_type manifest_type,
+                                      const char *path_override, struct loader_layer_list *instance_layers) {
+    assert(manifest_type == LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER || manifest_type == LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER);
+    VkResult res = VK_SUCCESS;
+    struct loader_string_list manifest_files = {0};
+
+    res = loader_get_data_files(inst, manifest_type, path_override, &manifest_files);
+    if (VK_SUCCESS != res) {
+        goto out;
     }
 
+    for (uint32_t i = 0; i < manifest_files.count; i++) {
+        char *file_str = manifest_files.list[i];
+        if (file_str == NULL) {
+            continue;
+        }
+
+        // Parse file into JSON struct
+        cJSON *json = NULL;
+        VkResult local_res = loader_get_json(inst, -1, file_str, &json);
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
+        } else if (VK_SUCCESS != local_res || NULL == json) {
+            continue;
+        }
+
+        local_res = loader_add_layer_properties(inst, instance_layers, json,
+                                                manifest_type == LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER, file_str);
+        loader_cJSON_Delete(json);
+
+        // If the error is anything other than out of memory we still want to try to load the other layers
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
+        }
+    }
+out:
+    free_string_list(inst, &manifest_files);
+
     return res;
 }
 
-VkResult loader_scan_for_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers) {
+// Given a loader_layer_properties struct that is a valid override layer, concatenate the properties override paths and put them
+// into the output parameter override_paths
+VkResult get_override_layer_override_paths(struct loader_instance *inst, struct loader_layer_properties *prop,
+                                           char **override_paths) {
+    if (prop->override_paths.count > 0) {
+        char *cur_write_ptr = NULL;
+        size_t override_path_size = 0;
+        for (uint32_t j = 0; j < prop->override_paths.count; j++) {
+            override_path_size += determine_data_file_path_size(prop->override_paths.list[j], 0);
+        }
+        *override_paths = loader_instance_heap_alloc(inst, override_path_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+        if (*override_paths == NULL) {
+            return VK_ERROR_OUT_OF_HOST_MEMORY;
+        }
+        cur_write_ptr = &(*override_paths)[0];
+        for (uint32_t j = 0; j < prop->override_paths.count; j++) {
+            copy_data_file_info(prop->override_paths.list[j], NULL, 0, &cur_write_ptr);
+        }
+        // Remove the last path separator
+        --cur_write_ptr;
+        assert(cur_write_ptr - (*override_paths) < (ptrdiff_t)override_path_size);
+        *cur_write_ptr = '\0';
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Override layer has override paths set to %s",
+                   *override_paths);
+    }
+    return VK_SUCCESS;
+}
+
+VkResult loader_scan_for_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers,
+                                const struct loader_envvar_all_filters *filters) {
     VkResult res = VK_SUCCESS;
-    char *file_str;
-    struct loader_data_files manifest_files;
-    cJSON *json = NULL;
+    struct loader_layer_list settings_layers = {0};
+    struct loader_layer_list regular_instance_layers = {0};
     bool override_layer_valid = false;
     char *override_paths = NULL;
-    uint32_t total_count = 0;
-    struct loader_envvar_filter enable_filter;
-    struct loader_envvar_disable_layers_filter disable_filter;
 
-    // Before we begin anything, init manifest_files to avoid a delete of garbage memory if
-    // a failure occurs before allocating the manifest filename_list.
-    memset(&manifest_files, 0, sizeof(struct loader_data_files));
-
-    // Parse the filter environment variables to determine if we have any special behavior
-    res = parse_generic_filter_environment_var(NULL, VK_LAYERS_ENABLE_ENV_VAR, &enable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-    res = parse_layers_disable_filter_environment_var(NULL, &disable_filter);
+    bool should_search_for_other_layers = true;
+    res = get_settings_layers(inst, &settings_layers, &should_search_for_other_layers);
     if (VK_SUCCESS != res) {
         goto out;
     }
 
-    // Cleanup any previously scanned libraries
-    loader_delete_layer_list_and_properties(inst, instance_layers);
-
-    loader_platform_thread_lock_mutex(&loader_json_lock);
-
-    // Get a list of manifest files for any implicit layers
-    res = loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER, NULL, &manifest_files);
-    if (VK_SUCCESS != res) {
+    // If we should not look for layers using other mechanisms, assing settings_layers to instance_layers and jump to the
+    // output
+    if (!should_search_for_other_layers) {
+        *instance_layers = settings_layers;
+        memset(&settings_layers, 0, sizeof(struct loader_layer_list));
         goto out;
     }
 
-    if (manifest_files.count != 0) {
-        total_count += manifest_files.count;
-        for (uint32_t i = 0; i < manifest_files.count; i++) {
-            file_str = manifest_files.filename_list[i];
-            if (file_str == NULL) {
-                continue;
-            }
-
-            // Parse file into JSON struct
-            VkResult local_res = loader_get_json(inst, -1, file_str, &json);
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            } else if (VK_SUCCESS != local_res || NULL == json) {
-                continue;
-            }
-
-            local_res = loader_add_layer_properties(inst, instance_layers, json, true, file_str);
-            cJSON_Delete(json);
-
-            // If the error is anything other than out of memory we still want to try to load the other layers
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            }
-        }
+    res = loader_parse_instance_layers(inst, LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER, NULL, &regular_instance_layers);
+    if (VK_SUCCESS != res) {
+        goto out;
     }
 
     // Remove any extraneous override layers.
-    remove_all_non_valid_override_layers(inst, instance_layers);
+    remove_all_non_valid_override_layers(inst, &regular_instance_layers);
 
     // Check to see if the override layer is present, and use it's override paths.
-    for (int32_t i = 0; i < (int32_t)instance_layers->count; i++) {
-        struct loader_layer_properties *prop = &instance_layers->list[i];
-        if (prop->is_override && loader_implicit_layer_is_enabled(inst, &enable_filter, &disable_filter, prop) &&
-            prop->num_override_paths > 0) {
-            char *cur_write_ptr = NULL;
-            size_t override_path_size = 0;
-            for (uint32_t j = 0; j < prop->num_override_paths; j++) {
-                override_path_size += determine_data_file_path_size(prop->override_paths[j], 0);
-            }
-            override_paths = loader_instance_heap_alloc(inst, override_path_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-            if (override_paths == NULL) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
+    for (uint32_t i = 0; i < regular_instance_layers.count; i++) {
+        struct loader_layer_properties *prop = &regular_instance_layers.list[i];
+        if (prop->is_override && loader_implicit_layer_is_enabled(inst, filters, prop) && prop->override_paths.count > 0) {
+            res = get_override_layer_override_paths(inst, prop, &override_paths);
+            if (VK_SUCCESS != res) {
                 goto out;
             }
-            cur_write_ptr = &override_paths[0];
-            for (uint32_t j = 0; j < prop->num_override_paths; j++) {
-                copy_data_file_info(prop->override_paths[j], NULL, 0, &cur_write_ptr);
-            }
-            // Remove the last path separator
-            --cur_write_ptr;
-            assert(cur_write_ptr - override_paths < (ptrdiff_t)override_path_size);
-            *cur_write_ptr = '\0';
-            loader_log(NULL, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Override layer has override paths set to %s",
-                       override_paths);
+            break;
         }
     }
 
     // Get a list of manifest files for explicit layers
-    res = loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER, override_paths, &manifest_files);
+    res = loader_parse_instance_layers(inst, LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER, override_paths, &regular_instance_layers);
     if (VK_SUCCESS != res) {
         goto out;
     }
 
-    // Make sure we have at least one layer, if not, go ahead and return
-    if (manifest_files.count == 0 && total_count == 0) {
-        goto out;
-    } else {
-        for (uint32_t i = 0; i < manifest_files.count; i++) {
-            file_str = manifest_files.filename_list[i];
-            if (file_str == NULL) {
-                continue;
-            }
-
-            // Parse file into JSON struct
-            VkResult local_res = loader_get_json(inst, -1, file_str, &json);
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            } else if (VK_SUCCESS != local_res || NULL == json) {
-                continue;
-            }
-
-            local_res = loader_add_layer_properties(inst, instance_layers, json, false, file_str);
-            cJSON_Delete(json);
-
-            // If the error is anything other than out of memory we still want to try to load the other layers
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
-                res = local_res;
-                goto out;
-            }
-        }
-    }
-
     // Verify any meta-layers in the list are valid and all the component layers are
     // actually present in the available layer list
-    verify_all_meta_layers(inst, &enable_filter, &disable_filter, instance_layers, &override_layer_valid);
+    res = verify_all_meta_layers(inst, filters, &regular_instance_layers, &override_layer_valid);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+        return res;
+    }
 
     if (override_layer_valid) {
-        loader_remove_layers_in_blacklist(inst, instance_layers);
+        loader_remove_layers_in_blacklist(inst, &regular_instance_layers);
         if (NULL != inst) {
             inst->override_layer_present = true;
         }
     }
 
     // Remove disabled layers
-    for (uint32_t i = 0; i < instance_layers->count; ++i) {
-        if (!loader_layer_is_available(inst, &enable_filter, &disable_filter, &instance_layers->list[i])) {
-            loader_remove_layer_in_list(inst, instance_layers, i);
+    for (uint32_t i = 0; i < regular_instance_layers.count; ++i) {
+        if (!loader_layer_is_available(inst, filters, &regular_instance_layers.list[i])) {
+            loader_remove_layer_in_list(inst, &regular_instance_layers, i);
             i--;
         }
     }
 
+    res = combine_settings_layers_with_regular_layers(inst, &settings_layers, &regular_instance_layers, instance_layers);
+
 out:
+    loader_delete_layer_list_and_properties(inst, &settings_layers);
+    loader_delete_layer_list_and_properties(inst, &regular_instance_layers);
 
     loader_instance_heap_free(inst, override_paths);
-    if (NULL != manifest_files.filename_list) {
-        for (uint32_t i = 0; i < manifest_files.count; i++) {
-            loader_instance_heap_free(inst, manifest_files.filename_list[i]);
-        }
-        loader_instance_heap_free(inst, manifest_files.filename_list);
-    }
-    loader_platform_thread_unlock_mutex(&loader_json_lock);
     return res;
 }
 
 VkResult loader_scan_for_implicit_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers,
-                                         loader_platform_dl_handle **libs) {
-    struct loader_envvar_filter enable_filter;
-    struct loader_envvar_disable_layers_filter disable_filter;
-    char *file_str;
-    struct loader_data_files manifest_files;
-    cJSON *json = NULL;
+                                         const struct loader_envvar_all_filters *layer_filters) {
+    VkResult res = VK_SUCCESS;
+    struct loader_layer_list settings_layers = {0};
+    struct loader_layer_list regular_instance_layers = {0};
     bool override_layer_valid = false;
     char *override_paths = NULL;
     bool implicit_metalayer_present = false;
-    bool have_json_lock = false;
-    VkResult res = VK_SUCCESS;
 
-    // Before we begin anything, init manifest_files to avoid a delete of garbage memory if
-    // a failure occurs before allocating the manifest filename_list.
-    memset(&manifest_files, 0, sizeof(struct loader_data_files));
-
-    // Parse the filter environment variables to determine if we have any special behavior
-    res = parse_generic_filter_environment_var(inst, VK_LAYERS_ENABLE_ENV_VAR, &enable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-    res = parse_layers_disable_filter_environment_var(inst, &disable_filter);
+    bool should_search_for_other_layers = true;
+    res = get_settings_layers(inst, &settings_layers, &should_search_for_other_layers);
     if (VK_SUCCESS != res) {
         goto out;
     }
 
-    res = loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER, NULL, &manifest_files);
-    if (VK_SUCCESS != res || manifest_files.count == 0) {
+    // If we should not look for layers using other mechanisms, assing settings_layers to instance_layers and jump to the
+    // output
+    if (!should_search_for_other_layers) {
+        *instance_layers = settings_layers;
+        memset(&settings_layers, 0, sizeof(struct loader_layer_list));
         goto out;
     }
 
-    // Cleanup any previously scanned libraries
-    loader_delete_layer_list_and_properties(inst, instance_layers);
-
-    loader_platform_thread_lock_mutex(&loader_json_lock);
-    have_json_lock = true;
-
-    for (uint32_t i = 0; i < manifest_files.count; i++) {
-        file_str = manifest_files.filename_list[i];
-        if (file_str == NULL) {
-            continue;
-        }
-
-        // parse file into JSON struct
-        VkResult temp_res = loader_get_json(inst, -1, file_str, &json);
-        if (VK_ERROR_OUT_OF_HOST_MEMORY == temp_res) {
-            res = temp_res;
-            goto out;
-        } else if (VK_SUCCESS != temp_res || NULL == json) {
-            continue;
-        }
-
-        temp_res = loader_add_layer_properties(inst, instance_layers, json, true, file_str);
-
-        loader_instance_heap_free(inst, file_str);
-        manifest_files.filename_list[i] = NULL;
-        cJSON_Delete(json);
-
-        if (VK_ERROR_OUT_OF_HOST_MEMORY == temp_res) {
-            res = temp_res;
-            goto out;
-        }
+    res = loader_parse_instance_layers(inst, LOADER_DATA_FILE_MANIFEST_IMPLICIT_LAYER, NULL, &regular_instance_layers);
+    if (VK_SUCCESS != res) {
+        goto out;
     }
 
     // Remove any extraneous override layers.
-    remove_all_non_valid_override_layers(inst, instance_layers);
+    remove_all_non_valid_override_layers(inst, &regular_instance_layers);
 
     // Check to see if either the override layer is present, or another implicit meta-layer.
     // Each of these may require explicit layers to be enabled at this time.
-    for (int32_t i = 0; i < (int32_t)instance_layers->count; i++) {
-        struct loader_layer_properties *prop = &instance_layers->list[i];
-        if (prop->is_override && loader_implicit_layer_is_enabled(inst, &enable_filter, &disable_filter, prop)) {
+    for (uint32_t i = 0; i < regular_instance_layers.count; i++) {
+        struct loader_layer_properties *prop = &regular_instance_layers.list[i];
+        if (prop->is_override && loader_implicit_layer_is_enabled(inst, layer_filters, prop)) {
             override_layer_valid = true;
-            if (prop->num_override_paths > 0) {
-                char *cur_write_ptr = NULL;
-                size_t override_path_size = 0;
-                for (uint32_t j = 0; j < prop->num_override_paths; j++) {
-                    override_path_size += determine_data_file_path_size(prop->override_paths[j], 0);
-                }
-                override_paths = loader_instance_heap_alloc(inst, override_path_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-                if (override_paths == NULL) {
-                    goto out;
-                }
-                cur_write_ptr = &override_paths[0];
-                for (uint32_t j = 0; j < prop->num_override_paths; j++) {
-                    copy_data_file_info(prop->override_paths[j], NULL, 0, &cur_write_ptr);
-                }
-                // Remove the last path separator
-                --cur_write_ptr;
-                assert(cur_write_ptr - override_paths < (ptrdiff_t)override_path_size);
-                *cur_write_ptr = '\0';
-                loader_log(NULL, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Override layer has override paths set to %s",
-                           override_paths);
+            res = get_override_layer_override_paths(inst, prop, &override_paths);
+            if (VK_SUCCESS != res) {
+                goto out;
             }
         } else if (!prop->is_override && prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
             implicit_metalayer_present = true;
@@ -3900,91 +3930,63 @@
     // explicit layer info as well.  Not to worry, though, all explicit layers not included
     // in the override layer will be removed below in loader_remove_layers_in_blacklist().
     if (override_layer_valid || implicit_metalayer_present) {
-        if (VK_SUCCESS != loader_get_data_files(inst, LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER, override_paths, &manifest_files)) {
+        res =
+            loader_parse_instance_layers(inst, LOADER_DATA_FILE_MANIFEST_EXPLICIT_LAYER, override_paths, &regular_instance_layers);
+        if (VK_SUCCESS != res) {
             goto out;
         }
-
-        for (uint32_t i = 0; i < manifest_files.count; i++) {
-            file_str = manifest_files.filename_list[i];
-            if (file_str == NULL) {
-                continue;
-            }
-
-            // parse file into JSON struct
-            res = loader_get_json(inst, -1, file_str, &json);
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
-                goto out;
-            } else if (VK_SUCCESS != res || NULL == json) {
-                continue;
-            }
-
-            VkResult temp_res = loader_add_layer_properties(inst, instance_layers, json, false, file_str);
-            loader_instance_heap_free(inst, file_str);
-            manifest_files.filename_list[i] = NULL;
-            cJSON_Delete(json);
-
-            if (VK_ERROR_OUT_OF_HOST_MEMORY == temp_res) {
-                res = temp_res;
-                goto out;
-            }
-        }
     }
 
     // Verify any meta-layers in the list are valid and all the component layers are
     // actually present in the available layer list
-    verify_all_meta_layers(inst, &enable_filter, &disable_filter, instance_layers, &override_layer_valid);
+    res = verify_all_meta_layers(inst, layer_filters, &regular_instance_layers, &override_layer_valid);
+    if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+        return res;
+    }
 
     if (override_layer_valid || implicit_metalayer_present) {
-        loader_remove_layers_not_in_implicit_meta_layers(inst, instance_layers);
+        loader_remove_layers_not_in_implicit_meta_layers(inst, &regular_instance_layers);
         if (override_layer_valid && inst != NULL) {
             inst->override_layer_present = true;
         }
     }
 
     // Remove disabled layers
-    for (uint32_t i = 0; i < instance_layers->count; ++i) {
-        if (!loader_implicit_layer_is_enabled(inst, &enable_filter, &disable_filter, &instance_layers->list[i])) {
-            loader_remove_layer_in_list(inst, instance_layers, i);
+    for (uint32_t i = 0; i < regular_instance_layers.count; ++i) {
+        if (!loader_implicit_layer_is_enabled(inst, layer_filters, &regular_instance_layers.list[i])) {
+            loader_remove_layer_in_list(inst, &regular_instance_layers, i);
             i--;
         }
     }
 
-    // We'll need to save the dl handles so we can close them later
-    if (instance_layers->count > 0 && NULL != libs) {
-        *libs = loader_calloc(NULL, sizeof(loader_platform_dl_handle) * instance_layers->count, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-        if (*libs == NULL) {
-            res = VK_ERROR_OUT_OF_HOST_MEMORY;
-            goto out;
-        }
-    }
+    res = combine_settings_layers_with_regular_layers(inst, &settings_layers, &regular_instance_layers, instance_layers);
 
 out:
+    loader_delete_layer_list_and_properties(inst, &settings_layers);
+    loader_delete_layer_list_and_properties(inst, &regular_instance_layers);
 
     loader_instance_heap_free(inst, override_paths);
-    for (uint32_t i = 0; i < manifest_files.count; i++) {
-        loader_instance_heap_free(inst, manifest_files.filename_list[i]);
-    }
-    loader_instance_heap_free(inst, manifest_files.filename_list);
-
-    if (have_json_lock) {
-        loader_platform_thread_unlock_mutex(&loader_json_lock);
-    }
-
     return res;
 }
 
-static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpdpa_instance_terminator(VkInstance inst, const char *pName) {
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpdpa_instance_terminator(VkInstance inst, const char *pName) {
     // inst is not wrapped
     if (inst == VK_NULL_HANDLE) {
         return NULL;
     }
+
     VkLayerInstanceDispatchTable *disp_table = *(VkLayerInstanceDispatchTable **)inst;
-    void *addr;
 
     if (disp_table == NULL) return NULL;
 
+    struct loader_instance *loader_inst = loader_get_instance(inst);
+
+    if (loader_inst->instance_finished_creation) {
+        disp_table = &loader_inst->terminator_dispatch;
+    }
+
     bool found_name;
-    addr = loader_lookup_instance_dispatch_table(disp_table, pName, &found_name);
+    void *addr = loader_lookup_instance_dispatch_table(disp_table, pName, &found_name);
     if (found_name) {
         return addr;
     }
@@ -3998,7 +4000,8 @@
     return NULL;
 }
 
-static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpa_instance_terminator(VkInstance inst, const char *pName) {
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpa_instance_terminator(VkInstance inst, const char *pName) {
+    // Global functions - Do not need a valid instance handle to query
     if (!strcmp(pName, "vkGetInstanceProcAddr")) {
         return (PFN_vkVoidFunction)loader_gpa_instance_terminator;
     }
@@ -4008,49 +4011,70 @@
     if (!strcmp(pName, "vkCreateInstance")) {
         return (PFN_vkVoidFunction)terminator_CreateInstance;
     }
+
+    // While the spec is very clear that quering vkCreateDevice requires a valid VkInstance, because the loader allowed querying
+    // with a NULL VkInstance handle for a long enough time, it is impractical to fix this bug in the loader
+
+    // As such, this is a bug to maintain compatibility for the RTSS layer (Riva Tuner Statistics Server) but may
+    // be dependend upon by other layers out in the wild.
     if (!strcmp(pName, "vkCreateDevice")) {
         return (PFN_vkVoidFunction)terminator_CreateDevice;
     }
 
-    // The VK_EXT_debug_utils functions need a special case here so the terminators can still be found from vkGetInstanceProcAddr
-    // This is because VK_EXT_debug_utils is an instance level extension with device level functions, and is 'supported' by the
-    // loader. There needs to be a terminator in case a driver doesn't support VK_EXT_debug_utils.
-    if (!strcmp(pName, "vkSetDebugUtilsObjectNameEXT")) {
-        return (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT;
-    }
-    if (!strcmp(pName, "vkSetDebugUtilsObjectTagEXT")) {
-        return (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT;
-    }
-    if (!strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT;
-    }
-    if (!strcmp(pName, "vkQueueEndDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT;
-    }
-    if (!strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT;
-    }
-    if (!strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT;
-    }
-    if (!strcmp(pName, "vkCmdEndDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT;
-    }
-    if (!strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT")) {
-        return (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT;
-    }
-
     // inst is not wrapped
     if (inst == VK_NULL_HANDLE) {
         return NULL;
     }
     VkLayerInstanceDispatchTable *disp_table = *(VkLayerInstanceDispatchTable **)inst;
-    void *addr;
 
     if (disp_table == NULL) return NULL;
 
+    struct loader_instance *loader_inst = loader_get_instance(inst);
+
+    // The VK_EXT_debug_utils functions need a special case here so the terminators can still be found from
+    // vkGetInstanceProcAddr This is because VK_EXT_debug_utils is an instance level extension with device level functions, and
+    // is 'supported' by the loader.
+    // These functions need a terminator to handle the case of a driver not supporting VK_EXT_debug_utils when there are layers
+    // present which not check for NULL before calling the function.
+    if (!strcmp(pName, "vkSetDebugUtilsObjectNameEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectNameEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkSetDebugUtilsObjectTagEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_SetDebugUtilsObjectTagEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_QueueBeginDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkQueueEndDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_QueueEndDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_QueueInsertDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_CmdBeginDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkCmdEndDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_CmdEndDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+    if (!strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT")) {
+        return loader_inst->enabled_known_extensions.ext_debug_utils ? (PFN_vkVoidFunction)terminator_CmdInsertDebugUtilsLabelEXT
+                                                                     : NULL;
+    }
+
+    if (loader_inst->instance_finished_creation) {
+        disp_table = &loader_inst->terminator_dispatch;
+    }
+
     bool found_name;
-    addr = loader_lookup_instance_dispatch_table(disp_table, pName, &found_name);
+    void *addr = loader_lookup_instance_dispatch_table(disp_table, pName, &found_name);
     if (found_name) {
         return addr;
     }
@@ -4101,6 +4125,10 @@
         }
     }
 
+    if (icd_term == NULL) {
+        return NULL;
+    }
+
     return icd_term->dispatch.GetDeviceProcAddr(device, pName);
 }
 
@@ -4126,7 +4154,7 @@
     return ptr_instance;
 }
 
-static loader_platform_dl_handle loader_open_layer_file(const struct loader_instance *inst, struct loader_layer_properties *prop) {
+loader_platform_dl_handle loader_open_layer_file(const struct loader_instance *inst, struct loader_layer_properties *prop) {
     if ((prop->lib_handle = loader_platform_open_library(prop->lib_name)) == NULL) {
         loader_handle_load_library_error(inst, prop->lib_name, &prop->lib_status);
     } else {
@@ -4137,98 +4165,27 @@
     return prop->lib_handle;
 }
 
-static void loader_close_layer_file(const struct loader_instance *inst, struct loader_layer_properties *prop) {
-    if (prop->lib_handle) {
-        loader_platform_close_library(prop->lib_handle);
-        loader_log(inst, VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_LAYER_BIT, 0, "Unloading layer library %s", prop->lib_name);
-        prop->lib_handle = NULL;
-    }
-}
-
-void loader_deactivate_layers(const struct loader_instance *instance, struct loader_device *device,
-                              struct loader_layer_list *list) {
-    // Delete instance list of enabled layers and close any layer libraries
-    for (uint32_t i = 0; i < list->count; i++) {
-        struct loader_layer_properties *layer_prop = &list->list[i];
-
-        loader_close_layer_file(instance, layer_prop);
-    }
-    loader_destroy_layer_list(instance, device, list);
-}
-
 // Go through the search_list and find any layers which match type. If layer
 // type match is found in then add it to ext_list.
-static VkResult loader_add_implicit_layers(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                                           const struct loader_envvar_disable_layers_filter *disable_filter,
-                                           struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
-                                           const struct loader_layer_list *source_list) {
+VkResult loader_add_implicit_layers(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                                    struct loader_pointer_layer_list *target_list,
+                                    struct loader_pointer_layer_list *expanded_target_list,
+                                    const struct loader_layer_list *source_list) {
     for (uint32_t src_layer = 0; src_layer < source_list->count; src_layer++) {
-        const struct loader_layer_properties *prop = &source_list->list[src_layer];
+        struct loader_layer_properties *prop = &source_list->list[src_layer];
         if (0 == (prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) {
-            VkResult result = loader_add_implicit_layer(inst, prop, enable_filter, disable_filter, target_list,
-                                                        expanded_target_list, source_list);
+            VkResult result = loader_add_implicit_layer(inst, prop, filters, target_list, expanded_target_list, source_list);
             if (result == VK_ERROR_OUT_OF_HOST_MEMORY) return result;
         }
     }
     return VK_SUCCESS;
 }
 
-VkResult loader_enable_instance_layers(struct loader_instance *inst, const VkInstanceCreateInfo *pCreateInfo,
-                                       const struct loader_layer_list *instance_layers) {
-    VkResult res = VK_SUCCESS;
-    struct loader_envvar_filter layers_enable_filter;
-    struct loader_envvar_disable_layers_filter layers_disable_filter;
-
-    assert(inst && "Cannot have null instance");
-
-    if (!loader_init_layer_list(inst, &inst->app_activated_layer_list)) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "loader_enable_instance_layers: Failed to initialize application version of the layer list");
-        res = VK_ERROR_OUT_OF_HOST_MEMORY;
-        goto out;
-    }
-
-    if (!loader_init_layer_list(inst, &inst->expanded_activated_layer_list)) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "loader_enable_instance_layers: Failed to initialize expanded version of the layer list");
-        res = VK_ERROR_OUT_OF_HOST_MEMORY;
-        goto out;
-    }
-
-    // Parse the filter environment variables to determine if we have any special behavior
-    res = parse_generic_filter_environment_var(inst, VK_LAYERS_ENABLE_ENV_VAR, &layers_enable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-    res = parse_layers_disable_filter_environment_var(inst, &layers_disable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-
-    // Add any implicit layers first
-    res = loader_add_implicit_layers(inst, &layers_enable_filter, &layers_disable_filter, &inst->app_activated_layer_list,
-                                     &inst->expanded_activated_layer_list, instance_layers);
-    if (res != VK_SUCCESS) {
-        goto out;
-    }
-
-    // Add any layers specified via environment variable next
-    res = loader_add_environment_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, "VK_INSTANCE_LAYERS", &layers_enable_filter,
-                                        &layers_disable_filter, &inst->app_activated_layer_list,
-                                        &inst->expanded_activated_layer_list, instance_layers);
-    if (res != VK_SUCCESS) {
-        goto out;
-    }
-
-    // Add layers specified by the application
-    res = loader_add_layer_names_to_list(inst, &layers_enable_filter, &layers_disable_filter, &inst->app_activated_layer_list,
-                                         &inst->expanded_activated_layer_list, pCreateInfo->enabledLayerCount,
-                                         pCreateInfo->ppEnabledLayerNames, instance_layers);
-
+void warn_if_layers_are_older_than_application(struct loader_instance *inst) {
     for (uint32_t i = 0; i < inst->expanded_activated_layer_list.count; i++) {
         // Verify that the layer api version is at least that of the application's request, if not, throw a warning since
         // undefined behavior could occur.
-        struct loader_layer_properties *prop = inst->expanded_activated_layer_list.list + i;
+        struct loader_layer_properties *prop = inst->expanded_activated_layer_list.list[i];
         loader_api_version prop_spec_version = loader_make_version(prop->info.specVersion);
         if (!loader_check_version_meets_required(inst->app_api_version, prop_spec_version)) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
@@ -4238,6 +4195,57 @@
                        inst->app_api_version.minor);
         }
     }
+}
+
+VkResult loader_enable_instance_layers(struct loader_instance *inst, const VkInstanceCreateInfo *pCreateInfo,
+                                       const struct loader_layer_list *instance_layers,
+                                       const struct loader_envvar_all_filters *layer_filters) {
+    VkResult res = VK_SUCCESS;
+
+    assert(inst && "Cannot have null instance");
+
+    if (!loader_init_pointer_layer_list(inst, &inst->app_activated_layer_list)) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "loader_enable_instance_layers: Failed to initialize application version of the layer list");
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+    if (!loader_init_pointer_layer_list(inst, &inst->expanded_activated_layer_list)) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "loader_enable_instance_layers: Failed to initialize expanded version of the layer list");
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+    if (inst->settings.settings_active) {
+        res = enable_correct_layers_from_settings(inst, layer_filters, pCreateInfo->enabledLayerCount,
+                                                  pCreateInfo->ppEnabledLayerNames, &inst->instance_layer_list,
+                                                  &inst->app_activated_layer_list, &inst->expanded_activated_layer_list);
+        warn_if_layers_are_older_than_application(inst);
+
+        goto out;
+    }
+
+    // Add any implicit layers first
+    res = loader_add_implicit_layers(inst, layer_filters, &inst->app_activated_layer_list, &inst->expanded_activated_layer_list,
+                                     instance_layers);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+    // Add any layers specified via environment variable next
+    res = loader_add_environment_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, layer_filters, &inst->app_activated_layer_list,
+                                        &inst->expanded_activated_layer_list, instance_layers);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+    // Add layers specified by the application
+    res = loader_add_layer_names_to_list(inst, layer_filters, &inst->app_activated_layer_list, &inst->expanded_activated_layer_list,
+                                         pCreateInfo->enabledLayerCount, pCreateInfo->ppEnabledLayerNames, instance_layers);
+
+    warn_if_layers_are_older_than_application(inst);
 out:
     return res;
 }
@@ -4272,6 +4280,33 @@
     return true;
 }
 
+// Every extension that has a loader-defined trampoline needs to be marked as enabled or disabled so that we know whether or
+// not to return that trampoline when vkGetDeviceProcAddr is called
+void setup_logical_device_enabled_layer_extensions(const struct loader_instance *inst, struct loader_device *dev,
+                                                   const struct loader_extension_list *icd_exts,
+                                                   const VkDeviceCreateInfo *pCreateInfo) {
+    // Can only setup debug marker as debug utils is an instance extensions.
+    for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; ++i) {
+        if (!strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
+            // Check if its supported by the driver
+            for (uint32_t j = 0; j < icd_exts->count; ++j) {
+                if (!strcmp(icd_exts->list[j].extensionName, VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
+                    dev->layer_extensions.ext_debug_marker_enabled = true;
+                }
+            }
+            // also check if any layers support it.
+            for (uint32_t j = 0; j < inst->app_activated_layer_list.count; j++) {
+                struct loader_layer_properties *layer = inst->app_activated_layer_list.list[j];
+                for (uint32_t k = 0; k < layer->device_extension_list.count; k++) {
+                    if (!strcmp(layer->device_extension_list.list[k].props.extensionName, VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
+                        dev->layer_extensions.ext_debug_marker_enabled = true;
+                    }
+                }
+            }
+        }
+    }
+}
+
 VKAPI_ATTR VkResult VKAPI_CALL loader_layer_create_device(VkInstance instance, VkPhysicalDevice physicalDevice,
                                                           const VkDeviceCreateInfo *pCreateInfo,
                                                           const VkAllocationCallbacks *pAllocator, VkDevice *pDevice,
@@ -4291,7 +4326,7 @@
     }
 
     // Get the physical device (ICD) extensions
-    struct loader_extension_list icd_exts;
+    struct loader_extension_list icd_exts = {0};
     icd_exts.list = NULL;
     res = loader_init_generic_list(inst, (struct loader_generic_list *)&icd_exts, sizeof(VkExtensionProperties));
     if (VK_SUCCESS != res) {
@@ -4325,47 +4360,7 @@
         goto out;
     }
 
-    // Copy the application enabled instance layer list into the device
-    if (NULL != inst->app_activated_layer_list.list) {
-        dev->app_activated_layer_list.capacity = inst->app_activated_layer_list.capacity;
-        dev->app_activated_layer_list.count = inst->app_activated_layer_list.count;
-        dev->app_activated_layer_list.list =
-            loader_device_heap_alloc(dev, inst->app_activated_layer_list.capacity, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
-        if (dev->app_activated_layer_list.list == NULL) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "vkCreateDevice: Failed to allocate application activated layer list of size %d.",
-                       inst->app_activated_layer_list.capacity);
-            res = VK_ERROR_OUT_OF_HOST_MEMORY;
-            goto out;
-        }
-        memcpy(dev->app_activated_layer_list.list, inst->app_activated_layer_list.list,
-               sizeof(*dev->app_activated_layer_list.list) * dev->app_activated_layer_list.count);
-    } else {
-        dev->app_activated_layer_list.capacity = 0;
-        dev->app_activated_layer_list.count = 0;
-        dev->app_activated_layer_list.list = NULL;
-    }
-
-    // Copy the expanded enabled instance layer list into the device
-    if (NULL != inst->expanded_activated_layer_list.list) {
-        dev->expanded_activated_layer_list.capacity = inst->expanded_activated_layer_list.capacity;
-        dev->expanded_activated_layer_list.count = inst->expanded_activated_layer_list.count;
-        dev->expanded_activated_layer_list.list =
-            loader_device_heap_alloc(dev, inst->expanded_activated_layer_list.capacity, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
-        if (dev->expanded_activated_layer_list.list == NULL) {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "vkCreateDevice: Failed to allocate expanded activated layer list of size %d.",
-                       inst->expanded_activated_layer_list.capacity);
-            res = VK_ERROR_OUT_OF_HOST_MEMORY;
-            goto out;
-        }
-        memcpy(dev->expanded_activated_layer_list.list, inst->expanded_activated_layer_list.list,
-               sizeof(*dev->expanded_activated_layer_list.list) * dev->expanded_activated_layer_list.count);
-    } else {
-        dev->expanded_activated_layer_list.capacity = 0;
-        dev->expanded_activated_layer_list.count = 0;
-        dev->expanded_activated_layer_list.list = NULL;
-    }
+    setup_logical_device_enabled_layer_extensions(inst, dev, &icd_exts, pCreateInfo);
 
     res = loader_create_device_chain(internal_device, pCreateInfo, pAllocator, inst, dev, layerGIPA, nextGDPA);
     if (res != VK_SUCCESS) {
@@ -4414,7 +4409,7 @@
                 icd_term = icd_term->next;
             }
             // Now destroy the device and the allocations associated with it.
-            loader_destroy_logical_device(inst, dev, pAllocator);
+            loader_destroy_logical_device(dev, pAllocator);
         }
     }
 
@@ -4433,13 +4428,12 @@
     }
 
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, NULL);
-    const struct loader_instance *inst = icd_term->this_instance;
 
     destroyFunction(device, pAllocator);
     if (NULL != dev) {
         dev->chain_device = NULL;
         dev->icd_device = NULL;
-        loader_remove_logical_device(inst, icd_term, dev, pAllocator);
+        loader_remove_logical_device(icd_term, dev, pAllocator);
     }
 }
 
@@ -4499,7 +4493,7 @@
 
         // Create instance chain of enabled layers
         for (int32_t i = inst->expanded_activated_layer_list.count - 1; i >= 0; i--) {
-            struct loader_layer_properties *layer_prop = &inst->expanded_activated_layer_list.list[i];
+            struct loader_layer_properties *layer_prop = inst->expanded_activated_layer_list.list[i];
             loader_platform_dl_handle lib_handle;
 
             // Skip it if a Layer with the same name has been already successfully activated
@@ -4508,6 +4502,9 @@
             }
 
             lib_handle = loader_open_layer_file(inst, layer_prop);
+            if (layer_prop->lib_status == LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY) {
+                return VK_ERROR_OUT_OF_HOST_MEMORY;
+            }
             if (!lib_handle) {
                 continue;
             }
@@ -4515,7 +4512,7 @@
             if (NULL == layer_prop->functions.negotiate_layer_interface) {
                 PFN_vkNegotiateLoaderLayerInterfaceVersion negotiate_interface = NULL;
                 bool functions_in_interface = false;
-                if (strlen(layer_prop->functions.str_negotiate_interface) == 0) {
+                if (!layer_prop->functions.str_negotiate_interface || strlen(layer_prop->functions.str_negotiate_interface) == 0) {
                     negotiate_interface = (PFN_vkNegotiateLoaderLayerInterfaceVersion)loader_platform_get_proc_address(
                         lib_handle, "vkNegotiateLoaderLayerInterfaceVersion");
                 } else {
@@ -4556,7 +4553,7 @@
 
                 if (!functions_in_interface) {
                     if ((cur_gipa = layer_prop->functions.get_instance_proc_addr) == NULL) {
-                        if (strlen(layer_prop->functions.str_gipa) == 0) {
+                        if (layer_prop->functions.str_gipa == NULL || strlen(layer_prop->functions.str_gipa) == 0) {
                             cur_gipa =
                                 (PFN_vkGetInstanceProcAddr)loader_platform_get_proc_address(lib_handle, "vkGetInstanceProcAddr");
                             layer_prop->functions.get_instance_proc_addr = cur_gipa;
@@ -4616,7 +4613,7 @@
 
     // Make sure each layer requested by the application was actually loaded
     for (uint32_t exp = 0; exp < inst->expanded_activated_layer_list.count; ++exp) {
-        struct loader_layer_properties *exp_layer_prop = &inst->expanded_activated_layer_list.list[exp];
+        struct loader_layer_properties *exp_layer_prop = inst->expanded_activated_layer_list.list[exp];
         bool found = false;
         for (uint32_t act = 0; act < num_activated_layers; ++act) {
             if (!strcmp(activated_layers[act].name, exp_layer_prop->info.layerName)) {
@@ -4657,6 +4654,7 @@
                                ending);
                     break;
                 case LOADER_LAYER_LIB_SUCCESS_LOADED:
+                case LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY:
                     // Shouldn't be able to reach this but if it is, best to report a debug
                     loader_log(inst, log_flag, 0,
                                "Shouldn't reach this. A valid version of requested layer %s was loaded but was not found in the "
@@ -4700,7 +4698,7 @@
 
         // If layer debugging is enabled, let's print out the full callstack with layers in their
         // defined order.
-        if ((loader_get_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
+        if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
             loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "vkCreateInstance layer callstack setup to:");
             loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "   <Application>");
             loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "     ||");
@@ -4719,7 +4717,7 @@
                 loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "           Library:  %s", activated_layers[index].library);
                 loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "     ||");
             }
-            loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "   <Drivers>\n");
+            loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "   <Drivers>");
         }
 
         res = fpCreateInstance(&loader_create_info, pAllocator, created_instance);
@@ -4730,10 +4728,26 @@
     }
 
     if (res == VK_SUCCESS) {
+        // Copy the current disp table into the terminator_dispatch table so we can use it in loader_gpa_instance_terminator()
+        memcpy(&inst->terminator_dispatch, &inst->disp->layer_inst_disp, sizeof(VkLayerInstanceDispatchTable));
+
         loader_init_instance_core_dispatch_table(&inst->disp->layer_inst_disp, next_gipa, *created_instance);
         inst->instance = *created_instance;
     }
 
+    if (pCreateInfo->enabledLayerCount > 0 && pCreateInfo->ppEnabledLayerNames != NULL) {
+        res = create_string_list(inst, pCreateInfo->enabledLayerCount, &inst->enabled_layer_names);
+        if (res != VK_SUCCESS) {
+            return res;
+        }
+
+        for (uint32_t i = 0; i < pCreateInfo->enabledLayerCount; ++i) {
+            res = copy_str_to_string_list(inst, &inst->enabled_layer_names, pCreateInfo->ppEnabledLayerNames[i],
+                                          strlen(pCreateInfo->ppEnabledLayerNames[i]));
+            if (res != VK_SUCCESS) return res;
+        }
+    }
+
     return res;
 }
 
@@ -4742,16 +4756,16 @@
                                                   created_inst);
 }
 
-#ifdef __APPLE__
+#if defined(__APPLE__)
 VkResult loader_create_device_chain(const VkPhysicalDevice pd, const VkDeviceCreateInfo *pCreateInfo,
                                     const VkAllocationCallbacks *pAllocator, const struct loader_instance *inst,
                                     struct loader_device *dev, PFN_vkGetInstanceProcAddr callingLayer,
-                                    PFN_vkGetDeviceProcAddr *layerNextGDPA) __attribute__ ((optnone)) {
+                                    PFN_vkGetDeviceProcAddr *layerNextGDPA) __attribute__((optnone)) {
 #else
-    VkResult loader_create_device_chain(const VkPhysicalDevice pd, const VkDeviceCreateInfo *pCreateInfo,
-                                        const VkAllocationCallbacks *pAllocator, const struct loader_instance *inst,
-                                        struct loader_device *dev, PFN_vkGetInstanceProcAddr callingLayer,
-                                        PFN_vkGetDeviceProcAddr *layerNextGDPA) {
+VkResult loader_create_device_chain(const VkPhysicalDevice pd, const VkDeviceCreateInfo *pCreateInfo,
+                                    const VkAllocationCallbacks *pAllocator, const struct loader_instance *inst,
+                                    struct loader_device *dev, PFN_vkGetInstanceProcAddr callingLayer,
+                                    PFN_vkGetDeviceProcAddr *layerNextGDPA) {
 #endif
     uint32_t num_activated_layers = 0;
     struct activated_layer_info *activated_layers = NULL;
@@ -4766,6 +4780,34 @@
 
     memcpy(&loader_create_info, pCreateInfo, sizeof(VkDeviceCreateInfo));
 
+    if (loader_create_info.enabledLayerCount > 0 && loader_create_info.ppEnabledLayerNames != NULL) {
+        bool invalid_device_layer_usage = false;
+
+        if (loader_create_info.enabledLayerCount != inst->enabled_layer_names.count && loader_create_info.enabledLayerCount > 0) {
+            invalid_device_layer_usage = true;
+        } else if (loader_create_info.enabledLayerCount > 0 && loader_create_info.ppEnabledLayerNames == NULL) {
+            invalid_device_layer_usage = true;
+        } else if (loader_create_info.enabledLayerCount == 0 && loader_create_info.ppEnabledLayerNames != NULL) {
+            invalid_device_layer_usage = true;
+        } else if (inst->enabled_layer_names.list != NULL) {
+            for (uint32_t i = 0; i < loader_create_info.enabledLayerCount; i++) {
+                const char *device_layer_names = loader_create_info.ppEnabledLayerNames[i];
+
+                if (strcmp(device_layer_names, inst->enabled_layer_names.list[i]) != 0) {
+                    invalid_device_layer_usage = true;
+                    break;
+                }
+            }
+        }
+
+        if (invalid_device_layer_usage) {
+            loader_log(
+                inst, VULKAN_LOADER_WARN_BIT, 0,
+                "loader_create_device_chain: Using deprecated and ignored 'ppEnabledLayerNames' member of 'VkDeviceCreateInfo' "
+                "when creating a Vulkan device.");
+        }
+    }
+
     // Before we continue, we need to find out if the KHR_device_group extension is in the enabled list.  If it is, we then
     // need to look for the corresponding VkDeviceGroupDeviceCreateInfoKHR struct in the device list.  This is because we
     // need to replace all the incoming physical device values (which are really loader trampoline physical device values)
@@ -4809,8 +4851,8 @@
             pNext = pNext->pNext;
         }
     }
-    if (dev->expanded_activated_layer_list.count > 0) {
-        layer_device_link_info = loader_stack_alloc(sizeof(VkLayerDeviceLink) * dev->expanded_activated_layer_list.count);
+    if (inst->expanded_activated_layer_list.count > 0) {
+        layer_device_link_info = loader_stack_alloc(sizeof(VkLayerDeviceLink) * inst->expanded_activated_layer_list.count);
         if (!layer_device_link_info) {
             loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                        "loader_create_device_chain: Failed to alloc Device objects for layer. Skipping Layer.");
@@ -4831,8 +4873,8 @@
         loader_create_info.pNext = &chain_info;
 
         // Create instance chain of enabled layers
-        for (int32_t i = dev->expanded_activated_layer_list.count - 1; i >= 0; i--) {
-            struct loader_layer_properties *layer_prop = &dev->expanded_activated_layer_list.list[i];
+        for (int32_t i = inst->expanded_activated_layer_list.count - 1; i >= 0; i--) {
+            struct loader_layer_properties *layer_prop = inst->expanded_activated_layer_list.list[i];
             loader_platform_dl_handle lib_handle = layer_prop->lib_handle;
 
             // Skip it if a Layer with the same name has been already successfully activated
@@ -4849,7 +4891,7 @@
             // The Get*ProcAddr pointers will already be filled in if they were received from either the json file or the
             // version negotiation
             if ((fpGIPA = layer_prop->functions.get_instance_proc_addr) == NULL) {
-                if (strlen(layer_prop->functions.str_gipa) == 0) {
+                if (layer_prop->functions.str_gipa == NULL || strlen(layer_prop->functions.str_gipa) == 0) {
                     fpGIPA = (PFN_vkGetInstanceProcAddr)loader_platform_get_proc_address(lib_handle, "vkGetInstanceProcAddr");
                     layer_prop->functions.get_instance_proc_addr = fpGIPA;
                 } else
@@ -4874,7 +4916,7 @@
             }
 
             if ((fpGDPA = layer_prop->functions.get_device_proc_addr) == NULL) {
-                if (strlen(layer_prop->functions.str_gdpa) == 0) {
+                if (layer_prop->functions.str_gdpa == NULL || strlen(layer_prop->functions.str_gdpa) == 0) {
                     fpGDPA = (PFN_vkGetDeviceProcAddr)loader_platform_get_proc_address(lib_handle, "vkGetDeviceProcAddr");
                     layer_prop->functions.get_device_proc_addr = fpGDPA;
                 } else
@@ -4921,13 +4963,13 @@
         // If layer debugging is enabled, let's print out the full callstack with layers in their
         // defined order.
         uint32_t layer_driver_bits = VULKAN_LOADER_LAYER_BIT | VULKAN_LOADER_DRIVER_BIT;
-        if ((loader_get_debug_level() & layer_driver_bits) != 0) {
+        if ((loader_get_global_debug_level() & layer_driver_bits) != 0) {
             loader_log(inst, layer_driver_bits, 0, "vkCreateDevice layer callstack setup to:");
             loader_log(inst, layer_driver_bits, 0, "   <Application>");
             loader_log(inst, layer_driver_bits, 0, "     ||");
             loader_log(inst, layer_driver_bits, 0, "   <Loader>");
             loader_log(inst, layer_driver_bits, 0, "     ||");
-            if ((loader_get_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
+            if ((loader_get_global_debug_level() & VULKAN_LOADER_LAYER_BIT) != 0) {
                 for (uint32_t cur_layer = 0; cur_layer < num_activated_layers; ++cur_layer) {
                     uint32_t index = num_activated_layers - cur_layer - 1;
                     loader_log(inst, VULKAN_LOADER_LAYER_BIT, 0, "   %s", activated_layers[index].name);
@@ -4991,7 +5033,7 @@
 
     if (layer_count > 0 && ppEnabledLayerNames == NULL) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "loader_validate_instance_layers: ppEnabledLayerNames is NULL but enabledLayerCount is greater than zero");
+                   "loader_validate_layers: ppEnabledLayerNames is NULL but enabledLayerCount is greater than zero");
         return VK_ERROR_LAYER_NOT_PRESENT;
     }
 
@@ -5010,24 +5052,28 @@
                        ppEnabledLayerNames[i]);
             return VK_ERROR_LAYER_NOT_PRESENT;
         }
+        if (inst->settings.settings_active && prop->settings_control_value != LOADER_SETTINGS_LAYER_CONTROL_ON &&
+            prop->settings_control_value != LOADER_SETTINGS_LAYER_CONTROL_DEFAULT) {
+            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                       "loader_validate_layers: Layer %d was explicitly prevented from being enabled by the loader settings file",
+                       i);
+            return VK_ERROR_LAYER_NOT_PRESENT;
+        }
     }
     return VK_SUCCESS;
 }
 
 VkResult loader_validate_instance_extensions(struct loader_instance *inst, const struct loader_extension_list *icd_exts,
                                              const struct loader_layer_list *instance_layers,
+                                             const struct loader_envvar_all_filters *layer_filters,
                                              const VkInstanceCreateInfo *pCreateInfo) {
     VkExtensionProperties *extension_prop;
     char *env_value;
     bool check_if_known = true;
     VkResult res = VK_SUCCESS;
-    struct loader_envvar_filter layers_enable_filter;
-    struct loader_envvar_disable_layers_filter layers_disable_filter;
 
-    struct loader_layer_list active_layers;
-    struct loader_layer_list expanded_layers;
-    memset(&active_layers, 0, sizeof(active_layers));
-    memset(&expanded_layers, 0, sizeof(expanded_layers));
+    struct loader_pointer_layer_list active_layers = {0};
+    struct loader_pointer_layer_list expanded_layers = {0};
 
     if (pCreateInfo->enabledExtensionCount > 0 && pCreateInfo->ppEnabledExtensionNames == NULL) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
@@ -5035,43 +5081,40 @@
                    "greater than zero");
         return VK_ERROR_EXTENSION_NOT_PRESENT;
     }
-    if (!loader_init_layer_list(inst, &active_layers)) {
+    if (!loader_init_pointer_layer_list(inst, &active_layers)) {
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
     }
-    if (!loader_init_layer_list(inst, &expanded_layers)) {
+    if (!loader_init_pointer_layer_list(inst, &expanded_layers)) {
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
     }
 
-    // Parse the filter environment variables to determine if we have any special behavior
-    res = parse_generic_filter_environment_var(inst, VK_LAYERS_ENABLE_ENV_VAR, &layers_enable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
+    if (inst->settings.settings_active) {
+        res = enable_correct_layers_from_settings(inst, layer_filters, pCreateInfo->enabledLayerCount,
+                                                  pCreateInfo->ppEnabledLayerNames, instance_layers, &active_layers,
+                                                  &expanded_layers);
+        if (res != VK_SUCCESS) {
+            goto out;
+        }
+    } else {
+        // Build the lists of active layers (including metalayers) and expanded layers (with metalayers resolved to their
+        // components)
+        res = loader_add_implicit_layers(inst, layer_filters, &active_layers, &expanded_layers, instance_layers);
+        if (res != VK_SUCCESS) {
+            goto out;
+        }
+        res = loader_add_environment_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, layer_filters, &active_layers,
+                                            &expanded_layers, instance_layers);
+        if (res != VK_SUCCESS) {
+            goto out;
+        }
+        res = loader_add_layer_names_to_list(inst, layer_filters, &active_layers, &expanded_layers, pCreateInfo->enabledLayerCount,
+                                             pCreateInfo->ppEnabledLayerNames, instance_layers);
+        if (VK_SUCCESS != res) {
+            goto out;
+        }
     }
-    res = parse_layers_disable_filter_environment_var(inst, &layers_disable_filter);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-
-    // Build the lists of active layers (including metalayers) and expanded layers (with metalayers resolved to their
-    // components)
-    res = loader_add_implicit_layers(inst, &layers_enable_filter, &layers_disable_filter, &active_layers, &expanded_layers,
-                                     instance_layers);
-    if (res != VK_SUCCESS) {
-        goto out;
-    }
-    res = loader_add_environment_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, ENABLED_LAYERS_ENV, &layers_enable_filter,
-                                        &layers_disable_filter, &active_layers, &expanded_layers, instance_layers);
-    if (res != VK_SUCCESS) {
-        goto out;
-    }
-    res = loader_add_layer_names_to_list(inst, &layers_enable_filter, &layers_disable_filter, &active_layers, &expanded_layers,
-                                         pCreateInfo->enabledLayerCount, pCreateInfo->ppEnabledLayerNames, instance_layers);
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-
     for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
         VkStringErrorFlags result = vk_string_validate(MaxLoaderStringLength, pCreateInfo->ppEnabledExtensionNames[i]);
         if (result != VK_STRING_ERROR_NONE) {
@@ -5118,16 +5161,16 @@
         extension_prop = NULL;
 
         // Not in global list, search layer extension lists
-        struct loader_layer_properties *layer_prop = NULL;
         for (uint32_t j = 0; NULL == extension_prop && j < expanded_layers.count; ++j) {
             extension_prop =
-                get_extension_property(pCreateInfo->ppEnabledExtensionNames[i], &expanded_layers.list[j].instance_extension_list);
+                get_extension_property(pCreateInfo->ppEnabledExtensionNames[i], &expanded_layers.list[j]->instance_extension_list);
             if (extension_prop) {
                 // Found the extension in one of the layers enabled by the app.
                 break;
             }
 
-            layer_prop = loader_find_layer_property(expanded_layers.list[j].info.layerName, instance_layers);
+            struct loader_layer_properties *layer_prop =
+                loader_find_layer_property(expanded_layers.list[j]->info.layerName, instance_layers);
             if (NULL == layer_prop) {
                 // Should NOT get here, loader_validate_layers should have already filtered this case out.
                 continue;
@@ -5146,17 +5189,14 @@
     }
 
 out:
-    loader_destroy_layer_list(inst, NULL, &active_layers);
-    loader_destroy_layer_list(inst, NULL, &expanded_layers);
+    loader_destroy_pointer_layer_list(inst, &active_layers);
+    loader_destroy_pointer_layer_list(inst, &expanded_layers);
     return res;
 }
 
 VkResult loader_validate_device_extensions(struct loader_instance *this_instance,
-                                           const struct loader_layer_list *activated_device_layers,
+                                           const struct loader_pointer_layer_list *activated_device_layers,
                                            const struct loader_extension_list *icd_exts, const VkDeviceCreateInfo *pCreateInfo) {
-    VkExtensionProperties *extension_prop;
-    struct loader_layer_properties *layer_prop;
-
     for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
         VkStringErrorFlags result = vk_string_validate(MaxLoaderStringLength, pCreateInfo->ppEnabledExtensionNames[i]);
         if (result != VK_STRING_ERROR_NONE) {
@@ -5167,7 +5207,7 @@
         }
 
         const char *extension_name = pCreateInfo->ppEnabledExtensionNames[i];
-        extension_prop = get_extension_property(extension_name, icd_exts);
+        VkExtensionProperties *extension_prop = get_extension_property(extension_name, icd_exts);
 
         if (extension_prop) {
             continue;
@@ -5175,7 +5215,7 @@
 
         // Not in global list, search activated layer extension lists
         for (uint32_t j = 0; j < activated_device_layers->count; j++) {
-            layer_prop = &activated_device_layers->list[j];
+            struct loader_layer_properties *layer_prop = activated_device_layers->list[j];
 
             extension_prop = get_dev_extension_property(extension_name, &layer_prop->device_extension_list);
             if (extension_prop) {
@@ -5214,9 +5254,9 @@
                    "#LLP_LAYER_21)");
     } else if (LOADER_MAGIC_NUMBER != ptr_instance->magic) {
         loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT, 0,
-                   "terminator_CreateInstance: Instance pointer (%p) has invalid MAGIC value 0x%08x. Instance value possibly "
+                   "terminator_CreateInstance: Instance pointer (%p) has invalid MAGIC value 0x%08lx. Instance value possibly "
                    "corrupted by active layer (Policy #LLP_LAYER_21).  ",
-                   ptr_instance->magic);
+                   ptr_instance, ptr_instance->magic);
     }
 
     // Save the application version if it has been modified - layers sometimes needs features in newer API versions than
@@ -5239,7 +5279,7 @@
     //       support a layer, but it would be independent of the actual ICD,
     //       just in the same library.
     uint32_t extension_count = pCreateInfo->enabledExtensionCount;
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
     extension_count += 1;
 #endif  // LOADER_ENABLE_LINUX_SORT
     filtered_extension_names = loader_stack_alloc(extension_count * sizeof(char *));
@@ -5278,7 +5318,7 @@
         // Make sure that we reset the pApplicationInfo so we don't get an old pointer
         icd_create_info.pApplicationInfo = pCreateInfo->pApplicationInfo;
         icd_create_info.enabledExtensionCount = 0;
-        struct loader_extension_list icd_exts;
+        struct loader_extension_list icd_exts = {0};
 
         // traverse scanned icd list adding non-duplicate extensions to the list
         res = loader_init_generic_list(ptr_instance, (struct loader_generic_list *)&icd_exts, sizeof(VkExtensionProperties));
@@ -5317,7 +5357,7 @@
                 icd_create_info.enabledExtensionCount++;
             }
         }
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
         // Force on "VK_KHR_get_physical_device_properties2" for Linux as we use it for GPU sorting.  This
         // should be done if the API version of either the application or the driver does not natively support
         // the core version of vkGetPhysicalDeviceProperties2 entrypoint.
@@ -5364,7 +5404,17 @@
                                "terminator_CreateInstance: ICD \"%s\" vkEnumerateInstanceVersion returned error. The ICD will be "
                                "treated as a 1.0 ICD",
                                icd_term->scanned_icd->lib_name);
+                } else if (VK_API_VERSION_MINOR(icd_version) == 0) {
+                    loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                               "terminator_CreateInstance: Manifest ICD for \"%s\" contained a 1.1 or greater API version, but "
+                               "vkEnumerateInstanceVersion returned 1.0, treating as a 1.0 ICD",
+                               icd_term->scanned_icd->lib_name);
                 }
+            } else {
+                loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                           "terminator_CreateInstance: Manifest ICD for \"%s\" contained a 1.1 or greater API version, but does "
+                           "not support vkEnumerateInstanceVersion, treating as a 1.0 ICD",
+                           icd_term->scanned_icd->lib_name);
             }
         }
 
@@ -5426,19 +5476,19 @@
 
         if (ptr_instance->icd_tramp_list.scanned_list[i].interface_version < 3 &&
             (
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
                 NULL != icd_term->dispatch.CreateXlibSurfaceKHR ||
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
                 NULL != icd_term->dispatch.CreateXcbSurfaceKHR ||
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
                 NULL != icd_term->dispatch.CreateWaylandSurfaceKHR ||
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
                 NULL != icd_term->dispatch.CreateAndroidSurfaceKHR ||
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
                 NULL != icd_term->dispatch.CreateWin32SurfaceKHR ||
 #endif  // VK_USE_PLATFORM_WIN32_KHR
                 NULL != icd_term->dispatch.DestroySurfaceKHR)) {
@@ -5548,7 +5598,6 @@
         icd_terms = next_icd_term;
     }
 
-    loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list);
     loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list);
     loader_destroy_generic_list(ptr_instance, (struct loader_generic_list *)&ptr_instance->ext_list);
     if (NULL != ptr_instance->phys_devs_term) {
@@ -5572,6 +5621,8 @@
     }
     loader_free_dev_ext_table(ptr_instance);
     loader_free_phys_dev_ext_table(ptr_instance);
+
+    free_string_list(ptr_instance, &ptr_instance->enabled_layer_names);
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo,
@@ -5588,6 +5639,18 @@
     VkBaseOutStructure *caller_dgci_container = NULL;
     VkDeviceGroupDeviceCreateInfoKHR *caller_dgci = NULL;
 
+    if (NULL == dev) {
+        loader_log(icd_term->this_instance, VULKAN_LOADER_WARN_BIT, 0,
+                   "terminator_CreateDevice: Loader device pointer null encountered.  Possibly set by active layer. (Policy "
+                   "#LLP_LAYER_22)");
+    } else if (DEVICE_DISP_TABLE_MAGIC_NUMBER != dev->loader_dispatch.core_dispatch.magic) {
+        loader_log(icd_term->this_instance, VULKAN_LOADER_WARN_BIT, 0,
+                   "terminator_CreateDevice: Device pointer (%p) has invalid MAGIC value 0x%08lx. The expected value is "
+                   "0x10ADED040410ADED. Device value possibly "
+                   "corrupted by active layer (Policy #LLP_LAYER_22).  ",
+                   dev, dev->loader_dispatch.core_dispatch.magic);
+    }
+
     dev->phys_dev_term = phys_dev_term;
 
     icd_exts.list = NULL;
@@ -5762,33 +5825,61 @@
         }
     }
 
+    VkBool32 maintenance5_feature_enabled = false;
+    // Look for the VkPhysicalDeviceMaintenance5FeaturesKHR struct to see if the feature was enabled
+    {
+        const void *pNext = localCreateInfo.pNext;
+        while (pNext != NULL) {
+            switch (*(VkStructureType *)pNext) {
+                case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: {
+                    const VkPhysicalDeviceMaintenance5FeaturesKHR *maintenance_features = pNext;
+                    if (maintenance_features->maintenance5 == VK_TRUE) {
+                        maintenance5_feature_enabled = true;
+                    }
+                    pNext = maintenance_features->pNext;
+                    break;
+                }
+
+                default: {
+                    const VkBaseInStructure *header = pNext;
+                    pNext = header->pNext;
+                    break;
+                }
+            }
+        }
+    }
+
     // Every extension that has a loader-defined terminator needs to be marked as enabled or disabled so that we know whether or
     // not to return that terminator when vkGetDeviceProcAddr is called
     for (uint32_t i = 0; i < localCreateInfo.enabledExtensionCount; ++i) {
         if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME)) {
-            dev->extensions.khr_swapchain_enabled = true;
+            dev->driver_extensions.khr_swapchain_enabled = true;
         } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME)) {
-            dev->extensions.khr_display_swapchain_enabled = true;
+            dev->driver_extensions.khr_display_swapchain_enabled = true;
         } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_KHR_DEVICE_GROUP_EXTENSION_NAME)) {
-            dev->extensions.khr_device_group_enabled = true;
+            dev->driver_extensions.khr_device_group_enabled = true;
         } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
-            dev->extensions.ext_debug_marker_enabled = true;
+            dev->driver_extensions.ext_debug_marker_enabled = true;
         } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], "VK_EXT_full_screen_exclusive")) {
-            dev->extensions.ext_full_screen_exclusive_enabled = true;
+            dev->driver_extensions.ext_full_screen_exclusive_enabled = true;
+        } else if (!strcmp(localCreateInfo.ppEnabledExtensionNames[i], VK_KHR_MAINTENANCE_5_EXTENSION_NAME) &&
+                   maintenance5_feature_enabled) {
+            dev->should_ignore_device_commands_from_newer_version = true;
         }
     }
-    dev->extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
+    dev->layer_extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
+    dev->driver_extensions.ext_debug_utils_enabled = icd_term->this_instance->enabled_known_extensions.ext_debug_utils;
 
     VkPhysicalDeviceProperties properties;
     icd_term->dispatch.GetPhysicalDeviceProperties(phys_dev_term->phys_dev, &properties);
-    if (!dev->extensions.khr_device_group_enabled) {
+    if (!dev->driver_extensions.khr_device_group_enabled) {
         if (properties.apiVersion >= VK_API_VERSION_1_1) {
-            dev->extensions.khr_device_group_enabled = true;
+            dev->driver_extensions.khr_device_group_enabled = true;
         }
     }
 
     loader_log(icd_term->this_instance, VULKAN_LOADER_LAYER_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
-               "       Using \"%s\" with driver: \"%s\"\n", properties.deviceName, icd_term->scanned_icd->lib_name);
+               "       Using \"%s\" with driver: \"%s\"", properties.deviceName, icd_term->scanned_icd->lib_name);
 
     res = fpCreateDevice(phys_dev_term->phys_dev, &localCreateInfo, pAllocator, &dev->icd_device);
     if (res != VK_SUCCESS) {
@@ -5798,7 +5889,7 @@
     }
 
     *pDevice = dev->icd_device;
-    loader_add_logical_device(icd_term->this_instance, icd_term, dev);
+    loader_add_logical_device(icd_term, dev);
 
     // Init dispatch pointer in new device object
     loader_init_dispatch(*pDevice, &dev->loader_dispatch);
@@ -5996,7 +6087,7 @@
     return res;
 }
 
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
 bool is_linux_sort_enabled(struct loader_instance *inst) {
     bool sort_items = inst->supports_get_dev_prop_2;
     char *env_value = loader_getenv("VK_LOADER_DISABLE_SELECT", inst);
@@ -6011,8 +6102,8 @@
 }
 #endif  // LOADER_ENABLE_LINUX_SORT
 
-// Look for physical_device in the provided phys_devs list, return true if found and put the index into out_idx, otherwise return
-// false
+// Look for physical_device in the provided phys_devs list, return true if found and put the index into out_idx, otherwise
+// return false
 bool find_phys_dev(VkPhysicalDevice physical_device, uint32_t phys_devs_count, struct loader_physical_device_term **phys_devs,
                    uint32_t *out_idx) {
     if (NULL == phys_devs) return false;
@@ -6043,8 +6134,8 @@
         return VK_SUCCESS;
     }
 
-    // Exit in case something is already present - this shouldn't happen but better to be safe than overwrite existing data since
-    // this code has been refactored a half dozen times.
+    // Exit in case something is already present - this shouldn't happen but better to be safe than overwrite existing data
+    // since this code has been refactored a half dozen times.
     if (NULL != new_phys_devs[idx]) {
         return VK_SUCCESS;
     }
@@ -6182,8 +6273,8 @@
         }
     }
 
-    // Now go through the rest of the physical devices and add them to new_phys_devs
-#ifdef LOADER_ENABLE_LINUX_SORT
+// Now go through the rest of the physical devices and add them to new_phys_devs
+#if defined(LOADER_ENABLE_LINUX_SORT)
 
     if (is_linux_sort_enabled(inst)) {
         for (uint32_t dev = new_phys_devs_count; dev < new_phys_devs_capacity; ++dev) {
@@ -6234,7 +6325,7 @@
                 }
             }
         }
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
     }
 #endif  // LOADER_ENABLE_LINUX_SORT
 out:
@@ -6386,6 +6477,10 @@
 VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
                                                                              const char *pLayerName, uint32_t *pPropertyCount,
                                                                              VkExtensionProperties *pProperties) {
+    if (NULL == pPropertyCount) {
+        return VK_INCOMPLETE;
+    }
+
     struct loader_physical_device_term *phys_dev_term;
 
     // Any layer or trampoline wrapping should be removed at this point in time can just cast to the expected
@@ -6435,88 +6530,91 @@
         return VK_SUCCESS;
     }
 
-    // This case is during the call down the instance chain with pLayerName == NULL
+    // user is querying driver extensions and has supplied their own storage - just fill it out
+    else if (pProperties) {
+        struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
+        uint32_t written_count = *pPropertyCount;
+        VkResult res =
+            icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &written_count, pProperties);
+        if (res != VK_SUCCESS) {
+            return res;
+        }
+
+        // Iterate over active layers, if they are an implicit layer, add their device extensions
+        // After calling into the driver, written_count contains the amount of device extensions written. We can therefore write
+        // layer extensions starting at that point in pProperties
+        for (uint32_t i = 0; i < icd_term->this_instance->expanded_activated_layer_list.count; i++) {
+            struct loader_layer_properties *layer_props = icd_term->this_instance->expanded_activated_layer_list.list[i];
+            if (0 == (layer_props->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) {
+                struct loader_device_extension_list *layer_ext_list = &layer_props->device_extension_list;
+                for (uint32_t j = 0; j < layer_ext_list->count; j++) {
+                    struct loader_dev_ext_props *cur_ext_props = &layer_ext_list->list[j];
+                    // look for duplicates
+                    if (has_vk_extension_property_array(&cur_ext_props->props, written_count, pProperties)) {
+                        continue;
+                    }
+
+                    if (*pPropertyCount <= written_count) {
+                        return VK_INCOMPLETE;
+                    }
+
+                    memcpy(&pProperties[written_count], &cur_ext_props->props, sizeof(VkExtensionProperties));
+                    written_count++;
+                }
+            }
+        }
+        // Make sure we update the pPropertyCount with the how many were written
+        *pPropertyCount = written_count;
+        return res;
+    }
+    // Use `goto out;` for rest of this function
+
+    // This case is during the call down the instance chain with pLayerName == NULL and pProperties == NULL
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
-    uint32_t icd_ext_count = *pPropertyCount;
-    VkExtensionProperties *icd_props_list = pProperties;
-    const struct loader_instance *inst = icd_term->this_instance;
     struct loader_extension_list all_exts = {0};
     VkResult res;
 
-    if (NULL == icd_props_list) {
-        // We need to find the count without duplicates. This requires querying the driver for the names of the extensions.
-        // A small amount of storage is then needed to facilitate the de-duplication.
-        res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &icd_ext_count, NULL);
-        if (res != VK_SUCCESS) {
-            goto out;
-        }
-        if (icd_ext_count > 0) {
-            icd_props_list = loader_instance_heap_alloc(icd_term->this_instance, sizeof(VkExtensionProperties) * icd_ext_count,
-                                                        VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-            if (NULL == icd_props_list) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            }
-        }
+    // We need to find the count without duplicates. This requires querying the driver for the names of the extensions.
+    res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &all_exts.count, NULL);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+    // Then allocate memory to store the physical device extension list + the extensions layers provide
+    // all_exts.count currently is the number of driver extensions
+    all_exts.capacity = sizeof(VkExtensionProperties) * (all_exts.count + 20);
+    all_exts.list = loader_instance_heap_alloc(icd_term->this_instance, all_exts.capacity, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+    if (NULL == all_exts.list) {
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
     }
 
-    // Get the available device extension count, and if pProperties is not NULL, the extensions as well
-    res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &icd_ext_count, icd_props_list);
+    // Get the available device extensions and put them in all_exts.list
+    res = icd_term->dispatch.EnumerateDeviceExtensionProperties(phys_dev_term->phys_dev, NULL, &all_exts.count, all_exts.list);
     if (res != VK_SUCCESS) {
         goto out;
     }
 
-    // Init a list with enough capacity for the device extensions and the implicit layer device extensions
-    res = loader_init_generic_list(inst, (struct loader_generic_list *)&all_exts,
-                                   sizeof(VkExtensionProperties) * (icd_ext_count + 20));
-    if (VK_SUCCESS != res) {
-        goto out;
-    }
-
-    // Copy over the device extensions into all_exts & deduplicate
-    res = loader_add_to_ext_list(inst, &all_exts, icd_ext_count, icd_props_list);
-    if (res != VK_SUCCESS) {
-        goto out;
-    }
-
-    // Iterate over active layers, if they are an implicit layer, add their device extensions
+    // Iterate over active layers, if they are an implicit layer, add their device extensions to all_exts.list
     for (uint32_t i = 0; i < icd_term->this_instance->expanded_activated_layer_list.count; i++) {
-        struct loader_layer_properties *layer_props = &icd_term->this_instance->expanded_activated_layer_list.list[i];
+        struct loader_layer_properties *layer_props = icd_term->this_instance->expanded_activated_layer_list.list[i];
         if (0 == (layer_props->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) {
-            for (uint32_t j = 0; j < layer_props->device_extension_list.count; j++) {
-                res = loader_add_to_ext_list(icd_term->this_instance, &all_exts, 1,
-                                             &layer_props->device_extension_list.list[j].props);
+            struct loader_device_extension_list *layer_ext_list = &layer_props->device_extension_list;
+            for (uint32_t j = 0; j < layer_ext_list->count; j++) {
+                res = loader_add_to_ext_list(icd_term->this_instance, &all_exts, 1, &layer_ext_list->list[j].props);
                 if (res != VK_SUCCESS) {
                     goto out;
                 }
             }
         }
     }
-    uint32_t capacity = *pPropertyCount;
-    VkExtensionProperties *props = pProperties;
 
+    // Write out the final de-duplicated count to pPropertyCount
+    *pPropertyCount = all_exts.count;
     res = VK_SUCCESS;
-    if (NULL != pProperties) {
-        for (uint32_t i = 0; i < all_exts.count && i < capacity; i++) {
-            props[i] = all_exts.list[i];
-        }
-
-        // Wasn't enough space for the extensions, we did partial copy now return VK_INCOMPLETE
-        if (capacity < all_exts.count) {
-            res = VK_INCOMPLETE;
-        } else {
-            *pPropertyCount = all_exts.count;
-        }
-    } else {
-        *pPropertyCount = all_exts.count;
-    }
 
 out:
 
     loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&all_exts);
-    if (NULL == pProperties && NULL != icd_props_list) {
-        loader_instance_heap_free(icd_term->this_instance, icd_props_list);
-    }
     return res;
 }
 
@@ -6563,6 +6661,7 @@
 
 VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateInstanceVersion(const VkEnumerateInstanceVersionChain *chain,
                                                                    uint32_t *pApiVersion) {
+    (void)chain;
     // NOTE: The Vulkan WG doesn't want us checking pApiVersion for NULL, but instead
     // prefers us crashing.
     *pApiVersion = VK_HEADER_VERSION_COMPLETE;
@@ -6572,17 +6671,24 @@
 VKAPI_ATTR VkResult VKAPI_CALL
 terminator_EnumerateInstanceExtensionProperties(const VkEnumerateInstanceExtensionPropertiesChain *chain, const char *pLayerName,
                                                 uint32_t *pPropertyCount, VkExtensionProperties *pProperties) {
+    (void)chain;
     struct loader_extension_list *global_ext_list = NULL;
     struct loader_layer_list instance_layers;
     struct loader_extension_list local_ext_list;
     struct loader_icd_tramp_list icd_tramp_list;
     uint32_t copy_size;
     VkResult res = VK_SUCCESS;
+    struct loader_envvar_all_filters layer_filters = {0};
 
     memset(&local_ext_list, 0, sizeof(local_ext_list));
     memset(&instance_layers, 0, sizeof(instance_layers));
     memset(&icd_tramp_list, 0, sizeof(icd_tramp_list));
 
+    res = parse_layer_environment_var_filters(NULL, &layer_filters);
+    if (VK_SUCCESS != res) {
+        goto out;
+    }
+
     // Get layer libraries if needed
     if (pLayerName && strlen(pLayerName) != 0) {
         if (vk_string_validate(MaxLoaderStringLength, pLayerName) != VK_STRING_ERROR_NONE) {
@@ -6591,7 +6697,7 @@
             goto out;
         }
 
-        res = loader_scan_for_layers(NULL, &instance_layers);
+        res = loader_scan_for_layers(NULL, &instance_layers, &layer_filters);
         if (VK_SUCCESS != res) {
             goto out;
         }
@@ -6607,7 +6713,7 @@
         loader_preload_icds();
 
         // Scan/discover all ICD libraries
-        res = loader_icd_scan(NULL, &icd_tramp_list, NULL);
+        res = loader_icd_scan(NULL, &icd_tramp_list, NULL, NULL);
         // EnumerateInstanceExtensionProperties can't return anything other than OOM or VK_ERROR_LAYER_NOT_PRESENT
         if ((VK_SUCCESS != res && icd_tramp_list.count > 0) || res == VK_ERROR_OUT_OF_HOST_MEMORY) {
             goto out;
@@ -6620,7 +6726,7 @@
         loader_scanned_icd_clear(NULL, &icd_tramp_list);
 
         // Append enabled implicit layers.
-        res = loader_scan_for_implicit_layers(NULL, &instance_layers, NULL);
+        res = loader_scan_for_implicit_layers(NULL, &instance_layers, &layer_filters);
         if (VK_SUCCESS != res) {
             goto out;
         }
@@ -6663,28 +6769,48 @@
 VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateInstanceLayerProperties(const VkEnumerateInstanceLayerPropertiesChain *chain,
                                                                            uint32_t *pPropertyCount,
                                                                            VkLayerProperties *pProperties) {
+    (void)chain;
     VkResult result = VK_SUCCESS;
     struct loader_layer_list instance_layer_list;
+    struct loader_envvar_all_filters layer_filters = {0};
 
     LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize);
 
     uint32_t copy_size;
 
-    // Get layer libraries
-    memset(&instance_layer_list, 0, sizeof(instance_layer_list));
-    result = loader_scan_for_layers(NULL, &instance_layer_list);
+    result = parse_layer_environment_var_filters(NULL, &layer_filters);
     if (VK_SUCCESS != result) {
         goto out;
     }
 
-    if (pProperties == NULL) {
-        *pPropertyCount = instance_layer_list.count;
+    // Get layer libraries
+    memset(&instance_layer_list, 0, sizeof(instance_layer_list));
+    result = loader_scan_for_layers(NULL, &instance_layer_list, &layer_filters);
+    if (VK_SUCCESS != result) {
         goto out;
     }
 
-    copy_size = (*pPropertyCount < instance_layer_list.count) ? *pPropertyCount : instance_layer_list.count;
+    uint32_t active_layer_count = 0;
+    for (uint32_t i = 0; i < instance_layer_list.count; i++) {
+        if (instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_ON ||
+            instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_DEFAULT) {
+            active_layer_count++;
+        }
+    }
+
+    if (pProperties == NULL) {
+        *pPropertyCount = active_layer_count;
+        goto out;
+    }
+
+    copy_size = (*pPropertyCount < active_layer_count) ? *pPropertyCount : active_layer_count;
+    uint32_t output_properties_index = 0;
     for (uint32_t i = 0; i < copy_size; i++) {
-        memcpy(&pProperties[i], &instance_layer_list.list[i].info, sizeof(VkLayerProperties));
+        if (instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_ON ||
+            instance_layer_list.list[i].settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_DEFAULT) {
+            memcpy(&pProperties[output_properties_index], &instance_layer_list.list[i].info, sizeof(VkLayerProperties));
+            output_properties_index++;
+        }
     }
 
     *pPropertyCount = copy_size;
@@ -6902,7 +7028,7 @@
             cur_icd_group_count += count_this_time;
         }
 
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
         if (is_linux_sort_enabled(inst)) {
             // Get the physical devices supported by platform sorting mechanism into a separate list
             res = linux_sort_physical_device_groups(inst, total_count, local_phys_dev_groups);
diff --git a/loader/loader.h b/loader/loader.h
index 6296491..87cc753 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -1,8 +1,8 @@
 /*
  *
- * Copyright (c) 2014-2022 The Khronos Group Inc.
- * Copyright (c) 2014-2022 Valve Corporation
- * Copyright (c) 2014-2022 LunarG, Inc.
+ * Copyright (c) 2014-2023 The Khronos Group Inc.
+ * Copyright (c) 2014-2023 Valve Corporation
+ * Copyright (c) 2014-2023 LunarG, Inc.
  * Copyright (C) 2015 Google Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,6 +30,7 @@
 #pragma once
 
 #include "loader_common.h"
+#include "cJSON.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -72,7 +73,7 @@
 }
 
 static inline void loader_init_dispatch(void *obj, const void *data) {
-#ifdef DEBUG
+#if defined(DEBUG)
     assert(valid_loader_magic_value(obj) &&
            "Incompatible ICD, first dword must be initialized to "
            "ICD_LOADER_MAGIC. See loader/README.md for details.");
@@ -84,7 +85,6 @@
 // Global variables used across files
 extern struct loader_struct loader;
 extern loader_platform_thread_mutex loader_lock;
-extern loader_platform_thread_mutex loader_json_lock;
 extern loader_platform_thread_mutex loader_preload_icd_lock;
 extern loader_platform_thread_mutex loader_global_instance_list_lock;
 
@@ -95,62 +95,89 @@
 
 VkResult loader_validate_instance_extensions(struct loader_instance *inst, const struct loader_extension_list *icd_exts,
                                              const struct loader_layer_list *instance_layer,
+                                             const struct loader_envvar_all_filters *layer_filters,
                                              const VkInstanceCreateInfo *pCreateInfo);
 
 void loader_initialize(void);
 void loader_release(void);
 void loader_preload_icds(void);
 void loader_unload_preloaded_icds(void);
+VkResult loader_init_library_list(struct loader_layer_list *instance_layers, loader_platform_dl_handle **libs);
+
+// Allocate a new string able to hold source_str and place it in dest_str
+VkResult loader_copy_to_new_str(const struct loader_instance *inst, const char *source_str, char **dest_str);
+
+// Allocate a loader_string_list with enough space for allocated_count strings inside of it
+VkResult create_string_list(const struct loader_instance *inst, uint32_t allocated_count, struct loader_string_list *string_list);
+// Resize if there isn't enough space, then add the string str to the end of the loader_string_list
+// This function takes ownership of the str passed in - but only when it succeeds
+VkResult append_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, char *str);
+// Resize if there isn't enough space, then copy the string str to a new string the end of the loader_string_list
+// This function does not take ownership of the string, it merely copies it.
+// This function appends a null terminator to the string automatically
+// The str_len parameter does not include the null terminator
+VkResult copy_str_to_string_list(const struct loader_instance *inst, struct loader_string_list *string_list, const char *str,
+                                 size_t str_len);
+
+// Free any string inside of loader_string_list and then free the list itself
+void free_string_list(const struct loader_instance *inst, struct loader_string_list *string_list);
+
+VkResult loader_init_generic_list(const struct loader_instance *inst, struct loader_generic_list *list_info, size_t element_size);
 bool has_vk_extension_property_array(const VkExtensionProperties *vk_ext_prop, const uint32_t count,
                                      const VkExtensionProperties *ext_array);
 bool has_vk_extension_property(const VkExtensionProperties *vk_ext_prop, const struct loader_extension_list *ext_list);
-
-VkResult loader_add_layer_properties_to_list(const struct loader_instance *inst, struct loader_layer_list *list,
-                                             uint32_t prop_list_count, const struct loader_layer_properties *props);
+// This function takes ownership of layer_property in the case that allocation fails
+VkResult loader_append_layer_property(const struct loader_instance *inst, struct loader_layer_list *layer_list,
+                                      struct loader_layer_properties *layer_property);
+VkResult loader_add_layer_properties(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list, cJSON *json,
+                                     bool is_implicit, char *filename);
+bool loader_find_layer_name_in_list(const char *name, const struct loader_pointer_layer_list *layer_list);
+VkResult loader_add_layer_properties_to_list(const struct loader_instance *inst, struct loader_pointer_layer_list *list,
+                                             struct loader_layer_properties *props);
 void loader_free_layer_properties(const struct loader_instance *inst, struct loader_layer_properties *layer_properties);
-VkResult loader_add_meta_layer(const struct loader_instance *inst, const struct loader_envvar_filter *enable_filter,
-                               const struct loader_envvar_disable_layers_filter *disable_filter,
-                               const struct loader_layer_properties *prop, struct loader_layer_list *target_list,
-                               struct loader_layer_list *expanded_target_list, const struct loader_layer_list *source_list,
+bool loader_implicit_layer_is_enabled(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                                      const struct loader_layer_properties *prop);
+VkResult loader_add_meta_layer(const struct loader_instance *inst, const struct loader_envvar_all_filters *filters,
+                               struct loader_layer_properties *prop, struct loader_pointer_layer_list *target_list,
+                               struct loader_pointer_layer_list *expanded_target_list, const struct loader_layer_list *source_list,
                                bool *out_found_all_component_layers);
 VkResult loader_add_to_ext_list(const struct loader_instance *inst, struct loader_extension_list *ext_list,
                                 uint32_t prop_list_count, const VkExtensionProperties *props);
-VkResult loader_add_to_dev_ext_list(const struct loader_instance *inst, struct loader_device_extension_list *ext_list,
-                                    const VkExtensionProperties *props, uint32_t entry_count, char **entrys);
 VkResult loader_add_device_extensions(const struct loader_instance *inst,
                                       PFN_vkEnumerateDeviceExtensionProperties fpEnumerateDeviceExtensionProperties,
                                       VkPhysicalDevice physical_device, const char *lib_name,
                                       struct loader_extension_list *ext_list);
 VkResult loader_init_generic_list(const struct loader_instance *inst, struct loader_generic_list *list_info, size_t element_size);
 void loader_destroy_generic_list(const struct loader_instance *inst, struct loader_generic_list *list);
-void loader_destroy_layer_list(const struct loader_instance *inst, struct loader_device *device,
-                               struct loader_layer_list *layer_list);
+void loader_destroy_pointer_layer_list(const struct loader_instance *inst, struct loader_pointer_layer_list *layer_list);
 void loader_delete_layer_list_and_properties(const struct loader_instance *inst, struct loader_layer_list *layer_list);
+void loader_remove_layer_in_list(const struct loader_instance *inst, struct loader_layer_list *layer_list,
+                                 uint32_t layer_to_remove);
+VkResult loader_scanned_icd_init(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list);
 void loader_scanned_icd_clear(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list);
 VkResult loader_icd_scan(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
-                         bool *skipped_portability_drivers);
+                         const VkInstanceCreateInfo *pCreateInfo, bool *skipped_portability_drivers);
 void loader_icd_destroy(struct loader_instance *ptr_inst, struct loader_icd_term *icd_term,
                         const VkAllocationCallbacks *pAllocator);
-VkResult loader_scan_for_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers);
+VkResult loader_scan_for_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers,
+                                const struct loader_envvar_all_filters *layer_filters);
 VkResult loader_scan_for_implicit_layers(struct loader_instance *inst, struct loader_layer_list *instance_layers,
-                                         loader_platform_dl_handle **libs);
+                                         const struct loader_envvar_all_filters *layer_filters);
 VkResult loader_get_icd_loader_instance_extensions(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list,
                                                    struct loader_extension_list *inst_exts);
 struct loader_icd_term *loader_get_icd_and_device(const void *device, struct loader_device **found_dev, uint32_t *icd_index);
 struct loader_instance *loader_get_instance(const VkInstance instance);
-void loader_deactivate_layers(const struct loader_instance *instance, struct loader_device *device, struct loader_layer_list *list);
 struct loader_device *loader_create_logical_device(const struct loader_instance *inst, const VkAllocationCallbacks *pAllocator);
-void loader_add_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term,
-                               struct loader_device *found_dev);
-void loader_remove_logical_device(const struct loader_instance *inst, struct loader_icd_term *icd_term,
-                                  struct loader_device *found_dev, const VkAllocationCallbacks *pAllocator);
+void loader_add_logical_device(struct loader_icd_term *icd_term, struct loader_device *found_dev);
+void loader_remove_logical_device(struct loader_icd_term *icd_term, struct loader_device *found_dev,
+                                  const VkAllocationCallbacks *pAllocator);
 // NOTE: Outside of loader, this entry-point is only provided for error
 // cleanup.
-void loader_destroy_logical_device(const struct loader_instance *inst, struct loader_device *dev,
-                                   const VkAllocationCallbacks *pAllocator);
+void loader_destroy_logical_device(struct loader_device *dev, const VkAllocationCallbacks *pAllocator);
 
 VkResult loader_enable_instance_layers(struct loader_instance *inst, const VkInstanceCreateInfo *pCreateInfo,
-                                       const struct loader_layer_list *instance_layers);
+                                       const struct loader_layer_list *instance_layers,
+                                       const struct loader_envvar_all_filters *layer_filters);
 
 VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator,
                                       struct loader_instance *inst, VkInstance *created_instance);
@@ -170,7 +197,7 @@
                                     PFN_vkGetDeviceProcAddr *layerNextGDPA);
 
 VkResult loader_validate_device_extensions(struct loader_instance *this_instance,
-                                           const struct loader_layer_list *activated_device_layers,
+                                           const struct loader_pointer_layer_list *activated_device_layers,
                                            const struct loader_extension_list *icd_exts, const VkDeviceCreateInfo *pCreateInfo);
 
 VkResult setup_loader_tramp_phys_devs(struct loader_instance *inst, uint32_t phys_dev_count, VkPhysicalDevice *phys_devs);
@@ -180,7 +207,7 @@
 VkStringErrorFlags vk_string_validate(const int max_length, const char *char_array);
 
 char *loader_get_next_path(char *path);
-VkResult add_data_files(const struct loader_instance *inst, int dir_fd, char *search_path, struct loader_data_files *out_files,
+VkResult add_data_files(const struct loader_instance *inst, int dir_fd, char *search_path, struct loader_string_list *out_files,
                         bool use_first_found_manifest);
 
 loader_api_version loader_make_version(uint32_t version);
@@ -190,11 +217,11 @@
 bool loader_check_version_meets_required(loader_api_version required, loader_api_version version);
 
 // Convenience macros for common versions
-#ifndef LOADER_VERSION_1_0_0
+#if !defined(LOADER_VERSION_1_0_0)
 #define LOADER_VERSION_1_0_0 loader_combine_version(1, 0, 0)
 #endif
 
-#ifndef LOADER_VERSION_1_1_0
+#if !defined(LOADER_VERSION_1_1_0)
 #define LOADER_VERSION_1_1_0 loader_combine_version(1, 1, 0)
 #endif
 
diff --git a/loader/loader.rc b/loader/loader.rc
index 996d9c5..74a6659 100644
--- a/loader/loader.rc
+++ b/loader/loader.rc
@@ -1,7 +1,7 @@
 //
-// Copyright (c) 2014-2022 The Khronos Group Inc.
-// Copyright (c) 2014-2022 Valve Corporation
-// Copyright (c) 2014-2022 LunarG, Inc.
+// Copyright (c) 2014-2023 The Khronos Group Inc.
+// Copyright (c) 2014-2023 Valve Corporation
+// Copyright (c) 2014-2023 LunarG, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -22,9 +22,10 @@
 #include "winres.h"
 
 // All set through CMake
-#define VER_FILE_VERSION 1, 0, 1111, 2222
-#define VER_FILE_DESCRIPTION_STR "Vulkan Loader - Dev Build"
-#define VER_FILE_VERSION_STR "1.0.1111.2222.Dev Build"
+#define VER_FILE_VERSION 1, 3, 268, 0
+#define VER_FILE_DESCRIPTION_STR "1.3.268.Dev Build"
+#define VER_FILE_VERSION_STR "Vulkan Loader - Dev Build"
+#define VER_COPYRIGHT_STR "Copyright (C) 2015-2023"
 
 VS_VERSION_INFO VERSIONINFO
  FILEVERSION VER_FILE_VERSION
@@ -46,7 +47,7 @@
         BEGIN
             VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
             VALUE "FileVersion", VER_FILE_VERSION_STR
-            VALUE "LegalCopyright", "Copyright (C) 2015-2022"
+            VALUE "LegalCopyright", VER_COPYRIGHT_STR
             VALUE "ProductName", "Vulkan Runtime"
             VALUE "ProductVersion", VER_FILE_VERSION_STR
         END
diff --git a/loader/loader.rc.in b/loader/loader.rc.in
index 23010f5..0dc4227 100644
--- a/loader/loader.rc.in
+++ b/loader/loader.rc.in
@@ -1,7 +1,7 @@
 //
-// Copyright (c) 2014-2022 The Khronos Group Inc.
-// Copyright (c) 2014-2022 Valve Corporation
-// Copyright (c) 2014-2022 LunarG, Inc.
+// Copyright (c) 2014-${LOADER_CUR_COPYRIGHT_YEAR} The Khronos Group Inc.
+// Copyright (c) 2014-${LOADER_CUR_COPYRIGHT_YEAR} Valve Corporation
+// Copyright (c) 2014-${LOADER_CUR_COPYRIGHT_YEAR} LunarG, Inc.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@
 #define VER_FILE_VERSION ${LOADER_VER_FILE_VERSION}
 #define VER_FILE_DESCRIPTION_STR ${LOADER_VER_FILE_DESCRIPTION_STR}
 #define VER_FILE_VERSION_STR ${LOADER_VER_FILE_VERSION_STR}
+#define VER_COPYRIGHT_STR "Copyright (C) 2015-${LOADER_CUR_COPYRIGHT_YEAR}"
 
 VS_VERSION_INFO VERSIONINFO
  FILEVERSION VER_FILE_VERSION
@@ -46,7 +47,7 @@
         BEGIN
             VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
             VALUE "FileVersion", VER_FILE_VERSION_STR
-            VALUE "LegalCopyright", "Copyright (C) 2015-2022"
+            VALUE "LegalCopyright", VER_COPYRIGHT_STR
             VALUE "ProductName", "Vulkan Runtime"
             VALUE "ProductVersion", VER_FILE_VERSION_STR
         END
diff --git a/loader/loader_common.h b/loader/loader_common.h
index d79cca7..2ff67f8 100644
--- a/loader/loader_common.h
+++ b/loader/loader_common.h
@@ -39,6 +39,8 @@
 #include "vk_layer_dispatch_table.h"
 #include "vk_loader_extensions.h"
 
+#include "settings.h"
+
 typedef enum VkStringErrorFlagBits {
     VK_STRING_ERROR_NONE = 0x00000000,
     VK_STRING_ERROR_LENGTH = 0x00000001,
@@ -65,6 +67,12 @@
     void *list;
 };
 
+struct loader_string_list {
+    uint32_t allocated_count;
+    uint32_t count;
+    char **list;
+};
+
 struct loader_extension_list {
     size_t capacity;
     uint32_t count;
@@ -73,8 +81,7 @@
 
 struct loader_dev_ext_props {
     VkExtensionProperties props;
-    uint32_t entrypoint_count;
-    char **entrypoints;
+    struct loader_string_list entrypoints;
 };
 
 struct loader_device_extension_list {
@@ -84,14 +91,14 @@
 };
 
 struct loader_name_value {
-    char name[MAX_STRING_SIZE];
-    char value[MAX_STRING_SIZE];
+    char *name;
+    char *value;
 };
 
 struct loader_layer_functions {
-    char str_gipa[MAX_STRING_SIZE];
-    char str_gdpa[MAX_STRING_SIZE];
-    char str_negotiate_interface[MAX_STRING_SIZE];
+    char *str_gipa;
+    char *str_gdpa;
+    char *str_negotiate_interface;
     PFN_vkNegotiateLoaderLayerInterfaceVersion negotiate_layer_interface;
     PFN_vkGetInstanceProcAddr get_instance_proc_addr;
     PFN_vkGetDeviceProcAddr get_device_proc_addr;
@@ -113,6 +120,7 @@
 
     LOADER_LAYER_LIB_ERROR_WRONG_BIT_TYPE = 20,
     LOADER_LAYER_LIB_ERROR_FAILED_TO_LOAD = 21,
+    LOADER_LAYER_LIB_ERROR_OUT_OF_MEMORY = 22,
 };
 
 enum layer_type_flags {
@@ -124,9 +132,11 @@
 struct loader_layer_properties {
     VkLayerProperties info;
     enum layer_type_flags type_flags;
+    enum loader_settings_layer_control settings_control_value;
+
     uint32_t interface_version;  // PFN_vkNegotiateLoaderLayerInterfaceVersion
-    char manifest_file_name[MAX_STRING_SIZE];
-    char lib_name[MAX_STRING_SIZE];
+    char *manifest_file_name;
+    char *lib_name;
     enum loader_layer_library_status lib_status;
     loader_platform_dl_handle lib_handle;
     struct loader_layer_functions functions;
@@ -134,29 +144,34 @@
     struct loader_device_extension_list device_extension_list;
     struct loader_name_value disable_env_var;
     struct loader_name_value enable_env_var;
-    uint32_t num_component_layers;
-    char (*component_layer_names)[MAX_STRING_SIZE];
+    struct loader_string_list component_layer_names;
     struct {
-        char enumerate_instance_extension_properties[MAX_STRING_SIZE];
-        char enumerate_instance_layer_properties[MAX_STRING_SIZE];
-        char enumerate_instance_version[MAX_STRING_SIZE];
+        char *enumerate_instance_extension_properties;
+        char *enumerate_instance_layer_properties;
+        char *enumerate_instance_version;
     } pre_instance_functions;
-    uint32_t num_override_paths;
-    char (*override_paths)[MAX_STRING_SIZE];
+    struct loader_string_list override_paths;
     bool is_override;
     bool keep;
-    uint32_t num_blacklist_layers;
-    char (*blacklist_layer_names)[MAX_STRING_SIZE];
-    uint32_t num_app_key_paths;
-    char (*app_key_paths)[MAX_STRING_SIZE];
+    struct loader_string_list blacklist_layer_names;
+    struct loader_string_list app_key_paths;
 };
 
+// Stores a list of loader_layer_properties
 struct loader_layer_list {
     size_t capacity;
     uint32_t count;
     struct loader_layer_properties *list;
 };
 
+// Stores a list of pointers to loader_layer_properties
+// Used for app_activated_layer_list and expanded_activated_layer_list
+struct loader_pointer_layer_list {
+    size_t capacity;
+    uint32_t count;
+    struct loader_layer_properties **list;
+};
+
 typedef VkResult(VKAPI_PTR *PFN_vkDevExt)(VkDevice device);
 
 struct loader_dev_dispatch_table {
@@ -172,16 +187,16 @@
     VkDevice icd_device;    // device object from the icd
     struct loader_physical_device_term *phys_dev_term;
 
-    // List of activated layers.
-    //  app_      is the version based on exactly what the application asked for.
-    //            This is what must be returned to the application on Enumerate calls.
-    //  expanded_ is the version based on expanding meta-layers into their
-    //            individual component layers.  This is what is used internally.
-    struct loader_layer_list app_activated_layer_list;
-    struct loader_layer_list expanded_activated_layer_list;
-
     VkAllocationCallbacks alloc_callbacks;
 
+    // List of activated device extensions that layers support (but not necessarily the driver which have functions that require
+    // trampolines to work correctly. EX - vkDebugMarkerSetObjectNameEXT can name wrapped handles like instance, physical device,
+    // or surface
+    struct {
+        bool ext_debug_marker_enabled;
+        bool ext_debug_utils_enabled;
+    } layer_extensions;
+
     // List of activated device extensions that have terminators implemented in the loader
     struct {
         bool khr_swapchain_enabled;
@@ -190,9 +205,13 @@
         bool ext_debug_marker_enabled;
         bool ext_debug_utils_enabled;
         bool ext_full_screen_exclusive_enabled;
-    } extensions;
+    } driver_extensions;
 
     struct loader_device *next;
+
+    // Makes vkGetDeviceProcAddr check if core functions are supported by the current app_api_version.
+    // Only set to true if VK_KHR_maintenance5 is enabled.
+    bool should_ignore_device_commands_from_newer_version;
 };
 
 // Per ICD information
@@ -234,6 +253,9 @@
     struct loader_instance_dispatch_table *disp;  // must be first entry in structure
     uint64_t magic;                               // Should be LOADER_MAGIC_NUMBER
 
+    // Store all the terminators for instance functions in case a layer queries one *after* vkCreateInstance
+    VkLayerInstanceDispatchTable terminator_dispatch;
+
     // Vulkan API version the app is intending to use.
     loader_api_version app_api_version;
 
@@ -258,6 +280,8 @@
     struct loader_icd_term *icd_terms;
     struct loader_icd_tramp_list icd_tramp_list;
 
+    // Must store the strings inside loader_instance directly - since the asm code will offset into
+    // loader_instance to get the function name
     uint32_t dev_ext_disp_function_count;
     char *dev_ext_disp_functions[MAX_NUM_UNKNOWN_EXTS];
     uint32_t phys_dev_ext_disp_function_count;
@@ -265,6 +289,8 @@
 
     struct loader_msg_callback_map_entry *icd_msg_callback_map;
 
+    struct loader_string_list enabled_layer_names;
+
     struct loader_layer_list instance_layer_list;
     bool override_layer_present;
 
@@ -273,8 +299,8 @@
     //            This is what must be returned to the application on Enumerate calls.
     //  expanded_ is the version based on expanding meta-layers into their
     //            individual component layers.  This is what is used internally.
-    struct loader_layer_list app_activated_layer_list;
-    struct loader_layer_list expanded_activated_layer_list;
+    struct loader_pointer_layer_list app_activated_layer_list;
+    struct loader_pointer_layer_list expanded_activated_layer_list;
 
     VkInstance instance;  // layers/ICD instance returned to trampoline
 
@@ -291,47 +317,54 @@
 
     VkAllocationCallbacks alloc_callbacks;
 
+    // Set to true after vkCreateInstance has returned - necessary for loader_gpa_instance_terminator()
+    bool instance_finished_creation;
+
+    loader_settings settings;
+
     bool portability_enumeration_enabled;
+    bool portability_enumeration_flag_bit_set;
+    bool portability_enumeration_extension_enabled;
 
     bool wsi_surface_enabled;
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     bool wsi_win32_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     bool wsi_wayland_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     bool wsi_xcb_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     bool wsi_xlib_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     bool wsi_directfb_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     bool wsi_android_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     bool wsi_macos_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     bool wsi_ios_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     bool wsi_ggp_surface_enabled;
 #endif
     bool wsi_headless_surface_enabled;
 #if defined(VK_USE_PLATFORM_METAL_EXT)
     bool wsi_metal_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     bool wsi_imagepipe_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     bool wsi_screen_surface_enabled;
 #endif
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
     bool wsi_vi_surface_enabled;
 #endif
     bool wsi_display_enabled;
@@ -372,7 +405,7 @@
     VkPhysicalDevice phys_dev;  // object from ICD
 };
 
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
 // Structure for storing the relevent device information for selecting a device.
 // NOTE: Needs to be defined here so we can store this content in the term structrue
 //       for quicker sorting.
@@ -405,7 +438,7 @@
     struct loader_icd_term *this_icd_term;
     uint8_t icd_index;
     VkPhysicalDeviceGroupProperties group_props;
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
     struct LinuxSortedDeviceInfo internal_device_info[VK_MAX_DEVICE_GROUP_SIZE];
 #endif  // LOADER_ENABLE_LINUX_SORT
 };
@@ -435,12 +468,6 @@
     LOADER_DATA_FILE_NUM_TYPES  // Not a real field, used for possible loop terminator
 };
 
-struct loader_data_files {
-    uint32_t count;
-    uint32_t alloc_count;
-    char **filename_list;
-};
-
 struct loader_phys_dev_per_icd {
     uint32_t device_count;
     VkPhysicalDevice *physical_devices;
@@ -478,3 +505,9 @@
     bool disable_all_implicit;
     bool disable_all_explicit;
 };
+
+struct loader_envvar_all_filters {
+    struct loader_envvar_filter enable_filter;
+    struct loader_envvar_disable_layers_filter disable_filter;
+    struct loader_envvar_filter allow_filter;
+};
diff --git a/loader/loader_environment.c b/loader/loader_environment.c
index f4205f4..a419561 100644
--- a/loader/loader_environment.c
+++ b/loader/loader_environment.c
@@ -1,8 +1,8 @@
 /*
  *
- * Copyright (c) 2014-2022 The Khronos Group Inc.
- * Copyright (c) 2014-2022 Valve Corporation
- * Copyright (c) 2014-2022 LunarG, Inc.
+ * Copyright (c) 2014-2023 The Khronos Group Inc.
+ * Copyright (c) 2014-2023 Valve Corporation
+ * Copyright (c) 2014-2023 LunarG, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,12 +35,12 @@
 #include <ctype.h>
 
 // Environment variables
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
-    defined(__OpenBSD__)
+#if COMMON_UNIX_PLATFORMS
 
 bool is_high_integrity() { return geteuid() != getuid() || getegid() != getgid(); }
 
 char *loader_getenv(const char *name, const struct loader_instance *inst) {
+    if (NULL == name) return NULL;
     // No allocation of memory necessary for Linux, but we should at least touch
     // the inst pointer to get rid of compiler warnings.
     (void)inst;
@@ -62,15 +62,15 @@
 #else
     // Linux
     char *out;
-#if defined(HAVE_SECURE_GETENV) && !defined(USE_UNSAFE_FILE_SEARCH)
+#if defined(HAVE_SECURE_GETENV) && !defined(LOADER_USE_UNSAFE_FILE_SEARCH)
     (void)inst;
     out = secure_getenv(name);
-#elif defined(HAVE___SECURE_GETENV) && !defined(USE_UNSAFE_FILE_SEARCH)
+#elif defined(HAVE___SECURE_GETENV) && !defined(LOADER_USE_UNSAFE_FILE_SEARCH)
     (void)inst;
     out = __secure_getenv(name);
 #else
     out = loader_getenv(name, inst);
-#if !defined(USE_UNSAFE_FILE_SEARCH)
+#if !defined(LOADER_USE_UNSAFE_FILE_SEARCH)
     loader_log(inst, VULKAN_LOADER_INFO_BIT, 0, "Loader is using non-secure environment variable lookup for %s", name);
 #endif
 #endif
@@ -147,7 +147,8 @@
 }
 
 char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
-#if !defined(USE_UNSAFE_FILE_SEARCH)
+    if (NULL == name) return NULL;
+#if !defined(LOADER_USE_UNSAFE_FILE_SEARCH)
     if (is_high_integrity()) {
         loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
                    "Loader is running with elevated permissions. Environment variable %s will be ignored", name);
@@ -162,6 +163,9 @@
 
 #else
 
+#warning \
+    "This platform does not support environment variables! If this is not intended, please implement the stubs functions loader_getenv and loader_free_getenv"
+
 char *loader_getenv(const char *name, const struct loader_instance *inst) {
     // stub func
     (void)inst;
@@ -240,47 +244,54 @@
                                               struct loader_envvar_filter *filter_struct) {
     VkResult result = VK_SUCCESS;
     memset(filter_struct, 0, sizeof(struct loader_envvar_filter));
+    char *parsing_string = NULL;
     char *env_var_value = loader_secure_getenv(env_var_name, inst);
     if (NULL == env_var_value) {
         return result;
     }
-    if (strlen(env_var_value) > 0) {
-        const size_t env_var_len = strlen(env_var_value);
-        // Allocate a separate string since strtok modifies the original string
-        char *parsing_string = loader_instance_heap_calloc(inst, env_var_len + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-        if (NULL != parsing_string) {
-            const char tokenizer[3] = ",";
-
-            for (uint32_t iii = 0; iii < env_var_len; ++iii) {
-                parsing_string[iii] = (char)tolower(env_var_value[iii]);
-            }
-            parsing_string[env_var_len] = '\0';
-
-            char *token = strtok(parsing_string, tokenizer);
-            while (NULL != token) {
-                enum loader_filter_string_type cur_filter_type;
-                const char *actual_start;
-                size_t actual_len;
-                determine_filter_type(token, &cur_filter_type, &actual_start, &actual_len);
-                if (actual_len > VK_MAX_EXTENSION_NAME_SIZE) {
-                    strncpy(filter_struct->filters[filter_struct->count].value, actual_start, VK_MAX_EXTENSION_NAME_SIZE);
-                } else {
-                    strncpy(filter_struct->filters[filter_struct->count].value, actual_start, actual_len);
-                }
-                filter_struct->filters[filter_struct->count].length = actual_len;
-                filter_struct->filters[filter_struct->count++].type = cur_filter_type;
-                if (filter_struct->count >= MAX_ADDITIONAL_FILTERS) {
-                    break;
-                }
-                token = strtok(NULL, tokenizer);
-            }
-            loader_instance_heap_free(inst, parsing_string);
-        } else {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "parse_generic_filter_environment_var: Failed to allocate space for parsing env var \'%s\'", env_var_name);
-            result = VK_ERROR_OUT_OF_HOST_MEMORY;
-        }
+    const size_t env_var_len = strlen(env_var_value);
+    if (env_var_len == 0) {
+        goto out;
     }
+    // Allocate a separate string since scan_for_next_comma modifies the original string
+    parsing_string = loader_instance_heap_calloc(inst, env_var_len + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == parsing_string) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "parse_generic_filter_environment_var: Failed to allocate space for parsing env var \'%s\'", env_var_name);
+        result = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+    for (uint32_t iii = 0; iii < env_var_len; ++iii) {
+        parsing_string[iii] = (char)tolower(env_var_value[iii]);
+    }
+    parsing_string[env_var_len] = '\0';
+
+    char *context = NULL;
+    char *token = thread_safe_strtok(parsing_string, ",", &context);
+    while (NULL != token) {
+        enum loader_filter_string_type cur_filter_type;
+        const char *actual_start;
+        size_t actual_len;
+        determine_filter_type(token, &cur_filter_type, &actual_start, &actual_len);
+        if (actual_len > VK_MAX_EXTENSION_NAME_SIZE) {
+            loader_strncpy(filter_struct->filters[filter_struct->count].value, VK_MAX_EXTENSION_NAME_SIZE, actual_start,
+                           VK_MAX_EXTENSION_NAME_SIZE);
+        } else {
+            loader_strncpy(filter_struct->filters[filter_struct->count].value, VK_MAX_EXTENSION_NAME_SIZE, actual_start,
+                           actual_len);
+        }
+        filter_struct->filters[filter_struct->count].length = actual_len;
+        filter_struct->filters[filter_struct->count++].type = cur_filter_type;
+        if (filter_struct->count >= MAX_ADDITIONAL_FILTERS) {
+            break;
+        }
+        token = thread_safe_strtok(NULL, ",", &context);
+    }
+
+out:
+
+    loader_instance_heap_free(inst, parsing_string);
     loader_free_getenv(env_var_value, inst);
     return result;
 }
@@ -292,75 +303,94 @@
                                                      struct loader_envvar_disable_layers_filter *disable_struct) {
     VkResult result = VK_SUCCESS;
     memset(disable_struct, 0, sizeof(struct loader_envvar_disable_layers_filter));
+    char *parsing_string = NULL;
     char *env_var_value = loader_secure_getenv(VK_LAYERS_DISABLE_ENV_VAR, inst);
     if (NULL == env_var_value) {
         goto out;
     }
-    if (strlen(env_var_value) > 0) {
-        const size_t env_var_len = strlen(env_var_value);
-        // Allocate a separate string since strtok modifies the original string
-        char *parsing_string = loader_instance_heap_calloc(inst, env_var_len + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
-        if (NULL != parsing_string) {
-            const char tokenizer[3] = ",";
-
-            for (uint32_t iii = 0; iii < env_var_len; ++iii) {
-                parsing_string[iii] = (char)tolower(env_var_value[iii]);
-            }
-            parsing_string[env_var_len] = '\0';
-
-            char *token = strtok(parsing_string, tokenizer);
-            while (NULL != token) {
-                uint32_t cur_count = disable_struct->additional_filters.count;
-                enum loader_filter_string_type cur_filter_type;
-                const char *actual_start;
-                size_t actual_len;
-                determine_filter_type(token, &cur_filter_type, &actual_start, &actual_len);
-                if (cur_filter_type == FILTER_STRING_SPECIAL) {
-                    if (!strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_1, token) || !strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_2, token) ||
-                        !strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_3, token)) {
-                        disable_struct->disable_all = true;
-                    } else if (!strcmp(VK_LOADER_DISABLE_IMPLICIT_LAYERS_VAR, token)) {
-                        disable_struct->disable_all_implicit = true;
-                    } else if (!strcmp(VK_LOADER_DISABLE_EXPLICIT_LAYERS_VAR, token)) {
-                        disable_struct->disable_all_explicit = true;
-                    }
-                } else {
-                    if (actual_len > VK_MAX_EXTENSION_NAME_SIZE) {
-                        strncpy(disable_struct->additional_filters.filters[cur_count].value, actual_start,
-                                VK_MAX_EXTENSION_NAME_SIZE);
-                    } else {
-                        strncpy(disable_struct->additional_filters.filters[cur_count].value, actual_start, actual_len);
-                    }
-                    disable_struct->additional_filters.filters[cur_count].length = actual_len;
-                    disable_struct->additional_filters.filters[cur_count].type = cur_filter_type;
-                    disable_struct->additional_filters.count++;
-                    if (disable_struct->additional_filters.count >= MAX_ADDITIONAL_FILTERS) {
-                        break;
-                    }
-                }
-                token = strtok(NULL, tokenizer);
-            }
-            loader_instance_heap_free(inst, parsing_string);
-        } else {
-            loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                       "parse_layers_disable_filter_environment_var: Failed to allocate space for parsing env var "
-                       "\'VK_LAYERS_DISABLE_ENV_VAR\'");
-            result = VK_ERROR_OUT_OF_HOST_MEMORY;
-        }
+    const size_t env_var_len = strlen(env_var_value);
+    if (env_var_len == 0) {
+        goto out;
     }
-    loader_free_getenv(env_var_value, inst);
+    // Allocate a separate string since scan_for_next_comma modifies the original string
+    parsing_string = loader_instance_heap_calloc(inst, env_var_len + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == parsing_string) {
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "parse_layers_disable_filter_environment_var: Failed to allocate space for parsing env var "
+                   "\'VK_LAYERS_DISABLE_ENV_VAR\'");
+        result = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+    for (uint32_t iii = 0; iii < env_var_len; ++iii) {
+        parsing_string[iii] = (char)tolower(env_var_value[iii]);
+    }
+    parsing_string[env_var_len] = '\0';
+
+    char *context = NULL;
+    char *token = thread_safe_strtok(parsing_string, ",", &context);
+    while (NULL != token) {
+        uint32_t cur_count = disable_struct->additional_filters.count;
+        enum loader_filter_string_type cur_filter_type;
+        const char *actual_start;
+        size_t actual_len;
+        determine_filter_type(token, &cur_filter_type, &actual_start, &actual_len);
+        if (cur_filter_type == FILTER_STRING_SPECIAL) {
+            if (!strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_1, token) || !strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_2, token) ||
+                !strcmp(VK_LOADER_DISABLE_ALL_LAYERS_VAR_3, token)) {
+                disable_struct->disable_all = true;
+            } else if (!strcmp(VK_LOADER_DISABLE_IMPLICIT_LAYERS_VAR, token)) {
+                disable_struct->disable_all_implicit = true;
+            } else if (!strcmp(VK_LOADER_DISABLE_EXPLICIT_LAYERS_VAR, token)) {
+                disable_struct->disable_all_explicit = true;
+            }
+        } else {
+            if (actual_len > VK_MAX_EXTENSION_NAME_SIZE) {
+                loader_strncpy(disable_struct->additional_filters.filters[cur_count].value, VK_MAX_EXTENSION_NAME_SIZE,
+                               actual_start, VK_MAX_EXTENSION_NAME_SIZE);
+            } else {
+                loader_strncpy(disable_struct->additional_filters.filters[cur_count].value, VK_MAX_EXTENSION_NAME_SIZE,
+                               actual_start, actual_len);
+            }
+            disable_struct->additional_filters.filters[cur_count].length = actual_len;
+            disable_struct->additional_filters.filters[cur_count].type = cur_filter_type;
+            disable_struct->additional_filters.count++;
+            if (disable_struct->additional_filters.count >= MAX_ADDITIONAL_FILTERS) {
+                break;
+            }
+        }
+        token = thread_safe_strtok(NULL, ",", &context);
+    }
 out:
+    loader_instance_heap_free(inst, parsing_string);
+    loader_free_getenv(env_var_value, inst);
     return result;
 }
 
+// Parses the filter environment variables to determine if we have any special behavior
+VkResult parse_layer_environment_var_filters(const struct loader_instance *inst, struct loader_envvar_all_filters *layer_filters) {
+    VkResult res = parse_generic_filter_environment_var(inst, VK_LAYERS_ENABLE_ENV_VAR, &layer_filters->enable_filter);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+    res = parse_layers_disable_filter_environment_var(inst, &layer_filters->disable_filter);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+    res = parse_generic_filter_environment_var(inst, VK_LAYERS_ALLOW_ENV_VAR, &layer_filters->allow_filter);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+    return res;
+}
+
 // Check to see if the provided layer name matches any of the filter strings.
 // This will properly check against:
 //  - substrings "*string*"
 //  - prefixes "string*"
 //  - suffixes "*string"
 //  - full string names "string"
-bool check_name_matches_filter_environment_var(const struct loader_instance *inst, const char *name,
-                                               const struct loader_envvar_filter *filter_struct) {
+bool check_name_matches_filter_environment_var(const char *name, const struct loader_envvar_filter *filter_struct) {
     bool ret_value = false;
     const size_t name_len = strlen(name);
     char lower_name[VK_MAX_EXTENSION_NAME_SIZE];
@@ -417,62 +447,62 @@
 
 // Get the layer name(s) from the env_name environment variable. If layer is found in
 // search_list then add it to layer_list.  But only add it to layer_list if type_flags matches.
-VkResult loader_add_environment_layers(struct loader_instance *inst, const enum layer_type_flags type_flags, const char *env_name,
-                                       const struct loader_envvar_filter *enable_filter,
-                                       const struct loader_envvar_disable_layers_filter *disable_filter,
-                                       struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
+VkResult loader_add_environment_layers(struct loader_instance *inst, const enum layer_type_flags type_flags,
+                                       const struct loader_envvar_all_filters *filters,
+                                       struct loader_pointer_layer_list *target_list,
+                                       struct loader_pointer_layer_list *expanded_target_list,
                                        const struct loader_layer_list *source_list) {
     VkResult res = VK_SUCCESS;
-    char *next, *name;
-    char *layer_env = loader_getenv(env_name, inst);
-    char **vk_inst_layers = NULL;
-    uint32_t vk_inst_layer_count = 0;
-    uint32_t separator_count = 0;
+    char *layer_env = loader_getenv(ENABLED_LAYERS_ENV, inst);
 
     // If the layer environment variable is present (i.e. VK_INSTANCE_LAYERS), we will always add it to the layer list.
     if (layer_env != NULL) {
-        name = loader_stack_alloc(strlen(layer_env) + 1);
+        size_t layer_env_len = strlen(layer_env) + 1;
+        char *name = loader_stack_alloc(layer_env_len);
         if (name != NULL) {
-            separator_count = 1;
-            for (uint32_t c = 0; c < strlen(layer_env); ++c) {
-                if (layer_env[c] == PATH_SEPARATOR) {
-                    separator_count++;
-                }
-            }
-
-            vk_inst_layers =
-                loader_instance_heap_calloc(inst, (separator_count * sizeof(char *)), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-            if (vk_inst_layers == NULL) {
-                res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                goto out;
-            }
-            for (uint32_t cur_layer = 0; cur_layer < separator_count; ++cur_layer) {
-                vk_inst_layers[cur_layer] =
-                    loader_instance_heap_calloc(inst, VK_MAX_EXTENSION_NAME_SIZE, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
-                if (vk_inst_layers[cur_layer] == NULL) {
-                    res = VK_ERROR_OUT_OF_HOST_MEMORY;
-                    goto out;
-                }
-            }
-
-            strcpy(name, layer_env);
+            loader_strncpy(name, layer_env_len, layer_env, layer_env_len);
 
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "env var \'%s\' defined and adding layers \"%s\"",
-                       env_name, name);
+                       ENABLED_LAYERS_ENV, name);
 
             // First look for the old-fashion layers forced on with VK_INSTANCE_LAYERS
             while (name && *name) {
-                next = loader_get_next_path(name);
+                char *next = loader_get_next_path(name);
 
                 if (strlen(name) > 0) {
-                    strncpy(vk_inst_layers[vk_inst_layer_count++], name, VK_MAX_EXTENSION_NAME_SIZE);
+                    bool found = false;
+                    for (uint32_t i = 0; i < source_list->count; i++) {
+                        struct loader_layer_properties *source_prop = &source_list->list[i];
+
+                        if (0 == strcmp(name, source_prop->info.layerName)) {
+                            found = true;
+                            // Only add it if it doesn't already appear in the layer list
+                            if (!loader_find_layer_name_in_list(source_prop->info.layerName, target_list)) {
+                                if (0 == (source_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) {
+                                    res = loader_add_layer_properties_to_list(inst, target_list, source_prop);
+                                    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+                                    res = loader_add_layer_properties_to_list(inst, expanded_target_list, source_prop);
+                                    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+                                } else {
+                                    res = loader_add_meta_layer(inst, filters, source_prop, target_list, expanded_target_list,
+                                                                source_list, NULL);
+                                    if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+                                }
+                                break;
+                            }
+                        }
+                    }
+                    if (!found) {
+                        loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_LAYER_BIT, 0,
+                                   "Layer \"%s\" was not found but was requested by env var VK_INSTANCE_LAYERS!", name);
+                    }
                 }
                 name = next;
             }
         }
     }
 
-    // Loop through all the layers and check the enable/disable filters as well as the VK_INSTANCE_LAYERS value.
+    // Loop through all the layers and check the enable/disable filters
     for (uint32_t i = 0; i < source_list->count; i++) {
         struct loader_layer_properties *source_prop = &source_list->list[i];
 
@@ -484,11 +514,11 @@
         // We found a layer we're interested in, but has it been disabled...
         bool adding = true;
         bool is_implicit = (0 == (source_prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER));
-        bool disabled_by_type = (is_implicit) ? (NULL != disable_filter && disable_filter->disable_all_implicit)
-                                              : (NULL != disable_filter && disable_filter->disable_all_explicit);
-        if (NULL != disable_filter &&
-            (disable_filter->disable_all || disabled_by_type ||
-             check_name_matches_filter_environment_var(inst, source_prop->info.layerName, &disable_filter->additional_filters))) {
+        bool disabled_by_type =
+            (is_implicit) ? (filters->disable_filter.disable_all_implicit) : (filters->disable_filter.disable_all_explicit);
+        if ((filters->disable_filter.disable_all || disabled_by_type ||
+             check_name_matches_filter_environment_var(source_prop->info.layerName, &filters->disable_filter.additional_filters)) &&
+            !check_name_matches_filter_environment_var(source_prop->info.layerName, &filters->allow_filter)) {
             loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0,
                        "Layer \"%s\" ignored because it has been disabled by env var \'%s\'", source_prop->info.layerName,
                        VK_LAYERS_DISABLE_ENV_VAR);
@@ -497,7 +527,9 @@
 
         // If we are supposed to filter through all layers, we need to compare the layer name against the filter.
         // This can override the disable above, so we want to do it second.
-        if (check_name_matches_filter_environment_var(inst, source_prop->info.layerName, enable_filter)) {
+        // Also make sure the layer isn't already in the output_list, skip adding it if it is.
+        if (check_name_matches_filter_environment_var(source_prop->info.layerName, &filters->enable_filter) &&
+            !loader_find_layer_name_in_list(source_prop->info.layerName, target_list)) {
             adding = true;
             // Only way is_substring is true is if there are enable variables.  If that's the case, and we're past the
             // above, we should indicate that it was forced on in this way.
@@ -505,15 +537,6 @@
                        "Layer \"%s\" forced enabled due to env var \'%s\'", source_prop->info.layerName, VK_LAYERS_ENABLE_ENV_VAR);
         } else {
             adding = false;
-            // If it's not in the enable filter, check the environment variable if it exists
-            if (vk_inst_layer_count > 0) {
-                for (uint32_t cur_layer = 0; cur_layer < vk_inst_layer_count; ++cur_layer) {
-                    if (!strcmp(vk_inst_layers[cur_layer], source_prop->info.layerName)) {
-                        adding = true;
-                        break;
-                    }
-                }
-            }
         }
 
         if (!adding) {
@@ -522,26 +545,18 @@
 
         // If not a meta-layer, simply add it.
         if (0 == (source_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) {
-            res = loader_add_layer_properties_to_list(inst, target_list, 1, source_prop);
+            res = loader_add_layer_properties_to_list(inst, target_list, source_prop);
             if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
-            res = loader_add_layer_properties_to_list(inst, expanded_target_list, 1, source_prop);
+            res = loader_add_layer_properties_to_list(inst, expanded_target_list, source_prop);
             if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
         } else {
-            res = loader_add_meta_layer(inst, enable_filter, disable_filter, source_prop, target_list, expanded_target_list,
-                                        source_list, NULL);
+            res = loader_add_meta_layer(inst, filters, source_prop, target_list, expanded_target_list, source_list, NULL);
             if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
         }
     }
 
 out:
 
-    if (NULL != vk_inst_layers) {
-        for (uint32_t cur_layer = 0; cur_layer < separator_count; ++cur_layer) {
-            loader_instance_heap_free(inst, vk_inst_layers[cur_layer]);
-        }
-        loader_instance_heap_free(inst, vk_inst_layers);
-    }
-
     if (layer_env != NULL) {
         loader_free_getenv(layer_env, inst);
     }
diff --git a/loader/loader_environment.h b/loader/loader_environment.h
index 2eb61d5..15474a3 100644
--- a/loader/loader_environment.h
+++ b/loader/loader_environment.h
@@ -35,8 +35,7 @@
 char *loader_getenv(const char *name, const struct loader_instance *inst);
 void loader_free_getenv(char *val, const struct loader_instance *inst);
 
-#if defined(WIN32) || defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || \
-    defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(WIN32) || COMMON_UNIX_PLATFORMS
 
 bool is_high_integrity();
 
@@ -48,10 +47,10 @@
                                               struct loader_envvar_filter *filter_struct);
 VkResult parse_layers_disable_filter_environment_var(const struct loader_instance *inst,
                                                      struct loader_envvar_disable_layers_filter *disable_struct);
-bool check_name_matches_filter_environment_var(const struct loader_instance *inst, const char *name,
-                                               const struct loader_envvar_filter *filter_struct);
-VkResult loader_add_environment_layers(struct loader_instance *inst, const enum layer_type_flags type_flags, const char *env_name,
-                                       const struct loader_envvar_filter *enable_filter,
-                                       const struct loader_envvar_disable_layers_filter *disable_filter,
-                                       struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list,
-                                       const struct loader_layer_list *source_list);
\ No newline at end of file
+VkResult parse_layer_environment_var_filters(const struct loader_instance *inst, struct loader_envvar_all_filters *layer_filters);
+bool check_name_matches_filter_environment_var(const char *name, const struct loader_envvar_filter *filter_struct);
+VkResult loader_add_environment_layers(struct loader_instance *inst, const enum layer_type_flags type_flags,
+                                       const struct loader_envvar_all_filters *filters,
+                                       struct loader_pointer_layer_list *target_list,
+                                       struct loader_pointer_layer_list *expanded_target_list,
+                                       const struct loader_layer_list *source_list);
diff --git a/loader/loader_linux.c b/loader/loader_linux.c
index 9f1a168..189ddd3 100644
--- a/loader/loader_linux.c
+++ b/loader/loader_linux.c
@@ -22,7 +22,7 @@
 
 // Non-windows and non-apple only header file, guard it so that accidental
 // inclusion doesn't cause unknown header include errors
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,7 +35,7 @@
 #include "log.h"
 
 // Determine a priority based on device type with the higher value being higher priority.
-static uint32_t determine_priority_type_value(VkPhysicalDeviceType type) {
+uint32_t determine_priority_type_value(VkPhysicalDeviceType type) {
     switch (type) {
         case VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:
             return 10;
@@ -55,7 +55,7 @@
 
 // Compare the two device types.
 // This behaves similar to a qsort compare.
-static int32_t device_type_compare(VkPhysicalDeviceType a, VkPhysicalDeviceType b) {
+int32_t device_type_compare(VkPhysicalDeviceType a, VkPhysicalDeviceType b) {
     uint32_t a_value = determine_priority_type_value(a);
     uint32_t b_value = determine_priority_type_value(b);
     if (a_value > b_value) {
@@ -204,8 +204,8 @@
 }
 
 // Search for the default device using the loader environment variable.
-static void linux_env_var_default_device(struct loader_instance *inst, uint32_t device_count,
-                                         struct LinuxSortedDeviceInfo *sorted_device_info) {
+void linux_env_var_default_device(struct loader_instance *inst, uint32_t device_count,
+                                  struct LinuxSortedDeviceInfo *sorted_device_info) {
     char *selection = loader_getenv("VK_LOADER_DEVICE_SELECT", inst);
     if (NULL != selection) {
         loader_log(inst, VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
@@ -269,7 +269,7 @@
             bool device_is_1_1_capable =
                 loader_check_version_meets_required(LOADER_VERSION_1_1_0, loader_make_version(dev_props.apiVersion));
             if (!sorted_device_info[index].has_pci_bus_info) {
-                uint32_t ext_count;
+                uint32_t ext_count = 0;
                 icd_term->dispatch.EnumerateDeviceExtensionProperties(sorted_device_info[index].physical_device, NULL, &ext_count,
                                                                       NULL);
                 if (ext_count > 0) {
@@ -437,7 +437,7 @@
     // Sort device groups by PCI info
     qsort(sorted_group_term, group_count, sizeof(struct loader_physical_device_group_term), compare_device_groups);
 
-    if (loader_get_debug_level() & (VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT)) {
+    if (loader_get_global_debug_level() & (VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT)) {
         loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "linux_sort_physical_device_groups:  Sorted order:");
         for (uint32_t group = 0; group < group_count; ++group) {
             loader_log(inst, VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "           Group %u", group);
diff --git a/loader/loader_linux.h b/loader/loader_linux.h
index 5515953..9456dd2 100644
--- a/loader/loader_linux.h
+++ b/loader/loader_linux.h
@@ -22,7 +22,7 @@
 
 #pragma once
 
-#ifdef LOADER_ENABLE_LINUX_SORT
+#if defined(LOADER_ENABLE_LINUX_SORT)
 
 #include "loader_common.h"
 
@@ -35,4 +35,4 @@
 VkResult linux_sort_physical_device_groups(struct loader_instance *inst, uint32_t group_count,
                                            struct loader_physical_device_group_term *sorted_group_term);
 
-#endif  // LOADER_ENABLE_LINUX_SORT
\ No newline at end of file
+#endif  // LOADER_ENABLE_LINUX_SORT
diff --git a/loader/loader_windows.c b/loader/loader_windows.c
index db8b691..0f6c2c8 100644
--- a/loader/loader_windows.c
+++ b/loader/loader_windows.c
@@ -27,7 +27,7 @@
  *
  */
 // Windows only header file, guard it so that accidental inclusion doesn't cause unknown header include errors
-#ifdef _WIN32
+#if defined(_WIN32)
 
 // This needs to be defined first, or else we'll get redefinitions on NTSTATUS values
 #define UMDF_USING_NTSTATUS
@@ -45,13 +45,13 @@
 #include <devpkey.h>
 #include <winternl.h>
 #include <strsafe.h>
-#ifdef __MINGW32__
+#if defined(__MINGW32__)
 #undef strcpy  // fix error with redfined strcpy when building with MinGW-w64
 #endif
 #include <dxgi1_6.h>
 #include "adapters.h"
 
-#ifndef __MINGW32__
+#if !defined(__MINGW32__)
 // not yet available with MinGW-w64 stable
 #include <appmodel.h>
 #endif
@@ -61,7 +61,10 @@
 #endif
 
 typedef HRESULT(APIENTRY *PFN_CreateDXGIFactory1)(REFIID riid, void **ppFactory);
-static PFN_CreateDXGIFactory1 fpCreateDXGIFactory1;
+PFN_CreateDXGIFactory1 fpCreateDXGIFactory1;
+
+// Empty function just so windows_initialization can find the current module location
+void function_for_finding_the_current_module(void) {}
 
 void windows_initialization(void) {
     char dll_location[MAX_PATH];
@@ -69,7 +72,7 @@
 
     // Get a module handle to a static function inside of this source
     if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
-                          (LPCSTR)&loader_debug_init, &module_handle) != 0 &&
+                          (LPCSTR)&function_for_finding_the_current_module, &module_handle) != 0 &&
         GetModuleFileName(module_handle, dll_location, sizeof(dll_location)) != 0) {
         loader_log(NULL, VULKAN_LOADER_INFO_BIT, 0, "Using Vulkan Loader %s", dll_location);
     }
@@ -82,7 +85,8 @@
     GetSystemDirectoryW(systemPath, MAX_PATH);
     StringCchCatW(systemPath, MAX_PATH, L"\\dxgi.dll");
     HMODULE dxgi_module = LoadLibraryW(systemPath);
-    fpCreateDXGIFactory1 = dxgi_module == NULL ? NULL : (PFN_CreateDXGIFactory1)GetProcAddress(dxgi_module, "CreateDXGIFactory1");
+    fpCreateDXGIFactory1 =
+        dxgi_module == NULL ? NULL : (PFN_CreateDXGIFactory1)(void *)GetProcAddress(dxgi_module, "CreateDXGIFactory1");
 
 #if !defined(NDEBUG)
     _set_error_mode(_OUT_TO_STDERR);
@@ -92,6 +96,7 @@
 }
 
 BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
+    (void)hinst;
     switch (reason) {
         case DLL_PROCESS_ATTACH:
             loader_initialize();
@@ -227,9 +232,9 @@
 
 VkResult windows_get_device_registry_files(const struct loader_instance *inst, uint32_t log_target_flag, char **reg_data,
                                            PDWORD reg_data_size, LPCSTR value_name) {
-    static const wchar_t *softwareComponentGUID = L"{5c4c3332-344d-483c-8739-259e934c9cc8}";
-    static const wchar_t *displayGUID = L"{4d36e968-e325-11ce-bfc1-08002be10318}";
-#ifdef CM_GETIDLIST_FILTER_PRESENT
+    const wchar_t *softwareComponentGUID = L"{5c4c3332-344d-483c-8739-259e934c9cc8}";
+    const wchar_t *displayGUID = L"{4d36e968-e325-11ce-bfc1-08002be10318}";
+#if defined(CM_GETIDLIST_FILTER_PRESENT)
     const ULONG flags = CM_GETIDLIST_FILTER_CLASS | CM_GETIDLIST_FILTER_PRESENT;
 #else
     const ULONG flags = 0x300;
@@ -348,7 +353,7 @@
                                     PDWORD reg_data_size) {
     // This list contains all of the allowed ICDs. This allows us to verify that a device is actually present from the vendor
     // specified. This does disallow other vendors, but any new driver should use the device-specific registries anyway.
-    static const struct {
+    const struct {
         const char *filename;
         unsigned int vendor_id;
     } known_drivers[] = {
@@ -553,7 +558,8 @@
     }
 
     if (!found && result != VK_ERROR_OUT_OF_HOST_MEMORY) {
-        loader_log(inst, log_target_flag, 0, "Found no registry files in %s", location);
+        loader_log(inst, log_target_flag, 0, "Found no registry files in %s\\%s",
+                   (hive == DEFAULT_VK_REGISTRY_HIVE) ? DEFAULT_VK_REGISTRY_HIVE_STR : SECONDARY_VK_REGISTRY_HIVE_STR, location);
         result = VK_ERROR_INCOMPATIBLE_DRIVER;
     }
 
@@ -581,9 +587,10 @@
         goto out;
     }
 
-    PFN_LoaderEnumAdapters2 fpLoaderEnumAdapters2 = (PFN_LoaderEnumAdapters2)GetProcAddress(gdi32_dll, "D3DKMTEnumAdapters2");
+    PFN_LoaderEnumAdapters2 fpLoaderEnumAdapters2 =
+        (PFN_LoaderEnumAdapters2)(void *)GetProcAddress(gdi32_dll, "D3DKMTEnumAdapters2");
     PFN_LoaderQueryAdapterInfo fpLoaderQueryAdapterInfo =
-        (PFN_LoaderQueryAdapterInfo)GetProcAddress(gdi32_dll, "D3DKMTQueryAdapterInfo");
+        (PFN_LoaderQueryAdapterInfo)(void *)GetProcAddress(gdi32_dll, "D3DKMTQueryAdapterInfo");
     if (fpLoaderEnumAdapters2 == NULL || fpLoaderQueryAdapterInfo == NULL) {
         result = VK_ERROR_INCOMPATIBLE_DRIVER;
         goto out;
@@ -615,7 +622,8 @@
             .value_type = REG_MULTI_SZ,
             .physical_adapter_index = 0,
         };
-        wcsncpy(filename_info.value_name, value_name, sizeof(filename_info.value_name) / sizeof(WCHAR));
+        size_t value_name_size = wcslen(value_name);
+        wcsncpy_s(filename_info.value_name, MAX_PATH, value_name, value_name_size);
         LoaderQueryAdapterInfo query_info;
         query_info.handle = adapters.adapters[i].handle;
         query_info.type = LOADER_QUERY_TYPE_REGISTRY;
@@ -698,17 +706,19 @@
 // Look for data files in the registry.
 VkResult windows_read_data_files_in_registry(const struct loader_instance *inst, enum loader_data_files_type data_file_type,
                                              bool warn_if_not_present, char *registry_location,
-                                             struct loader_data_files *out_files) {
+                                             struct loader_string_list *out_files) {
     VkResult vk_result = VK_SUCCESS;
     char *search_path = NULL;
     uint32_t log_target_flag = 0;
 
     if (data_file_type == LOADER_DATA_FILE_MANIFEST_DRIVER) {
         log_target_flag = VULKAN_LOADER_DRIVER_BIT;
-        loader_log(inst, log_target_flag, 0, "Checking for Driver Manifest files in Registry at %s", registry_location);
+        loader_log(inst, log_target_flag, 0, "Checking for Driver Manifest files in Registry at %s\\%s",
+                   DEFAULT_VK_REGISTRY_HIVE_STR, registry_location);
     } else {
         log_target_flag = VULKAN_LOADER_LAYER_BIT;
-        loader_log(inst, log_target_flag, 0, "Checking for Layer Manifest files in Registry at %s", registry_location);
+        loader_log(inst, log_target_flag, 0, "Checking for Layer Manifest files in Registry at %s\\%s",
+                   DEFAULT_VK_REGISTRY_HIVE_STR, registry_location);
     }
 
     // These calls look at the PNP/Device section of the registry.
@@ -993,13 +1003,13 @@
     // These functions are only available on Windows 8 and above, load them dynamically for compatibility with Windows 7
     typedef LONG(WINAPI * PFN_GetPackagesByPackageFamily)(PCWSTR, UINT32 *, PWSTR *, UINT32 *, WCHAR *);
     PFN_GetPackagesByPackageFamily fpGetPackagesByPackageFamily =
-        (PFN_GetPackagesByPackageFamily)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetPackagesByPackageFamily");
+        (PFN_GetPackagesByPackageFamily)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetPackagesByPackageFamily");
     if (!fpGetPackagesByPackageFamily) {
         return NULL;
     }
     typedef LONG(WINAPI * PFN_GetPackagePathByFullName)(PCWSTR, UINT32 *, PWSTR);
     PFN_GetPackagePathByFullName fpGetPackagePathByFullName =
-        (PFN_GetPackagePathByFullName)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetPackagePathByFullName");
+        (PFN_GetPackagePathByFullName)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetPackagePathByFullName");
     if (!fpGetPackagePathByFullName) {
         return NULL;
     }
@@ -1013,7 +1023,7 @@
     if (ERROR_INSUFFICIENT_BUFFER != fpGetPackagesByPackageFamily(familyName, &numPackages, NULL, &bufferLength, NULL) ||
         numPackages == 0 || bufferLength == 0) {
         loader_log(inst, VULKAN_LOADER_INFO_BIT, 0,
-                   "windows_get_app_package_manifest_path: Failed to find mapping layers packages by family name\n");
+                   "windows_get_app_package_manifest_path: Failed to find mapping layers packages by family name");
         return NULL;
     }
 
@@ -1022,13 +1032,13 @@
     PWSTR *packages = loader_instance_heap_alloc(inst, sizeof(PWSTR) * numPackages, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
     if (!buffer || !packages) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "windows_get_app_package_manifest_path: Failed to allocate memory for package names\n");
+                   "windows_get_app_package_manifest_path: Failed to allocate memory for package names");
         goto cleanup;
     }
 
     if (ERROR_SUCCESS != fpGetPackagesByPackageFamily(familyName, &numPackages, packages, &bufferLength, buffer)) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "windows_get_app_package_manifest_path: Failed to mapping layers package full names\n");
+                   "windows_get_app_package_manifest_path: Failed to mapping layers package full names");
         goto cleanup;
     }
 
@@ -1038,20 +1048,20 @@
     if (ERROR_INSUFFICIENT_BUFFER != fpGetPackagePathByFullName(packages[0], &pathLength, NULL) || pathLength > MAX_PATH ||
         ERROR_SUCCESS != fpGetPackagePathByFullName(packages[0], &pathLength, path)) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "windows_get_app_package_manifest_path: Failed to get mapping layers package path\n");
+                   "windows_get_app_package_manifest_path: Failed to get mapping layers package path");
         goto cleanup;
     }
 
     int narrowPathLength = WideCharToMultiByte(CP_ACP, 0, path, -1, NULL, 0, NULL, NULL);
     if (narrowPathLength == 0) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "windows_get_app_package_manifest_path: Failed to convert path from wide to narrow\n");
+                   "windows_get_app_package_manifest_path: Failed to convert path from wide to narrow");
         goto cleanup;
     }
 
     ret = loader_instance_heap_alloc(inst, narrowPathLength, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
     if (!ret) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "windows_get_app_package_manifest_path: Failed to allocate path\n");
+        loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0, "windows_get_app_package_manifest_path: Failed to allocate path");
         goto cleanup;
     }
 
@@ -1063,4 +1073,99 @@
     loader_instance_heap_free(inst, packages);
     return ret;
 }
+
+VkResult get_settings_path_if_exists_in_registry_key(const struct loader_instance *inst, char **out_path, HKEY key) {
+    VkResult result = VK_ERROR_INITIALIZATION_FAILED;
+
+    char name[MAX_STRING_SIZE] = {0};
+    DWORD name_size = sizeof(name);
+
+    *out_path = NULL;
+
+    LONG rtn_value = ERROR_SUCCESS;
+    for (DWORD idx = 0; rtn_value == ERROR_SUCCESS; idx++) {
+        DWORD value = 0;
+        DWORD value_size = sizeof(value);
+        rtn_value = RegEnumValue(key, idx, name, &name_size, NULL, NULL, (LPBYTE)&value, &value_size);
+
+        if (ERROR_SUCCESS != rtn_value) {
+            break;
+        }
+
+        uint32_t start_of_path_filename = 0;
+        for (uint32_t last_char = name_size; last_char > 0; last_char--) {
+            if (name[last_char] == '\\') {
+                start_of_path_filename = last_char + 1;
+                break;
+            }
+        }
+
+        // Make sure the path exists first
+        if (*out_path && !loader_platform_file_exists(name)) {
+            return VK_ERROR_INITIALIZATION_FAILED;
+        }
+
+        if (strcmp(VK_LOADER_SETTINGS_FILENAME, &(name[start_of_path_filename])) == 0) {
+            *out_path = loader_instance_heap_calloc(inst, name_size + 1, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+            if (*out_path == NULL) {
+                return VK_ERROR_OUT_OF_HOST_MEMORY;
+            }
+            loader_strncpy(*out_path, name_size + 1, name, name_size);
+            (*out_path)[name_size] = '\0';
+            result = VK_SUCCESS;
+            break;
+        }
+    }
+
+    return result;
+}
+
+VkResult windows_get_loader_settings_file_path(const struct loader_instance *inst, char **out_path) {
+    VkResult result = VK_SUCCESS;
+    DWORD access_flags = KEY_QUERY_VALUE;
+    HKEY key = NULL;
+
+    *out_path = NULL;
+
+    // if we are running with admin privileges, only check HKEY_LOCAL_MACHINE.
+    // Otherwise check HKEY_CURRENT_USER, and if nothing is there, look in HKEY_LOCAL_MACHINE
+
+    if (is_high_integrity()) {
+        LONG rtn_value = RegOpenKeyEx(HKEY_LOCAL_MACHINE, VK_SETTINGS_INFO_REGISTRY_LOC, 0, access_flags, &key);
+        if (ERROR_SUCCESS != rtn_value) {
+            result = VK_ERROR_FEATURE_NOT_PRESENT;
+            goto out;
+        }
+        result = get_settings_path_if_exists_in_registry_key(inst, out_path, key);
+    } else {
+        LONG rtn_value = RegOpenKeyEx(HKEY_CURRENT_USER, VK_SETTINGS_INFO_REGISTRY_LOC, 0, access_flags, &key);
+        if (ERROR_SUCCESS == rtn_value) {
+            result = get_settings_path_if_exists_in_registry_key(inst, out_path, key);
+            RegCloseKey(key);
+            // Either we got OOM and *must* exit or we successfully found the settings file and can exit
+            if (result == VK_ERROR_OUT_OF_HOST_MEMORY || result == VK_SUCCESS) {
+                goto out;
+            }
+        }
+
+        rtn_value = RegOpenKeyEx(HKEY_LOCAL_MACHINE, VK_SETTINGS_INFO_REGISTRY_LOC, 0, access_flags, &key);
+        if (ERROR_SUCCESS != rtn_value) {
+            result = VK_ERROR_FEATURE_NOT_PRESENT;
+            goto out;
+        }
+
+        result = get_settings_path_if_exists_in_registry_key(inst, out_path, key);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            goto out;
+        }
+    }
+
+out:
+    if (NULL != key) {
+        RegCloseKey(key);
+    }
+
+    return result;
+}
+
 #endif  // _WIN32
diff --git a/loader/loader_windows.h b/loader/loader_windows.h
index 80ba6eb..dd58d82 100644
--- a/loader/loader_windows.h
+++ b/loader/loader_windows.h
@@ -97,7 +97,7 @@
 // Look for data files in the registry.
 VkResult windows_read_data_files_in_registry(const struct loader_instance *inst, enum loader_data_files_type data_file_type,
                                              bool warn_if_not_present, char *registry_location,
-                                             struct loader_data_files *out_files);
+                                             struct loader_string_list *out_files);
 
 // This function allocates an array in sorted_devices which must be freed by the caller if not null
 VkResult windows_read_sorted_physical_devices(struct loader_instance *inst, uint32_t *sorted_devices_count,
@@ -116,4 +116,10 @@
 // Retrieve a path to an installed app package that contains Vulkan manifests.
 // When done using the returned string, the caller should free the pointer.
 char *windows_get_app_package_manifest_path(const struct loader_instance *inst);
+
+// Gets the path to the loader settings file, if it exists. If it doesn't exists, writes NULL to out_path.
+// The path is located through the registry as an entry in HKEY_CURRENT_USER/SOFTWARE/Khronos/Vulkan/LoaderSettings
+// and if nothing is there, will try to look in HKEY_LOCAL_MACHINE/SOFTWARE/Khronos/Vulkan/LoaderSettings.
+// If running with elevated privileges, this function only looks in HKEY_LOCAL_MACHINE.
+VkResult windows_get_loader_settings_file_path(const struct loader_instance *inst, char **out_path);
 #endif  // WIN32
diff --git a/loader/log.c b/loader/log.c
index 33ed3ce..2474317 100644
--- a/loader/log.c
+++ b/loader/log.c
@@ -32,11 +32,14 @@
 #include <stdarg.h>
 
 #include "debug_utils.h"
+#include "loader_common.h"
 #include "loader_environment.h"
+#include "settings.h"
+#include "vk_loader_platform.h"
 
 uint32_t g_loader_debug = 0;
 
-void loader_debug_init(void) {
+void loader_init_global_debug_level(void) {
     char *env, *orig;
 
     if (g_loader_debug > 0) return;
@@ -83,18 +86,17 @@
     loader_free_getenv(orig, NULL);
 }
 
-uint32_t loader_get_debug_level(void) { return g_loader_debug; }
+void loader_set_global_debug_level(uint32_t new_loader_debug) { g_loader_debug = new_loader_debug; }
+
+uint32_t loader_get_global_debug_level(void) { return g_loader_debug; }
 
 void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code, const char *format, ...) {
-    char msg[512];
-    char cmd_line_msg[512];
-    size_t cmd_line_size = sizeof(cmd_line_msg);
-    size_t num_used = 0;
-    va_list ap;
-    int ret;
+    (void)msg_code;
+    char msg[512] = {0};
 
+    va_list ap;
     va_start(ap, format);
-    ret = vsnprintf(msg, sizeof(msg), format, ap);
+    int ret = vsnprintf(msg, sizeof(msg), format, ap);
     if ((ret >= (int)sizeof(msg)) || ret < 0) {
         msg[sizeof(msg) - 1] = '\0';
     }
@@ -150,84 +152,84 @@
         util_SubmitDebugUtilsMessageEXT(inst, severity, type, &callback_data);
     }
 
-    uint32_t filtered_msg_type = (msg_type & g_loader_debug);
-    if (0 == filtered_msg_type) {
-        return;
+    // Always log to stderr if this is a fatal error
+    if (0 == (msg_type & VULKAN_LOADER_FATAL_ERROR_BIT)) {
+        // Exit early if the current instance settings do not ask for logging to stderr
+        if (inst && inst->settings.settings_active && 0 == (msg_type & inst->settings.debug_level)) {
+            return;
+            // Check the global settings and if that doesn't say to skip, check the environment variable
+        } else if (0 == (msg_type & g_loader_debug)) {
+            return;
+        }
     }
 
+    // Only need enough space to create the filter description header for log messages
+    // Also use the same header for all output
+    char cmd_line_msg[64];
+    size_t cmd_line_size = sizeof(cmd_line_msg);
+    size_t num_used = 0;
+
     cmd_line_msg[0] = '\0';
-    cmd_line_size -= 1;
-    num_used = 1;
+
+// Helper macro which strncat's the given string literal, then updates num_used & cmd_line_end
+// Assumes that we haven't used the entire buffer - must manually check this when adding new filter types
+// We concat at the end of cmd_line_msg, so that strncat isn't a victim of Schlemiel the Painter
+// We write to the end - 1 of cmd_line_msg, as the end is actually a null terminator
+#define STRNCAT_TO_BUFFER(string_literal_to_cat)                                                                             \
+    loader_strncat(cmd_line_msg + num_used, cmd_line_size - num_used, string_literal_to_cat, sizeof(string_literal_to_cat)); \
+    num_used += sizeof(string_literal_to_cat) - 1;  // subtract one to remove the null terminator in the string literal
 
     if ((msg_type & VULKAN_LOADER_ERROR_BIT) != 0) {
-        strncat(cmd_line_msg, "ERROR", cmd_line_size - num_used);
-        num_used += 5;
+        STRNCAT_TO_BUFFER("ERROR");
     } else if ((msg_type & VULKAN_LOADER_WARN_BIT) != 0) {
-        strncat(cmd_line_msg, "WARNING", cmd_line_size - num_used);
-        num_used += 7;
+        STRNCAT_TO_BUFFER("WARNING");
     } else if ((msg_type & VULKAN_LOADER_INFO_BIT) != 0) {
-        strncat(cmd_line_msg, "INFO", cmd_line_size - num_used);
-        num_used += 4;
+        STRNCAT_TO_BUFFER("INFO");
     } else if ((msg_type & VULKAN_LOADER_DEBUG_BIT) != 0) {
-        strncat(cmd_line_msg, "DEBUG", cmd_line_size - num_used);
-        num_used += 5;
-    }
-    // For the remaining messages, we only want to add any tags that are
-    // explicitly enabled by the tools.
-    if ((filtered_msg_type & VULKAN_LOADER_PERF_BIT) != 0) {
-        if (num_used > 1) {
-            strncat(cmd_line_msg, " | ", cmd_line_size - num_used);
-            num_used += 3;
-        }
-        strncat(cmd_line_msg, "PERF", cmd_line_size - num_used);
-        num_used += 4;
-    }
-    if ((filtered_msg_type & VULKAN_LOADER_DRIVER_BIT) != 0) {
-        if (num_used > 1) {
-            strncat(cmd_line_msg, " | ", cmd_line_size - num_used);
-            num_used += 3;
-        }
-        strncat(cmd_line_msg, "DRIVER", cmd_line_size - num_used);
-        num_used += 6;
-    }
-    if ((filtered_msg_type & VULKAN_LOADER_LAYER_BIT) != 0) {
-        if (num_used > 1) {
-            strncat(cmd_line_msg, " | ", cmd_line_size - num_used);
-            num_used += 3;
-        }
-        strncat(cmd_line_msg, "LAYER", cmd_line_size - num_used);
-        num_used += 5;
-    }
-    // Add any preceeding spaces so we can have clean output
-    if (num_used > 1) {
-        strncat(cmd_line_msg, ": ", cmd_line_size - num_used);
-        num_used += 2;
-    }
-    while (num_used < 19) {
-        strncat(cmd_line_msg, " ", cmd_line_size - num_used);
-        num_used++;
+        STRNCAT_TO_BUFFER("DEBUG");
     }
 
-    size_t available_space = cmd_line_size - num_used;
-    if (available_space > 0) {
-        // If the message is too long, trim it down
-        if (strlen(msg) > available_space) {
-            msg[available_space - 1] = '\0';
+    if ((msg_type & VULKAN_LOADER_PERF_BIT) != 0) {
+        if (num_used > 1) {
+            STRNCAT_TO_BUFFER(" | ");
         }
-        strncat(cmd_line_msg, msg, cmd_line_size);
+        STRNCAT_TO_BUFFER("PERF");
+    }
+    if ((msg_type & VULKAN_LOADER_DRIVER_BIT) != 0) {
+        if (num_used > 1) {
+            STRNCAT_TO_BUFFER(" | ");
+        }
+        STRNCAT_TO_BUFFER("DRIVER");
+    }
+    if ((msg_type & VULKAN_LOADER_LAYER_BIT) != 0) {
+        if (num_used > 1) {
+            STRNCAT_TO_BUFFER(" | ");
+        }
+        STRNCAT_TO_BUFFER("LAYER");
+    }
 
+    // Add a ": " to separate the filters from the message
+    STRNCAT_TO_BUFFER(": ");
+#undef STRNCAT_TO_BUFFER
+
+    // Justifies the output to at least 19 spaces
+    if (num_used < 19) {
+        const char *space_buffer = "                   ";
+        // Only write (19 - num_used) spaces
+        loader_strncat(cmd_line_msg + num_used, cmd_line_size - num_used, space_buffer, 19 - num_used);
+        num_used += sizeof(space_buffer) - 1 - num_used;
+    }
+    // Assert that we didn't write more than what is available in cmd_line_msg
+    assert(cmd_line_size > num_used);
+
+    fputs(cmd_line_msg, stderr);
+    fputs(msg, stderr);
+    fputc('\n', stderr);
 #if defined(WIN32)
-        OutputDebugString(cmd_line_msg);
-        OutputDebugString("\n");
+    OutputDebugString(cmd_line_msg);
+    OutputDebugString(msg);
+    OutputDebugString("\n");
 #endif
-
-        fputs(cmd_line_msg, stderr);
-        fputc('\n', stderr);
-    } else {
-        // Shouldn't get here, but check to make sure if we've already overrun
-        // the string boundary
-        assert(false);
-    }
 }
 
 void loader_log_asm_function_not_supported(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code,
diff --git a/loader/log.h b/loader/log.h
index 3e074c3..7c7522c 100644
--- a/loader/log.h
+++ b/loader/log.h
@@ -26,7 +26,14 @@
  *
  */
 
-#include "loader_common.h"
+#pragma once
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "vulkan/vulkan_core.h"
+
+struct loader_instance;
 
 #ifdef __cplusplus
 extern "C" {
@@ -41,23 +48,37 @@
     VULKAN_LOADER_LAYER_BIT = 0x20,
     VULKAN_LOADER_DRIVER_BIT = 0x40,
     VULKAN_LOADER_VALIDATION_BIT = 0x80,
+    VULKAN_LOADER_FATAL_ERROR_BIT = 0x100,  // only forces the output to be printed to stderr, has no other effect
 };
 
 // Checks for the environment variable VK_LOADER_DEBUG and sets up the current debug level accordingly
 // This should be called before any Vulkan API calls, eg in the initialization of the .dll or .so
-void loader_debug_init(void);
+void loader_init_global_debug_level(void);
+
+// Sets the global debug level - used by global settings files
+void loader_set_global_debug_level(uint32_t new_loader_debug);
 
 // Returns a bitmask that indicates the current flags that should be output
-uint32_t loader_get_debug_level(void);
+uint32_t loader_get_global_debug_level(void);
+
+// The asm declaration prevents name mangling which is necessary for macOS
+#if defined(MODIFY_UNKNOWN_FUNCTION_DECLS)
+#define ASM_NAME(name) __asm(name)
+#else
+#define ASM_NAME(name)
+#endif
 
 // Logs a message to stderr
 // May output to DebugUtils if the instance isn't null and the extension is enabled.
-void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code, const char *format, ...);
+void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code, const char *format, ...)
+    ASM_NAME("loader_log");
 
 // Used for the assembly code to emit an specific error message
 // This is a work around for linux 32 bit error handling not passing relocatable strings correctly
 void loader_log_asm_function_not_supported(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code,
-                                           const char *func_name);
+                                           const char *func_name) ASM_NAME("loader_log_asm_function_not_supported");
+
+#undef ASM_NAME
 
 #ifdef __cplusplus
 } // extern "C"
diff --git a/loader/phys_dev_ext.c b/loader/phys_dev_ext.c
index 5e840eb..1bcfa57 100644
--- a/loader/phys_dev_ext.c
+++ b/loader/phys_dev_ext.c
@@ -34,511 +34,518 @@
 #pragma GCC optimize(3)  // force gcc to use tail-calls
 #endif
 
+// The asm declaration prevents name mangling which is necessary for macOS
+#if defined(MODIFY_UNKNOWN_FUNCTION_DECLS)
+#define ASM_NAME(name) __asm(name)
+#else
+#define ASM_NAME(name)
+#endif
+
 // Declarations for the trampoline
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp0(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp1(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp2(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp3(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp4(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp5(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp6(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp7(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp8(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp9(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp10(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp11(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp12(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp13(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp14(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp15(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp16(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp17(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp18(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp19(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp20(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp21(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp22(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp23(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp24(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp25(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp26(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp27(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp28(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp29(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp30(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp31(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp32(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp33(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp34(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp35(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp36(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp37(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp38(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp39(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp40(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp41(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp42(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp43(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp44(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp45(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp46(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp47(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp48(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp49(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp50(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp51(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp52(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp53(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp54(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp55(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp56(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp57(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp58(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp59(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp60(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp61(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp62(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp63(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp64(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp65(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp66(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp67(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp68(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp69(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp70(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp71(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp72(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp73(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp74(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp75(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp76(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp77(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp78(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp79(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp80(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp81(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp82(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp83(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp84(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp85(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp86(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp87(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp88(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp89(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp90(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp91(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp92(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp93(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp94(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp95(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp96(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp97(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp98(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp99(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp100(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp101(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp102(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp103(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp104(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp105(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp106(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp107(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp108(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp109(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp110(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp111(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp112(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp113(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp114(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp115(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp116(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp117(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp118(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp119(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp120(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp121(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp122(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp123(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp124(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp125(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp126(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp127(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp128(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp129(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp130(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp131(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp132(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp133(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp134(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp135(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp136(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp137(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp138(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp139(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp140(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp141(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp142(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp143(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp144(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp145(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp146(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp147(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp148(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp149(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp150(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp151(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp152(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp153(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp154(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp155(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp156(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp157(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp158(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp159(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp160(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp161(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp162(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp163(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp164(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp165(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp166(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp167(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp168(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp169(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp170(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp171(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp172(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp173(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp174(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp175(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp176(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp177(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp178(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp179(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp180(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp181(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp182(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp183(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp184(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp185(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp186(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp187(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp188(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp189(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp190(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp191(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp192(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp193(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp194(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp195(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp196(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp197(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp198(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp199(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp200(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp201(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp202(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp203(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp204(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp205(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp206(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp207(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp208(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp209(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp210(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp211(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp212(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp213(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp214(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp215(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp216(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp217(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp218(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp219(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp220(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp221(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp222(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp223(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp224(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp225(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp226(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp227(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp228(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp229(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp230(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp231(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp232(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp233(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp234(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp235(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp236(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp237(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp238(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp239(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp240(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp241(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp242(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp243(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp244(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp245(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp246(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp247(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp248(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp249(VkPhysicalDevice);
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp0(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp0");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp1(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp1");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp2(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp2");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp3(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp3");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp4(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp4");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp5(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp5");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp6(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp6");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp7(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp7");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp8(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp8");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp9(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp9");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp10(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp10");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp11(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp11");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp12(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp12");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp13(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp13");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp14(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp14");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp15(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp15");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp16(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp16");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp17(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp17");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp18(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp18");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp19(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp19");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp20(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp20");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp21(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp21");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp22(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp22");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp23(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp23");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp24(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp24");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp25(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp25");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp26(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp26");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp27(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp27");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp28(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp28");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp29(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp29");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp30(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp30");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp31(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp31");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp32(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp32");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp33(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp33");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp34(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp34");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp35(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp35");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp36(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp36");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp37(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp37");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp38(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp38");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp39(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp39");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp40(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp40");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp41(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp41");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp42(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp42");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp43(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp43");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp44(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp44");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp45(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp45");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp46(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp46");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp47(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp47");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp48(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp48");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp49(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp49");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp50(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp50");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp51(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp51");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp52(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp52");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp53(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp53");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp54(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp54");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp55(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp55");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp56(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp56");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp57(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp57");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp58(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp58");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp59(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp59");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp60(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp60");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp61(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp61");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp62(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp62");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp63(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp63");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp64(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp64");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp65(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp65");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp66(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp66");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp67(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp67");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp68(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp68");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp69(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp69");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp70(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp70");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp71(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp71");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp72(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp72");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp73(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp73");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp74(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp74");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp75(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp75");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp76(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp76");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp77(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp77");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp78(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp78");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp79(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp79");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp80(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp80");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp81(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp81");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp82(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp82");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp83(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp83");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp84(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp84");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp85(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp85");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp86(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp86");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp87(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp87");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp88(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp88");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp89(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp89");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp90(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp90");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp91(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp91");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp92(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp92");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp93(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp93");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp94(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp94");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp95(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp95");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp96(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp96");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp97(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp97");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp98(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp98");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp99(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp99");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp100(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp100");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp101(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp101");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp102(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp102");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp103(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp103");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp104(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp104");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp105(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp105");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp106(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp106");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp107(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp107");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp108(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp108");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp109(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp109");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp110(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp110");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp111(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp111");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp112(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp112");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp113(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp113");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp114(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp114");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp115(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp115");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp116(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp116");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp117(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp117");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp118(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp118");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp119(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp119");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp120(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp120");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp121(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp121");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp122(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp122");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp123(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp123");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp124(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp124");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp125(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp125");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp126(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp126");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp127(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp127");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp128(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp128");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp129(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp129");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp130(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp130");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp131(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp131");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp132(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp132");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp133(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp133");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp134(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp134");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp135(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp135");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp136(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp136");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp137(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp137");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp138(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp138");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp139(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp139");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp140(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp140");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp141(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp141");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp142(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp142");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp143(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp143");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp144(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp144");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp145(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp145");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp146(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp146");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp147(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp147");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp148(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp148");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp149(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp149");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp150(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp150");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp151(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp151");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp152(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp152");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp153(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp153");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp154(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp154");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp155(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp155");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp156(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp156");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp157(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp157");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp158(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp158");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp159(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp159");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp160(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp160");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp161(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp161");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp162(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp162");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp163(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp163");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp164(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp164");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp165(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp165");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp166(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp166");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp167(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp167");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp168(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp168");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp169(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp169");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp170(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp170");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp171(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp171");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp172(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp172");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp173(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp173");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp174(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp174");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp175(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp175");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp176(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp176");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp177(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp177");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp178(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp178");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp179(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp179");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp180(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp180");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp181(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp181");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp182(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp182");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp183(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp183");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp184(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp184");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp185(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp185");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp186(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp186");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp187(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp187");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp188(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp188");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp189(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp189");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp190(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp190");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp191(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp191");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp192(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp192");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp193(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp193");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp194(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp194");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp195(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp195");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp196(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp196");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp197(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp197");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp198(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp198");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp199(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp199");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp200(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp200");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp201(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp201");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp202(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp202");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp203(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp203");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp204(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp204");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp205(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp205");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp206(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp206");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp207(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp207");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp208(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp208");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp209(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp209");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp210(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp210");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp211(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp211");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp212(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp212");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp213(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp213");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp214(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp214");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp215(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp215");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp216(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp216");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp217(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp217");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp218(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp218");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp219(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp219");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp220(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp220");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp221(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp221");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp222(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp222");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp223(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp223");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp224(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp224");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp225(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp225");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp226(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp226");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp227(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp227");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp228(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp228");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp229(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp229");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp230(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp230");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp231(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp231");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp232(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp232");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp233(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp233");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp234(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp234");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp235(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp235");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp236(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp236");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp237(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp237");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp238(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp238");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp239(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp239");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp240(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp240");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp241(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp241");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp242(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp242");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp243(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp243");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp244(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp244");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp245(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp245");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp246(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp246");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp247(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp247");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp248(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp248");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTramp249(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTramp249");
 
 // Disable clang-format for lists of macros
 // clang-format off
 
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin0(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin1(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin2(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin3(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin4(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin5(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin6(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin7(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin8(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin9(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin10(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin11(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin12(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin13(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin14(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin15(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin16(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin17(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin18(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin19(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin20(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin21(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin22(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin23(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin24(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin25(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin26(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin27(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin28(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin29(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin30(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin31(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin32(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin33(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin34(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin35(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin36(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin37(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin38(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin39(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin40(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin41(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin42(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin43(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin44(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin45(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin46(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin47(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin48(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin49(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin50(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin51(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin52(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin53(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin54(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin55(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin56(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin57(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin58(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin59(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin60(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin61(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin62(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin63(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin64(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin65(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin66(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin67(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin68(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin69(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin70(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin71(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin72(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin73(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin74(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin75(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin76(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin77(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin78(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin79(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin80(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin81(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin82(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin83(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin84(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin85(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin86(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin87(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin88(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin89(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin90(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin91(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin92(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin93(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin94(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin95(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin96(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin97(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin98(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin99(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin100(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin101(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin102(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin103(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin104(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin105(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin106(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin107(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin108(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin109(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin110(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin111(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin112(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin113(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin114(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin115(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin116(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin117(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin118(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin119(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin120(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin121(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin122(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin123(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin124(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin125(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin126(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin127(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin128(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin129(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin130(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin131(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin132(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin133(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin134(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin135(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin136(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin137(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin138(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin139(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin140(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin141(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin142(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin143(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin144(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin145(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin146(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin147(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin148(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin149(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin150(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin151(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin152(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin153(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin154(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin155(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin156(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin157(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin158(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin159(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin160(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin161(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin162(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin163(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin164(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin165(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin166(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin167(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin168(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin169(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin170(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin171(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin172(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin173(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin174(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin175(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin176(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin177(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin178(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin179(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin180(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin181(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin182(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin183(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin184(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin185(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin186(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin187(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin188(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin189(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin190(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin191(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin192(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin193(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin194(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin195(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin196(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin197(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin198(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin199(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin200(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin201(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin202(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin203(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin204(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin205(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin206(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin207(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin208(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin209(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin210(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin211(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin212(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin213(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin214(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin215(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin216(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin217(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin218(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin219(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin220(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin221(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin222(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin223(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin224(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin225(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin226(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin227(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin228(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin229(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin230(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin231(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin232(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin233(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin234(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin235(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin236(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin237(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin238(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin239(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin240(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin241(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin242(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin243(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin244(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin245(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin246(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin247(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin248(VkPhysicalDevice);
-VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin249(VkPhysicalDevice);
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin0(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin0");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin1(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin1");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin2(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin2");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin3(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin3");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin4(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin4");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin5(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin5");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin6(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin6");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin7(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin7");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin8(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin8");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin9(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin9");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin10(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin10");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin11(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin11");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin12(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin12");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin13(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin13");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin14(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin14");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin15(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin15");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin16(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin16");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin17(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin17");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin18(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin18");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin19(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin19");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin20(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin20");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin21(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin21");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin22(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin22");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin23(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin23");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin24(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin24");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin25(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin25");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin26(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin26");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin27(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin27");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin28(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin28");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin29(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin29");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin30(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin30");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin31(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin31");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin32(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin32");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin33(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin33");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin34(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin34");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin35(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin35");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin36(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin36");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin37(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin37");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin38(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin38");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin39(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin39");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin40(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin40");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin41(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin41");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin42(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin42");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin43(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin43");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin44(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin44");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin45(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin45");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin46(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin46");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin47(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin47");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin48(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin48");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin49(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin49");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin50(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin50");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin51(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin51");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin52(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin52");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin53(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin53");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin54(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin54");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin55(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin55");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin56(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin56");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin57(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin57");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin58(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin58");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin59(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin59");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin60(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin60");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin61(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin61");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin62(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin62");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin63(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin63");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin64(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin64");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin65(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin65");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin66(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin66");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin67(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin67");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin68(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin68");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin69(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin69");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin70(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin70");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin71(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin71");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin72(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin72");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin73(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin73");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin74(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin74");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin75(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin75");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin76(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin76");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin77(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin77");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin78(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin78");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin79(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin79");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin80(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin80");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin81(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin81");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin82(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin82");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin83(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin83");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin84(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin84");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin85(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin85");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin86(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin86");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin87(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin87");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin88(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin88");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin89(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin89");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin90(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin90");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin91(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin91");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin92(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin92");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin93(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin93");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin94(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin94");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin95(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin95");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin96(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin96");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin97(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin97");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin98(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin98");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin99(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin99");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin100(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin100");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin101(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin101");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin102(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin102");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin103(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin103");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin104(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin104");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin105(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin105");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin106(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin106");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin107(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin107");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin108(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin108");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin109(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin109");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin110(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin110");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin111(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin111");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin112(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin112");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin113(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin113");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin114(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin114");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin115(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin115");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin116(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin116");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin117(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin117");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin118(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin118");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin119(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin119");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin120(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin120");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin121(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin121");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin122(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin122");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin123(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin123");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin124(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin124");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin125(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin125");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin126(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin126");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin127(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin127");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin128(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin128");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin129(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin129");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin130(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin130");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin131(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin131");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin132(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin132");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin133(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin133");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin134(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin134");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin135(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin135");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin136(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin136");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin137(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin137");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin138(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin138");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin139(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin139");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin140(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin140");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin141(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin141");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin142(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin142");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin143(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin143");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin144(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin144");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin145(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin145");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin146(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin146");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin147(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin147");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin148(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin148");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin149(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin149");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin150(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin150");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin151(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin151");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin152(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin152");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin153(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin153");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin154(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin154");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin155(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin155");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin156(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin156");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin157(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin157");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin158(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin158");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin159(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin159");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin160(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin160");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin161(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin161");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin162(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin162");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin163(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin163");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin164(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin164");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin165(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin165");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin166(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin166");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin167(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin167");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin168(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin168");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin169(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin169");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin170(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin170");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin171(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin171");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin172(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin172");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin173(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin173");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin174(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin174");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin175(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin175");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin176(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin176");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin177(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin177");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin178(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin178");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin179(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin179");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin180(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin180");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin181(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin181");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin182(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin182");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin183(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin183");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin184(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin184");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin185(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin185");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin186(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin186");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin187(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin187");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin188(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin188");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin189(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin189");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin190(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin190");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin191(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin191");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin192(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin192");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin193(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin193");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin194(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin194");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin195(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin195");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin196(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin196");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin197(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin197");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin198(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin198");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin199(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin199");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin200(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin200");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin201(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin201");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin202(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin202");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin203(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin203");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin204(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin204");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin205(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin205");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin206(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin206");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin207(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin207");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin208(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin208");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin209(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin209");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin210(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin210");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin211(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin211");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin212(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin212");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin213(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin213");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin214(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin214");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin215(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin215");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin216(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin216");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin217(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin217");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin218(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin218");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin219(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin219");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin220(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin220");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin221(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin221");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin222(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin222");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin223(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin223");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin224(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin224");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin225(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin225");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin226(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin226");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin227(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin227");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin228(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin228");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin229(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin229");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin230(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin230");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin231(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin231");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin232(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin232");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin233(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin233");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin234(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin234");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin235(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin235");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin236(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin236");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin237(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin237");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin238(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin238");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin239(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin239");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin240(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin240");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin241(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin241");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin242(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin242");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin243(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin243");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin244(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin244");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin245(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin245");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin246(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin246");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin247(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin247");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin248(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin248");
+VKAPI_ATTR void VKAPI_CALL vkPhysDevExtTermin249(VkPhysicalDevice) ASM_NAME("vkPhysDevExtTermin249");
 
 
 void *loader_get_phys_dev_ext_tramp(uint32_t index) {
diff --git a/loader/settings.c b/loader/settings.c
new file mode 100644
index 0000000..f7780c7
--- /dev/null
+++ b/loader/settings.c
@@ -0,0 +1,805 @@
+/*
+ *
+ * Copyright (c) 2023 The Khronos Group Inc.
+ * Copyright (c) 2023 Valve Corporation
+ * Copyright (c) 2023 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Author: Charles Giessen <charles@lunarg.com>
+ *
+ */
+
+#include "settings.h"
+
+#include "allocation.h"
+#include "cJSON.h"
+#include "loader.h"
+#include "loader_environment.h"
+#include "loader_windows.h"
+#include "log.h"
+#include "stack_allocation.h"
+#include "vk_loader_platform.h"
+
+loader_platform_thread_mutex global_loader_settings_lock;
+loader_settings global_loader_settings;
+
+void free_layer_configuration(const struct loader_instance* inst, loader_settings_layer_configuration* layer_configuration) {
+    loader_instance_heap_free(inst, layer_configuration->name);
+    layer_configuration->name = NULL;
+    loader_instance_heap_free(inst, layer_configuration->path);
+    layer_configuration->path = NULL;
+}
+
+void free_loader_settings(const struct loader_instance* inst, loader_settings* settings) {
+    if (NULL != settings->layer_configurations) {
+        for (uint32_t i = 0; i < settings->layer_configuration_count; i++) {
+            free_layer_configuration(inst, &settings->layer_configurations[i]);
+        }
+    }
+    loader_instance_heap_free(inst, settings->layer_configurations);
+    loader_instance_heap_free(inst, settings->settings_file_path);
+    settings->layer_configurations = NULL;
+    memset(settings, 0, sizeof(loader_settings));
+}
+
+loader_settings_layer_control parse_control_string(char* control_string) {
+    loader_settings_layer_control layer_control = LOADER_SETTINGS_LAYER_CONTROL_DEFAULT;
+    if (strcmp(control_string, "auto") == 0)
+        layer_control = LOADER_SETTINGS_LAYER_CONTROL_DEFAULT;
+    else if (strcmp(control_string, "on") == 0)
+        layer_control = LOADER_SETTINGS_LAYER_CONTROL_ON;
+    else if (strcmp(control_string, "off") == 0)
+        layer_control = LOADER_SETTINGS_LAYER_CONTROL_OFF;
+    else if (strcmp(control_string, "unordered_layer_location") == 0)
+        layer_control = LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION;
+    return layer_control;
+}
+
+const char* loader_settings_layer_control_to_string(loader_settings_layer_control control) {
+    switch (control) {
+        case (LOADER_SETTINGS_LAYER_CONTROL_DEFAULT):
+            return "auto";
+        case (LOADER_SETTINGS_LAYER_CONTROL_ON):
+            return "on";
+        case (LOADER_SETTINGS_LAYER_CONTROL_OFF):
+            return "off";
+        case (LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION):
+            return "unordered_layer_location";
+        default:
+            return "UNKNOWN_LAYER_CONTROl";
+    }
+}
+
+uint32_t parse_log_filters_from_strings(struct loader_string_list* log_filters) {
+    uint32_t filters = 0;
+    for (uint32_t i = 0; i < log_filters->count; i++) {
+        if (strcmp(log_filters->list[i], "all") == 0)
+            filters |= VULKAN_LOADER_INFO_BIT | VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_PERF_BIT | VULKAN_LOADER_ERROR_BIT |
+                       VULKAN_LOADER_DEBUG_BIT | VULKAN_LOADER_LAYER_BIT | VULKAN_LOADER_DRIVER_BIT | VULKAN_LOADER_VALIDATION_BIT;
+        else if (strcmp(log_filters->list[i], "info") == 0)
+            filters |= VULKAN_LOADER_INFO_BIT;
+        else if (strcmp(log_filters->list[i], "warn") == 0)
+            filters |= VULKAN_LOADER_WARN_BIT;
+        else if (strcmp(log_filters->list[i], "perf") == 0)
+            filters |= VULKAN_LOADER_PERF_BIT;
+        else if (strcmp(log_filters->list[i], "error") == 0)
+            filters |= VULKAN_LOADER_ERROR_BIT;
+        else if (strcmp(log_filters->list[i], "debug") == 0)
+            filters |= VULKAN_LOADER_DEBUG_BIT;
+        else if (strcmp(log_filters->list[i], "layer") == 0)
+            filters |= VULKAN_LOADER_LAYER_BIT;
+        else if (strcmp(log_filters->list[i], "driver") == 0)
+            filters |= VULKAN_LOADER_DRIVER_BIT;
+        else if (strcmp(log_filters->list[i], "validation") == 0)
+            filters |= VULKAN_LOADER_VALIDATION_BIT;
+    }
+    return filters;
+}
+
+bool parse_json_enable_disable_option(const struct loader_instance* inst, cJSON* object, const char* key) {
+    char* str = NULL;
+    VkResult res = loader_parse_json_string(object, key, &str);
+    if (res != VK_SUCCESS || NULL == str) {
+        return false;
+    }
+    bool enable = false;
+    if (strcmp(str, "enabled") == 0) {
+        enable = true;
+    }
+    loader_instance_heap_free(inst, str);
+    return enable;
+}
+
+VkResult parse_layer_configuration(const struct loader_instance* inst, cJSON* layer_configuration_json,
+                                   loader_settings_layer_configuration* layer_configuration) {
+    char* control_string = NULL;
+    VkResult res = loader_parse_json_string(layer_configuration_json, "control", &control_string);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+    layer_configuration->control = parse_control_string(control_string);
+    loader_instance_heap_free(inst, control_string);
+
+    // If that is the only value - do no further parsing
+    if (layer_configuration->control == LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
+        goto out;
+    }
+
+    res = loader_parse_json_string(layer_configuration_json, "name", &(layer_configuration->name));
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+    res = loader_parse_json_string(layer_configuration_json, "path", &(layer_configuration->path));
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+    cJSON* treat_as_implicit_manifest = loader_cJSON_GetObjectItem(layer_configuration_json, "treat_as_implicit_manifest");
+    if (treat_as_implicit_manifest && treat_as_implicit_manifest->type == cJSON_True) {
+        layer_configuration->treat_as_implicit_manifest = true;
+    }
+out:
+    if (VK_SUCCESS != res) {
+        free_layer_configuration(inst, layer_configuration);
+    }
+    return res;
+}
+
+VkResult parse_layer_configurations(const struct loader_instance* inst, cJSON* settings_object, loader_settings* loader_settings) {
+    VkResult res = VK_SUCCESS;
+
+    cJSON* layer_configurations = loader_cJSON_GetObjectItem(settings_object, "layers");
+    if (NULL == layer_configurations) {
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+
+    uint32_t layer_configurations_count = loader_cJSON_GetArraySize(layer_configurations);
+    if (layer_configurations_count == 0) {
+        return VK_SUCCESS;
+    }
+
+    loader_settings->layer_configuration_count = layer_configurations_count;
+
+    loader_settings->layer_configurations = loader_instance_heap_calloc(
+        inst, sizeof(loader_settings_layer_configuration) * layer_configurations_count, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
+    if (NULL == loader_settings->layer_configurations) {
+        res = VK_ERROR_OUT_OF_HOST_MEMORY;
+        goto out;
+    }
+
+    for (uint32_t i = 0; i < layer_configurations_count; i++) {
+        cJSON* layer = loader_cJSON_GetArrayItem(layer_configurations, i);
+        if (NULL == layer) {
+            res = VK_ERROR_INITIALIZATION_FAILED;
+            goto out;
+        }
+        res = parse_layer_configuration(inst, layer, &(loader_settings->layer_configurations[i]));
+        if (VK_SUCCESS != res) {
+            goto out;
+        }
+    }
+out:
+    if (res != VK_SUCCESS) {
+        if (loader_settings->layer_configurations) {
+            for (uint32_t i = 0; i < layer_configurations_count; i++) {
+                free_layer_configuration(inst, &loader_settings->layer_configurations[i]);
+            }
+        }
+        loader_instance_heap_free(inst, &loader_settings->layer_configurations);
+    }
+
+    return res;
+}
+
+VkResult check_if_settings_path_exists(const struct loader_instance* inst, char* base, char* suffix, char** settings_file_path) {
+    if (NULL == base || NULL == suffix) {
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+    size_t base_len = strlen(base);
+    size_t suffix_len = strlen(suffix);
+    size_t path_len = base_len + suffix_len + 1;
+    *settings_file_path = loader_instance_heap_calloc(inst, path_len, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+    if (NULL == *settings_file_path) {
+        return VK_ERROR_OUT_OF_HOST_MEMORY;
+    }
+    loader_strncpy(*settings_file_path, path_len, base, base_len);
+    loader_strncat(*settings_file_path, path_len, suffix, suffix_len);
+
+    if (!loader_platform_file_exists(*settings_file_path)) {
+        loader_instance_heap_free(inst, *settings_file_path);
+        *settings_file_path = NULL;
+        return VK_ERROR_INITIALIZATION_FAILED;
+    }
+    return VK_SUCCESS;
+}
+VkResult get_unix_settings_path(const struct loader_instance* inst, char** settings_file_path) {
+    VkResult res =
+        check_if_settings_path_exists(inst, loader_secure_getenv("HOME", inst),
+                                      "/.local/share/vulkan/loader_settings.d/" VK_LOADER_SETTINGS_FILENAME, settings_file_path);
+    if (res == VK_SUCCESS) {
+        return res;
+    }
+    // If HOME isn't set, fallback to XDG_DATA_HOME
+    res = check_if_settings_path_exists(inst, loader_secure_getenv("XDG_DATA_HOME", inst),
+                                        "/vulkan/loader_settings.d/" VK_LOADER_SETTINGS_FILENAME, settings_file_path);
+    if (res == VK_SUCCESS) {
+        return res;
+    }
+    // if XDG_DATA_HOME isn't set, fallback to /etc.
+    // note that the settings_fil_path_suffix stays the same since its the same layout as for XDG_DATA_HOME
+    return check_if_settings_path_exists(inst, "/etc", "/vulkan/loader_settings.d/" VK_LOADER_SETTINGS_FILENAME,
+                                         settings_file_path);
+}
+
+bool check_if_settings_are_equal(loader_settings* a, loader_settings* b) {
+    // If either pointer is null, return true
+    if (NULL == a || NULL == b) return false;
+    bool are_equal = true;
+    are_equal &= a->settings_active == b->settings_active;
+    are_equal &= a->has_unordered_layer_location == b->has_unordered_layer_location;
+    are_equal &= a->debug_level == b->debug_level;
+    are_equal &= a->layer_configuration_count == b->layer_configuration_count;
+    if (!are_equal) return false;
+    for (uint32_t i = 0; i < a->layer_configuration_count && i < b->layer_configuration_count; i++) {
+        if (a->layer_configurations[i].name && b->layer_configurations[i].name) {
+            are_equal &= 0 == strcmp(a->layer_configurations[i].name, b->layer_configurations[i].name);
+        } else {
+            are_equal = false;
+        }
+        if (a->layer_configurations[i].path && b->layer_configurations[i].path) {
+            are_equal &= 0 == strcmp(a->layer_configurations[i].path, b->layer_configurations[i].path);
+        } else {
+            are_equal = false;
+        }
+        are_equal &= a->layer_configurations[i].control == b->layer_configurations[i].control;
+    }
+    return are_equal;
+}
+
+void log_settings(const struct loader_instance* inst, loader_settings* settings) {
+    if (settings == NULL) {
+        return;
+    }
+    loader_log(inst, VULKAN_LOADER_INFO_BIT, 0, "Using layer configurations found in loader settings from %s",
+               settings->settings_file_path);
+
+    loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Layer Configurations count = %d", settings->layer_configuration_count);
+    for (uint32_t i = 0; i < settings->layer_configuration_count; i++) {
+        loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "---- Layer Configuration [%d] ----", i);
+        if (settings->layer_configurations[i].control != LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
+            loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Name: %s", settings->layer_configurations[i].name);
+            loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Path: %s", settings->layer_configurations[i].path);
+        }
+        loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "Control: %s",
+                   loader_settings_layer_control_to_string(settings->layer_configurations[i].control));
+    }
+    loader_log(inst, VULKAN_LOADER_DEBUG_BIT, 0, "---------------------------------");
+}
+
+// Loads the vk_loader_settings.json file
+// Returns VK_SUCCESS if it was found & was successfully parsed. Otherwise, it returns VK_ERROR_INITIALIZATION_FAILED if it
+// wasn't found or failed to parse, and returns VK_ERROR_OUT_OF_HOST_MEMORY if it was unable to allocate enough memory.
+VkResult get_loader_settings(const struct loader_instance* inst, loader_settings* loader_settings) {
+    VkResult res = VK_SUCCESS;
+    cJSON* json = NULL;
+    char* file_format_version_string = NULL;
+    char* settings_file_path = NULL;
+#if defined(WIN32)
+    res = windows_get_loader_settings_file_path(inst, &settings_file_path);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+#elif COMMON_UNIX_PLATFORMS
+    res = get_unix_settings_path(inst, &settings_file_path);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+#else
+#warning "Unsupported platform - must specify platform specific location for vk_loader_settings.json"
+#endif
+
+    res = loader_get_json(inst, -1, settings_file_path, &json);
+    // Make sure sure the top level json value is an object
+    if (res != VK_SUCCESS || NULL == json || json->type != 6) {
+        goto out;
+    }
+
+    res = loader_parse_json_string(json, "file_format_version", &file_format_version_string);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+    uint32_t settings_array_count = 0;
+    bool has_multi_setting_file = false;
+    cJSON* settings_array = loader_cJSON_GetObjectItem(json, "settings_array");
+    cJSON* single_settings_object = loader_cJSON_GetObjectItem(json, "settings");
+    if (NULL != settings_array) {
+        has_multi_setting_file = true;
+        settings_array_count = loader_cJSON_GetArraySize(settings_array);
+    } else if (NULL != single_settings_object) {
+        settings_array_count = 1;
+    }
+
+    // Corresponds to the settings object that has no app keys
+    int global_settings_index = -1;
+    // Corresponds to the settings object which has a matchign app key
+    int index_to_use = -1;
+
+    char current_process_path[1024];
+    bool valid_exe_path = NULL != loader_platform_executable_path(current_process_path, 1024);
+
+    for (int i = 0; i < (int)settings_array_count; i++) {
+        if (has_multi_setting_file) {
+            single_settings_object = loader_cJSON_GetArrayItem(settings_array, i);
+        }
+        cJSON* app_keys = loader_cJSON_GetObjectItem(single_settings_object, "app_keys");
+        if (NULL == app_keys) {
+            if (global_settings_index == -1) {
+                global_settings_index = i;  // use the first 'global' settings that has no app keys as the global one
+            }
+            continue;
+        } else if (valid_exe_path) {
+            int app_key_count = loader_cJSON_GetArraySize(app_keys);
+            if (app_key_count == 0) {
+                continue;  // empty array
+            }
+            for (int j = 0; j < app_key_count; j++) {
+                cJSON* app_key_json = loader_cJSON_GetArrayItem(app_keys, j);
+                if (NULL == app_key_json) {
+                    continue;
+                }
+                char* app_key = loader_cJSON_Print(app_key_json);
+                if (NULL == app_key) {
+                    continue;
+                }
+
+                if (strcmp(current_process_path, app_key) == 0) {
+                    index_to_use = i;
+                }
+                loader_instance_heap_free(inst, app_key);
+                if (index_to_use == i) {
+                    break;  // break only after freeing the app key
+                }
+            }
+        }
+    }
+
+    // No app specific settings match - either use global settings or exit
+    if (index_to_use == -1) {
+        if (global_settings_index == -1) {
+            goto out;  // No global settings were found - exit
+        } else {
+            index_to_use = global_settings_index;  // Global settings are present - use it
+        }
+    }
+
+    // Now get the actual settings object to use - already have it if there is only one settings object
+    // If there are multiple settings, just need to set single_settings_object to the desired settings object
+    if (has_multi_setting_file) {
+        single_settings_object = loader_cJSON_GetArrayItem(settings_array, index_to_use);
+        if (NULL == single_settings_object) {
+            res = VK_ERROR_INITIALIZATION_FAILED;
+            goto out;
+        }
+    }
+
+    // optional
+    cJSON* stderr_filter = loader_cJSON_GetObjectItem(single_settings_object, "stderr_log");
+    if (NULL != stderr_filter) {
+        struct loader_string_list stderr_log = {0};
+        res = loader_parse_json_array_of_strings(inst, single_settings_object, "stderr_log", &stderr_log);
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+            goto out;
+        }
+        loader_settings->debug_level = parse_log_filters_from_strings(&stderr_log);
+        free_string_list(inst, &stderr_log);
+    }
+
+    // optional
+    cJSON* logs_to_use = loader_cJSON_GetObjectItem(single_settings_object, "log_locations");
+    if (NULL != logs_to_use) {
+        int log_count = loader_cJSON_GetArraySize(logs_to_use);
+        for (int i = 0; i < log_count; i++) {
+            cJSON* log_element = loader_cJSON_GetArrayItem(logs_to_use, i);
+            // bool is_valid = true;
+            if (NULL != log_element) {
+                struct loader_string_list log_destinations = {0};
+                res = loader_parse_json_array_of_strings(inst, log_element, "destinations", &log_destinations);
+                if (res != VK_SUCCESS) {
+                    // is_valid = false;
+                }
+                free_string_list(inst, &log_destinations);
+                struct loader_string_list log_filters = {0};
+                res = loader_parse_json_array_of_strings(inst, log_element, "filters", &log_filters);
+                if (res != VK_SUCCESS) {
+                    // is_valid = false;
+                }
+                free_string_list(inst, &log_filters);
+            }
+        }
+    }
+
+    res = parse_layer_configurations(inst, single_settings_object, loader_settings);
+    if (res != VK_SUCCESS) {
+        goto out;
+    }
+
+    // Determine if there exists a layer configuration indicating where to put layers not contained in the settings file
+    // LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION
+    for (uint32_t i = 0; i < loader_settings->layer_configuration_count; i++) {
+        if (loader_settings->layer_configurations[i].control == LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
+            loader_settings->has_unordered_layer_location = true;
+            break;
+        }
+    }
+
+    loader_settings->settings_file_path = settings_file_path;
+    settings_file_path = NULL;
+    loader_settings->settings_active = true;
+out:
+    if (NULL != json) {
+        loader_cJSON_Delete(json);
+    }
+
+    loader_instance_heap_free(inst, settings_file_path);
+
+    loader_instance_heap_free(inst, file_format_version_string);
+    return res;
+}
+
+VkResult update_global_loader_settings(void) {
+    loader_settings settings = {0};
+    VkResult res = get_loader_settings(NULL, &settings);
+    loader_platform_thread_lock_mutex(&global_loader_settings_lock);
+
+    free_loader_settings(NULL, &global_loader_settings);
+    if (res == VK_SUCCESS) {
+        if (!check_if_settings_are_equal(&settings, &global_loader_settings)) {
+            log_settings(NULL, &settings);
+        }
+
+        memcpy(&global_loader_settings, &settings, sizeof(loader_settings));
+        if (global_loader_settings.settings_active) {
+            loader_set_global_debug_level(global_loader_settings.debug_level);
+        }
+    }
+    loader_platform_thread_unlock_mutex(&global_loader_settings_lock);
+    return res;
+}
+
+void init_global_loader_settings(void) {
+    loader_platform_thread_create_mutex(&global_loader_settings_lock);
+    // Free out the global settings in case the process was loaded & unloaded
+    free_loader_settings(NULL, &global_loader_settings);
+}
+void teardown_global_loader_settings(void) {
+    free_loader_settings(NULL, &global_loader_settings);
+    loader_platform_thread_delete_mutex(&global_loader_settings_lock);
+}
+
+bool should_skip_logging_global_messages(VkFlags msg_type) {
+    loader_platform_thread_lock_mutex(&global_loader_settings_lock);
+    bool should_skip = global_loader_settings.settings_active && 0 != (msg_type & global_loader_settings.debug_level);
+    loader_platform_thread_unlock_mutex(&global_loader_settings_lock);
+    return should_skip;
+}
+
+// Use this function to get the correct settings to use based on the context
+// If inst is NULL - use the global settings and lock the mutex
+// Else return the settings local to the instance - but do nto lock the mutex
+const loader_settings* get_current_settings_and_lock(const struct loader_instance* inst) {
+    if (inst) {
+        return &inst->settings;
+    }
+    loader_platform_thread_lock_mutex(&global_loader_settings_lock);
+    return &global_loader_settings;
+}
+// Release the global settings lock if we are using the global settings - aka if inst is NULL
+void release_current_settings_lock(const struct loader_instance* inst) {
+    if (inst == NULL) {
+        loader_platform_thread_unlock_mutex(&global_loader_settings_lock);
+    }
+}
+
+VkResult get_settings_layers(const struct loader_instance* inst, struct loader_layer_list* settings_layers,
+                             bool* should_search_for_other_layers) {
+    VkResult res = VK_SUCCESS;
+    *should_search_for_other_layers = true;  // default to true
+
+    const loader_settings* settings = get_current_settings_and_lock(inst);
+
+    // Assume the list doesn't contain LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION at first
+    if (settings != NULL && settings->settings_active) {
+        *should_search_for_other_layers = false;
+    }
+
+    for (uint32_t i = 0; i < settings->layer_configuration_count; i++) {
+        loader_settings_layer_configuration* layer_config = &settings->layer_configurations[i];
+
+        // If we encountered a layer that should be forced off, we add it to the settings_layers list but only
+        // with the data required to compare it with layers not in the settings file (aka name and manifest path)
+        if (layer_config->control == LOADER_SETTINGS_LAYER_CONTROL_OFF) {
+            struct loader_layer_properties props = {0};
+            props.settings_control_value = LOADER_SETTINGS_LAYER_CONTROL_OFF;
+            loader_strncpy(props.info.layerName, VK_MAX_EXTENSION_NAME_SIZE, layer_config->name, VK_MAX_EXTENSION_NAME_SIZE);
+            props.info.layerName[VK_MAX_EXTENSION_NAME_SIZE - 1] = '\0';
+            res = loader_copy_to_new_str(inst, layer_config->path, &props.manifest_file_name);
+            if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                goto out;
+            }
+            res = loader_append_layer_property(inst, settings_layers, &props);
+            if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                loader_free_layer_properties(inst, &props);
+                goto out;
+            }
+            continue;
+        }
+
+        // The special layer location that indicates where unordered layers should go only should have the
+        // settings_control_value set - everythign else should be NULL
+        if (layer_config->control == LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
+            struct loader_layer_properties props = {0};
+            props.settings_control_value = LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION;
+            res = loader_append_layer_property(inst, settings_layers, &props);
+            if (VK_ERROR_OUT_OF_HOST_MEMORY == res) {
+                loader_free_layer_properties(inst, &props);
+                goto out;
+            }
+            *should_search_for_other_layers = true;
+            continue;
+        }
+
+        if (layer_config->path == NULL) {
+            continue;
+        }
+
+        cJSON* json = NULL;
+        VkResult local_res = loader_get_json(inst, -1, layer_config->path, &json);
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
+        } else if (VK_SUCCESS != local_res || NULL == json) {
+            continue;
+        }
+
+        local_res =
+            loader_add_layer_properties(inst, settings_layers, json, layer_config->treat_as_implicit_manifest, layer_config->path);
+        loader_cJSON_Delete(json);
+
+        // If the error is anything other than out of memory we still want to try to load the other layers
+        if (VK_ERROR_OUT_OF_HOST_MEMORY == local_res) {
+            res = VK_ERROR_OUT_OF_HOST_MEMORY;
+            goto out;
+        }
+        struct loader_layer_properties* newly_added_layer = &settings_layers->list[settings_layers->count - 1];
+        newly_added_layer->settings_control_value = layer_config->control;
+        // If the manifest file found has a name that differs from the one in the settings, remove this layer from consideration
+        bool should_remove = false;
+        if (strncmp(newly_added_layer->info.layerName, layer_config->name, VK_MAX_EXTENSION_NAME_SIZE) != 0) {
+            should_remove = true;
+            loader_remove_layer_in_list(inst, settings_layers, settings_layers->count - 1);
+        }
+        // Make sure the layer isn't already in the list
+        for (uint32_t j = 0; settings_layers->count > 0 && j < settings_layers->count - 1; j++) {
+            if (0 ==
+                strncmp(settings_layers->list[j].info.layerName, newly_added_layer->info.layerName, VK_MAX_EXTENSION_NAME_SIZE)) {
+                if (0 == (newly_added_layer->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) &&
+                    strcmp(settings_layers->list[j].lib_name, newly_added_layer->lib_name) == 0) {
+                    should_remove = true;
+                    break;
+                }
+            }
+        }
+        if (should_remove) {
+            loader_remove_layer_in_list(inst, settings_layers, settings_layers->count - 1);
+        }
+    }
+
+out:
+    release_current_settings_lock(inst);
+    return res;
+}
+
+// Check if layers has an element with the same name.
+// If layer_property is a regular layer, check if the lib_path is the same.
+// If layer_property is a meta layer, just use the layerName
+bool check_if_layer_is_in_list(struct loader_layer_list* layer_list, struct loader_layer_properties* layer_property) {
+    // If the layer is a meta layer, just check against the name
+    for (uint32_t i = 0; i < layer_list->count; i++) {
+        if (0 == strncmp(layer_list->list[i].info.layerName, layer_property->info.layerName, VK_MAX_EXTENSION_NAME_SIZE)) {
+            if (0 == (layer_property->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) &&
+                strcmp(layer_list->list[i].lib_name, layer_property->lib_name) == 0) {
+                return true;
+            }
+        }
+    }
+    return false;
+}
+
+VkResult combine_settings_layers_with_regular_layers(const struct loader_instance* inst, struct loader_layer_list* settings_layers,
+                                                     struct loader_layer_list* regular_layers,
+                                                     struct loader_layer_list* output_layers) {
+    VkResult res = VK_SUCCESS;
+    bool has_unordered_layer_location = false;
+    uint32_t unordered_layer_location_index = 0;
+    // Location to put layers that aren't known to the settings file
+    // Find it here so we dont have to pass in a loader_settings struct
+    for (uint32_t i = 0; i < settings_layers->count; i++) {
+        if (settings_layers->list[i].settings_control_value == LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION) {
+            has_unordered_layer_location = true;
+            unordered_layer_location_index = i;
+            break;
+        }
+    }
+
+    if (settings_layers->count == 0 && regular_layers->count == 0) {
+        // No layers to combine
+        goto out;
+    } else if (settings_layers->count == 0) {
+        // No settings layers - just copy regular to output_layers - memset regular layers to prevent double frees
+        *output_layers = *regular_layers;
+        memset(regular_layers, 0, sizeof(struct loader_layer_list));
+        goto out;
+    } else if (regular_layers->count == 0 || !has_unordered_layer_location) {
+        // No regular layers or has_unordered_layer_location is false - just copy settings to output_layers -
+        // memset settings layers to prevent double frees
+        *output_layers = *settings_layers;
+        memset(settings_layers, 0, sizeof(struct loader_layer_list));
+        goto out;
+    }
+
+    res = loader_init_generic_list(inst, (struct loader_generic_list*)output_layers,
+                                   (settings_layers->count + regular_layers->count) * sizeof(struct loader_layer_properties));
+    if (VK_SUCCESS != res) {
+        goto out;
+    }
+
+    // Insert the settings layers into output_layers up to unordered_layer_index
+    for (uint32_t i = 0; i < unordered_layer_location_index; i++) {
+        if (!check_if_layer_is_in_list(output_layers, &settings_layers->list[i])) {
+            res = loader_append_layer_property(inst, output_layers, &settings_layers->list[i]);
+            if (VK_SUCCESS != res) {
+                goto out;
+            }
+        }
+    }
+
+    for (uint32_t i = 0; i < regular_layers->count; i++) {
+        // Check if its already been put in the output_layers list as well as the remaining settings_layers
+        bool regular_layer_is_ordered = check_if_layer_is_in_list(output_layers, &regular_layers->list[i]) ||
+                                        check_if_layer_is_in_list(settings_layers, &regular_layers->list[i]);
+        // If it isn't found, add it
+        if (!regular_layer_is_ordered) {
+            res = loader_append_layer_property(inst, output_layers, &regular_layers->list[i]);
+            if (VK_SUCCESS != res) {
+                goto out;
+            }
+        } else {
+            // layer is already ordered and can be safely freed
+            loader_free_layer_properties(inst, &regular_layers->list[i]);
+        }
+    }
+
+    // Insert the rest of the settings layers into combined_layers from  unordered_layer_index to the end
+    // start at one after the unordered_layer_index
+    for (uint32_t i = unordered_layer_location_index + 1; i < settings_layers->count; i++) {
+        res = loader_append_layer_property(inst, output_layers, &settings_layers->list[i]);
+        if (VK_SUCCESS != res) {
+            goto out;
+        }
+    }
+
+out:
+    if (res != VK_SUCCESS) {
+        loader_delete_layer_list_and_properties(inst, output_layers);
+    }
+
+    return res;
+}
+
+VkResult enable_correct_layers_from_settings(const struct loader_instance* inst, const struct loader_envvar_all_filters* filters,
+                                             uint32_t app_enabled_name_count, const char* const* app_enabled_names,
+                                             const struct loader_layer_list* instance_layers,
+                                             struct loader_pointer_layer_list* target_layer_list,
+                                             struct loader_pointer_layer_list* activated_layer_list) {
+    VkResult res = VK_SUCCESS;
+    char* vk_instance_layers_env = loader_getenv(ENABLED_LAYERS_ENV, inst);
+    size_t vk_instance_layers_env_len = 0;
+    char* vk_instance_layers_env_copy = NULL;
+    if (vk_instance_layers_env != NULL) {
+        vk_instance_layers_env_len = strlen(vk_instance_layers_env) + 1;
+        vk_instance_layers_env_copy = loader_stack_alloc(vk_instance_layers_env_len);
+
+        loader_log(inst, VULKAN_LOADER_WARN_BIT | VULKAN_LOADER_LAYER_BIT, 0, "env var \'%s\' defined and adding layers: %s",
+                   ENABLED_LAYERS_ENV, vk_instance_layers_env);
+    }
+    for (uint32_t i = 0; i < instance_layers->count; i++) {
+        bool enable_layer = false;
+        struct loader_layer_properties* props = &instance_layers->list[i];
+
+        // Do not enable the layer if the settings have it set as off
+        if (props->settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_OFF) {
+            continue;
+        }
+        // Force enable it based on settings
+        if (props->settings_control_value == LOADER_SETTINGS_LAYER_CONTROL_ON) {
+            enable_layer = true;
+        }
+
+        // Check if disable filter needs to skip the layer
+        if ((filters->disable_filter.disable_all || filters->disable_filter.disable_all_implicit ||
+             check_name_matches_filter_environment_var(props->info.layerName, &filters->disable_filter.additional_filters)) &&
+            !check_name_matches_filter_environment_var(props->info.layerName, &filters->allow_filter)) {
+            continue;
+        }
+        // Check the enable filter
+        if (!enable_layer && check_name_matches_filter_environment_var(props->info.layerName, &filters->enable_filter)) {
+            enable_layer = true;
+        }
+
+        // First look for the old-fashion layers forced on with VK_INSTANCE_LAYERS
+        if (!enable_layer && vk_instance_layers_env && vk_instance_layers_env_copy && vk_instance_layers_env_len > 0) {
+            // Copy the env-var on each iteration, so that loader_get_next_path can correctly find the separators
+            // This solution only needs one stack allocation ahead of time rather than an allocation per layer in the env-var
+            loader_strncpy(vk_instance_layers_env_copy, vk_instance_layers_env_len, vk_instance_layers_env,
+                           vk_instance_layers_env_len);
+
+            while (vk_instance_layers_env_copy && *vk_instance_layers_env_copy) {
+                char* next = loader_get_next_path(vk_instance_layers_env_copy);
+                if (0 == strcmp(vk_instance_layers_env_copy, props->info.layerName)) {
+                    enable_layer = true;
+                    break;
+                }
+                vk_instance_layers_env_copy = next;
+            }
+        }
+
+        // Check if it should be enabled by the application
+        if (!enable_layer) {
+            for (uint32_t j = 0; j < app_enabled_name_count; j++) {
+                if (strcmp(props->info.layerName, app_enabled_names[j]) == 0) {
+                    enable_layer = true;
+                    break;
+                }
+            }
+        }
+
+        // Check if its an implicit layers and thus enabled by default
+        if (!enable_layer && (0 == (props->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) &&
+            loader_implicit_layer_is_enabled(inst, filters, props)) {
+            enable_layer = true;
+        }
+
+        if (enable_layer) {
+            // Check if the layer is a meta layer reuse the existing function to add the meta layer
+            if (props->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
+                res = loader_add_meta_layer(inst, filters, props, target_layer_list, activated_layer_list, instance_layers, NULL);
+                if (res == VK_ERROR_OUT_OF_HOST_MEMORY) goto out;
+            } else {
+                res = loader_add_layer_properties_to_list(inst, target_layer_list, props);
+                if (res != VK_SUCCESS) {
+                    goto out;
+                }
+                res = loader_add_layer_properties_to_list(inst, activated_layer_list, props);
+                if (res != VK_SUCCESS) {
+                    goto out;
+                }
+            }
+        }
+    }
+out:
+    return res;
+}
diff --git a/loader/settings.h b/loader/settings.h
new file mode 100644
index 0000000..d3cd8b7
--- /dev/null
+++ b/loader/settings.h
@@ -0,0 +1,114 @@
+/*
+ *
+ * Copyright (c) 2023 The Khronos Group Inc.
+ * Copyright (c) 2023 Valve Corporation
+ * Copyright (c) 2023 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Author: Charles Giessen <charles@lunarg.com>
+ *
+ */
+
+#pragma once
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "vulkan/vulkan_core.h"
+
+#include "log.h"
+
+struct loader_instance;
+struct loader_layer_list;
+struct loader_pointer_layer_list;
+struct loader_envvar_all_filters;
+typedef struct log_configuration log_configuration;
+
+typedef enum loader_settings_layer_control {
+    LOADER_SETTINGS_LAYER_CONTROL_DEFAULT,          // layer is not enabled by settings file but can be enabled through other means
+    LOADER_SETTINGS_LAYER_CONTROL_ON,               // layer is enabled by settings file
+    LOADER_SETTINGS_LAYER_CONTROL_OFF,              // layer is prevented from being enabled
+    LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION  // special control indicating unspecified layers should go here. If this is not
+                                                    // in the settings file, then the loader assume no other layers should be
+                                                    // searched & loaded.
+} loader_settings_layer_control;
+
+// If a loader_settings_layer_configuration has a name of loader_settings_unknown_layers_location, then it specifies that the
+// layer configuation it was found in shall be the location all layers not listed in the settings file that are enabled.
+#define LOADER_SETTINGS_UNKNOWN_LAYERS_LOCATION "loader_settings_unknown_layers_location"
+
+#define LOADER_SETTINGS_MAX_NAME_SIZE 256U;
+
+typedef struct loader_settings_layer_configuration {
+    char* name;
+    char* path;
+    loader_settings_layer_control control;
+    bool treat_as_implicit_manifest;  // whether or not the layer should be parsed as if it is implicit
+
+} loader_settings_layer_configuration;
+
+typedef struct loader_settings {
+    bool settings_active;
+    bool has_unordered_layer_location;
+    enum vulkan_loader_debug_flags debug_level;
+
+    uint32_t layer_configuration_count;
+    loader_settings_layer_configuration* layer_configurations;
+
+    char* settings_file_path;
+} loader_settings;
+
+// Call this function to get the current settings that the loader should use.
+// It will open up the current loader settings file and return a loader_settigns in out_loader_settings if it.
+// It should be called on every call to the global functions excluding vkGetInstanceProcAddr
+// Caller is responsible for cleaning up by calling free_loader_settings()
+VkResult get_loader_settings(const struct loader_instance* inst, loader_settings* out_loader_settings);
+
+void free_loader_settings(const struct loader_instance* inst, loader_settings* loader_settings);
+
+// Log the settings to the console
+void log_settings(const struct loader_instance* inst, loader_settings* settings);
+
+// Every global function needs to call this at startup to insure that
+VkResult update_global_loader_settings(void);
+
+// Needs to be called during startup -
+void init_global_loader_settings(void);
+void teardown_global_loader_settings(void);
+
+// Check the global settings and return true if msg_type does not correspond to the active global loader settings
+bool should_skip_logging_global_messages(VkFlags msg_type);
+
+// Query the current settings (either global or per-instance) and return the list of layers contained within.
+// should_search_for_other_layers tells the caller if the settings file should be used exclusively for layer searching or not
+VkResult get_settings_layers(const struct loader_instance* inst, struct loader_layer_list* settings_layers,
+                             bool* should_search_for_other_layers);
+
+// Take the provided list of settings_layers and add in the layers from regular search paths
+// Only adds layers that aren't already present in the settings_layers and in the location of the
+// layer configuration with LOADER_SETTINGS_LAYER_UNORDERED_LAYER_LOCATION set
+VkResult combine_settings_layers_with_regular_layers(const struct loader_instance* inst, struct loader_layer_list* settings_layers,
+                                                     struct loader_layer_list* regular_layers,
+                                                     struct loader_layer_list* output_layers);
+
+// Fill out activated_layer_list with the layers that should be activated, based on environment variables, VkInstanceCreateInfo, and
+// the settings
+VkResult enable_correct_layers_from_settings(const struct loader_instance* inst, const struct loader_envvar_all_filters* filters,
+                                             uint32_t app_enabled_name_count, const char* const* app_enabled_names,
+                                             const struct loader_layer_list* instance_layers,
+                                             struct loader_pointer_layer_list* target_layer_list,
+                                             struct loader_pointer_layer_list* activated_layer_list);
diff --git a/loader/stack_allocation.h b/loader/stack_allocation.h
index d1958fb..0a2bbaa 100644
--- a/loader/stack_allocation.h
+++ b/loader/stack_allocation.h
@@ -36,8 +36,10 @@
 #include <stdlib.h>
 #endif
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if COMMON_UNIX_PLATFORMS
 #define loader_stack_alloc(size) alloca(size)
 #elif defined(_WIN32)
 #define loader_stack_alloc(size) _alloca(size)
+#else
+#warning "alloca not available on this platform!"
 #endif  // defined(_WIN32)
diff --git a/loader/terminator.c b/loader/terminator.c
index 0f768c3..656f35b 100644
--- a/loader/terminator.c
+++ b/loader/terminator.c
@@ -113,6 +113,8 @@
 
 VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount,
                                                                          VkLayerProperties *pProperties) {
+    (void)pPropertyCount;
+    (void)pProperties;
     struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
diff --git a/loader/trampoline.c b/loader/trampoline.c
index 9066a08..65809ef 100644
--- a/loader/trampoline.c
+++ b/loader/trampoline.c
@@ -1,8 +1,8 @@
 /*
  *
- * Copyright (c) 2015-2022 The Khronos Group Inc.
- * Copyright (c) 2015-2022 Valve Corporation
- * Copyright (c) 2015-2022 LunarG, Inc.
+ * Copyright (c) 2015-2023 The Khronos Group Inc.
+ * Copyright (c) 2015-2023 Valve Corporation
+ * Copyright (c) 2015-2023 LunarG, Inc.
  * Copyright (C) 2015 Google Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,14 +31,16 @@
 #include "debug_utils.h"
 #include "gpa_helper.h"
 #include "loader.h"
+#include "loader_environment.h"
 #include "log.h"
+#include "settings.h"
 #include "vk_loader_extensions.h"
 #include "vk_loader_platform.h"
 #include "wsi.h"
 
 // Trampoline entrypoints are in this file for core Vulkan commands
 
-/* vkGetInstanceProcAddr: Get global level or instance level entrypoint addressess.
+/* vkGetInstanceProcAddr: Get global level or instance level entrypoint addresses.
  * @param instance
  * @param pName
  * @return
@@ -55,7 +57,7 @@
  *
  * Note:
  * Vulkan header updated 1.2.193 changed the behavior of vkGetInstanceProcAddr for global entrypoints. They used to always be
- * returned regardless of the value of the instance paramtere. The spec was amended in this version to only allow querying global
+ * returned regardless of the value of the instance parameter. The spec was amended in this version to only allow querying global
  * level entrypoints with a NULL instance. However, as to not break old applications, the new behavior is only applied if the
  * instance passed in is both valid and minor version is greater than 1.2, which was when this change in behavior occurred. Only
  * instances with a newer version will get the new behavior.
@@ -95,7 +97,7 @@
         struct loader_instance *ptr_instance = loader_get_instance(instance);
         // If we've gotten here and the pointer is NULL, it's invalid
         if (ptr_instance == NULL) {
-            loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+            loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                        "vkGetInstanceProcAddr: Invalid instance [VUID-vkGetInstanceProcAddr-instance-parameter]");
             abort(); /* Intentionally fail so user can correct issue. */
         }
@@ -115,25 +117,44 @@
 //    entry points both core and extensions.
 //    Device relative means call down the device chain.
 LOADER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char *pName) {
-    void *addr;
+    if (!pName || pName[0] != 'v' || pName[1] != 'k') return NULL;
 
     // For entrypoints that loader must handle (ie non-dispatchable or create object)
     // make sure the loader entrypoint is returned
-    addr = loader_non_passthrough_gdpa(pName);
-    if (addr) {
-        return addr;
-    }
+    const char *name = pName;
+    name += 2;
+    if (!strcmp(name, "GetDeviceProcAddr")) return (PFN_vkVoidFunction)vkGetDeviceProcAddr;
+    if (!strcmp(name, "DestroyDevice")) return (PFN_vkVoidFunction)vkDestroyDevice;
+    if (!strcmp(name, "GetDeviceQueue")) return (PFN_vkVoidFunction)vkGetDeviceQueue;
+    if (!strcmp(name, "AllocateCommandBuffers")) return (PFN_vkVoidFunction)vkAllocateCommandBuffers;
 
     // Although CreateDevice is on device chain it's dispatchable object isn't
     // a VkDevice or child of VkDevice so return NULL.
     if (!strcmp(pName, "CreateDevice")) return NULL;
 
+    // Because vkGetDeviceQueue2 is a 1.1 entry point, we need to check if the apiVersion provided during instance creation is
+    // sufficient
+    if (!strcmp(name, "GetDeviceQueue2")) {
+        struct loader_device *dev = NULL;
+        uint32_t index = 0;
+        struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &index);
+        if (NULL != icd_term && dev != NULL) {
+            const struct loader_instance *inst = icd_term->this_instance;
+            uint32_t api_version =
+                VK_MAKE_API_VERSION(0, inst->app_api_version.major, inst->app_api_version.minor, inst->app_api_version.patch);
+            return (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_1_1)
+                       ? NULL
+                       : (PFN_vkVoidFunction)vkGetDeviceQueue2;
+        }
+        return NULL;
+    }
     // Return the dispatch table entrypoint for the fastest case
-    const VkLayerDispatchTable *disp_table = *(VkLayerDispatchTable **)device;
+    const VkLayerDispatchTable *disp_table = loader_get_dispatch(device);
     if (disp_table == NULL) return NULL;
 
-    addr = loader_lookup_device_dispatch_table(disp_table, pName);
-    if (addr) return addr;
+    bool found_name = false;
+    void *addr = loader_lookup_device_dispatch_table(disp_table, pName, &found_name);
+    if (found_name) return addr;
 
     if (disp_table->GetDeviceProcAddr == NULL) return NULL;
     return disp_table->GetDeviceProcAddr(device, pName);
@@ -144,6 +165,8 @@
                                                                                     VkExtensionProperties *pProperties) {
     LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize);
 
+    update_global_loader_settings();
+
     // We know we need to call at least the terminator
     VkResult res = VK_SUCCESS;
     VkEnumerateInstanceExtensionPropertiesChain chain_tail = {
@@ -159,12 +182,23 @@
     VkEnumerateInstanceExtensionPropertiesChain *chain_head = &chain_tail;
 
     // Get the implicit layers
-    struct loader_layer_list layers;
+    struct loader_layer_list layers = {0};
     loader_platform_dl_handle *libs = NULL;
     size_t lib_count = 0;
     memset(&layers, 0, sizeof(layers));
+    struct loader_envvar_all_filters layer_filters = {0};
 
-    res = loader_scan_for_implicit_layers(NULL, &layers, &libs);
+    res = parse_layer_environment_var_filters(NULL, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_scan_for_implicit_layers(NULL, &layers, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_init_library_list(&layers, &libs);
     if (VK_SUCCESS != res) {
         return res;
     }
@@ -172,7 +206,7 @@
     // Prepend layers onto the chain if they implement this entry point
     for (uint32_t i = 0; i < layers.count; ++i) {
         // Skip this layer if it doesn't expose the entry-point
-        if (layers.list[i].pre_instance_functions.enumerate_instance_extension_properties[0] == '\0') {
+        if (NULL == layers.list[i].pre_instance_functions.enumerate_instance_extension_properties) {
             continue;
         }
 
@@ -237,6 +271,8 @@
                                                                                 VkLayerProperties *pProperties) {
     LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize);
 
+    update_global_loader_settings();
+
     // We know we need to call at least the terminator
     VkResult res = VK_SUCCESS;
     VkEnumerateInstanceLayerPropertiesChain chain_tail = {
@@ -256,14 +292,30 @@
     loader_platform_dl_handle *libs = NULL;
     size_t lib_count = 0;
     memset(&layers, 0, sizeof(layers));
+    struct loader_envvar_all_filters layer_filters = {0};
 
-    res = loader_scan_for_implicit_layers(NULL, &layers, &libs);
+    res = parse_layer_environment_var_filters(NULL, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_scan_for_implicit_layers(NULL, &layers, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_init_library_list(&layers, &libs);
     if (VK_SUCCESS != res) {
         return res;
     }
 
     // Prepend layers onto the chain if they implement this entry point
     for (uint32_t i = 0; i < layers.count; ++i) {
+        // Skip this layer if it doesn't expose the entry-point
+        if (NULL == layers.list[i].pre_instance_functions.enumerate_instance_layer_properties) {
+            continue;
+        }
+
         loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name);
         if (layer_lib == NULL) {
             loader_log(NULL, VULKAN_LOADER_WARN_BIT, 0, "%s: Unable to load implicit layer library \"%s\"", __FUNCTION__,
@@ -324,8 +376,10 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(uint32_t *pApiVersion) {
     LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize);
 
+    update_global_loader_settings();
+
     if (NULL == pApiVersion) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumerateInstanceVersion: \'pApiVersion\' must not be NULL "
                    "(VUID-vkEnumerateInstanceVersion-pApiVersion-parameter");
         // NOTE: This seems silly, but it's the only allowable failure
@@ -351,8 +405,19 @@
     loader_platform_dl_handle *libs = NULL;
     size_t lib_count = 0;
     memset(&layers, 0, sizeof(layers));
+    struct loader_envvar_all_filters layer_filters = {0};
 
-    res = loader_scan_for_implicit_layers(NULL, &layers, &libs);
+    res = parse_layer_environment_var_filters(NULL, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_scan_for_implicit_layers(NULL, &layers, &layer_filters);
+    if (VK_SUCCESS != res) {
+        return res;
+    }
+
+    res = loader_init_library_list(&layers, &libs);
     if (VK_SUCCESS != res) {
         return res;
     }
@@ -360,7 +425,7 @@
     // Prepend layers onto the chain if they implement this entry point
     for (uint32_t i = 0; i < layers.count; ++i) {
         // Skip this layer if it doesn't expose the entry-point
-        if (layers.list[i].pre_instance_functions.enumerate_instance_version[0] == '\0') {
+        if (NULL == layers.list[i].pre_instance_functions.enumerate_instance_version) {
             continue;
         }
 
@@ -424,16 +489,18 @@
     struct loader_instance *ptr_instance = NULL;
     VkInstance created_instance = VK_NULL_HANDLE;
     VkResult res = VK_ERROR_INITIALIZATION_FAILED;
+    VkInstanceCreateInfo ici = *pCreateInfo;
+    struct loader_envvar_all_filters layer_filters = {0};
 
     LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize);
 
     if (pCreateInfo == NULL) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateInstance: \'pCreateInfo\' is NULL (VUID-vkCreateInstance-pCreateInfo-parameter)");
         goto out;
     }
     if (pInstance == NULL) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateInstance \'pInstance\' not valid (VUID-vkCreateInstance-pInstance-parameter)");
         goto out;
     }
@@ -441,8 +508,6 @@
     ptr_instance =
         (struct loader_instance *)loader_calloc(pAllocator, sizeof(struct loader_instance), VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
 
-    VkInstanceCreateInfo ici = *pCreateInfo;
-
     if (ptr_instance == NULL) {
         res = VK_ERROR_OUT_OF_HOST_MEMORY;
         goto out;
@@ -480,14 +545,29 @@
         goto out;
     }
 
+    VkResult settings_file_res = get_loader_settings(ptr_instance, &ptr_instance->settings);
+    if (settings_file_res == VK_ERROR_OUT_OF_HOST_MEMORY) {
+        res = settings_file_res;
+        goto out;
+    }
+    if (ptr_instance->settings.settings_active) {
+        log_settings(ptr_instance, &ptr_instance->settings);
+    }
+
     // Check the VkInstanceCreateInfoFlags wether to allow the portability enumeration flag
     if ((pCreateInfo->flags & VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR) == 1) {
-        // Make sure the extension has been enabled
+        ptr_instance->portability_enumeration_flag_bit_set = true;
+    }
+    // Make sure the extension has been enabled
+    if (pCreateInfo->ppEnabledExtensionNames) {
         for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
             if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME) == 0) {
-                ptr_instance->portability_enumeration_enabled = true;
-                loader_log(ptr_instance, VULKAN_LOADER_INFO_BIT, 0,
-                           "Portability enumeration bit was set, enumerating portability drivers.");
+                ptr_instance->portability_enumeration_extension_enabled = true;
+                if (ptr_instance->portability_enumeration_flag_bit_set) {
+                    ptr_instance->portability_enumeration_enabled = true;
+                    loader_log(ptr_instance, VULKAN_LOADER_INFO_BIT, 0,
+                               "Portability enumeration bit was set, enumerating portability drivers.");
+                }
             }
         }
     }
@@ -503,11 +583,16 @@
         }
     }
 
+    res = parse_layer_environment_var_filters(ptr_instance, &layer_filters);
+    if (VK_SUCCESS != res) {
+        goto out;
+    }
+
     // Due to implicit layers need to get layer list even if
     // enabledLayerCount == 0 and VK_INSTANCE_LAYERS is unset. For now always
     // get layer list via loader_scan_for_layers().
     memset(&ptr_instance->instance_layer_list, 0, sizeof(ptr_instance->instance_layer_list));
-    res = loader_scan_for_layers(ptr_instance, &ptr_instance->instance_layer_list);
+    res = loader_scan_for_layers(ptr_instance, &ptr_instance->instance_layer_list, &layer_filters);
     if (VK_SUCCESS != res) {
         goto out;
     }
@@ -521,21 +606,37 @@
         }
     }
 
-    // Scan/discover all ICD libraries
-    memset(&ptr_instance->icd_tramp_list, 0, sizeof(ptr_instance->icd_tramp_list));
+    // Scan/discover all System and Environment Variable ICD libraries
     bool skipped_portability_drivers = false;
-    res = loader_icd_scan(ptr_instance, &ptr_instance->icd_tramp_list, &skipped_portability_drivers);
+    res = loader_icd_scan(ptr_instance, &ptr_instance->icd_tramp_list, pCreateInfo, &skipped_portability_drivers);
     if (res == VK_ERROR_OUT_OF_HOST_MEMORY) {
         goto out;
-    } else if (ptr_instance->icd_tramp_list.count == 0) {
+    }
+
+    if (ptr_instance->icd_tramp_list.count == 0) {
         // No drivers found
         if (skipped_portability_drivers) {
-            loader_log(
-                ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
-                "vkCreateInstance: Found drivers that contain devices which support the portability subset, but the "
-                "portability enumeration bit was not set! Applications that wish to enumerate portability drivers must set the "
-                "VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo flags and "
-                "enable the VK_KHR_portability_enumeration instance extension.");
+            if (ptr_instance->portability_enumeration_extension_enabled && !ptr_instance->portability_enumeration_flag_bit_set) {
+                loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                           "vkCreateInstance: Found drivers that contain devices which support the portability subset, but "
+                           "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
+                           "drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo "
+                           "flags.");
+            } else if (ptr_instance->portability_enumeration_flag_bit_set &&
+                       !ptr_instance->portability_enumeration_extension_enabled) {
+                loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                           "VkInstanceCreateInfo: If flags has the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit set, the "
+                           "list of enabled extensions in ppEnabledExtensionNames must contain VK_KHR_portability_enumeration "
+                           "[VUID-VkInstanceCreateInfo-flags-06559 ]"
+                           "Applications that wish to enumerate portability drivers must enable the VK_KHR_portability_enumeration "
+                           "instance extension.");
+            } else {
+                loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0,
+                           "vkCreateInstance: Found drivers that contain devices which support the portability subset, but "
+                           "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
+                           "drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo "
+                           "flags and enable the VK_KHR_portability_enumeration instance extension.");
+            }
         }
         loader_log(ptr_instance, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_DRIVER_BIT, 0, "vkCreateInstance: Found no drivers!");
         res = VK_ERROR_INCOMPATIBLE_DRIVER;
@@ -547,7 +648,8 @@
     if (res != VK_SUCCESS) {
         goto out;
     }
-    res = loader_validate_instance_extensions(ptr_instance, &ptr_instance->ext_list, &ptr_instance->instance_layer_list, &ici);
+    res = loader_validate_instance_extensions(ptr_instance, &ptr_instance->ext_list, &ptr_instance->instance_layer_list,
+                                              &layer_filters, &ici);
     if (res != VK_SUCCESS) {
         goto out;
     }
@@ -568,7 +670,7 @@
     loader_platform_thread_unlock_mutex(&loader_global_instance_list_lock);
 
     // Activate any layers on instance chain
-    res = loader_enable_instance_layers(ptr_instance, &ici, &ptr_instance->instance_layer_list);
+    res = loader_enable_instance_layers(ptr_instance, &ici, &ptr_instance->instance_layer_list, &layer_filters);
     if (res != VK_SUCCESS) {
         goto out;
     }
@@ -594,6 +696,7 @@
         // GetInstanceProcAddr functions to return valid extension functions
         // if enabled.
         loader_activate_instance_layer_extensions(ptr_instance, created_instance);
+        ptr_instance->instance_finished_creation = true;
     } else if (VK_ERROR_EXTENSION_NOT_PRESENT == res && !ptr_instance->create_terminator_invalid_extension) {
         loader_log(ptr_instance, VULKAN_LOADER_WARN_BIT, 0,
                    "vkCreateInstance: Layer returning invalid extension error not triggered by ICD/Loader (Policy #LLP_LAYER_17).");
@@ -610,16 +713,14 @@
             }
             loader_platform_thread_unlock_mutex(&loader_global_instance_list_lock);
 
+            free_loader_settings(ptr_instance, &ptr_instance->settings);
+
             loader_instance_heap_free(ptr_instance, ptr_instance->disp);
             // Remove any created VK_EXT_debug_report or VK_EXT_debug_utils items
             destroy_debug_callbacks_chain(ptr_instance, pAllocator);
 
-            if (NULL != ptr_instance->expanded_activated_layer_list.list) {
-                loader_deactivate_layers(ptr_instance, NULL, &ptr_instance->expanded_activated_layer_list);
-            }
-            if (NULL != ptr_instance->app_activated_layer_list.list) {
-                loader_destroy_layer_list(ptr_instance, NULL, &ptr_instance->app_activated_layer_list);
-            }
+            loader_destroy_pointer_layer_list(ptr_instance, &ptr_instance->expanded_activated_layer_list);
+            loader_destroy_pointer_layer_list(ptr_instance, &ptr_instance->app_activated_layer_list);
 
             loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list);
             loader_scanned_icd_clear(ptr_instance, &ptr_instance->icd_tramp_list);
@@ -631,10 +732,18 @@
             struct loader_icd_term *icd_term = NULL;
             while (NULL != ptr_instance->icd_terms) {
                 icd_term = ptr_instance->icd_terms;
+                // Call destroy Instance on each driver in case we successfully called down the chain but failed on
+                // our way back out of it.
+                if (icd_term->instance) {
+                    icd_term->dispatch.DestroyInstance(icd_term->instance, pAllocator);
+                }
+                icd_term->instance = VK_NULL_HANDLE;
                 ptr_instance->icd_terms = icd_term->next;
                 loader_icd_destroy(ptr_instance, icd_term, pAllocator);
             }
 
+            free_string_list(ptr_instance, &ptr_instance->enabled_layer_names);
+
             loader_instance_heap_free(ptr_instance, ptr_instance);
         } else {
             // success path, swap out created debug callbacks out so they aren't used until instance destruction
@@ -659,7 +768,7 @@
 
     ptr_instance = loader_get_instance(instance);
     if (ptr_instance == NULL) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyInstance: Invalid instance [VUID-vkDestroyInstance-instance-parameter]");
         loader_platform_thread_unlock_mutex(&loader_lock);
         abort(); /* Intentionally fail so user can correct issue. */
@@ -679,12 +788,14 @@
     disp = loader_get_instance_layer_dispatch(instance);
     disp->DestroyInstance(ptr_instance->instance, pAllocator);
 
-    if (NULL != ptr_instance->expanded_activated_layer_list.list) {
-        loader_deactivate_layers(ptr_instance, NULL, &ptr_instance->expanded_activated_layer_list);
-    }
-    if (NULL != ptr_instance->app_activated_layer_list.list) {
-        loader_destroy_layer_list(ptr_instance, NULL, &ptr_instance->app_activated_layer_list);
-    }
+    free_loader_settings(ptr_instance, &ptr_instance->settings);
+
+    loader_destroy_pointer_layer_list(ptr_instance, &ptr_instance->expanded_activated_layer_list);
+    loader_destroy_pointer_layer_list(ptr_instance, &ptr_instance->app_activated_layer_list);
+
+    loader_delete_layer_list_and_properties(ptr_instance, &ptr_instance->instance_layer_list);
+
+    free_string_list(ptr_instance, &ptr_instance->enabled_layer_names);
 
     if (ptr_instance->phys_devs_tramp) {
         for (uint32_t i = 0; i < ptr_instance->phys_dev_count_tramp; i++) {
@@ -700,8 +811,8 @@
     loader_instance_heap_free(ptr_instance, ptr_instance);
     loader_platform_thread_unlock_mutex(&loader_lock);
 
-    // Unload preloaded layers, so if vkEnumerateInstanceExtensionProperties or vkCreateInstance is called again, the ICD's are up
-    // to date
+    // Unload preloaded layers, so if vkEnumerateInstanceExtensionProperties or vkCreateInstance is called again, the ICD's are
+    // up to date
     loader_unload_preloaded_icds();
 }
 
@@ -714,13 +825,13 @@
 
     inst = loader_get_instance(instance);
     if (NULL == inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumeratePhysicalDevices: Invalid instance [VUID-vkEnumeratePhysicalDevices-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
 
     if (NULL == pPhysicalDeviceCount) {
-        loader_log(inst, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(inst, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumeratePhysicalDevices: Received NULL pointer for physical device count return value. "
                    "[VUID-vkEnumeratePhysicalDevices-pPhysicalDeviceCount-parameter]");
         res = VK_ERROR_INITIALIZATION_FAILED;
@@ -750,7 +861,7 @@
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
         loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
             "vkGetPhysicalDeviceFeatures: Invalid physicalDevice [VUID-vkGetPhysicalDeviceFeatures-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -763,7 +874,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceFormatProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceFormatProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -778,7 +889,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceImageFormatProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -793,9 +904,9 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
-            "vkGetPhysicalDeviceProperties: Invalid physicalDevice [VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter]");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetPhysicalDeviceProperties: Invalid physicalDevice "
+                   "[VUID-vkGetPhysicalDeviceProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     disp = loader_get_instance_layer_dispatch(physicalDevice);
@@ -808,7 +919,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceQueueFamilyProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceQueueFamilyProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -822,7 +933,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceMemoryProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceMemoryProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -834,7 +945,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo,
                                                             const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) {
     if (VK_NULL_HANDLE == loader_unwrap_physical_device(physicalDevice)) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDevice: Invalid physicalDevice [VUID-vkCreateDevice-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -852,7 +963,7 @@
     }
     disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDevice: Invalid device [VUID-vkDestroyDevice-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -872,7 +983,7 @@
     const VkLayerInstanceDispatchTable *disp;
     phys_dev = (struct loader_physical_device_tramp *)physicalDevice;
     if (VK_NULL_HANDLE == physicalDevice || PHYS_TRAMP_MAGIC_NUMBER != phys_dev->magic) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumerateDeviceExtensionProperties: Invalid physicalDevice "
                    "[VUID-vkEnumerateDeviceExtensionProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -896,8 +1007,6 @@
                                                                               VkLayerProperties *pProperties) {
     uint32_t copy_size;
     struct loader_physical_device_tramp *phys_dev;
-    struct loader_layer_list *enabled_layers, layers_list;
-    memset(&layers_list, 0, sizeof(layers_list));
     loader_platform_thread_lock_mutex(&loader_lock);
 
     // Don't dispatch this call down the instance chain, want all device layers
@@ -907,7 +1016,7 @@
 
     phys_dev = (struct loader_physical_device_tramp *)physicalDevice;
     if (VK_NULL_HANDLE == physicalDevice || PHYS_TRAMP_MAGIC_NUMBER != phys_dev->magic) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEnumerateDeviceLayerProperties: Invalid physicalDevice "
                    "[VUID-vkEnumerateDeviceLayerProperties-physicalDevice-parameter]");
         loader_platform_thread_unlock_mutex(&loader_lock);
@@ -922,11 +1031,10 @@
         loader_platform_thread_unlock_mutex(&loader_lock);
         return VK_SUCCESS;
     }
-    enabled_layers = (struct loader_layer_list *)&inst->app_activated_layer_list;
 
     copy_size = (*pPropertyCount < count) ? *pPropertyCount : count;
     for (uint32_t i = 0; i < copy_size; i++) {
-        memcpy(&pProperties[i], &(enabled_layers->list[i].info), sizeof(VkLayerProperties));
+        memcpy(&pProperties[i], &(inst->app_activated_layer_list.list[i]->info), sizeof(VkLayerProperties));
     }
     *pPropertyCount = copy_size;
 
@@ -943,7 +1051,7 @@
                                                           VkQueue *pQueue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceQueue: Invalid device [VUID-vkGetDeviceQueue-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -958,7 +1066,7 @@
                                                            VkFence fence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueSubmit: Invalid queue [VUID-vkQueueSubmit-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -969,7 +1077,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(VkQueue queue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueWaitIdle: Invalid queue [VUID-vkQueueWaitIdle-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -980,7 +1088,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(VkDevice device) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDeviceWaitIdle: Invalid device [VUID-vkDeviceWaitIdle-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -992,7 +1100,7 @@
                                                               const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAllocateMemory: Invalid device [VUID-vkAllocateMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1004,7 +1112,7 @@
                                                       const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkFreeMemory: Invalid device [VUID-vkFreeMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1016,7 +1124,7 @@
                                                          VkDeviceSize size, VkFlags flags, void **ppData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkMapMemory: Invalid device [VUID-vkMapMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1027,7 +1135,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory mem) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUnmapMemory: Invalid device [VUID-vkUnmapMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1039,7 +1147,7 @@
                                                                        const VkMappedMemoryRange *pMemoryRanges) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkFlushMappedMemoryRanges: Invalid device [VUID-vkFlushMappedMemoryRanges-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1051,7 +1159,7 @@
                                                                             const VkMappedMemoryRange *pMemoryRanges) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkInvalidateMappedMemoryRanges: Invalid device [VUID-vkInvalidateMappedMemoryRanges-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1063,7 +1171,7 @@
                                                                      VkDeviceSize *pCommittedMemoryInBytes) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceMemoryCommitment: Invalid device [VUID-vkGetDeviceMemoryCommitment-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1075,7 +1183,7 @@
                                                                 VkDeviceSize offset) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindBufferMemory: Invalid device [VUID-vkBindBufferMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1087,7 +1195,7 @@
                                                                VkDeviceSize offset) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindImageMemory: Invalid device [VUID-vkBindImageMemory-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1099,7 +1207,7 @@
                                                                        VkMemoryRequirements *pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferMemoryRequirements: Invalid device [VUID-vkGetBufferMemoryRequirements-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1111,7 +1219,7 @@
                                                                       VkMemoryRequirements *pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageMemoryRequirements: Invalid device [VUID-vkGetImageMemoryRequirements-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1124,7 +1232,7 @@
                                    VkSparseImageMemoryRequirements *pSparseMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageSparseMemoryRequirements: Invalid device [VUID-vkGetImageSparseMemoryRequirements-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1138,7 +1246,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSparseImageFormatProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSparseImageFormatProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1153,7 +1261,7 @@
                                                                const VkBindSparseInfo *pBindInfo, VkFence fence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueueBindSparse: Invalid queue [VUID-vkQueueBindSparse-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1165,7 +1273,7 @@
                                                            const VkAllocationCallbacks *pAllocator, VkFence *pFence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateFence: Invalid device [VUID-vkCreateFence-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1176,7 +1284,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyFence: Invalid device [VUID-vkDestroyFence-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1187,7 +1295,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetFences: Invalid device [VUID-vkResetFences-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1198,7 +1306,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetFenceStatus: Invalid device [VUID-vkGetFenceStatus-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1210,7 +1318,7 @@
                                                              VkBool32 waitAll, uint64_t timeout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWaitForFences: Invalid device [VUID-vkWaitForFences-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1222,7 +1330,7 @@
                                                                const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSemaphore: Invalid device [VUID-vkCreateSemaphore-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1234,7 +1342,7 @@
                                                             const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySemaphore: Invalid device [VUID-vkDestroySemaphore-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1246,7 +1354,7 @@
                                                            const VkAllocationCallbacks *pAllocator, VkEvent *pEvent) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateEvent: Invalid device [VUID-vkCreateEvent-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1257,7 +1365,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyEvent: Invalid device [VUID-vkDestroyEvent-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1268,7 +1376,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(VkDevice device, VkEvent event) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetEventStatus: Invalid device [VUID-vkGetEventStatus-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1279,7 +1387,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSetEvent: Invalid device [VUID-vkSetEvent-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1290,7 +1398,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetEvent: Invalid device [VUID-vkResetEvent-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1302,7 +1410,7 @@
                                                                const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateQueryPool: Invalid device [VUID-vkCreateQueryPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1314,7 +1422,7 @@
                                                             const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyQueryPool: Invalid device [VUID-vkDestroyQueryPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1327,7 +1435,7 @@
                                                                    VkDeviceSize stride, VkQueryResultFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetQueryPoolResults: Invalid device [VUID-vkGetQueryPoolResults-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1339,7 +1447,7 @@
                                                             const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateBuffer: Invalid device [VUID-vkCreateBuffer-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1351,7 +1459,7 @@
                                                          const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyBuffer: Invalid device [VUID-vkDestroyBuffer-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1363,7 +1471,7 @@
                                                                 const VkAllocationCallbacks *pAllocator, VkBufferView *pView) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateBufferView: Invalid device [VUID-vkCreateBufferView-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1375,7 +1483,7 @@
                                                              const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyBufferView: Invalid device [VUID-vkDestroyBufferView-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1387,7 +1495,7 @@
                                                            const VkAllocationCallbacks *pAllocator, VkImage *pImage) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateImage: Invalid device [VUID-vkCreateImage-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1398,7 +1506,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyImage: Invalid device [VUID-vkDestroyImage-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1411,7 +1519,7 @@
                                                                      VkSubresourceLayout *pLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageSubresourceLayout: Invalid device [VUID-vkGetImageSubresourceLayout-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1423,7 +1531,7 @@
                                                                const VkAllocationCallbacks *pAllocator, VkImageView *pView) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateImageView: Invalid device [VUID-vkCreateImageView-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1435,7 +1543,7 @@
                                                             const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyImageView: Invalid device [VUID-vkDestroyImageView-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1448,7 +1556,7 @@
                                                                   VkShaderModule *pShader) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateShaderModule: Invalid device [VUID-vkCreateShaderModule-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1460,7 +1568,7 @@
                                                                const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyShaderModule: Invalid device [VUID-vkDestroyShaderModule-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1473,7 +1581,7 @@
                                                                    VkPipelineCache *pPipelineCache) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreatePipelineCache: Invalid device [VUID-vkCreatePipelineCache-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1485,7 +1593,7 @@
                                                                 const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyPipelineCache: Invalid device [VUID-vkDestroyPipelineCache-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1497,7 +1605,7 @@
                                                                     size_t *pDataSize, void *pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPipelineCacheData: Invalid device [VUID-vkGetPipelineCacheData-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1509,7 +1617,7 @@
                                                                    uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkMergePipelineCaches: Invalid device [VUID-vkMergePipelineCaches-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1524,7 +1632,7 @@
                                                                        VkPipeline *pPipelines) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateGraphicsPipelines: Invalid device [VUID-vkCreateGraphicsPipelines-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1539,7 +1647,7 @@
                                                                       VkPipeline *pPipelines) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateComputePipelines: Invalid device [VUID-vkCreateComputePipelines-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1551,7 +1659,7 @@
                                                            const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyPipeline: Invalid device [VUID-vkDestroyPipeline-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1564,7 +1672,7 @@
                                                                     VkPipelineLayout *pPipelineLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreatePipelineLayout: Invalid device [VUID-vkCreatePipelineLayout-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1576,7 +1684,7 @@
                                                                  const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyPipelineLayout: Invalid device [VUID-vkDestroyPipelineLayout-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1588,7 +1696,7 @@
                                                              const VkAllocationCallbacks *pAllocator, VkSampler *pSampler) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSampler: Invalid device [VUID-vkCreateSampler-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1600,7 +1708,7 @@
                                                           const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySampler: Invalid device [VUID-vkDestroySampler-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1614,7 +1722,7 @@
                                                                          VkDescriptorSetLayout *pSetLayout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDescriptorSetLayout: Invalid device [VUID-vkCreateDescriptorSetLayout-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1626,7 +1734,7 @@
                                                                       const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDescriptorSetLayout: Invalid device [VUID-vkDestroyDescriptorSetLayout-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1639,7 +1747,7 @@
                                                                     VkDescriptorPool *pDescriptorPool) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDescriptorPool: Invalid device [VUID-vkCreateDescriptorPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1651,7 +1759,7 @@
                                                                  const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDescriptorPool: Invalid device [VUID-vkDestroyDescriptorPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1663,7 +1771,7 @@
                                                                    VkDescriptorPoolResetFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetDescriptorPool: Invalid device [VUID-vkResetDescriptorPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1676,7 +1784,7 @@
                                                                       VkDescriptorSet *pDescriptorSets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAllocateDescriptorSets: Invalid device [VUID-vkAllocateDescriptorSets-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1689,7 +1797,7 @@
                                                                   const VkDescriptorSet *pDescriptorSets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkFreeDescriptorSets: Invalid device [VUID-vkFreeDescriptorSets-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1703,7 +1811,7 @@
                                                                 const VkCopyDescriptorSet *pDescriptorCopies) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUpdateDescriptorSets: Invalid device [VUID-vkUpdateDescriptorSets-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1716,7 +1824,7 @@
                                                                  VkFramebuffer *pFramebuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateFramebuffer: Invalid device [VUID-vkCreateFramebuffer-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1728,7 +1836,7 @@
                                                               const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyFramebuffer: Invalid device [VUID-vkDestroyFramebuffer-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1741,7 +1849,7 @@
                                                                 VkRenderPass *pRenderPass) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateRenderPass: Invalid device [VUID-vkCreateRenderPass-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1753,7 +1861,7 @@
                                                              const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyRenderPass: Invalid device [VUID-vkDestroyRenderPass-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1765,7 +1873,7 @@
                                                                     VkExtent2D *pGranularity) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetRenderAreaGranularity: Invalid device [VUID-vkGetRenderAreaGranularity-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1778,7 +1886,7 @@
                                                                  VkCommandPool *pCommandPool) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateCommandPool: Invalid device [VUID-vkCreateCommandPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1790,7 +1898,7 @@
                                                               const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyCommandPool: Invalid device [VUID-vkDestroyCommandPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1802,7 +1910,7 @@
                                                                 VkCommandPoolResetFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetCommandPool: Invalid device [VUID-vkResetCommandPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1816,7 +1924,7 @@
     VkResult res;
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAllocateCommandBuffers: Invalid device [VUID-vkAllocateCommandBuffers-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1837,7 +1945,7 @@
                                                               uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkFreeCommandBuffers: Invalid device [VUID-vkFreeCommandBuffers-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1851,7 +1959,7 @@
 
     disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBeginCommandBuffer: Invalid commandBuffer [VUID-vkBeginCommandBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1862,7 +1970,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkEndCommandBuffer: Invalid commandBuffer [VUID-vkEndCommandBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1873,7 +1981,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetCommandBuffer: Invalid commandBuffer [VUID-vkResetCommandBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1885,7 +1993,7 @@
                                                            VkPipeline pipeline) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindPipeline: Invalid commandBuffer [VUID-vkCmdBindPipeline-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1897,7 +2005,7 @@
                                                           uint32_t viewportCount, const VkViewport *pViewports) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetViewport: Invalid commandBuffer [VUID-vkCmdSetViewport-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1909,7 +2017,7 @@
                                                          uint32_t scissorCount, const VkRect2D *pScissors) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetScissor: Invalid commandBuffer [VUID-vkCmdSetScissor-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1920,7 +2028,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetLineWidth: Invalid commandBuffer [VUID-vkCmdSetLineWidth-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1932,7 +2040,7 @@
                                                            float depthBiasClamp, float depthBiasSlopeFactor) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthBias: Invalid commandBuffer [VUID-vkCmdSetDepthBias-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1943,7 +2051,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetBlendConstants: Invalid commandBuffer [VUID-vkCmdSetBlendConstants-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1955,7 +2063,7 @@
                                                              float maxDepthBounds) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDepthBounds: Invalid commandBuffer [VUID-vkCmdSetDepthBounds-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1967,7 +2075,7 @@
                                                                     uint32_t compareMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetStencilCompareMask: Invalid commandBuffer [VUID-vkCmdSetStencilCompareMask-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1979,7 +2087,7 @@
                                                                   uint32_t writeMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetStencilWriteMask: Invalid commandBuffer [VUID-vkCmdSetStencilWriteMask-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1991,7 +2099,7 @@
                                                                   uint32_t reference) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetStencilReference: Invalid commandBuffer [VUID-vkCmdSetStencilReference-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2006,7 +2114,7 @@
                                                                  uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindDescriptorSets: Invalid commandBuffer [VUID-vkCmdBindDescriptorSets-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2019,7 +2127,7 @@
                                                               VkIndexType indexType) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindIndexBuffer: Invalid commandBuffer [VUID-vkCmdBindIndexBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2032,7 +2140,7 @@
                                                                 const VkDeviceSize *pOffsets) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBindVertexBuffers: Invalid commandBuffer [VUID-vkCmdBindVertexBuffers-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2044,7 +2152,7 @@
                                                    uint32_t firstVertex, uint32_t firstInstance) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDraw: Invalid commandBuffer [VUID-vkCmdDraw-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2057,7 +2165,7 @@
                                                           uint32_t firstInstance) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndexed: Invalid commandBuffer [VUID-vkCmdDrawIndexed-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2069,7 +2177,7 @@
                                                            uint32_t drawCount, uint32_t stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndirect: Invalid commandBuffer [VUID-vkCmdDrawIndirect-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2081,7 +2189,7 @@
                                                                   VkDeviceSize offset, uint32_t drawCount, uint32_t stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndexedIndirect: Invalid commandBuffer [VUID-vkCmdDrawIndexedIndirect-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2092,7 +2200,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDispatch: Invalid commandBuffer [VUID-vkCmdDispatch-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2104,7 +2212,7 @@
                                                                VkDeviceSize offset) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDispatchIndirect: Invalid commandBuffer [VUID-vkCmdDispatchIndirect-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2116,7 +2224,7 @@
                                                          uint32_t regionCount, const VkBufferCopy *pRegions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyBuffer: Invalid commandBuffer [VUID-vkCmdCopyBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2130,8 +2238,8 @@
                                                         const VkImageCopy *pRegions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
-                   "vkCmdCopyImage: Invalid commandBuffer [VUID-vkCmdCopyImage-devcommandBufferice-parameter]");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdCopyImage: Invalid commandBuffer [VUID-vkCmdCopyImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
 
@@ -2144,7 +2252,7 @@
                                                         const VkImageBlit *pRegions, VkFilter filter) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBlitImage: Invalid commandBuffer [VUID-vkCmdBlitImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2157,7 +2265,7 @@
                                                                 const VkBufferImageCopy *pRegions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyBufferToImage: Invalid commandBuffer [VUID-vkCmdCopyBufferToImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2170,7 +2278,7 @@
                                                                 uint32_t regionCount, const VkBufferImageCopy *pRegions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyImageToBuffer: Invalid commandBuffer [VUID-vkCmdCopyImageToBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2182,7 +2290,7 @@
                                                            VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdUpdateBuffer: Invalid commandBuffer [VUID-vkCmdUpdateBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2194,7 +2302,7 @@
                                                          VkDeviceSize size, uint32_t data) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdFillBuffer: Invalid commandBuffer [VUID-vkCmdFillBuffer-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2207,7 +2315,7 @@
                                                               uint32_t rangeCount, const VkImageSubresourceRange *pRanges) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdClearColorImage: Invalid commandBuffer [VUID-vkCmdClearColorImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2221,7 +2329,7 @@
                                                                      uint32_t rangeCount, const VkImageSubresourceRange *pRanges) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdClearDepthStencilImage: Invalid commandBuffer [VUID-vkCmdClearDepthStencilImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2234,7 +2342,7 @@
                                                                const VkClearRect *pRects) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdClearAttachments: Invalid commandBuffer [VUID-vkCmdClearAttachments-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2248,7 +2356,7 @@
                                                            const VkImageResolve *pRegions) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdResolveImage: Invalid commandBuffer [VUID-vkCmdResolveImage-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2260,7 +2368,7 @@
                                                        VkPipelineStageFlags stageMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetEvent: Invalid commandBuffer [VUID-vkCmdSetEvent-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2272,7 +2380,7 @@
                                                          VkPipelineStageFlags stageMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdResetEvent: Invalid commandBuffer [VUID-vkCmdResetEvent-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2289,7 +2397,7 @@
                                                          const VkImageMemoryBarrier *pImageMemoryBarriers) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWaitEvents: Invalid commandBuffer [VUID-vkCmdWaitEvents-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2307,7 +2415,7 @@
                                                               const VkImageMemoryBarrier *pImageMemoryBarriers) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPipelineBarrier: Invalid commandBuffer [VUID-vkCmdPipelineBarrier-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2320,7 +2428,7 @@
                                                          VkFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginQuery: Invalid commandBuffer [VUID-vkCmdBeginQuery-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2331,7 +2439,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t slot) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndQuery: Invalid commandBuffer [VUID-vkCmdEndQuery-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2343,7 +2451,7 @@
                                                              uint32_t firstQuery, uint32_t queryCount) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdResetQueryPool: Invalid commandBuffer [VUID-vkCmdResetQueryPool-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2355,7 +2463,7 @@
                                                              VkQueryPool queryPool, uint32_t slot) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdWriteTimestamp: Invalid commandBuffer [VUID-vkCmdWriteTimestamp-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2368,7 +2476,7 @@
                                                                    VkDeviceSize dstOffset, VkDeviceSize stride, VkFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdCopyQueryPoolResults: Invalid commandBuffer [VUID-vkCmdCopyQueryPoolResults-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2381,7 +2489,7 @@
                                                             const void *pValues) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdPushConstants: Invalid commandBuffer [VUID-vkCmdPushConstants-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2394,7 +2502,7 @@
                                                               VkSubpassContents contents) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginRenderPass: Invalid commandBuffer [VUID-vkCmdBeginRenderPass-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2405,7 +2513,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdNextSubpass: Invalid commandBuffer [VUID-vkCmdNextSubpass-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2416,7 +2524,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndRenderPass: Invalid commandBuffer [VUID-vkCmdEndRenderPass-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2428,7 +2536,7 @@
                                                               const VkCommandBuffer *pCommandBuffers) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdExecuteCommands: Invalid commandBuffer [VUID-vkCmdExecuteCommands-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2448,7 +2556,7 @@
     inst = loader_get_instance(instance);
     if (NULL == inst) {
         loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
             "vkEnumeratePhysicalDeviceGroupsKHR: Invalid instance [VUID-vkEnumeratePhysicalDeviceGroups-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2482,7 +2590,7 @@
                                                                       VkPhysicalDeviceFeatures2 *pFeatures) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceFeatures2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceFeatures2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2501,7 +2609,7 @@
                                                                         VkPhysicalDeviceProperties2 *pProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2520,7 +2628,7 @@
                                                                               VkFormatProperties2 *pFormatProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceFormatProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceFormatProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2540,7 +2648,7 @@
                                           VkImageFormatProperties2 *pImageFormatProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceImageFormatProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceImageFormatProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2559,7 +2667,7 @@
     VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties2 *pQueueFamilyProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceQueueFamilyProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceQueueFamilyProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2578,7 +2686,7 @@
 vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 *pMemoryProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceMemoryProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceMemoryProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2598,7 +2706,7 @@
     VkSparseImageFormatProperties2 *pProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSparseImageFormatProperties2: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSparseImageFormatProperties2-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2618,7 +2726,7 @@
     VkExternalBufferProperties *pExternalBufferProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceExternalBufferProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceExternalBufferProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2638,7 +2746,7 @@
     VkExternalSemaphoreProperties *pExternalSemaphoreProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceExternalSemaphoreProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceExternalSemaphoreProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2660,7 +2768,7 @@
     VkExternalFenceProperties *pExternalFenceProperties) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceExternalFenceProperties: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceExternalFenceProperties-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2679,7 +2787,7 @@
                                                                  const VkBindBufferMemoryInfo *pBindInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindBufferMemory2: Invalid device [VUID-vkBindBufferMemory2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2690,7 +2798,7 @@
                                                                 const VkBindImageMemoryInfo *pBindInfos) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkBindImageMemory2: Invalid device [VUID-vkBindImageMemory2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2702,7 +2810,7 @@
                                                                             VkPeerMemoryFeatureFlags *pPeerMemoryFeatures) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupPeerMemoryFeatures: Invalid device [VUID-vkGetDeviceGroupPeerMemoryFeatures-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2712,7 +2820,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdSetDeviceMask: Invalid commandBuffer [VUID-vkCmdSetDeviceMask-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2724,7 +2832,7 @@
                                                            uint32_t groupCountZ) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDispatchBase: Invalid commandBuffer [VUID-vkCmdDispatchBase-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2735,7 +2843,7 @@
                                                                        VkMemoryRequirements2 *pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetImageMemoryRequirements2: Invalid device [VUID-vkGetImageMemoryRequirements2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2747,7 +2855,7 @@
                                                                         VkMemoryRequirements2 *pMemoryRequirements) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferMemoryRequirements2: Invalid device [VUID-vkGetBufferMemoryRequirements2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2760,7 +2868,7 @@
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
         loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
             "vkGetImageSparseMemoryRequirements2: Invalid device [VUID-vkGetImageSparseMemoryRequirements2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2771,7 +2879,7 @@
                                                            VkCommandPoolTrimFlags flags) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkTrimCommandPool: Invalid device [VUID-vkTrimCommandPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2781,7 +2889,7 @@
 LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2 *pQueueInfo, VkQueue *pQueue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceQueue2: Invalid device [VUID-vkGetDeviceQueue2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2797,7 +2905,7 @@
                                                                             VkSamplerYcbcrConversion *pYcbcrConversion) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSamplerYcbcrConversion: Invalid device [VUID-vkCreateSamplerYcbcrConversion-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2808,7 +2916,7 @@
                                                                          const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySamplerYcbcrConversion: Invalid device [VUID-vkDestroySamplerYcbcrConversion-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2820,7 +2928,7 @@
                                                                          VkDescriptorSetLayoutSupport *pSupport) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDescriptorSetLayoutSupport: Invalid device [VUID-vkGetDescriptorSetLayoutSupport-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2832,7 +2940,7 @@
                                  const VkAllocationCallbacks *pAllocator, VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDescriptorUpdateTemplate: Invalid device [VUID-vkCreateDescriptorUpdateTemplate-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2844,7 +2952,7 @@
                                                                            const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroyDescriptorUpdateTemplate: Invalid device [VUID-vkDestroyDescriptorUpdateTemplate-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2856,7 +2964,7 @@
                                                                            const void *pData) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkUpdateDescriptorSetWithTemplate: Invalid device [VUID-vkUpdateDescriptorSetWithTemplate-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2870,7 +2978,7 @@
                                                                  VkRenderPass *pRenderPass) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateRenderPass2: Invalid device [VUID-vkCreateRenderPass2-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2882,7 +2990,7 @@
                                                                const VkSubpassBeginInfo *pSubpassBeginInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdBeginRenderPass2: Invalid commandBuffer [VUID-vkCmdBeginRenderPass2-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2894,7 +3002,7 @@
                                                            const VkSubpassEndInfo *pSubpassEndInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdNextSubpass2: Invalid commandBuffer [VUID-vkCmdNextSubpass2-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2905,7 +3013,7 @@
                                                              const VkSubpassEndInfo *pSubpassEndInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdEndRenderPass2: Invalid commandBuffer [VUID-vkCmdEndRenderPass2-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2917,7 +3025,7 @@
                                                                 uint32_t maxDrawCount, uint32_t stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCmdDrawIndirectCount: Invalid commandBuffer [VUID-vkCmdDrawIndirectCount-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2930,9 +3038,9 @@
                                                                        uint32_t stride) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer);
     if (NULL == disp) {
-        loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
-            "vkCmdDrawIndexedIndirectCount: Invalid commandBuffer [VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-parameter]");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkCmdDrawIndexedIndirectCount: Invalid commandBuffer "
+                   "[VUID-vkCmdDrawIndexedIndirectCount-commandBuffer-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     disp->CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride);
@@ -2941,7 +3049,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t *pValue) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSemaphoreCounterValue: Invalid device [VUID-vkGetSemaphoreCounterValue-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2952,7 +3060,7 @@
                                                               uint64_t timeout) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkWaitSemaphores: Invalid device [VUID-vkWaitSemaphores-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2962,7 +3070,7 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo *pSignalInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkSignalSemaphore: Invalid device [VUID-vkSignalSemaphore-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2973,7 +3081,7 @@
                                                                              const VkBufferDeviceAddressInfo *pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferDeviceAddress: Invalid device [VUID-vkGetBufferDeviceAddress-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2984,7 +3092,7 @@
                                                                              const VkBufferDeviceAddressInfo *pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetBufferOpaqueCaptureAddress: Invalid device [VUID-vkGetBufferOpaqueCaptureAddress-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2995,9 +3103,9 @@
 vkGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo *pInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
-            "vkGetDeviceMemoryOpaqueCaptureAddress: Invalid device [VUID-vkGetDeviceMemoryOpaqueCaptureAddress-device-parameter]");
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   "vkGetDeviceMemoryOpaqueCaptureAddress: Invalid device "
+                   "[VUID-vkGetDeviceMemoryOpaqueCaptureAddress-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     return disp->GetDeviceMemoryOpaqueCaptureAddress(device, pInfo);
@@ -3007,7 +3115,7 @@
                                                           uint32_t queryCount) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkResetQueryPool: Invalid device [VUID-vkResetQueryPool-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
diff --git a/loader/unknown_ext_chain_gas_aarch64.S b/loader/unknown_ext_chain_gas_aarch64.S
index 1be8af9..a4078e4 100644
--- a/loader/unknown_ext_chain_gas_aarch64.S
+++ b/loader/unknown_ext_chain_gas_aarch64.S
@@ -27,7 +27,11 @@
 
 .macro PhysDevExtTramp num
 .global vkPhysDevExtTramp\num
-.hidden vkPhysDevExtTramp\num
+#if defined(__ELF__)
+ .hidden vkPhysDevExtTramp\num
+#endif
+.balign 4
+
 vkPhysDevExtTramp\num:
     ldr     x9, [x0]                                                 // Load the loader_instance_dispatch_table* into x9
     ldr     x0, [x0, PHYS_DEV_OFFSET_PHYS_DEV_TRAMP]                 // Load the unwrapped VkPhysicalDevice into x0
@@ -38,7 +42,10 @@
 
 .macro PhysDevExtTermin num
 .global vkPhysDevExtTermin\num
-.hidden vkPhysDevExtTermin\num
+#if defined(__ELF__)
+ .hidden vkPhysDevExtTermin\num
+#endif
+.balign 4
 vkPhysDevExtTermin\num:
     ldr     x9, [x0, ICD_TERM_OFFSET_PHYS_DEV_TERM]             // Load the loader_icd_term* in x9
     mov     x11, (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num)) // Put the offset into the dispatch table in x11
@@ -48,21 +55,22 @@
     br      x10                                                 // Jump to the next function in the chain
 terminError\num:
     mov     x10, (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num)) // Offset of the function name string in the instance
-    ldr     x11, [x9, INSTANCE_OFFSET_ICD_TERM] // Load the instance pointer
-    mov     x0, x11                             // Vulkan instance pointer (first arg)
-    mov     x1, VULKAN_LOADER_ERROR_BIT         // The error logging bit (second arg)
-    mov     x2, #0                              // Zero (third arg)
-    adrp    x9, termin_error_string
-    add     x3, x9, #:lo12:termin_error_string  // The error string (fourth arg)
-    ldr     x4, [x11, x10]                      // The function name (fifth arg)
-    bl      loader_log                          // Log the error message before we crash
+    ldr     x11, [x9, INSTANCE_OFFSET_ICD_TERM]   // Load the instance pointer
+    mov     x0, x11                               // Vulkan instance pointer (first arg)
+    mov     x1, VULKAN_LOADER_ERROR_BIT           // The error logging bit (second arg)
+    mov     x2, #0                                // Zero (third arg)
+    ldr     x3, [x11, x10]                        // The function name (fourth arg)
+    bl      loader_log_asm_function_not_supported // Log the error message before we crash
     mov     x0, #0
-    br      x0                                  // Crash intentionally by jumping to address zero
+    br      x0                                    // Crash intentionally by jumping to address zero
 .endm
 
 .macro DevExtTramp num
 .global vkdev_ext\num
-.hidden vkdev_ext\num
+#if defined(__ELF__)
+ .hidden vkdev_ext\num
+#endif
+.balign 4
 vkdev_ext\num:
     ldr     x9, [x0]                                              // Load the loader_instance_dispatch_table* into x9
     mov     x10, (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num)) // Offset of the desired function in the dispatch table
diff --git a/loader/unknown_ext_chain_gas_x86.S b/loader/unknown_ext_chain_gas_x86.S
index a380427..de5a920 100644
--- a/loader/unknown_ext_chain_gas_x86.S
+++ b/loader/unknown_ext_chain_gas_x86.S
@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2017-2021 The Khronos Group Inc.
-# Copyright (c) 2017-2021 Valve Corporation
-# Copyright (c) 2017-2021 LunarG, Inc.
+# Copyright (c) 2017-2023 The Khronos Group Inc.
+# Copyright (c) 2017-2023 Valve Corporation
+# Copyright (c) 2017-2023 LunarG, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -24,7 +24,9 @@
 # VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then
 # jump to the next function in the call chain
 
-#ifdef HAVE_CET_H
+# The .hidden directive is only supported in ELF executables so in APPLE builds, the directive is removed
+
+#if defined(HAVE_CET_H)
 #include <cet.h>
 #else
 #define _CET_ENDBR
@@ -37,7 +39,9 @@
 
 .macro PhysDevExtTramp num
 .global vkPhysDevExtTramp\num
+#if defined(__ELF__)
 .hidden vkPhysDevExtTramp\num
+#endif
 vkPhysDevExtTramp\num:
     _CET_ENDBR
     mov     rax, [rdi]
@@ -47,7 +51,9 @@
 
 .macro PhysDevExtTermin num
 .global vkPhysDevExtTermin\num
+#if defined(__ELF__)
 .hidden vkPhysDevExtTermin\num
+#endif
 vkPhysDevExtTermin\num:
     _CET_ENDBR
     mov     rax, [rdi + ICD_TERM_OFFSET_PHYS_DEV_TERM]                          # Store the loader_icd_term* in rax
@@ -60,7 +66,7 @@
     mov     rdi, [rax + INSTANCE_OFFSET_ICD_TERM]                               # Load the loader_instance into rdi (first arg)
     lea     rsi, [VULKAN_LOADER_ERROR_BIT]                                      # Write the error logging bit to rsi (second arg)
     xor     rdx, rdx                                                            # Set rdx to zero (third arg)
-    lea     rcx, [rip + termin_error_string]                                   # Load the error string into rcx (fourth arg)
+    lea     rcx, [rip + termin_error_string]                                    # Load the error string into rcx (fourth arg)
     mov     r8, [rdi + (FUNCTION_OFFSET_INSTANCE + (CHAR_PTR_SIZE * \num))]     # Load the func name into r8 (fifth arg)
     call    loader_log                                                          # Log the error message before we crash
     add     rsp, 56                                                             # Clean up the stack frame
@@ -70,7 +76,9 @@
 
 .macro DevExtTramp num
 .global vkdev_ext\num
+#if defined(__ELF__)
 .hidden vkdev_ext\num
+#endif
 vkdev_ext\num:
     _CET_ENDBR
     mov     rax, [rdi]                                                          # Dereference the handle to get the dispatch table
@@ -81,7 +89,9 @@
 
 .macro PhysDevExtTramp num
 .global vkPhysDevExtTramp\num
+#if defined(__ELF__)
 .hidden vkPhysDevExtTramp\num
+#endif
 vkPhysDevExtTramp\num:
     _CET_ENDBR
     mov     eax, [esp + 4]                              # Load the wrapped VkPhysicalDevice into eax
@@ -93,7 +103,9 @@
 
 .macro PhysDevExtTermin num
 .global vkPhysDevExtTermin\num
+#if defined(__ELF__)
 .hidden vkPhysDevExtTermin\num
+#endif
 vkPhysDevExtTermin\num:
     _CET_ENDBR
     mov     ecx, [esp + 4]                                                      # Move the wrapped VkPhysicalDevice into ecx
@@ -117,7 +129,9 @@
 
 .macro DevExtTramp num
 .global vkdev_ext\num
+#if defined(__ELF__)
 .hidden vkdev_ext\num
+#endif
 vkdev_ext\num:
     _CET_ENDBR
     mov     eax, dword ptr [esp + 4]                                            # Dereference the handle to get the dispatch table
diff --git a/loader/unknown_function_handling.c b/loader/unknown_function_handling.c
index 2fbb2e7..d6ebe7f 100644
--- a/loader/unknown_function_handling.c
+++ b/loader/unknown_function_handling.c
@@ -85,17 +85,16 @@
 // Look in the layers list of device extensions, which contain names of entry points. If funcName is present, return true
 // If not, call down the first layer's vkGetInstanceProcAddr to determine if any layers support the function
 bool loader_check_layer_list_for_dev_ext_address(struct loader_instance *inst, const char *funcName) {
-    struct loader_layer_properties *layer_prop_list = inst->expanded_activated_layer_list.list;
-
     // Iterate over the layers.
     for (uint32_t layer = 0; layer < inst->expanded_activated_layer_list.count; ++layer) {
         // Iterate over the extensions.
-        const struct loader_device_extension_list *const extensions = &(layer_prop_list[layer].device_extension_list);
+        const struct loader_device_extension_list *const extensions =
+            &(inst->expanded_activated_layer_list.list[layer]->device_extension_list);
         for (uint32_t extension = 0; extension < extensions->count; ++extension) {
             // Iterate over the entry points.
             const struct loader_dev_ext_props *const property = &(extensions->list[extension]);
-            for (uint32_t entry = 0; entry < property->entrypoint_count; ++entry) {
-                if (strcmp(property->entrypoints[entry], funcName) == 0) {
+            for (uint32_t entry = 0; entry < property->entrypoints.count; ++entry) {
+                if (strcmp(property->entrypoints.list[entry], funcName) == 0) {
                     return true;
                 }
             }
@@ -104,7 +103,7 @@
     // If the function pointer doesn't appear in the layer manifest for intercepted device functions, look down the
     // vkGetInstanceProcAddr chain
     if (inst->expanded_activated_layer_list.count > 0) {
-        const struct loader_layer_functions *const functions = &(layer_prop_list[0].functions);
+        const struct loader_layer_functions *const functions = &(inst->expanded_activated_layer_list.list[0]->functions);
         if (NULL != functions->get_instance_proc_addr) {
             return NULL != functions->get_instance_proc_addr((VkInstance)inst->instance, funcName);
         }
@@ -165,7 +164,7 @@
         // failed to allocate memory, return NULL
         return NULL;
     }
-    strncpy(inst->dev_ext_disp_functions[inst->dev_ext_disp_function_count], funcName, funcName_len);
+    loader_strncpy(inst->dev_ext_disp_functions[inst->dev_ext_disp_function_count], funcName_len, funcName, funcName_len);
     // init any dev dispatch table entries as needed
     loader_init_dispatch_dev_ext_entry(inst, NULL, inst->dev_ext_disp_function_count, funcName);
     void *out_function = loader_get_dev_ext_trampoline(inst->dev_ext_disp_function_count);
@@ -199,13 +198,13 @@
 }
 
 bool loader_check_layer_list_for_phys_dev_ext_address(struct loader_instance *inst, const char *funcName) {
-    struct loader_layer_properties *layer_prop_list = inst->expanded_activated_layer_list.list;
     for (uint32_t layer = 0; layer < inst->expanded_activated_layer_list.count; layer++) {
+        struct loader_layer_properties *layer_prop_list = inst->expanded_activated_layer_list.list[layer];
         // Find the first layer in the call chain which supports vk_layerGetPhysicalDeviceProcAddr
         // and call that, returning whether it found a valid pointer for this function name.
         // We return if the topmost layer supports GPDPA since the layer should call down the chain for us.
-        if (layer_prop_list[layer].interface_version > 1) {
-            const struct loader_layer_functions *const functions = &(layer_prop_list[layer].functions);
+        if (layer_prop_list->interface_version > 1) {
+            const struct loader_layer_functions *const functions = &(layer_prop_list->functions);
             if (NULL != functions->get_physical_device_proc_addr) {
                 return NULL != functions->get_physical_device_proc_addr((VkInstance)inst->instance, funcName);
             }
@@ -277,12 +276,12 @@
             // failed to allocate memory, return NULL
             return NULL;
         }
-        strncpy(inst->phys_dev_ext_disp_functions[inst->phys_dev_ext_disp_function_count], funcName, funcName_len);
+        loader_strncpy(inst->phys_dev_ext_disp_functions[inst->phys_dev_ext_disp_function_count], funcName_len, funcName,
+                       funcName_len);
 
         new_function_index = inst->phys_dev_ext_disp_function_count;
         // increment the count so that the subsequent logic includes the newly added entry point when searching for functions
         inst->phys_dev_ext_disp_function_count++;
-        has_found = true;
     }
 
     // Setup the ICD function pointers
@@ -311,7 +310,7 @@
     // point. Only set the instance dispatch table to it if it isn't NULL.
     if (is_tramp) {
         for (uint32_t i = 0; i < inst->expanded_activated_layer_list.count; i++) {
-            struct loader_layer_properties *layer_prop = &inst->expanded_activated_layer_list.list[i];
+            struct loader_layer_properties *layer_prop = inst->expanded_activated_layer_list.list[i];
             if (layer_prop->interface_version > 1 && NULL != layer_prop->functions.get_physical_device_proc_addr) {
                 void *layer_ret_function =
                     (PFN_PhysDevExt)layer_prop->functions.get_physical_device_proc_addr(inst->instance, funcName);
diff --git a/loader/vk_loader_platform.h b/loader/vk_loader_platform.h
index b3145cb..aa8aa6d 100644
--- a/loader/vk_loader_platform.h
+++ b/loader/vk_loader_platform.h
@@ -29,22 +29,26 @@
 #include <sys/select.h>
 #endif
 
-#if defined(_WIN32)
-// WinSock2.h must be included *BEFORE* windows.h
-#include <winsock2.h>
-#endif  // _WIN32
-
 #include <assert.h>
-#include <string.h>
+#include <float.h>
 #include <stdbool.h>
 #include <stdint.h>
+#include <stdio.h>
+#include <string.h>
 
 #if defined(__Fuchsia__)
 #include "dlopen_fuchsia.h"
 #endif  // defined(__Fuchsia__)
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
-    defined(__OpenBSD__)
+// Set of platforms with a common set of functionality which is queried throughout the program
+#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNX__) || defined(__FreeBSD__) || \
+    defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
+#define COMMON_UNIX_PLATFORMS 1
+#else
+#define COMMON_UNIX_PLATFORMS 0
+#endif
+
+#if COMMON_UNIX_PLATFORMS
 #include <unistd.h>
 // Note: The following file is for dynamic loading:
 #include <dlfcn.h>
@@ -54,14 +58,13 @@
 #include <stdio.h>
 #include <unistd.h>
 
-#elif defined(_WIN32)  // defined(__linux__)
-/* Windows-specific common code: */
+#elif defined(_WIN32)
 // WinBase.h defines CreateSemaphore and synchapi.h defines CreateEvent
 //  undefine them to avoid conflicts with VkLayerDispatchTable struct members.
-#ifdef CreateSemaphore
+#if defined(CreateSemaphore)
 #undef CreateSemaphore
 #endif
-#ifdef CreateEvent
+#if defined(CreateEvent)
 #undef CreateEvent
 #endif
 #include <stdio.h>
@@ -72,7 +75,9 @@
 
 #include "stack_allocation.h"
 
-#if defined(__GNUC__) && __GNUC__ >= 4
+#if defined(BUILD_STATIC_LOADER)
+#define LOADER_EXPORT
+#elif defined(__GNUC__) && __GNUC__ >= 4
 #define LOADER_EXPORT __attribute__((visibility("default")))
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
 #define LOADER_EXPORT __attribute__((visibility("default")))
@@ -84,7 +89,7 @@
 
 // This is defined in vk_layer.h, but if there's problems we need to create the define
 // here.
-#ifndef MAX_NUM_UNKNOWN_EXTS
+#if !defined(MAX_NUM_UNKNOWN_EXTS)
 #define MAX_NUM_UNKNOWN_EXTS 250
 #endif
 
@@ -98,6 +103,7 @@
 // Support added in v1.3.234 loader
 #define VK_LAYERS_ENABLE_ENV_VAR "VK_LOADER_LAYERS_ENABLE"
 #define VK_LAYERS_DISABLE_ENV_VAR "VK_LOADER_LAYERS_DISABLE"
+#define VK_LAYERS_ALLOW_ENV_VAR "VK_LOADER_LAYERS_ALLOW"
 #define VK_DRIVERS_SELECT_ENV_VAR "VK_LOADER_DRIVERS_SELECT"
 #define VK_DRIVERS_DISABLE_ENV_VAR "VK_LOADER_DRIVERS_DISABLE"
 #define VK_LOADER_DISABLE_ALL_LAYERS_VAR_1 "~all~"
@@ -109,11 +115,13 @@
 // Override layer information
 #define VK_OVERRIDE_LAYER_NAME "VK_LAYER_LUNARG_override"
 
+// Loader Settings filename
+#define VK_LOADER_SETTINGS_FILENAME "vk_loader_settings.json"
+
 #define LAYERS_PATH_ENV "VK_LAYER_PATH"
 #define ENABLED_LAYERS_ENV "VK_INSTANCE_LAYERS"
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
-    defined(__OpenBSD__)
+#if COMMON_UNIX_PLATFORMS
 /* Linux-specific common code: */
 
 // VK Library Filenames, Paths, etc.:
@@ -134,11 +142,11 @@
 #define VK_ILAYERS_INFO_RELATIVE_DIR VULKAN_DIR VULKAN_ILAYERCONF_DIR
 
 #define VK_DRIVERS_INFO_REGISTRY_LOC ""
-#define VK_SETTINGS_INFO_REGISTRY_LOC ""
 #define VK_ELAYERS_INFO_REGISTRY_LOC ""
 #define VK_ILAYERS_INFO_REGISTRY_LOC ""
+#define VK_SETTINGS_INFO_REGISTRY_LOC ""
 
-#if defined(__QNXNTO__)
+#if defined(__QNX__)
 #define SYSCONFDIR "/etc"
 #endif
 
@@ -159,8 +167,8 @@
 
 typedef pthread_cond_t loader_platform_thread_cond;
 
-#elif defined(_WIN32)  // defined(__linux__)
-
+#elif defined(_WIN32)
+/* Windows-specific common code: */
 // VK Library Filenames, Paths, etc.:
 #define PATH_SEPARATOR ';'
 #define DIRECTORY_SYMBOL '\\'
@@ -174,15 +182,15 @@
 #define VK_ELAYERS_INFO_RELATIVE_DIR ""
 #define VK_ILAYERS_INFO_RELATIVE_DIR ""
 
-#ifdef _WIN64
+#if defined(_WIN64)
 #define HKR_VK_DRIVER_NAME API_NAME "DriverName"
 #else
 #define HKR_VK_DRIVER_NAME API_NAME "DriverNameWow"
 #endif
 #define VK_DRIVERS_INFO_REGISTRY_LOC "SOFTWARE\\Khronos\\" API_NAME "\\Drivers"
-#define VK_SETTINGS_INFO_REGISTRY_LOC "SOFTWARE\\Khronos\\" API_NAME "\\Settings"
 #define VK_ELAYERS_INFO_REGISTRY_LOC "SOFTWARE\\Khronos\\" API_NAME "\\ExplicitLayers"
 #define VK_ILAYERS_INFO_REGISTRY_LOC "SOFTWARE\\Khronos\\" API_NAME "\\ImplicitLayers"
+#define VK_SETTINGS_INFO_REGISTRY_LOC "SOFTWARE\\Khronos\\" API_NAME "\\LoaderSettings"
 
 #define PRINTF_SIZE_T_SPECIFIER "%Iu"
 
@@ -200,16 +208,19 @@
 
 typedef CONDITION_VARIABLE loader_platform_thread_cond;
 
-#else  // defined(_WIN32)
+#else
 
-#error The "vk_loader_platform.h" file must be modified for this OS.
+#warning The "vk_loader_platform.h" file must be modified for this OS.
 
 // NOTE: In order to support another OS, an #elif needs to be added (above the
 // "#else // defined(_WIN32)") for that OS, and OS-specific versions of the
 // contents of this file must be created, or extend one of the existing OS specific
 // sections with the necessary changes.
 
-#endif  // defined(_WIN32)
+#endif
+
+// controls whether loader_platform_close_library() closes the libraries or not - controlled by an environment variables
+extern bool loader_disable_dynamic_library_unloading;
 
 // Returns true if the DIRECTORY_SYMBOL is contained within path
 static inline bool loader_platform_is_path(const char *path) { return strchr(path, DIRECTORY_SYMBOL) != NULL; }
@@ -234,8 +245,7 @@
 
 #endif
 
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__FreeBSD__) || \
-    defined(__OpenBSD__)
+#if COMMON_UNIX_PLATFORMS
 
 // File IO
 static inline bool loader_platform_file_exists(const char *path) {
@@ -258,7 +268,7 @@
 
 // loader_platform_executable_path finds application path + name.
 // Path cannot be longer than 1024, returns NULL if it is greater than that.
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GNU__)
 static inline char *loader_platform_executable_path(char *buffer, size_t size) {
     ssize_t count = readlink("/proc/self/exe", buffer, size);
     if (count == -1) return NULL;
@@ -266,7 +276,14 @@
     buffer[count] = '\0';
     return buffer;
 }
-#elif defined(__APPLE__)  // defined(__linux__)
+#elif defined(__APPLE__)
+#if defined(__APPLE_EMBEDDED__)
+static inline char *loader_platform_executable_path(char *buffer, size_t size) {
+    (void)size;
+    buffer[0] = '\0';
+    return buffer;
+}
+#else
 #include <libproc.h>
 static inline char *loader_platform_executable_path(char *buffer, size_t size) {
     pid_t pid = getpid();
@@ -275,6 +292,7 @@
     buffer[ret] = '\0';
     return buffer;
 }
+#endif
 #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
 #include <sys/sysctl.h>
 static inline char *loader_platform_executable_path(char *buffer, size_t size) {
@@ -306,7 +324,7 @@
 }
 #elif defined(__OpenBSD__)
 static inline char *loader_platform_executable_path(char *buffer, size_t size) { return NULL; }
-#elif defined(__QNXNTO__)
+#elif defined(__QNX__)
 
 #define SYSCONFDIR "/etc"
 
@@ -330,15 +348,15 @@
 
     return buffer;
 }
-#endif  // defined (__QNXNTO__)
+#endif  // defined (__QNX__)
 
 // Compatability with compilers that don't support __has_feature
-#ifndef __has_feature
+#if !defined(__has_feature)
 #define __has_feature(x) 0
 #endif
 
 #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
-#define LOADER_ADDRESS_SANITIZER  // TODO: Add proper build flag for ASAN support
+#define LOADER_ADDRESS_SANITIZER_ACTIVE  // TODO: Add proper build flag for ASAN support
 #endif
 
 // When loading the library, we use RTLD_LAZY so that not all symbols have to be
@@ -354,27 +372,40 @@
 static inline loader_platform_dl_handle loader_platform_open_library(const char *libPath) {
     return dlopen_fuchsia(libPath, LOADER_DLOPEN_MODE, false);
 }
-static inline void loader_platform_close_library(loader_platform_dl_handle library) { dlclose_fuchsia(library); }
 #else
 static inline loader_platform_dl_handle loader_platform_open_library(const char *libPath) {
     return dlopen(libPath, LOADER_DLOPEN_MODE);
 }
-static inline void loader_platform_close_library(loader_platform_dl_handle library) { dlclose(library); }
 #endif
 
 static inline const char *loader_platform_open_library_error(const char *libPath) {
-#ifdef __Fuchsia__
+    (void)libPath;
+#if defined(__Fuchsia__)
     return dlerror_fuchsia();
 #else
     return dlerror();
 #endif
 }
+static inline void loader_platform_close_library(loader_platform_dl_handle library) {
+    if (!loader_disable_dynamic_library_unloading) {
+#if defined(__Fuchsia__)
+        dlclose_fuchsia(library);
+#else
+        dlclose(library);
+#endif
+    } else {
+        (void)library;
+    }
+}
 static inline void *loader_platform_get_proc_address(loader_platform_dl_handle library, const char *name) {
     assert(library);
     assert(name);
     return dlsym(library, name);
 }
-static inline const char *loader_platform_get_proc_address_error(const char *name) { return dlerror(); }
+static inline const char *loader_platform_get_proc_address_error(const char *name) {
+    (void)name;
+    return dlerror();
+}
 
 // Thread mutex:
 static inline void loader_platform_thread_create_mutex(loader_platform_thread_mutex *pMutex) { pthread_mutex_init(pMutex, NULL); }
@@ -382,7 +413,19 @@
 static inline void loader_platform_thread_unlock_mutex(loader_platform_thread_mutex *pMutex) { pthread_mutex_unlock(pMutex); }
 static inline void loader_platform_thread_delete_mutex(loader_platform_thread_mutex *pMutex) { pthread_mutex_destroy(pMutex); }
 
-#elif defined(_WIN32)  // defined(__linux__)
+static inline void *thread_safe_strtok(char *str, const char *delim, char **saveptr) { return strtok_r(str, delim, saveptr); }
+
+static inline FILE *loader_fopen(const char *fileName, const char *mode) { return fopen(fileName, mode); }
+static inline char *loader_strncat(char *dest, size_t dest_sz, const char *src, size_t count) {
+    (void)dest_sz;
+    return strncat(dest, src, count);
+}
+static inline char *loader_strncpy(char *dest, size_t dest_sz, const char *src, size_t count) {
+    (void)dest_sz;
+    return strncpy(dest, src, count);
+}
+
+#elif defined(_WIN32)
 
 // Get the key for the plug n play driver registry
 // The string returned by this function should NOT be freed
@@ -424,7 +467,7 @@
 }
 
 // File IO
-static bool loader_platform_file_exists(const char *path) {
+static inline bool loader_platform_file_exists(const char *path) {
     int path_utf16_size = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
     if (path_utf16_size <= 0) {
         return false;
@@ -441,7 +484,7 @@
 
 // Returns true if the given string appears to be a relative or absolute
 // path, as opposed to a bare filename.
-static bool loader_platform_is_path_absolute(const char *path) {
+static inline bool loader_platform_is_path_absolute(const char *path) {
     if (!path || !*path) {
         return false;
     }
@@ -490,7 +533,7 @@
 }
 
 // Dynamic Loading:
-static loader_platform_dl_handle loader_platform_open_library(const char *lib_path) {
+static inline loader_platform_dl_handle loader_platform_open_library(const char *lib_path) {
     int lib_path_utf16_size = MultiByteToWideChar(CP_UTF8, 0, lib_path, -1, NULL, 0);
     if (lib_path_utf16_size <= 0) {
         return NULL;
@@ -507,32 +550,61 @@
     }
     return lib_handle;
 }
-static const char *loader_platform_open_library_error(const char *libPath) {
+static inline const char *loader_platform_open_library_error(const char *libPath) {
     static char errorMsg[512];
     (void)snprintf(errorMsg, 511, "Failed to open dynamic library \"%s\" with error %lu", libPath, GetLastError());
     return errorMsg;
 }
-static void loader_platform_close_library(loader_platform_dl_handle library) { FreeLibrary(library); }
-static void *loader_platform_get_proc_address(loader_platform_dl_handle library, const char *name) {
+static inline void loader_platform_close_library(loader_platform_dl_handle library) {
+    if (!loader_disable_dynamic_library_unloading) {
+        FreeLibrary(library);
+    } else {
+        (void)library;
+    }
+}
+static inline void *loader_platform_get_proc_address(loader_platform_dl_handle library, const char *name) {
     assert(library);
     assert(name);
     return (void *)GetProcAddress(library, name);
 }
-static const char *loader_platform_get_proc_address_error(const char *name) {
+static inline const char *loader_platform_get_proc_address_error(const char *name) {
     static char errorMsg[120];
     (void)snprintf(errorMsg, 119, "Failed to find function \"%s\" in dynamic library", name);
     return errorMsg;
 }
 
 // Thread mutex:
-static void loader_platform_thread_create_mutex(loader_platform_thread_mutex *pMutex) { InitializeCriticalSection(pMutex); }
-static void loader_platform_thread_lock_mutex(loader_platform_thread_mutex *pMutex) { EnterCriticalSection(pMutex); }
-static void loader_platform_thread_unlock_mutex(loader_platform_thread_mutex *pMutex) { LeaveCriticalSection(pMutex); }
-static void loader_platform_thread_delete_mutex(loader_platform_thread_mutex *pMutex) { DeleteCriticalSection(pMutex); }
+static inline void loader_platform_thread_create_mutex(loader_platform_thread_mutex *pMutex) { InitializeCriticalSection(pMutex); }
+static inline void loader_platform_thread_lock_mutex(loader_platform_thread_mutex *pMutex) { EnterCriticalSection(pMutex); }
+static inline void loader_platform_thread_unlock_mutex(loader_platform_thread_mutex *pMutex) { LeaveCriticalSection(pMutex); }
+static inline void loader_platform_thread_delete_mutex(loader_platform_thread_mutex *pMutex) { DeleteCriticalSection(pMutex); }
+
+static inline void *thread_safe_strtok(char *str, const char *delimiters, char **context) {
+    return strtok_s(str, delimiters, context);
+}
+
+static inline FILE *loader_fopen(const char *fileName, const char *mode) {
+    FILE *file = NULL;
+    errno_t err = fopen_s(&file, fileName, mode);
+    if (err != 0) return NULL;
+    return file;
+}
+
+static inline char *loader_strncat(char *dest, size_t dest_sz, const char *src, size_t count) {
+    errno_t err = strncat_s(dest, dest_sz, src, count);
+    if (err != 0) return NULL;
+    return dest;
+}
+
+static inline char *loader_strncpy(char *dest, size_t dest_sz, const char *src, size_t count) {
+    errno_t err = strncpy_s(dest, dest_sz, src, count);
+    if (err != 0) return NULL;
+    return dest;
+}
 
 #else  // defined(_WIN32)
 
-#error The "vk_loader_platform.h" file must be modified for this OS.
+#warning The "vk_loader_platform.h" file must be modified for this OS.
 
 // NOTE: In order to support another OS, an #elif needs to be added (above the
 // "#else // defined(_WIN32)") for that OS, and OS-specific versions of the
diff --git a/loader/vulkan.pc.in b/loader/vulkan.pc.in
index 1d38a22..6a285f2 100644
--- a/loader/vulkan.pc.in
+++ b/loader/vulkan.pc.in
@@ -1,12 +1,10 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}
-libdir=${exec_prefix}/@CMAKE_INSTALL_REL_LIBDIR_PC@
-includedir=${prefix}/@CMAKE_INSTALL_REL_INCLUDEDIR_PC@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR_PC@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR_PC@
 
-Name: @CMAKE_PROJECT_NAME@
+Name: Vulkan-Loader
 Description: Vulkan Loader
-Version: @VK_API_VERSION@
+Version: @VULKAN_LOADER_VERSION@
 Libs: -L${libdir} -lvulkan@VULKAN_LIB_SUFFIX@
-@PRIVATE_LIBS@
 Cflags: -I${includedir}
-
diff --git a/loader/wsi.c b/loader/wsi.c
index 8a97ca5..8c86733 100644
--- a/loader/wsi.c
+++ b/loader/wsi.c
@@ -44,61 +44,61 @@
             loader_inst->wsi_surface_enabled = true;
             continue;
         }
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_WIN32_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_win32_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_wayland_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_XCB_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_xcb_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_XLIB_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_xlib_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_directfb_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_ANDROID_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_android_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_MVK_MACOS_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_macos_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_MVK_IOS_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_ios_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_ggp_surface_enabled = true;
             continue;
         }
 #endif  // VK_USE_PLATFORM_GGP
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_imagepipe_surface_enabled = true;
             continue;
@@ -120,7 +120,7 @@
             continue;
         }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
         if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_NN_VI_SURFACE_EXTENSION_NAME) == 0) {
             loader_inst->wsi_vi_surface_enabled = true;
             continue;
@@ -147,19 +147,19 @@
 // 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_WAYLAND_KHR
+#if !defined(VK_USE_PLATFORM_WAYLAND_KHR)
     if (!strcmp(ext_prop->extensionName, "VK_KHR_wayland_surface")) return true;
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifndef VK_USE_PLATFORM_XCB_KHR
+#if !defined(VK_USE_PLATFORM_XCB_KHR)
     if (!strcmp(ext_prop->extensionName, "VK_KHR_xcb_surface")) return true;
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifndef VK_USE_PLATFORM_XLIB_KHR
+#if !defined(VK_USE_PLATFORM_XLIB_KHR)
     if (!strcmp(ext_prop->extensionName, "VK_KHR_xlib_surface")) return true;
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifndef VK_USE_PLATFORM_DIRECTFB_EXT
+#if !defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     if (!strcmp(ext_prop->extensionName, "VK_EXT_directfb_surface")) return true;
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifndef VK_USE_PLATFORM_SCREEN_QNX
+#if !defined(VK_USE_PLATFORM_SCREEN_QNX)
     if (!strcmp(ext_prop->extensionName, "VK_QNX_screen_surface")) return true;
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
@@ -173,7 +173,7 @@
                                                              const VkAllocationCallbacks *pAllocator) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySurfaceKHR: Invalid instance [VUID-vkDestroySurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -219,7 +219,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfaceSupportKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceSupportKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -239,13 +239,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceSupportKHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceSupportKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == pSupported) {
-        loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceSupportKHR for pSupported!\n");
+        loader_log(loader_inst, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceSupportKHR for pSupported!");
         abort();
     }
     *pSupported = false;
@@ -254,7 +254,7 @@
         // set pSupported to false as this driver doesn't support WSI functionality
         *pSupported = false;
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceSupportKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceSupportKHR!");
         return VK_SUCCESS;
     }
 
@@ -274,7 +274,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfaceCapabilitiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceCapabilitiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -294,13 +294,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceCapabilitiesKHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceCapabilitiesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == pSurfaceCapabilities) {
-        loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceCapabilitiesKHR for pSurfaceCapabilities!\n");
+        loader_log(loader_inst, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceCapabilitiesKHR for pSurfaceCapabilities!");
         abort();
     }
 
@@ -308,7 +308,7 @@
         // Zero out the capabilities as this driver doesn't support WSI functionality
         memset(pSurfaceCapabilities, 0, sizeof(VkSurfaceCapabilitiesKHR));
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!");
         return VK_SUCCESS;
     }
 
@@ -330,7 +330,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfaceFormatsKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceFormatsKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -350,13 +350,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceFormatsKHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceFormatsKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == pSurfaceFormatCount) {
-        loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceFormatsKHR for pSurfaceFormatCount!\n");
+        loader_log(loader_inst, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "NULL pointer passed into vkGetPhysicalDeviceSurfaceFormatsKHR for pSurfaceFormatCount!");
         abort();
     }
 
@@ -364,7 +364,7 @@
         // Zero out the format count as this driver doesn't support WSI functionality
         *pSurfaceFormatCount = 0;
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfaceCapabilitiesKHR!");
         return VK_SUCCESS;
     }
 
@@ -388,7 +388,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfacePresentModesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -408,13 +408,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfacePresentModesKHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfacePresentModesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == pPresentModeCount) {
-        loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "NULL pointer passed into vkGetPhysicalDeviceSurfacePresentModesKHR for pPresentModeCount!\n");
+        loader_log(loader_inst, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0,
+                   "NULL pointer passed into vkGetPhysicalDeviceSurfacePresentModesKHR for pPresentModeCount!");
         abort();
     }
 
@@ -422,7 +422,7 @@
         // Zero out the present mode count as this driver doesn't support WSI functionality
         *pPresentModeCount = 0;
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfacePresentModesKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceSurfacePresentModesKHR!");
         return VK_SUCCESS;
     }
 
@@ -445,14 +445,14 @@
                                                                   VkSwapchainKHR *pSwapchain) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSwapchainKHR: Invalid device [VUID-vkCreateSwapchainKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     if (NULL == disp->CreateSwapchainKHR) {
         struct loader_device *dev = *((struct loader_device **)device);
         loader_log(NULL != dev ? dev->phys_dev_term->this_icd_term->this_instance : NULL,
-                   VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+                   VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSwapchainKHR: Driver's function pointer was NULL, returning VK_SUCCESS. Was the VK_KHR_swapchain "
                    "extension enabled?");
         abort();
@@ -466,20 +466,20 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSwapchainKHR Terminator: device handle. This is likely the result of a "
                    "layer wrapping device handles and failing to unwrap them in all functions. "
                    "[VUID-vkCreateSwapchainKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     if (NULL == pCreateInfo) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSwapchainKHR: Invalid pCreateInfo pointer [VUID-vkCreateSwapchainKHR-pCreateInfo-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     // Need to gracefully handle the function pointer not being found.
     if (NULL == dev->loader_dispatch.extension_terminator_dispatch.CreateSwapchainKHR) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSwapchainKHR: Driver's function pointer was NULL, returning VK_SUCCESS. Was the VK_KHR_swapchain "
                    "extension enabled?");
         return VK_SUCCESS;
@@ -508,7 +508,7 @@
                                                                const VkAllocationCallbacks *pAllocator) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkDestroySwapchainKHR: Invalid device [VUID-vkDestroySwapchainKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -520,7 +520,7 @@
                                                                      uint32_t *pSwapchainImageCount, VkImage *pSwapchainImages) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetSwapchainImagesKHR: Invalid device [VUID-vkGetSwapchainImagesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -532,7 +532,7 @@
                                                                    VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireNextImageKHR: Invalid device [VUID-vkAcquireNextImageKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -543,14 +543,14 @@
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(queue);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkQueuePresentKHR: Invalid queue [VUID-vkQueuePresentKHR-queue-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
     return disp->QueuePresentKHR(queue, pPresentInfo);
 }
 
-static VkIcdSurface *AllocateIcdSurfaceStruct(struct loader_instance *instance, size_t base_size, size_t platform_size) {
+VkIcdSurface *AllocateIcdSurfaceStruct(struct loader_instance *instance, size_t base_size, size_t platform_size) {
     // Next, if so, proceed with the implementation of this function:
     VkIcdSurface *pIcdSurface = loader_instance_heap_alloc(instance, sizeof(VkIcdSurface), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
     if (pIcdSurface != NULL) {
@@ -571,7 +571,7 @@
     return pIcdSurface;
 }
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 
 // Functions for the VK_KHR_win32_surface extension:
 
@@ -582,7 +582,7 @@
                                                                      VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateWin32SurfaceKHR: Invalid instance [VUID-vkCreateWin32SurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -602,7 +602,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_win32_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_win32_surface extension not enabled. vkCreateWin32SurfaceKHR not executed!\n");
+                   "VK_KHR_win32_surface extension not enabled. vkCreateWin32SurfaceKHR not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -659,7 +659,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceWin32PresentationSupportKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceWin32PresentationSupportKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -678,14 +678,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_win32_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_win32_surface extension not enabled. vkGetPhysicalDeviceWin32PresentationSupportKHR not executed!\n");
+                   "VK_KHR_win32_surface extension not enabled. vkGetPhysicalDeviceWin32PresentationSupportKHR not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceWin32PresentationSupportKHR) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceWin32PresentationSupportKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceWin32PresentationSupportKHR!");
         return VK_FALSE;
     }
 
@@ -693,7 +693,7 @@
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 
 // This is the trampoline entrypoint for CreateWaylandSurfaceKHR
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(VkInstance instance,
@@ -702,7 +702,7 @@
                                                                        VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateWaylandSurfaceKHR: Invalid instance [VUID-vkCreateWaylandSurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -721,7 +721,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_wayland_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_wayland_surface extension not enabled. vkCreateWaylandSurfaceKHR not executed!\n");
+                   "VK_KHR_wayland_surface extension not enabled. vkCreateWaylandSurfaceKHR not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -779,7 +779,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceWaylandPresentationSupportKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceWaylandPresentationSupportKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -798,16 +798,15 @@
     struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_wayland_surface_enabled) {
-        loader_log(
-            loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-            "VK_KHR_wayland_surface extension not enabled. vkGetPhysicalDeviceWaylandPresentationSupportKHR not executed!\n");
+        loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
+                   "VK_KHR_wayland_surface extension not enabled. vkGetPhysicalDeviceWaylandPresentationSupportKHR not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceWaylandPresentationSupportKHR) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceWaylandPresentationSupportKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceWaylandPresentationSupportKHR!");
         return VK_FALSE;
     }
 
@@ -815,7 +814,7 @@
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 
 // Functions for the VK_KHR_xcb_surface extension:
 
@@ -826,7 +825,7 @@
                                                                    VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateXcbSurfaceKHR: Invalid instance [VUID-vkCreateXcbSurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -844,7 +843,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_xcb_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_xcb_surface extension not enabled. vkCreateXcbSurfaceKHR not executed!\n");
+                   "VK_KHR_xcb_surface extension not enabled. vkCreateXcbSurfaceKHR not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -903,7 +902,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceXcbPresentationSupportKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceXcbPresentationSupportKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -924,14 +923,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_xcb_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_xcb_surface extension not enabled. vkGetPhysicalDeviceXcbPresentationSupportKHR not executed!\n");
+                   "VK_KHR_xcb_surface extension not enabled. vkGetPhysicalDeviceXcbPresentationSupportKHR not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceXcbPresentationSupportKHR) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceXcbPresentationSupportKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceXcbPresentationSupportKHR!");
         return VK_FALSE;
     }
 
@@ -940,7 +939,7 @@
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 
 // Functions for the VK_KHR_xlib_surface extension:
 
@@ -951,7 +950,7 @@
                                                                     VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateXlibSurfaceKHR: Invalid instance [VUID-vkCreateXlibSurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -969,7 +968,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_xlib_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_xlib_surface extension not enabled. vkCreateXlibSurfaceKHR not executed!\n");
+                   "VK_KHR_xlib_surface extension not enabled. vkCreateXlibSurfaceKHR not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1027,7 +1026,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceXlibPresentationSupportKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceXlibPresentationSupportKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1047,14 +1046,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_xlib_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_xlib_surface extension not enabled. vkGetPhysicalDeviceXlibPresentationSupportKHR not executed!\n");
+                   "VK_KHR_xlib_surface extension not enabled. vkGetPhysicalDeviceXlibPresentationSupportKHR not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceXlibPresentationSupportKHR) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceXlibPresentationSupportKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceXlibPresentationSupportKHR!");
         return VK_FALSE;
     }
 
@@ -1062,7 +1061,7 @@
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 
 // Functions for the VK_EXT_directfb_surface extension:
 
@@ -1073,7 +1072,7 @@
                                                                         VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDirectFBSurfaceEXT: Invalid instance [VUID-vkCreateDirectFBSurfaceEXT-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1093,7 +1092,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_directfb_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_EXT_directfb_surface extension not enabled. vkCreateDirectFBSurfaceEXT not executed!\n");
+                   "VK_EXT_directfb_surface extension not enabled. vkCreateDirectFBSurfaceEXT not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1152,7 +1151,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceDirectFBPresentationSupportEXT: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceDirectFBPresentationSupportEXT-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1173,14 +1172,14 @@
     if (!loader_inst->wsi_directfb_surface_enabled) {
         loader_log(
             loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-            "VK_EXT_directfb_surface extension not enabled. vkGetPhysicalDeviceDirectFBPresentationSupportKHR not executed!\n");
+            "VK_EXT_directfb_surface extension not enabled. vkGetPhysicalDeviceDirectFBPresentationSupportKHR not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceDirectFBPresentationSupportEXT) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceDirectFBPresentationSupportEXT!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceDirectFBPresentationSupportEXT!");
         return VK_FALSE;
     }
 
@@ -1189,7 +1188,7 @@
 
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 
 // Functions for the VK_KHR_android_surface extension:
 
@@ -1200,7 +1199,7 @@
                                                                        VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateAndroidSurfaceKHR: Invalid instance [VUID-vkCreateAndroidSurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1215,7 +1214,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkCreateAndroidSurfaceKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkCreateAndroidSurfaceKHR not executed!");
         return VK_ERROR_EXTENSION_NOT_PRESENT;
     }
 
@@ -1244,7 +1243,7 @@
                                                                         VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateHeadlessSurfaceEXT: Invalid instance [VUID-vkCreateHeadlessSurfaceEXT-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1263,7 +1262,7 @@
     if (!inst->wsi_headless_surface_enabled) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
                    "VK_EXT_headless_surface extension not enabled.  "
-                   "vkCreateHeadlessSurfaceEXT not executed!\n");
+                   "vkCreateHeadlessSurfaceEXT not executed!");
         return VK_SUCCESS;
     }
 
@@ -1309,7 +1308,7 @@
     return vkRes;
 }
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 
 // Functions for the VK_MVK_macos_surface extension:
 
@@ -1320,7 +1319,7 @@
                                                                      VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateMacOSSurfaceMVK: Invalid instance [VUID-vkCreateMacOSSurfaceMVK-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1338,7 +1337,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_macos_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_MVK_macos_surface extension not enabled. vkCreateMacOSSurfaceMVK not executed!\n");
+                   "VK_MVK_macos_surface extension not enabled. vkCreateMacOSSurfaceMVK not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1389,7 +1388,7 @@
 
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 
 // Functions for the VK_MVK_ios_surface extension:
 
@@ -1400,7 +1399,7 @@
                                                                    VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateIOSSurfaceMVK: Invalid instance [VUID-vkCreateIOSSurfaceMVK-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1414,7 +1413,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_ios_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_MVK_ios_surface extension not enabled. vkCreateIOSSurfaceMVK not executed!\n");
+                   "VK_MVK_ios_surface extension not enabled. vkCreateIOSSurfaceMVK not executed!");
         return VK_ERROR_EXTENSION_NOT_PRESENT;
     }
 
@@ -1435,7 +1434,7 @@
 
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 
 // Functions for the VK_GGP_stream_descriptor_surface extension:
 
@@ -1446,7 +1445,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
         loader_log(
-            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
             "vkCreateStreamDescriptorSurfaceGGP: Invalid instance [VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1466,7 +1465,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_ggp_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_GGP_stream_descriptor_surface extension not enabled. vkCreateStreamDescriptorSurfaceGGP not executed!\n");
+                   "VK_GGP_stream_descriptor_surface extension not enabled. vkCreateStreamDescriptorSurfaceGGP not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1524,7 +1523,7 @@
                                                                      VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateMetalSurfaceEXT: Invalid instance [VUID-vkCreateMetalSurfaceEXT-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1541,7 +1540,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_metal_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_EXT_metal_surface extension not enabled. vkCreateMetalSurfaceEXT will not be executed.\n");
+                   "VK_EXT_metal_surface extension not enabled. vkCreateMetalSurfaceEXT will not be executed.");
     }
 
     // Next, if so, proceed with the implementation of this function:
@@ -1587,7 +1586,7 @@
 
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 
 // This is the trampoline entrypoint for CreateScreenSurfaceQNX
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(VkInstance instance,
@@ -1596,7 +1595,7 @@
                                                                       VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateScreenSurfaceQNX: Invalid instance [VUID-vkCreateScreenSurfaceQNX-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1615,7 +1614,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_screen_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_QNX_screen_surface extension not enabled. vkCreateScreenSurfaceQNX not executed!\n");
+                   "VK_QNX_screen_surface extension not enabled. vkCreateScreenSurfaceQNX not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1672,7 +1671,7 @@
                                                                                              struct _screen_window *window) {
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceScreenPresentationSupportQNX: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1693,14 +1692,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_screen_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_QNX_screen_surface extension not enabled. vkGetPhysicalDeviceScreenPresentationSupportQNX not executed!\n");
+                   "VK_QNX_screen_surface extension not enabled. vkGetPhysicalDeviceScreenPresentationSupportQNX not executed!");
         return VK_FALSE;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceScreenPresentationSupportQNX) {
         // return VK_FALSE as this driver doesn't support WSI functionality
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceScreenPresentationSupportQNX!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceScreenPresentationSupportQNX!");
         return VK_FALSE;
     }
 
@@ -1708,7 +1707,7 @@
 }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
 
 // Functions for the VK_NN_vi_surface extension:
 
@@ -1717,7 +1716,7 @@
                                                                  const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateViSurfaceNN: Invalid instance [VUID-vkCreateViSurfaceNN-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -1735,7 +1734,7 @@
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (!loader_inst->wsi_vi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_NN_vi_surface extension not enabled. vkCreateViSurfaceNN not executed!\n");
+                   "VK_NN_vi_surface extension not enabled. vkCreateViSurfaceNN not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -1793,7 +1792,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceDisplayPropertiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceDisplayPropertiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1812,13 +1811,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkGetPhysicalDeviceDisplayPropertiesKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkGetPhysicalDeviceDisplayPropertiesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceDisplayPropertiesKHR) {
         loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPropertiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPropertiesKHR!");
         // return 0 for property count as this driver doesn't support WSI functionality
         if (pPropertyCount) {
             *pPropertyCount = 0;
@@ -1834,7 +1833,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceDisplayPlanePropertiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceDisplayPlanePropertiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1853,13 +1852,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkGetPhysicalDeviceDisplayPlanePropertiesKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkGetPhysicalDeviceDisplayPlanePropertiesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == icd_term->dispatch.GetPhysicalDeviceDisplayPlanePropertiesKHR) {
         loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPlanePropertiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetPhysicalDeviceDisplayPlanePropertiesKHR!");
         // return 0 for property count as this driver doesn't support WSI functionality
         if (pPropertyCount) {
             *pPropertyCount = 0;
@@ -1876,7 +1875,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDisplayPlaneSupportedDisplaysKHR: Invalid physicalDevice "
                    "[VUID-vkGetDisplayPlaneSupportedDisplaysKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1894,13 +1893,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkGetDisplayPlaneSupportedDisplaysKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkGetDisplayPlaneSupportedDisplaysKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == icd_term->dispatch.GetDisplayPlaneSupportedDisplaysKHR) {
         loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "ICD for selected physical device does not export vkGetDisplayPlaneSupportedDisplaysKHR!\n");
+                   "ICD for selected physical device does not export vkGetDisplayPlaneSupportedDisplaysKHR!");
         // return 0 for property count as this driver doesn't support WSI functionality
         if (pDisplayCount) {
             *pDisplayCount = 0;
@@ -1917,7 +1916,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDisplayModePropertiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetDisplayModePropertiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1936,13 +1935,13 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkGetDisplayModePropertiesKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkGetDisplayModePropertiesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == icd_term->dispatch.GetDisplayModePropertiesKHR) {
         loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "ICD for selected physical device does not export vkGetDisplayModePropertiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetDisplayModePropertiesKHR!");
         // return 0 for property count as this driver doesn't support WSI functionality
         if (pPropertyCount) {
             *pPropertyCount = 0;
@@ -1960,7 +1959,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDisplayModeKHR: Invalid physicalDevice "
                    "[VUID-vkCreateDisplayModeKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -1979,14 +1978,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkCreateDisplayModeKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkCreateDisplayModeKHR not executed!");
         return VK_ERROR_EXTENSION_NOT_PRESENT;
     }
 
     if (NULL == icd_term->dispatch.CreateDisplayModeKHR) {
         // Can't emulate, so return an appropriate error
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "ICD for selected physical device does not export vkCreateDisplayModeKHR!\n");
+                   "ICD for selected physical device does not export vkCreateDisplayModeKHR!");
         return VK_ERROR_INITIALIZATION_FAILED;
     }
 
@@ -1999,7 +1998,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDisplayPlaneCapabilitiesKHR: Invalid physicalDevice "
                    "[VUID-vkGetDisplayPlaneCapabilitiesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2018,14 +2017,14 @@
     struct loader_instance *loader_inst = (struct loader_instance *)icd_term->this_instance;
     if (!loader_inst->wsi_display_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_display extension not enabled. vkGetDisplayPlaneCapabilitiesKHR not executed!\n");
+                   "VK_KHR_display extension not enabled. vkGetDisplayPlaneCapabilitiesKHR not executed!");
         return VK_SUCCESS;
     }
 
     if (NULL == icd_term->dispatch.GetDisplayPlaneCapabilitiesKHR) {
         // Emulate support
         loader_log(loader_inst, VULKAN_LOADER_WARN_BIT, 0,
-                   "ICD for selected physical device does not export vkGetDisplayPlaneCapabilitiesKHR!\n");
+                   "ICD for selected physical device does not export vkGetDisplayPlaneCapabilitiesKHR!");
         if (pCapabilities) {
             memset(pCapabilities, 0, sizeof(VkDisplayPlaneCapabilitiesKHR));
         }
@@ -2041,7 +2040,7 @@
                                                                             VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateDisplayPlaneSurfaceKHR: Invalid instance [VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2060,7 +2059,7 @@
 
     if (!inst->wsi_display_enabled) {
         loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkCreateDisplayPlaneSurfaceKHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkCreateDisplayPlaneSurfaceKHR not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -2123,7 +2122,7 @@
                                                                          VkSwapchainKHR *pSwapchains) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSharedSwapchainsKHR: Invalid device [VUID-vkCreateSharedSwapchainsKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2138,7 +2137,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateSharedSwapchainsKHR Terminator: Invalid device handle. This is likely the result of a "
                    "layer wrapping device handles and failing to unwrap them in all functions. "
                    "[VUID-vkCreateSharedSwapchainsKHR-device-parameter]");
@@ -2174,7 +2173,7 @@
 vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR *pDeviceGroupPresentCapabilities) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupPresentCapabilitiesKHR: Invalid device "
                    "[VUID-vkGetDeviceGroupPresentCapabilitiesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2186,7 +2185,7 @@
                                                                                     VkDeviceGroupPresentModeFlagsKHR *pModes) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupSurfacePresentModesKHR: Invalid device "
                    "[VUID-vkGetDeviceGroupSurfacePresentModesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2200,7 +2199,7 @@
     struct loader_device *dev;
     struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
     if (NULL == icd_term || NULL == dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDeviceGroupSurfacePresentModesKHR: Invalid device "
                    "[VUID-vkGetDeviceGroupSurfacePresentModesKHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2226,7 +2225,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDevicePresentRectanglesKHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDevicePresentRectanglesKHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2262,7 +2261,7 @@
                                                                     uint32_t *pImageIndex) {
     const VkLayerDispatchTable *disp = loader_get_dispatch(device);
     if (NULL == disp) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkAcquireNextImage2KHR: Invalid device [VUID-vkAcquireNextImage2KHR-device-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2277,7 +2276,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceDisplayProperties2KHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceDisplayProperties2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2332,7 +2331,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceDisplayPlaneProperties2KHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceDisplayPlaneProperties2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2389,7 +2388,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDisplayModeProperties2KHR: Invalid physicalDevice "
                    "[VUID-vkGetDisplayModeProperties2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2445,7 +2444,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetDisplayPlaneCapabilities2KHR: Invalid physicalDevice "
                    "[VUID-vkGetDisplayPlaneCapabilities2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2482,7 +2481,7 @@
                                                              pDisplayPlaneInfo->planeIndex, &pCapabilities->capabilities);
 }
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 
 // This is the trampoline entrypoint for CreateImagePipeSurfaceFUCHSIA
 LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(VkInstance instance,
@@ -2491,7 +2490,7 @@
                                                                              VkSurfaceKHR *pSurface) {
     struct loader_instance *loader_inst = loader_get_instance(instance);
     if (NULL == loader_inst) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkCreateImagePipeSurfaceFUCHSIA: Invalid instance [VUID-vkCreateImagePipeSurfaceFUCHSIA-instance-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
     }
@@ -2515,7 +2514,7 @@
     if (!loader_inst->wsi_imagepipe_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
                    "VK_FUCHSIA_imagepipe_surface extension not enabled.  "
-                   "vkCreateImagePipeSurfaceFUCHSIA not executed!\n");
+                   "vkCreateImagePipeSurfaceFUCHSIA not executed!");
         vkRes = VK_ERROR_EXTENSION_NOT_PRESENT;
         goto out;
     }
@@ -2571,7 +2570,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfaceCapabilities2KHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2589,7 +2588,7 @@
 
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceCapabilities2KHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceCapabilities2KHR not executed!");
         return VK_SUCCESS;
     }
 
@@ -2662,7 +2661,7 @@
     const VkLayerInstanceDispatchTable *disp;
     VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
     if (VK_NULL_HANDLE == unwrapped_phys_dev) {
-        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
+        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
                    "vkGetPhysicalDeviceSurfaceFormats2KHR: Invalid physicalDevice "
                    "[VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter]");
         abort(); /* Intentionally fail so user can correct issue. */
@@ -2681,7 +2680,7 @@
 
     if (!loader_inst->wsi_surface_enabled) {
         loader_log(loader_inst, VULKAN_LOADER_ERROR_BIT, 0,
-                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceFormats2KHR not executed!\n");
+                   "VK_KHR_surface extension not enabled. vkGetPhysicalDeviceSurfaceFormats2KHR not executed!");
         return VK_SUCCESS;
     }
 
@@ -2833,7 +2832,7 @@
         return true;
     }
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 
     // Functions for the VK_KHR_win32_surface extension:
     if (!strcmp("vkCreateWin32SurfaceKHR", name)) {
@@ -2845,7 +2844,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 
     // Functions for the VK_KHR_wayland_surface extension:
     if (!strcmp("vkCreateWaylandSurfaceKHR", name)) {
@@ -2857,7 +2856,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 
     // Functions for the VK_KHR_xcb_surface extension:
     if (!strcmp("vkCreateXcbSurfaceKHR", name)) {
@@ -2869,7 +2868,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 
     // Functions for the VK_KHR_xlib_surface extension:
     if (!strcmp("vkCreateXlibSurfaceKHR", name)) {
@@ -2881,7 +2880,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 
     // Functions for the VK_EXT_directfb_surface extension:
     if (!strcmp("vkCreateDirectFBSurfaceEXT", name)) {
@@ -2893,7 +2892,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 
     // Functions for the VK_KHR_android_surface extension:
     if (!strcmp("vkCreateAndroidSurfaceKHR", name)) {
@@ -2902,7 +2901,7 @@
     }
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 
     // Functions for the VK_MVK_macos_surface extension:
     if (!strcmp("vkCreateMacOSSurfaceMVK", name)) {
@@ -2910,7 +2909,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 
     // Functions for the VK_MVK_ios_surface extension:
     if (!strcmp("vkCreateIOSSurfaceMVK", name)) {
@@ -2918,7 +2917,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 
     // Functions for the VK_GGP_stream_descriptor_surface extension:
     if (!strcmp("vkCreateStreamDescriptorSurfaceGGP", name)) {
@@ -2926,7 +2925,7 @@
         return true;
     }
 #endif  // VK_USE_PLATFORM_GGP
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 
     // Functions for the VK_FUCHSIA_imagepipe_surface extension:
     if (!strcmp("vkCreateImagePipeSurfaceFUCHSIA", name)) {
@@ -2950,7 +2949,7 @@
     }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 
     // Functions for the VK_QNX_screen_surface extension:
     if (!strcmp("vkCreateScreenSurfaceQNX", name)) {
@@ -2963,7 +2962,7 @@
     }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
 
     // Functions for the VK_NN_vi_surface extension:
     if (!strcmp("vkCreateViSurfaceNN", name)) {
diff --git a/loader/wsi.h b/loader/wsi.h
index 1d9fa68..07cc3f2 100644
--- a/loader/wsi.h
+++ b/loader/wsi.h
@@ -26,37 +26,37 @@
 
 typedef struct {
     union {
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
         VkIcdSurfaceWayland wayland_surf;
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
         VkIcdSurfaceWin32 win_surf;
 #endif  // VK_USE_PLATFORM_WIN32_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
         VkIcdSurfaceXcb xcb_surf;
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
         VkIcdSurfaceXlib xlib_surf;
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
         VkIcdSurfaceDirectFB directfb_surf;
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
         VkIcdSurfaceMacOS macos_surf;
 #endif  // VK_USE_PLATFORM_MACOS_MVK
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
         VkIcdSurfaceGgp ggp_surf;
 #endif  // VK_USE_PLATFORM_GGP
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
         VkIcdSurfaceImagePipe imagepipe_surf;
 #endif  // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
         VkIcdSurfaceMetal metal_surf;
 #endif  // VK_USE_PLATFORM_METAL_EXT
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
         VkIcdSurfaceScreen screen_surf;
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
         VkIcdSurfaceVi vi_surf;
 #endif  // VK_USE_PLATFORM_VI_NN
         VkIcdSurfaceDisplay display_surf;
@@ -103,13 +103,13 @@
 VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface,
                                                                                VkDeviceGroupPresentModeFlagsKHR *pModes);
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
                                                                 const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 VKAPI_ATTR VkBool32 VKAPI_CALL terminator_GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                                                                        uint32_t queueFamilyIndex);
 #endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWaylandSurfaceKHR(VkInstance instance,
                                                                   const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
                                                                   const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
@@ -117,7 +117,7 @@
                                                                                          uint32_t queueFamilyIndex,
                                                                                          struct wl_display *display);
 #endif
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
                                                               const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 
@@ -126,14 +126,14 @@
                                                                                      xcb_connection_t *connection,
                                                                                      xcb_visualid_t visual_id);
 #endif
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
                                                                const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 VKAPI_ATTR VkBool32 VKAPI_CALL terminator_GetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice,
                                                                                       uint32_t queueFamilyIndex, Display *dpy,
                                                                                       VisualID visualID);
 #endif
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDirectFBSurfaceEXT(VkInstance instance,
                                                                    const VkDirectFBSurfaceCreateInfoEXT *pCreateInfo,
                                                                    const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
@@ -141,15 +141,15 @@
                                                                                           uint32_t queueFamilyIndex,
                                                                                           IDirectFB *dfb);
 #endif
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK *pCreateInfo,
                                                                 const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 #endif
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo,
                                                               const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 #endif
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 VKAPI_ATTR VkResult VKAPI_CALL
 terminator_CreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP *pCreateInfo,
                                             const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
@@ -158,7 +158,7 @@
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT *pCreateInfo,
                                                                 const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 #endif
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateScreenSurfaceQNX(VkInstance instance,
                                                                  const VkScreenSurfaceCreateInfoQNX *pCreateInfo,
                                                                  const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
@@ -166,7 +166,7 @@
                                                                                         uint32_t queueFamilyIndex,
                                                                                         struct _screen_window *window);
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN *pCreateInfo,
                                                             const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
 #endif  // VK_USE_PLATFORM_VI_NN
@@ -216,14 +216,14 @@
 VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice,
                                                                           const VkDisplayPlaneInfo2KHR *pDisplayPlaneInfo,
                                                                           VkDisplayPlaneCapabilities2KHR *pCapabilities);
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateImagePipeSurfaceFUCHSIA(VkInstance instance,
                                                                         const VkImagePipeSurfaceCreateInfoFUCHSIA *pCreateInfo,
                                                                         const VkAllocationCallbacks *pAllocator,
                                                                         VkSurfaceKHR *pSurface);
 #endif
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateAndroidSurfaceKHR(VkInstance instance,
                                                                   const VkAndroidSurfaceCreateInfoKHR *pCreateInfo,
                                                                   const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
new file mode 100644
index 0000000..4fce83e
--- /dev/null
+++ b/scripts/CMakeLists.txt
@@ -0,0 +1,113 @@
+# ~~~
+# Copyright (c) 2023 LunarG, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ~~~
+
+option(UPDATE_DEPS "Run update_deps.py for user")
+if (UPDATE_DEPS)
+    find_package(Python3 REQUIRED QUIET)
+
+    set(update_dep_py "${CMAKE_CURRENT_LIST_DIR}/update_deps.py")
+    set(known_good_json "${CMAKE_CURRENT_LIST_DIR}/known_good.json")
+
+    set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${update_dep_py} ${known_good_json})
+
+    list(APPEND update_dep_command "${update_dep_py}")
+    list(APPEND update_dep_command "--generator")
+    list(APPEND update_dep_command "${CMAKE_GENERATOR}")
+
+    if (CMAKE_GENERATOR_PLATFORM)
+        list(APPEND update_dep_command "--arch")
+        list(APPEND update_dep_command "${CMAKE_GENERATOR_PLATFORM}")
+    endif()
+
+    if (NOT CMAKE_BUILD_TYPE)
+        message(WARNING "CMAKE_BUILD_TYPE not set. Using Debug for dependency build type")
+        set(_build_type Debug)
+    else()
+        set(_build_type ${CMAKE_BUILD_TYPE})
+    endif()
+    list(APPEND update_dep_command "--config")
+    list(APPEND update_dep_command "${_build_type}")
+
+    set(UPDATE_DEPS_DIR_SUFFIX "${_build_type}")
+    if (ANDROID)
+        set(UPDATE_DEPS_DIR_SUFFIX "android/${UPDATE_DEPS_DIR_SUFFIX}")
+    endif()
+    set(UPDATE_DEPS_DIR "${PROJECT_SOURCE_DIR}/external/${UPDATE_DEPS_DIR_SUFFIX}" CACHE PATH "Location where update_deps.py installs packages")
+    list(APPEND update_dep_command "--dir" )
+    list(APPEND update_dep_command "${UPDATE_DEPS_DIR}")
+
+    if (NOT BUILD_TESTS)
+        list(APPEND update_dep_command "--optional=tests")
+    endif()
+
+    if (UPDATE_DEPS_SKIP_EXISTING_INSTALL)
+        list(APPEND update_dep_command "--skip-existing-install")
+    endif()
+
+    list(APPEND cmake_vars "CMAKE_TOOLCHAIN_FILE")
+    if (ANDROID)
+        list(APPEND cmake_vars "ANDROID_PLATFORM" "CMAKE_ANDROID_ARCH_ABI" "CMAKE_ANDROID_STL_TYPE" "CMAKE_ANDROID_RTTI" "CMAKE_ANDROID_EXCEPTIONS" "ANDROID_USE_LEGACY_TOOLCHAIN_FILE")
+    endif()
+
+    set(cmake_var)
+    foreach(var IN LISTS cmake_vars)
+        if (DEFINED ${var})
+            list(APPEND update_dep_command "--cmake_var")
+            list(APPEND update_dep_command "${var}=${${var}}")
+        endif()
+    endforeach()
+
+    if (cmake_var)
+        list(APPEND update_dep_command "${cmake_var}")
+    endif()
+
+    file(TIMESTAMP ${update_dep_py} timestamp_1)
+    file(TIMESTAMP ${known_good_json} timestamp_2)
+
+    string("MD5" md5_hash "${timestamp_1}-${timestamp_2}-${update_dep_command}")
+
+    set(UPDATE_DEPS_HASH "0" CACHE STRING "Default value until we run update_deps.py")
+    mark_as_advanced(UPDATE_DEPS_HASH)
+
+    if ("${UPDATE_DEPS_HASH}" STREQUAL "0")
+        list(APPEND update_dep_command "--clean-build")
+        list(APPEND update_dep_command "--clean-install")
+    endif()
+
+    if ("${md5_hash}" STREQUAL $CACHE{UPDATE_DEPS_HASH})
+        message(DEBUG "update_deps.py: no work to do.")
+    else()
+        execute_process(
+            COMMAND ${Python3_EXECUTABLE} ${update_dep_command}
+            RESULT_VARIABLE _update_deps_result
+        )
+        if (NOT (${_update_deps_result} EQUAL 0))
+            message(FATAL_ERROR "Could not run update_deps.py which is necessary to download dependencies.")
+        endif()
+        set(UPDATE_DEPS_HASH ${md5_hash} CACHE STRING "Ensure we only run update_deps.py when we need to." FORCE)
+        include("${UPDATE_DEPS_DIR}/helper.cmake")
+    endif()
+endif()
+if (VULKAN_HEADERS_INSTALL_DIR)
+    list(APPEND CMAKE_PREFIX_PATH ${VULKAN_HEADERS_INSTALL_DIR})
+    set(CMAKE_REQUIRE_FIND_PACKAGE_VulkanHeaders TRUE PARENT_SCOPE)
+endif()
+
+if (CMAKE_CROSSCOMPILING)
+    set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
+else()
+    set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
+endif()
diff --git a/scripts/check_code_format.sh b/scripts/check_code_format.sh
index dde4379..2107fbd 100755
--- a/scripts/check_code_format.sh
+++ b/scripts/check_code_format.sh
@@ -22,14 +22,14 @@
 GREEN='\033[0;32m'
 NC='\033[0m' # No Color
 
-FILES_TO_CHECK=$(git diff --name-only master | grep -v -E "^include/vulkan" | grep -E ".*\.(cpp|cc|c\+\+|cxx|c|h|hpp)$")
+FILES_TO_CHECK=$(git diff --name-only main grep -E ".*\.(cpp|cc|c\+\+|cxx|c|h|hpp)$")
 
 if [ -z "${FILES_TO_CHECK}" ]; then
   echo -e "${GREEN}No source code to check for formatting.${NC}"
   exit 0
 fi
 
-FORMAT_DIFF=$(git diff -U0 master -- ${FILES_TO_CHECK} | python ./scripts/clang-format-diff.py -p1 -style=file)
+FORMAT_DIFF=$(git diff -U0 main -- ${FILES_TO_CHECK} | python ./scripts/clang-format-diff.py -p1 -style=file)
 
 if [ -z "${FORMAT_DIFF}" ]; then
   echo -e "${GREEN}All source code in PR properly formatted.${NC}"
diff --git a/scripts/clang-format-diff.py b/scripts/clang-format-diff.py
new file mode 100644
index 0000000..122db49
--- /dev/null
+++ b/scripts/clang-format-diff.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+#
+#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+#===------------------------------------------------------------------------===#
+
+"""
+This script reads input from a unified diff and reformats all the changed
+lines. This is useful to reformat all the lines touched by a specific patch.
+Example usage for git/svn users:
+
+  git diff -U0 --no-color HEAD^ | clang-format-diff.py -p1 -i
+  svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
+
+"""
+from __future__ import absolute_import, division, print_function
+
+import argparse
+import difflib
+import re
+import subprocess
+import sys
+
+if sys.version_info.major >= 3:
+    from io import StringIO
+else:
+    from io import BytesIO as StringIO
+
+
+def main():
+  parser = argparse.ArgumentParser(description=__doc__,
+                                   formatter_class=
+                                           argparse.RawDescriptionHelpFormatter)
+  parser.add_argument('-i', action='store_true', default=False,
+                      help='apply edits to files instead of displaying a diff')
+  parser.add_argument('-p', metavar='NUM', default=0,
+                      help='strip the smallest prefix containing P slashes')
+  parser.add_argument('-regex', metavar='PATTERN', default=None,
+                      help='custom pattern selecting file paths to reformat '
+                      '(case sensitive, overrides -iregex)')
+  parser.add_argument('-iregex', metavar='PATTERN', default=
+                      r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc|js|ts|proto'
+                      r'|protodevel|java|cs)',
+                      help='custom pattern selecting file paths to reformat '
+                      '(case insensitive, overridden by -regex)')
+  parser.add_argument('-sort-includes', action='store_true', default=False,
+                      help='let clang-format sort include blocks')
+  parser.add_argument('-v', '--verbose', action='store_true',
+                      help='be more verbose, ineffective without -i')
+  parser.add_argument('-style',
+                      help='formatting style to apply (LLVM, Google, Chromium, '
+                      'Mozilla, WebKit)')
+  parser.add_argument('-binary', default='clang-format',
+                      help='location of binary to use for clang-format')
+  args = parser.parse_args()
+
+  # Extract changed lines for each file.
+  filename = None
+  lines_by_file = {}
+  for line in sys.stdin:
+    match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
+    if match:
+      filename = match.group(2)
+    if filename == None:
+      continue
+
+    if args.regex is not None:
+      if not re.match('^%s$' % args.regex, filename):
+        continue
+    else:
+      if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
+        continue
+
+    match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
+    if match:
+      start_line = int(match.group(1))
+      line_count = 1
+      if match.group(3):
+        line_count = int(match.group(3))
+      if line_count == 0:
+        continue
+      end_line = start_line + line_count - 1
+      lines_by_file.setdefault(filename, []).extend(
+          ['-lines', str(start_line) + ':' + str(end_line)])
+
+  # Reformat files containing changes in place.
+  for filename, lines in lines_by_file.items():
+    if args.i and args.verbose:
+      print('Formatting {}'.format(filename))
+    command = [args.binary, filename]
+    if args.i:
+      command.append('-i')
+    if args.sort_includes:
+      command.append('-sort-includes')
+    command.extend(lines)
+    if args.style:
+      command.extend(['-style', args.style])
+    p = subprocess.Popen(command,
+                         stdout=subprocess.PIPE,
+                         stderr=None,
+                         stdin=subprocess.PIPE,
+                         universal_newlines=True)
+    stdout, stderr = p.communicate()
+    if p.returncode != 0:
+      sys.exit(p.returncode)
+
+    if not args.i:
+      with open(filename) as f:
+        code = f.readlines()
+      formatted_code = StringIO(stdout).readlines()
+      diff = difflib.unified_diff(code, formatted_code,
+                                  filename, filename,
+                                  '(before formatting)', '(after formatting)')
+      diff_string = ''.join(diff)
+      if len(diff_string) > 0:
+        sys.stdout.write(diff_string)
+
+if __name__ == '__main__':
+  main()
diff --git a/scripts/dispatch_table_helper_generator.py b/scripts/dispatch_table_helper_generator.py
index 6d4a5bb..67af7be 100644
--- a/scripts/dispatch_table_helper_generator.py
+++ b/scripts/dispatch_table_helper_generator.py
@@ -103,7 +103,7 @@
                 write(s, file=self.outFile)
         # File Comment
         file_comment = '// *** THIS FILE IS GENERATED - DO NOT EDIT ***\n'
-        file_comment += '// See dispatch_helper_generator.py for modifications\n'
+        file_comment += '// See dispatch_table_helper_generator.py for modifications\n'
         write(file_comment, file=self.outFile)
         # Copyright Notice
         copyright =  '/*\n'
@@ -132,7 +132,7 @@
         preamble += '#include <vulkan/vulkan.h>\n'
         preamble += '#include <vulkan/vk_layer.h>\n'
         preamble += '#include <string.h>\n'
-        preamble += '#include "vk_layer_dispatch_table.h"\n'
+        preamble += '#include "loader/generated/vk_layer_dispatch_table.h"\n'
 
         write(copyright, file=self.outFile)
         write(preamble, file=self.outFile)
@@ -183,27 +183,6 @@
             return
         if handle_type != 'VkInstance' and handle_type != 'VkPhysicalDevice' and name != 'vkGetInstanceProcAddr':
             self.device_dispatch_list.append((name, self.featureExtraProtect))
-            if "VK_VERSION" not in self.featureName and self.extension_type == 'device':
-                self.device_extension_list.append(name)
-                # Build up stub function
-                decl = self.makeCDecls(cmdinfo.elem)[1]
-                return_type = cmdinfo.elem.find('proto/type').text
-                return_statement = ""  # default type is void, so no return type
-                try:
-                    return_statement = 'return ' + return_type_table[return_type] + ';'
-                except KeyError:
-                    if return_type != "void":
-                        raise AssertionError("return_type_table does not contain all possible types. Add an entry for `" + return_type + "`.")
-                decl = decl.split('*PFN_vk')[1]
-                decl = decl.replace(')(', '(')
-                decl = 'static VKAPI_ATTR ' + return_type + ' VKAPI_CALL Stub' + decl
-                func_body = ' { ' + return_statement + ' }'
-                decl = decl.replace (';', func_body)
-                if self.featureExtraProtect is not None:
-                    self.dev_ext_stub_list.append('#ifdef %s' % self.featureExtraProtect)
-                self.dev_ext_stub_list.append(decl)
-                if self.featureExtraProtect is not None:
-                    self.dev_ext_stub_list.append('#endif // %s' % self.featureExtraProtect)
         else:
             self.instance_dispatch_list.append((name, self.featureExtraProtect))
         return
@@ -240,7 +219,7 @@
             base_name = item[0][2:]
 
             if item[1] is not None:
-                table += '#ifdef %s\n' % item[1]
+                table += '#if defined(%s)\n' % item[1]
 
             # If we're looking for the proc we are passing in, just point the table to it.  This fixes the issue where
             # a layer overrides the function name for the loader.
@@ -250,9 +229,6 @@
                 table += '    table->GetInstanceProcAddr = gpa;\n'
             else:
                 table += '    table->%s = (PFN_%s) gpa(%s, "%s");\n' % (base_name, item[0], table_type, item[0])
-            if item[0] in self.device_extension_list:
-                stub_check = '    if (table->%s == nullptr) { table->%s = (PFN_%s)Stub%s; }\n' % (base_name, base_name, item[0], base_name)
-                table += stub_check
             if item[1] is not None:
                 table += '#endif // %s\n' % item[1]
 
diff --git a/scripts/generate_source.py b/scripts/generate_source.py
index 712747b..16a2b47 100755
--- a/scripts/generate_source.py
+++ b/scripts/generate_source.py
@@ -26,6 +26,8 @@
 import subprocess
 import sys
 import tempfile
+import datetime
+import re
 
 # files to exclude from --verify check
 verify_exclude = ['.clang-format']
@@ -33,6 +35,7 @@
 def main(argv):
     parser = argparse.ArgumentParser(description='Generate source code for this repository')
     parser.add_argument('registry', metavar='REGISTRY_PATH', help='path to the Vulkan-Headers registry directory')
+    parser.add_argument('--generated-version', help='sets the header version used to generate the repo')
     group = parser.add_mutually_exclusive_group()
     group.add_argument('-i', '--incremental', action='store_true', help='only update repo files that change')
     group.add_argument('-v', '--verify', action='store_true', help='verify repo files match generator output')
@@ -41,8 +44,7 @@
     gen_cmds = [[common_codegen.repo_relative('scripts/loader_genvk.py'),
                  '-registry', os.path.abspath(os.path.join(args.registry,  'vk.xml')),
                  '-quiet',
-                 filename] for filename in ['vk_dispatch_table_helper.h',
-                                            'vk_layer_dispatch_table.h',
+                 filename] for filename in ['vk_layer_dispatch_table.h',
                                             'vk_loader_extensions.h',
                                             'vk_loader_extensions.c',
                                             'vk_object_types.h']]
@@ -52,7 +54,7 @@
     # get directory where generators will run
     if args.verify or args.incremental:
         # generate in temp directory so we can compare or copy later
-        temp_obj = tempfile.TemporaryDirectory(prefix='VulkanLoader_generated_source_')
+        temp_obj = tempfile.TemporaryDirectory(prefix='loader_codegen_')
         temp_dir = temp_obj.name
         gen_dir = temp_dir
     else:
@@ -106,6 +108,26 @@
                 print('update', repo_filename)
                 shutil.copyfile(temp_filename, repo_filename)
 
+    # write out the header version used to generate the code to a checked in CMake FIle
+    if args.generated_version:
+        # Update the CMake project version
+        with open(common_codegen.repo_relative('CMakeLists.txt'), "r+") as f:
+            data = f.read()
+            f.seek(0)
+            f.write(re.sub("project.*VERSION.*", f"project(VULKAN_LOADER VERSION {args.generated_version})", data))
+            f.truncate()
+
+        with open(common_codegen.repo_relative('loader/loader.rc.in'), "r") as rc_file:
+            rc_file_contents = rc_file.read()
+        rc_ver = ', '.join(args.generated_version.split('.') + ['0'])
+        rc_file_contents = rc_file_contents.replace('${LOADER_VER_FILE_VERSION}', f'{rc_ver}')
+        rc_file_contents = rc_file_contents.replace('${LOADER_VER_FILE_DESCRIPTION_STR}', f'"{args.generated_version}.Dev Build"')
+        rc_file_contents = rc_file_contents.replace('${LOADER_VER_FILE_VERSION_STR}', f'"Vulkan Loader - Dev Build"')
+        rc_file_contents = rc_file_contents.replace('${LOADER_CUR_COPYRIGHT_YEAR}', f'{datetime.date.today().year}')
+        with open(common_codegen.repo_relative('loader/loader.rc'), "w") as rc_file_out:
+            rc_file_out.write(rc_file_contents)
+            rc_file_out.close()
+
     return 0
 
 if __name__ == '__main__':
diff --git a/scripts/known_good.json b/scripts/known_good.json
index 5b71481..c033766 100644
--- a/scripts/known_good.json
+++ b/scripts/known_good.json
@@ -6,7 +6,7 @@
             "sub_dir": "Vulkan-Headers",
             "build_dir": "Vulkan-Headers/build",
             "install_dir": "Vulkan-Headers/build/install",
-            "commit": "v1.3.238"
+            "commit": "v1.3.268"
         },
         {
             "name": "googletest",
@@ -15,7 +15,7 @@
             "build_dir": "googletest",
             "install_dir": "googletest",
             "build_step": "skip",
-            "commit": "release-1.11.0",
+            "commit": "ec4fed93217bc2830959bb8e86798c1d86956949",
             "optional": [
                 "tests"
             ]
diff --git a/scripts/loader_extension_generator.py b/scripts/loader_extension_generator.py
index 86322f7..be9d22b 100644
--- a/scripts/loader_extension_generator.py
+++ b/scripts/loader_extension_generator.py
@@ -78,6 +78,11 @@
                          'vkCmdInsertDebugUtilsLabelEXT',
                          'vkGetDeviceGroupSurfacePresentModes2EXT']
 
+DEVICE_CMDS_MUST_USE_TRAMP = ['vkSetDebugUtilsObjectNameEXT',
+                              'vkSetDebugUtilsObjectTagEXT',
+                              'vkDebugMarkerSetObjectNameEXT',
+                              'vkDebugMarkerSetObjectTagEXT']
+
 # These are the aliased functions that use the same terminator for both extension and core versions
 # Generally, this is only applies to physical device level functions in instance extensions
 SHARED_ALIASES = {
@@ -227,7 +232,9 @@
         elif self.genOpts.filename == 'vk_layer_dispatch_table.h':
             preamble += '#pragma once\n'
             preamble += '\n'
+            preamble += '#if !defined(PFN_GetPhysicalDeviceProcAddr)\n'
             preamble += 'typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);\n'
+            preamble += '#endif\n'
 
         write(copyright, file=self.outFile)
         write(preamble, file=self.outFile)
@@ -249,6 +256,7 @@
             file_data += self.OutputIcdDispatchTableInit()
             file_data += self.OutputLoaderDispatchTables()
             file_data += self.InitDeviceFunctionTerminatorDispatchTable()
+            file_data += self.OutputDeviceFunctionTrampolinePrototypes()
             file_data += self.OutputLoaderLookupFunc()
             file_data += self.CreateTrampTermFuncs()
             file_data += self.InstExtensionGPA()
@@ -340,8 +348,8 @@
         require = None
         if name == 'vkGetDeviceGroupSurfacePresentModes2EXT':
             require_node = self.registry.tree.find("./extensions/extension[@name='{}']/require/command[@name='{}']/..".format(extension_name, name))
-            if 'extension' in require_node.attrib:
-                require = require_node.attrib['extension']
+            if 'depends' in require_node.attrib:
+                require = require_node.attrib['depends']
 
         cmd_params = []
 
@@ -479,7 +487,7 @@
         protos += '                                                                         VkInstance inst);\n'
         protos += '\n'
         protos += '// Device command lookup function\n'
-        protos += 'VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name);\n'
+        protos += 'VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name, bool* name_found);\n'
         protos += '\n'
         protos += '// Instance command lookup function\n'
         protos += 'VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table, const char *name,\n'
@@ -539,7 +547,7 @@
                     base_name = cur_cmd.name[2:]
 
                     if cur_cmd.protect is not None:
-                        table += '#ifdef %s\n' % cur_cmd.protect
+                        table += '#if defined(%s)\n' % cur_cmd.protect
 
                     table += '    PFN_%s %s;\n' % (cur_cmd.name, base_name)
 
@@ -582,7 +590,7 @@
                     base_name = cur_cmd.name[2:]
 
                     if cur_cmd.protect is not None:
-                        table += '#ifdef %s\n' % cur_cmd.protect
+                        table += '#if defined(%s)\n' % cur_cmd.protect
 
                     table += '    PFN_%s %s;\n' % (cur_cmd.name, base_name)
 
@@ -631,7 +639,7 @@
                     base_name = cur_cmd.name[2:]
 
                     if cur_cmd.protect is not None:
-                        table += '#ifdef %s\n' % cur_cmd.protect
+                        table += '#if defined(%s)\n' % cur_cmd.protect
 
                     table += '    PFN_%s %s;\n' % (cur_cmd.name, base_name)
 
@@ -693,7 +701,7 @@
                     base_name = cur_cmd.name[2:]
 
                     if cur_cmd.protect is not None:
-                        table += '#ifdef %s\n' % cur_cmd.protect
+                        table += '#if defined(%s)\n' % cur_cmd.protect
 
                     # The Core Vulkan code will be wrapped in a feature called VK_VERSION_#_#
                     # For example: VK_VERSION_1_0 wraps the core 1.0 Vulkan functionality
@@ -743,7 +751,7 @@
                     mod_string = mod_string.replace(cur_cmd.name[2:] + '(\n', cur_cmd.name[2:] + '(\n    const Vk' + cur_cmd.name[2:] + 'Chain* chain,\n')
 
                 if (cur_cmd.protect is not None):
-                    terminators += '#ifdef %s\n' % cur_cmd.protect
+                    terminators += '#if defined(%s)\n' % cur_cmd.protect
 
                 terminators += mod_string
                 terminators += '\n'
@@ -773,7 +781,7 @@
                 tables += 'VKAPI_ATTR void VKAPI_CALL loader_init_device_dispatch_table(struct loader_dev_dispatch_table *dev_table, PFN_vkGetDeviceProcAddr gpa,\n'
                 tables += '                                                             VkDevice dev) {\n'
                 tables += '    VkLayerDispatchTable *table = &dev_table->core_dispatch;\n'
-                tables += '    table->magic = DEVICE_DISP_TABLE_MAGIC_NUMBER;\n'
+                tables += '    if (table->magic != DEVICE_DISP_TABLE_MAGIC_NUMBER) { abort(); }\n'
                 tables += '    for (uint32_t i = 0; i < MAX_NUM_UNKNOWN_EXTS; i++) dev_table->ext_dispatch[i] = (PFN_vkDevExt)vkDevExtError;\n'
 
             elif x == 1:
@@ -829,7 +837,7 @@
                         continue
 
                     if cur_cmd.protect is not None:
-                        tables += '#ifdef %s\n' % cur_cmd.protect
+                        tables += '#if defined(%s)\n' % cur_cmd.protect
 
                     # If we're looking for the proc we are passing in, just point the table to it.  This fixes the issue where
                     # a layer overrides the function name for the loader.
@@ -867,10 +875,18 @@
                 cur_type = 'device'
 
                 tables += '// Device command lookup function\n'
-                tables += 'VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name) {\n'
-                tables += '    if (!name || name[0] != \'v\' || name[1] != \'k\') return NULL;\n'
+                tables += 'VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table, const char *name, bool* found_name) {\n'
+                tables += '    if (!name || name[0] != \'v\' || name[1] != \'k\') {\n'
+                tables += '        *found_name = false;\n'
+                tables += '        return NULL;\n'
+                tables += '    }\n'
                 tables += '\n'
                 tables += '    name += 2;\n'
+                tables += '    *found_name = true;\n'
+                tables += '    struct loader_device* dev = (struct loader_device *)table;\n'
+                tables += '    const struct loader_instance* inst = dev->phys_dev_term->this_icd_term->this_instance;\n'
+                tables += '    uint32_t api_version = VK_MAKE_API_VERSION(0, inst->app_api_version.major, inst->app_api_version.minor, inst->app_api_version.patch);\n'
+                tables += '\n'
             else:
                 cur_type = 'instance'
 
@@ -885,6 +901,7 @@
                 tables += '    *found_name = true;\n'
                 tables += '    name += 2;\n'
 
+
             for y in range(0, 2):
                 if y == 0:
                     commands = self.core_commands
@@ -894,12 +911,15 @@
                 for cur_cmd in commands:
                     is_inst_handle_type = cur_cmd.handle_type == 'VkInstance' or cur_cmd.handle_type == 'VkPhysicalDevice'
                     if ((cur_type == 'instance' and is_inst_handle_type) or (cur_type == 'device' and not is_inst_handle_type)):
-
                         if cur_cmd.ext_name != cur_extension_name:
                             if 'VK_VERSION_' in cur_cmd.ext_name:
                                 tables += '\n    // ---- Core %s commands\n' % cur_cmd.ext_name[11:]
+                                if cur_type == 'device':
+                                    version_check = f'        if (dev->should_ignore_device_commands_from_newer_version && api_version < VK_API_VERSION_{cur_cmd.ext_name[11:]}) return NULL;\n'
                             else:
+
                                 tables += '\n    // ---- %s extension commands\n' % cur_cmd.ext_name
+                                version_check = ''
                             cur_extension_name = cur_cmd.ext_name
 
                         # Remove 'vk' from proto name
@@ -912,16 +932,26 @@
                             continue
 
                         if cur_cmd.protect is not None:
-                            tables += '#ifdef %s\n' % cur_cmd.protect
+                            tables += '#if defined(%s)\n' % cur_cmd.protect
 
-                        tables += '    if (!strcmp(name, "%s")) return (void *)table->%s;\n' % (base_name, base_name)
+                        tables += f'    if (!strcmp(name, "{base_name}")) '
+                        if cur_cmd.name in DEVICE_CMDS_MUST_USE_TRAMP:
+                            if version_check != '':
+                                tables += f'{{\n{version_check}        return dev->layer_extensions.{cur_cmd.ext_name[3:].lower()}_enabled ? (void *){base_name} : NULL;\n    }}\n'
+                            else:
+                                tables += f'return dev->layer_extensions.{cur_cmd.ext_name[3:].lower()}_enabled ? (void *){base_name} : NULL;\n'
+
+                        else:
+                            if version_check != '':
+                                tables += f'{{\n{version_check}        return (void *)table->{base_name};\n    }}\n'
+                            else:
+                                tables += f'return (void *)table->{base_name};\n'
 
                         if cur_cmd.protect is not None:
                             tables += '#endif // %s\n' % cur_cmd.protect
 
             tables += '\n'
-            if x == 1:
-                tables += '    *found_name = false;\n'
+            tables += '    *found_name = false;\n'
             tables += '    return NULL;\n'
             tables += '}\n\n'
         return tables
@@ -976,7 +1006,7 @@
                 cur_extension_name = ext_cmd.ext_name
 
             if ext_cmd.protect is not None:
-                funcs += '#ifdef %s\n' % ext_cmd.protect
+                funcs += '#if defined(%s)\n' % ext_cmd.protect
 
             func_header = ext_cmd.cdecl.replace(";", " {\n")
             tramp_header = func_header.replace("VKAPI_CALL vk", "VKAPI_CALL ")
@@ -1042,7 +1072,7 @@
                     funcs += '    const VkLayerInstanceDispatchTable *disp;\n'
                     funcs += '    VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(%s);\n' % (phys_dev_var_name)
                     funcs += '    if (VK_NULL_HANDLE == unwrapped_phys_dev) {\n'
-                    funcs += '        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
+                    funcs += '        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
                     funcs += '                   "%s: Invalid %s "\n' % (ext_cmd.name, phys_dev_var_name)
                     funcs += '                   "[VUID-%s-%s-parameter]");\n' % (ext_cmd.name, phys_dev_var_name)
                     funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
@@ -1052,7 +1082,7 @@
                     funcs += '    struct loader_instance *inst = loader_get_instance(%s);\n' % (instance_var_name)
                     funcs += '    if (NULL == inst) {\n'
                     funcs += '        loader_log(\n'
-                    funcs += '            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
+                    funcs += '            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
                     funcs += '            "%s: Invalid instance [VUID-%s-%s-parameter]");\n' % (ext_cmd.name, ext_cmd.name, instance_var_name)
                     funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
                     funcs += '    }\n'
@@ -1062,7 +1092,7 @@
                     funcs += ext_cmd.params[0].name
                     funcs += ');\n'
                     funcs += '    if (NULL == disp) {\n'
-                    funcs += '        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
+                    funcs += '        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
                     funcs += '                   "%s: Invalid %s "\n' % (ext_cmd.name, ext_cmd.params[0].name)
                     funcs += '                   "[VUID-%s-%s-parameter]");\n' % (ext_cmd.name, ext_cmd.params[0].name)
                     funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
@@ -1076,6 +1106,10 @@
                     funcs += '        struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->object;\n'
                     funcs += '        local_name_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;\n'
                     funcs += '    }\n'
+                    funcs += '    if (pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {\n'
+                    funcs += '        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pNameInfo->object;\n'
+                    funcs += '        local_name_info.object = (uint64_t)(uintptr_t)instance->instance;\n'
+                    funcs += '    }\n'
                 elif 'DebugMarkerSetObjectTag' in ext_cmd.name:
                     funcs += '    VkDebugMarkerObjectTagInfoEXT local_tag_info;\n'
                     funcs += '    memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugMarkerObjectTagInfoEXT));\n'
@@ -1084,6 +1118,10 @@
                     funcs += '        struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->object;\n'
                     funcs += '        local_tag_info.object = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;\n'
                     funcs += '    }\n'
+                    funcs += '    if (pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {\n'
+                    funcs += '        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pTagInfo->object;\n'
+                    funcs += '        local_tag_info.object = (uint64_t)(uintptr_t)instance->instance;\n'
+                    funcs += '    }\n'
                 elif 'SetDebugUtilsObjectName' in ext_cmd.name:
                     funcs += '    VkDebugUtilsObjectNameInfoEXT local_name_info;\n'
                     funcs += '    memcpy(&local_name_info, pNameInfo, sizeof(VkDebugUtilsObjectNameInfoEXT));\n'
@@ -1092,6 +1130,10 @@
                     funcs += '        struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pNameInfo->objectHandle;\n'
                     funcs += '        local_name_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;\n'
                     funcs += '    }\n'
+                    funcs += '    if (pNameInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {\n'
+                    funcs += '        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pNameInfo->objectHandle;\n'
+                    funcs += '        local_name_info.objectHandle = (uint64_t)(uintptr_t)instance->instance;\n'
+                    funcs += '    }\n'
                 elif 'SetDebugUtilsObjectTag' in ext_cmd.name:
                     funcs += '    VkDebugUtilsObjectTagInfoEXT local_tag_info;\n'
                     funcs += '    memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugUtilsObjectTagInfoEXT));\n'
@@ -1100,6 +1142,10 @@
                     funcs += '        struct loader_physical_device_tramp *phys_dev_tramp = (struct loader_physical_device_tramp *)(uintptr_t)pTagInfo->objectHandle;\n'
                     funcs += '        local_tag_info.objectHandle = (uint64_t)(uintptr_t)phys_dev_tramp->phys_dev;\n'
                     funcs += '    }\n'
+                    funcs += '    if (pTagInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {\n'
+                    funcs += '        struct loader_instance* instance = (struct loader_instance *)(uintptr_t)pTagInfo->objectHandle;\n'
+                    funcs += '        local_tag_info.objectHandle = (uint64_t)(uintptr_t)instance->instance;\n'
+                    funcs += '    }\n'
 
                 if ext_cmd.ext_name in NULL_CHECK_EXT_NAMES:
                     funcs += '    if (disp->' + base_name + ' != NULL) {\n'
@@ -1140,7 +1186,8 @@
                     funcs += '    if (NULL == icd_term->dispatch.'
                     funcs += base_name
                     funcs += ') {\n'
-                    funcs += '        loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,\n'
+                    fatal_error_bit = '' if ext_cmd.ext_type =='instance' and has_return_type else 'VULKAN_LOADER_FATAL_ERROR_BIT | '
+                    funcs += f'        loader_log(icd_term->this_instance, {fatal_error_bit}VULKAN_LOADER_ERROR_BIT, 0,\n'
                     funcs += '                   "ICD associated with VkPhysicalDevice does not support '
                     funcs += base_name
                     funcs += '");\n'
@@ -1208,7 +1255,7 @@
                     funcs += '    struct loader_instance *inst = loader_get_instance(%s);\n' % (instance_var_name)
                     funcs += '    if (NULL == inst) {\n'
                     funcs += '        loader_log(\n'
-                    funcs += '            NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
+                    funcs += '            NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
                     funcs += '            "%s: Invalid instance [VUID-%s-%s-parameter]");\n' % (ext_cmd.name, ext_cmd.name, instance_var_name)
                     funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
                     funcs += '    }\n'
@@ -1222,11 +1269,12 @@
                         member_name = 'objectHandle' if is_debug_utils else 'object'
                         phys_dev_check = 'VK_OBJECT_TYPE_PHYSICAL_DEVICE' if is_debug_utils else 'VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT'
                         surf_check = 'VK_OBJECT_TYPE_SURFACE_KHR' if is_debug_utils else 'VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT'
+                        inst_check = 'VK_OBJECT_TYPE_INSTANCE' if is_debug_utils else 'VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT'
                         funcs += '    uint32_t icd_index = 0;\n'
                         funcs += '    struct loader_device *dev;\n'
                         funcs += f'    struct loader_icd_term *icd_term = loader_get_icd_and_device({ ext_cmd.params[0].name}, &dev, &icd_index);\n'
                         funcs += f'    if (NULL == icd_term || NULL == dev) {{\n'
-                        funcs += f'        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "{ext_cmd.name[2:]}: Invalid device handle");\n'
+                        funcs += f'        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "{ext_cmd.name[2:]}: Invalid device handle");\n'
                         funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
                         funcs += '    }\n'
                         funcs += f'    { ext_cmd.params[1].type} {local_struct};\n'
@@ -1243,6 +1291,9 @@
                         funcs += f'                {local_struct}.{member_name} = (uint64_t)icd_surface->real_icd_surfaces[icd_index];\n'
                         funcs += '            }\n'
                         funcs += '        }\n'
+                        funcs += '    // If this is an instance we have to replace it with the proper one for the next call.\n'
+                        funcs += f'    }} else if ({debug_struct_name}->objectType == {inst_check}) {{\n'
+                        funcs += f'        {local_struct}.{member_name} = (uint64_t)(uintptr_t)icd_term->instance;\n'
                         funcs += '    }\n'
                         funcs += '    // Exit early if the driver does not support the function - this can happen as a layer or the loader itself supports\n'
                         funcs += '    // debug utils but the driver does not.\n'
@@ -1251,7 +1302,7 @@
                     else:
                         funcs += f'    struct loader_dev_dispatch_table *dispatch_table = loader_get_dev_dispatch({ext_cmd.params[0].name});\n'
                         funcs += f'    if (NULL == dispatch_table) {{\n'
-                        funcs += f'        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "{ext_cmd.ext_name}: Invalid device handle");\n'
+                        funcs += f'        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, "{ext_cmd.ext_name}: Invalid device handle");\n'
                         funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
                         funcs += '    }\n'
                         funcs += '    // Only call down if the device supports the function\n'
@@ -1291,7 +1342,7 @@
                 funcs += ext_cmd.params[0].name
                 funcs += ');\n'
                 funcs += '    if (NULL == disp) {\n'
-                funcs += '        loader_log(NULL, VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
+                funcs += '        loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,\n'
                 funcs += '                   "%s: Invalid %s "\n' % (ext_cmd.name, ext_cmd.params[0].name)
                 funcs += '                   "[VUID-%s-%s-parameter]");\n' % (ext_cmd.name, ext_cmd.params[0].name)
                 funcs += '        abort(); /* Intentionally fail so user can correct issue. */\n'
@@ -1347,7 +1398,7 @@
                 cur_extension_name = cur_cmd.ext_name
 
             if cur_cmd.protect is not None:
-                gpa_func += '#ifdef %s\n' % cur_cmd.protect
+                gpa_func += '#if defined(%s)\n' % cur_cmd.protect
 
             #base_name = cur_cmd.name[2:]
             base_name = SHARED_ALIASES[cur_cmd.name] if cur_cmd.name in SHARED_ALIASES else cur_cmd.name[2:]
@@ -1398,7 +1449,7 @@
                 cur_extension_name = ext.name
 
             if ext.protect is not None:
-                create_func += '#ifdef %s\n' % ext.protect
+                create_func += '#if defined(%s)\n' % ext.protect
             if count == 0:
                 create_func += '        if (0 == strcmp(pCreateInfo->ppEnabledExtensionNames[i], '
             else:
@@ -1443,7 +1494,7 @@
                 else:
                     last_protect = ext_cmd.protect
                     if ext_cmd.protect is not None:
-                        term_func += f'#ifdef {ext_cmd.protect}\n'
+                        term_func += f'#if defined({ext_cmd.protect})\n'
                     if (last_ext != ext_cmd.ext_name):
                         term_func += f'    // ---- {ext_cmd.ext_name} extension commands\n'
                         last_ext = ext_cmd.ext_name
@@ -1451,14 +1502,14 @@
                 term_func += f'    if (!strcmp(name, "{ext_cmd.name[2:]}")) {{\n'
                 term_func += f'        *found_name = true;\n'
                 if ext_cmd.require:
-                    term_func += f'        return dev->extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->extensions.{ext_cmd.require[3:].lower()}_enabled ?\n'
+                    term_func += f'        return dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->driver_extensions.{ext_cmd.require[3:].lower()}_enabled ?\n'
                 else:
-                    term_func += f'        return dev->extensions.{ext_cmd.ext_name[3:].lower()}_enabled ?\n'
+                    term_func += f'        return dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled ?\n'
                 term_func += f'            (PFN_vkVoidFunction)terminator_{(ext_cmd.name[2:])} : NULL;\n'
                 term_func += f'    }}\n'
 
         if last_protect is not None:
-            term_func += '#endif // %s\n' % ext_cmd.protect
+            term_func += '#endif // %s\n' % last_protect
 
         term_func += '    return NULL;\n'
         term_func += '}\n\n'
@@ -1482,7 +1533,7 @@
                 else:
                     last_protect = ext_cmd.protect
                     if ext_cmd.protect is not None:
-                        term_func += f'#ifdef {ext_cmd.protect}\n'
+                        term_func += f'#if defined({ext_cmd.protect})\n'
                     if (last_ext != ext_cmd.ext_name):
                         term_func += f'    // ---- {ext_cmd.ext_name} extension commands\n'
                         last_ext = ext_cmd.ext_name
@@ -1490,12 +1541,37 @@
                 term_func += f'    PFN_{ext_cmd.name} {ext_cmd.name[2:]};\n'
 
         if last_protect is not None:
-            term_func += '#endif // %s\n' % ext_cmd.protect
+            term_func += '#endif // %s\n' % last_protect
 
         term_func += '}; \n\n'
 
         return term_func
 
+    def OutputDeviceFunctionTrampolinePrototypes(self):
+        tramp_protos = ''
+        tramp_protos += '// These are prototypes for functions that need their trampoline called in all circumstances.\n'
+        tramp_protos += '// They are used in loader_lookup_device_dispatch_table but are defined afterwards.\n'
+        last_protect = None
+        last_ext = None
+        for ext_cmd in self.ext_commands:
+            if ext_cmd.name in DEVICE_CMDS_MUST_USE_TRAMP:
+                if 'VK_VERSION_' in ext_cmd.ext_name:
+                    tramp_protos += f'    // ---- Core {ext_cmd.ext_name[11:]} commands\n'
+                else:
+                    last_protect = ext_cmd.protect
+                    if ext_cmd.protect is not None:
+                        tramp_protos += f'#if defined({ext_cmd.protect})\n'
+                    if (last_ext != ext_cmd.ext_name):
+                        tramp_protos += f'    // ---- {ext_cmd.ext_name} extension commands\n'
+                        last_ext = ext_cmd.ext_name
+
+                tramp_protos += f'{ext_cmd.cdecl.replace("VKAPI_CALL vk", "VKAPI_CALL ")}\n'
+
+        if last_protect is not None:
+            tramp_protos += '#endif // %s\n' % last_protect
+        tramp_protos += '\n'
+        return tramp_protos
+
     #
     # Create code to initialize a dispatch table from the appropriate list of
     # extension entrypoints and return it as a string
@@ -1516,21 +1592,21 @@
                 else:
                     last_protect = ext_cmd.protect
                     if ext_cmd.protect is not None:
-                        term_func += f'#ifdef {ext_cmd.protect}\n'
+                        term_func += f'#if defined({ext_cmd.protect})\n'
                     if (last_ext != ext_cmd.ext_name):
                         term_func += f'    // ---- {ext_cmd.ext_name} extension commands\n'
                         last_ext = ext_cmd.ext_name
 
 
                 if ext_cmd.require:
-                    term_func += f'    if (dev->extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->extensions.{ext_cmd.require[3:].lower()}_enabled)\n'
+                    term_func += f'    if (dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->driver_extensions.{ext_cmd.require[3:].lower()}_enabled)\n'
                     term_func += f'       dispatch->{ext_cmd.name[2:]} = (PFN_{(ext_cmd.name)})gpda(dev->icd_device, "{(ext_cmd.name)}");\n'
                 else:
-                    term_func += f'    if (dev->extensions.{ext_cmd.ext_name[3:].lower()}_enabled)\n'
+                    term_func += f'    if (dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled)\n'
                     term_func += f'       dispatch->{ext_cmd.name[2:]} = (PFN_{(ext_cmd.name)})gpda(dev->icd_device, "{(ext_cmd.name)}");\n'
 
         if last_protect is not None:
-            term_func += '#endif // %s\n' % ext_cmd.protect
+            term_func += '#endif // %s\n' % last_protect
 
         term_func += '}\n\n'
 
@@ -1576,7 +1652,7 @@
                         continue
 
                     if cur_cmd.protect is not None:
-                        table += '#ifdef %s\n' % cur_cmd.protect
+                        table += '#if defined(%s)\n' % cur_cmd.protect
 
                     if base_name == 'GetInstanceProcAddr':
                         table += '    .%s = %s,\n' % (base_name, cur_cmd.name)
@@ -1605,7 +1681,7 @@
                 continue
 
             if ext.protect is not None:
-                table += '#ifdef %s\n' % ext.protect
+                table += '#if defined(%s)\n' % ext.protect
             table += '                                                  '
             table += ext.define + ',\n'
 
diff --git a/scripts/parse_asm_values.py b/scripts/parse_asm_values.py
index df7a046..e6ae90f 100644
--- a/scripts/parse_asm_values.py
+++ b/scripts/parse_asm_values.py
@@ -39,6 +39,8 @@
 # Only used with GAS - MASM doesn't need this, as it has its own way to determine x86 vs x64
 arch = sys.argv[5]
 
+POSIX_COMPILERS = ["GNU", "Clang", "AppleClang"]
+
 if destination_file is None or source_asm_file is None or assembler_type is None or compiler is None or arch is None:
     print("Required command line arguments were not provided")
     sys.exit(1)
@@ -80,13 +82,13 @@
             if d == "VULKAN_LOADER_ERROR_BIT":
                 continue # skip due to special case
             match = re.search(d + " DD [ ]*([0-9a-f]+)H", asm_intermediate_file)
-        elif compiler == "Clang" or compiler == "GNU":
+        elif compiler in POSIX_COMPILERS:
             match = re.search(d + " = ([0-9]+)", asm_intermediate_file)
 
         if match:
             if compiler == "MSVC":
                 value = str(int(match.group(1), 16))
-            elif compiler == "Clang" or compiler == "GNU":
+            elif compiler in POSIX_COMPILERS:
                 value = match.group(1)
             if assembler_type == "MASM":
             # MASM uses hex values, decode them here
diff --git a/scripts/update_deps.py b/scripts/update_deps.py
index 8a576d3..937c790 100755
--- a/scripts/update_deps.py
+++ b/scripts/update_deps.py
@@ -1,8 +1,9 @@
 #!/usr/bin/env python
 
 # Copyright 2017 The Glslang Authors. All rights reserved.
-# Copyright (c) 2018 Valve Corporation
-# Copyright (c) 2018-2021 LunarG, Inc.
+# Copyright (c) 2018-2023 Valve Corporation
+# Copyright (c) 2018-2023 LunarG, Inc.
+# Copyright (c) 2023-2023 RasterGrid Kft.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -31,11 +32,6 @@
 repository at a "known-good" commit in order to provide stability in
 the dependent repositories.
 
-Python Compatibility
---------------------
-
-This program can be used with Python 2.7 and Python 3.
-
 Known-Good JSON Database
 ------------------------
 
@@ -117,6 +113,10 @@
 The name of the dependent repository.  This field can be referenced
 by the "deps.repo_name" structure to record a dependency.
 
+- api
+
+The name of the API the dependency is specific to (e.g. "vulkan").
+
 - url
 
 Specifies the URL of the repository.
@@ -206,11 +206,6 @@
 A list of environment variables where one must be set to "true"
 (case-insensitive) in order for this repo to be fetched and built.
 This list can be used to specify repos that should be built only in CI.
-Typically, this list might contain "TRAVIS" and/or "APPVEYOR" because
-each of these CI systems sets an environment variable with its own
-name to "true".  Note that this could also be (ab)used to control
-the processing of the repo with any environment variable.  The default
-is an empty list, which means that the repo is always processed.
 
 - build_step (optional)
 
@@ -238,8 +233,6 @@
 
 """
 
-from __future__ import print_function
-
 import argparse
 import json
 import os.path
@@ -269,7 +262,7 @@
 def on_rm_error( func, path, exc_info):
     """Error handler for recursively removing a directory. The
     shutil.rmtree function can fail on Windows due to read-only files.
-    This handler will change the permissions for tha file and continue.
+    This handler will change the permissions for the file and continue.
     """
     os.chmod( path, stat.S_IWRITE )
     os.unlink( path )
@@ -340,6 +333,7 @@
         self.build_step = json['build_step'] if ('build_step' in json) else 'build'
         self.build_platforms = json['build_platforms'] if ('build_platforms' in json) else []
         self.optional = set(json.get('optional', []))
+        self.api = json['api'] if ('api' in json) else None
         # Absolute paths for a repo's directories
         dir_top = os.path.abspath(args.dir)
         self.repo_dir = os.path.join(dir_top, self.sub_dir)
@@ -430,9 +424,11 @@
     def CMakeConfig(self, repos):
         """Build CMake command for the configuration phase and execute it"""
         if self._args.do_clean_build:
-            shutil.rmtree(self.build_dir)
+            if os.path.isdir(self.build_dir):
+                shutil.rmtree(self.build_dir, onerror=on_rm_error)
         if self._args.do_clean_install:
-            shutil.rmtree(self.install_dir)
+            if os.path.isdir(self.install_dir):
+                shutil.rmtree(self.install_dir, onerror=on_rm_error)
 
         # Create and change to build directory
         make_or_exist_dirs(self.build_dir)
@@ -443,6 +439,11 @@
             '-DCMAKE_INSTALL_PREFIX=' + self.install_dir
         ]
 
+        # Allow users to pass in arbitrary cache variables
+        for cmake_var in self._args.cmake_var:
+            pieces = cmake_var.split('=', 1)
+            cmake_cmd.append('-D{}={}'.format(pieces[0], pieces[1]))
+
         # For each repo this repo depends on, generate a CMake variable
         # definitions for "...INSTALL_DIR" that points to that dependent
         # repo's install dir.
@@ -457,10 +458,8 @@
         for option in self.cmake_options:
             cmake_cmd.append(escape(option.format(**self.__dict__)))
 
-        # Set build config for single-configuration generators
-        if platform.system() == 'Linux' or platform.system() == 'Darwin':
-            cmake_cmd.append('-DCMAKE_BUILD_TYPE={config}'.format(
-                config=CONFIG_MAP[self._args.config]))
+        # Set build config for single-configuration generators (this is a no-op on multi-config generators)
+        cmake_cmd.append(f'-D CMAKE_BUILD_TYPE={CONFIG_MAP[self._args.config]}')
 
         # Use the CMake -A option to select the platform architecture
         # without needing a Visual Studio generator.
@@ -487,29 +486,14 @@
 
     def CMakeBuild(self):
         """Build CMake command for the build phase and execute it"""
-        cmake_cmd = ['cmake', '--build', self.build_dir, '--target', 'install']
+        cmake_cmd = ['cmake', '--build', self.build_dir, '--target', 'install', '--config', CONFIG_MAP[self._args.config]]
         if self._args.do_clean:
             cmake_cmd.append('--clean-first')
 
-        if platform.system() == 'Windows':
-            cmake_cmd.append('--config')
-            cmake_cmd.append(CONFIG_MAP[self._args.config])
-
-        # Speed up the build.
-        if platform.system() == 'Linux' or platform.system() == 'Darwin':
-            cmake_cmd.append('--')
-            num_make_jobs = multiprocessing.cpu_count()
-            env_make_jobs = os.environ.get('MAKE_JOBS', None)
-            if env_make_jobs is not None:
-                try:
-                    num_make_jobs = min(num_make_jobs, int(env_make_jobs))
-                except ValueError:
-                    print('warning: environment variable MAKE_JOBS has non-numeric value "{}".  '
-                          'Using {} (CPU count) instead.'.format(env_make_jobs, num_make_jobs))
-            cmake_cmd.append('-j{}'.format(num_make_jobs))
-        if platform.system() == 'Windows' and self._args.generator != "Ninja":
-            cmake_cmd.append('--')
-            cmake_cmd.append('/maxcpucount')
+        # Ninja is parallel by default
+        if self._args.generator != "Ninja":
+            cmake_cmd.append('--parallel')
+            cmake_cmd.append(format(multiprocessing.cpu_count()))
 
         if VERBOSE:
             print("CMake command: " + " ".join(cmake_cmd))
@@ -596,6 +580,10 @@
     install_names = GetInstallNames(args)
     with open(filename, 'w') as helper_file:
         for repo in repos:
+            # If the repo has an API tag and that does not match
+            # the target API then skip it
+            if repo.api is not None and repo.api != args.api:
+                continue
             if install_names and repo.name in install_names and repo.on_build_platform:
                 helper_file.write('set({var} "{dir}" CACHE STRING "" FORCE)\n'
                                   .format(
@@ -619,7 +607,7 @@
         '--ref',
         dest='ref',
         default='',
-        help="Override 'commit' with git reference. E.g., 'origin/master'")
+        help="Override 'commit' with git reference. E.g., 'origin/main'")
     parser.add_argument(
         '--no-build',
         dest='do_build',
@@ -652,11 +640,17 @@
         help="Delete install directory before building",
         default=False)
     parser.add_argument(
+        '--skip-existing-install',
+        dest='skip_existing_install',
+        action='store_true',
+        help="Skip build if install directory exists",
+        default=False)
+    parser.add_argument(
         '--arch',
         dest='arch',
         choices=['32', '64', 'x86', 'x64', 'win32', 'win64'],
         type=str.lower,
-        help="Set build files architecture (Windows)",
+        help="Set build files architecture (Visual Studio Generator Only)",
         default='64')
     parser.add_argument(
         '--config',
@@ -666,6 +660,12 @@
         help="Set build files configuration",
         default='debug')
     parser.add_argument(
+        '--api',
+        dest='api',
+        default='vulkan',
+        choices=['vulkan'],
+        help="Target API")
+    parser.add_argument(
         '--generator',
         dest='generator',
         help="Set the CMake generator",
@@ -676,6 +676,13 @@
         type=lambda a: set(a.lower().split(',')),
         help="Comma-separated list of 'optional' resources that may be skipped. Only 'tests' is currently supported as 'optional'",
         default=set())
+    parser.add_argument(
+        '--cmake_var',
+        dest='cmake_var',
+        action='append',
+        metavar='VAR[=VALUE]',
+        help="Add CMake command line option -D'VAR'='VALUE' to the CMake generation command line; may be used multiple times",
+        default=[])
 
     args = parser.parse_args()
     save_cwd = os.getcwd()
@@ -689,11 +696,24 @@
 
     print('Starting builds in {d}'.format(d=abs_top_dir))
     for repo in repos:
+        # If the repo has an API tag and that does not match
+        # the target API then skip it
+        if repo.api is not None and repo.api != args.api:
+            continue
+
         # If the repo has a platform whitelist, skip the repo
         # unless we are building on a whitelisted platform.
         if not repo.on_build_platform:
             continue
 
+        # Skip building the repo if its install directory already exists
+        # and requested via an option.  This is useful for cases where the
+        # install directory is restored from a cache that is known to be up
+        # to date.
+        if args.skip_existing_install and os.path.isdir(repo.install_dir):
+            print('Skipping build for repo {n} due to existing install directory'.format(n=repo.name))
+            continue
+
         # Skip test-only repos if the --tests option was not passed in
         if repo.IsOptional(args.optional):
             continue
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f9677bc..7734e53 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -16,10 +16,6 @@
 # ~~~
 
 
-# By default, tests and loader are built without sanitizers
-# Use these options to force a specific sanitizer on all test executables
-option(TEST_USE_ADDRESS_SANITIZER "Linux only: Advanced memory checking" OFF)
-option(TEST_USE_THREAD_SANITIZER "Linux only: Advanced thread checking" OFF)
 option(ENABLE_LIVE_VERIFICATION_TESTS "Enable tests which expect to run on live drivers. Meant for manual verification only" OFF)
 
 include(GoogleTest)
@@ -36,11 +32,12 @@
         loader_layer_tests.cpp
         loader_regression_tests.cpp
         loader_phys_dev_inst_ext_tests.cpp
+        loader_settings_tests.cpp
         loader_version_tests.cpp
         loader_unknown_ext_tests.cpp
         loader_wsi_tests.cpp)
 target_link_libraries(test_regression PUBLIC testing_dependencies)
-set_target_properties(test_regression ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_regression PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 target_compile_definitions(test_regression PUBLIC VK_NO_PROTOTYPES)
 
 # Threading tests live in separate executabe just for threading tests as it'll need support
@@ -50,7 +47,7 @@
         loader_testing_main.cpp
         loader_threading_tests.cpp)
 target_link_libraries(test_threading PUBLIC testing_dependencies)
-set_target_properties(test_threading ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_threading PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 target_compile_definitions(test_threading PUBLIC VK_NO_PROTOTYPES)
 
 # executables that are meant for testing against real drivers rather than the mocks
diff --git a/tests/README.md b/tests/README.md
index a12fde3..7a09938 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -11,8 +11,6 @@
 | ------------------------------ | -------- | ------- | -------------------------------------------------------- |
 | BUILD_TESTS                    | All      | `OFF`   | Controls whether or not the loader tests are built.      |
 | ENABLE_LIVE_VERIFICATION_TESTS | All      | `OFF`   | Enables building of tests meant to run with live drivers |
-| TEST_USE_ADDRESS_SANITIZER     | Linux    | `OFF`   | Enables Address Sanitizer in the loader and tests        |
-| TEST_USE_THREAD_SANITIZER      | Linux    | `OFF`   | Enables Thread Sanitizer in the loader and tests         |
 
 ## Running Tests
 
@@ -51,4 +49,4 @@
 Basic usage example:
 ```c
 VK_LOADER_TEST_LOADER_PATH="/path/to/older/loader/build" ctest --output-on-failure
-```
\ No newline at end of file
+```
diff --git a/tests/framework/CMakeLists.txt b/tests/framework/CMakeLists.txt
index c04ebae..7131299 100644
--- a/tests/framework/CMakeLists.txt
+++ b/tests/framework/CMakeLists.txt
@@ -17,7 +17,7 @@
 
 add_library(testing_framework_util STATIC test_util.cpp)
 target_link_libraries(testing_framework_util PUBLIC loader_common_options Vulkan::Headers)
-set_target_properties(testing_framework_util ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(testing_framework_util PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 if(UNIX OR APPLE)
     target_link_libraries(testing_framework_util PUBLIC ${CMAKE_DL_LIBS})
@@ -30,17 +30,13 @@
 target_include_directories(testing_framework_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
 
 if (UNIX)
-    if (TEST_USE_ADDRESS_SANITIZER)
+    if (LOADER_ENABLE_ADDRESS_SANITIZER)
         target_compile_options(testing_framework_util PUBLIC -fsanitize=address)
         target_link_options(testing_framework_util PUBLIC -fsanitize=address)
-        target_compile_options(vulkan PUBLIC -fsanitize=address)
-        target_link_options(vulkan PUBLIC -fsanitize=address)
     endif()
-    if (TEST_USE_THREAD_SANITIZER)
+    if (LOADER_ENABLE_THREAD_SANITIZER)
         target_compile_options(testing_framework_util PUBLIC -fsanitize=thread)
         target_link_options(testing_framework_util PUBLIC -fsanitize=thread)
-        target_compile_options(vulkan PUBLIC -fsanitize=thread)
-        target_link_options(vulkan PUBLIC -fsanitize=thread)
         target_compile_options(gtest PUBLIC -fsanitize=thread)
         target_link_options(gtest PUBLIC -fsanitize=thread)
     endif()
@@ -60,7 +56,7 @@
     add_library(${LIBRARY_NAME} SHARED ${PARSED_ARGS_SOURCES})
     target_link_libraries(${LIBRARY_NAME} PUBLIC testing_framework_util)
     target_compile_definitions(${LIBRARY_NAME} PRIVATE ${PARSED_ARGS_DEFINITIONS} VK_NO_PROTOTYPES)
-    set_target_properties(${LIBRARY_NAME} ${LOADER_STANDARD_CXX_PROPERTIES})
+    set_target_properties(${LIBRARY_NAME} PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
     # Windows requires export definitions for these libraries
     if(WIN32)
         target_sources(${LIBRARY_NAME} PRIVATE export_definitions/${PARSED_ARGS_DEF_FILE}.def)
@@ -97,8 +93,8 @@
     PUBLIC gtest Vulkan::Headers testing_framework_util shim-library)
 target_include_directories(testing_dependencies PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
 target_compile_definitions(testing_dependencies PUBLIC "GTEST_LINKED_AS_SHARED_LIBRARY=1")
-set_target_properties(testing_dependencies ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(testing_dependencies PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 if (APPLE AND BUILD_STATIC_LOADER)
     target_compile_definitions(testing_dependencies PUBLIC "BUILD_STATIC_LOADER=1")
     target_link_libraries(testing_dependencies PUBLIC vulkan)
-endif()
\ No newline at end of file
+endif()
diff --git a/tests/framework/README.md b/tests/framework/README.md
index 3b11698..7ae04c2 100644
--- a/tests/framework/README.md
+++ b/tests/framework/README.md
@@ -22,8 +22,8 @@
 Or Ensure that `googletest` is in the `external` directory.
 And on Windows only, ensure that the `Detours` library is in the `external` directory.
 
-Linux only: The CMake Configuration `TEST_USE_ADDRESS_SANITIZER` can be used to
-enable Address Sanitizer inside the testing framework.
+Linux & macOS only: The CMake Configuration `LOADER_ENABLE_ADDRESS_SANITIZER` can be used to
+enable Address Sanitizer.
 
 Run the test executables as normal
 
@@ -133,7 +133,7 @@
 There are many utilities that the test framework and tests have access to. These include:
 * Including common C and C++ headers
 * `FRAMEWORK_EXPORT` - macro used for exporting shared library funtions
-* Environment Variable helpers: `get_env_var`, `set_env_var`, `remove_env_var`
+* Environment Variable Wrapper: `EnvVarWrapper` for creating, setting, getting, and removing environment variables in a RAII manner
 * Windows API error handling helpers
 * filesystem abstractions:
   * `fs::path` - wrapper around std::string that has a similar API to C++17's `filesystem::path` library
diff --git a/tests/framework/framework_config.h.in b/tests/framework/framework_config.h.in
index e7abe0d..e07a2ab 100644
--- a/tests/framework/framework_config.h.in
+++ b/tests/framework/framework_config.h.in
@@ -42,8 +42,7 @@
 #define TEST_ICD_PATH_VERSION_2 "$<TARGET_FILE:test_icd_version_2>"
 
 #define TEST_JSON_NAME_VERSION_2_UNICODE "\xf0\x9f\x8c\x8b"
-#define TEST_ICD_PATH_VERSION_2_UNICODE \
-    "$<TARGET_FILE_DIR:test_icd_version_2>/" TEST_JSON_NAME_VERSION_2_UNICODE "$<TARGET_FILE_SUFFIX:test_icd_version_2>"
+#define TEST_ICD_PATH_VERSION_2_UNICODE "$<TARGET_FILE:test_unicode>"
 
 // assumes version 2 exports
 #define TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA "$<TARGET_FILE:test_icd_version_2_export_icd_gpdpa>"
@@ -55,6 +54,10 @@
 // All possible defines for v6
 #define TEST_ICD_PATH_VERSION_6 "$<TARGET_FILE:test_icd_version_6>"
 
+// Version 7
+#define TEST_ICD_PATH_VERSION_7 "$<TARGET_FILE:test_icd_version_7>"
+#define TEST_ICD_PATH_VERSION_7_WITH_ADDITIONAL_EXPORTS "$<TARGET_FILE:test_icd_version_7_with_additional_exports>"
+
 // TestLayer binaries
 #define TEST_LAYER_PATH_EXPORT_BASE "$<TARGET_FILE:test_layer_export_base>"
 #define TEST_LAYER_PATH_EXPORT_VERSION_0 "$<TARGET_FILE:test_layer_export_version_0>"
@@ -74,7 +77,7 @@
 #define BAD_DUMMY_BINARY_WINDOWS_64 "${CMAKE_CURRENT_SOURCE_DIR}/data/binaries/libdummy_library_elf_64.dll"
 #define BAD_DUMMY_BINARY_WINDOWS_32 "${CMAKE_CURRENT_SOURCE_DIR}/data/binaries/libdummy_library_elf_32.dll"
 #endif
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 #define DUMMY_BINARY_LINUX_64 "${CMAKE_CURRENT_SOURCE_DIR}/data/binaries/libdummy_library_elf_64.so"
 #define DUMMY_BINARY_LINUX_32 "${CMAKE_CURRENT_SOURCE_DIR}/data/binaries/libdummy_library_elf_32.so"
 #define BAD_DUMMY_BINARY_LINUX_64 "${CMAKE_CURRENT_SOURCE_DIR}/data/binaries/dummy_library_pe_64.so"
@@ -91,7 +94,7 @@
 #define CURRENT_PLATFORM_DUMMY_BINARY_BAD BAD_DUMMY_BINARY_WINDOWS_32
 #endif
 #endif
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GNU__)
 #if __x86_64__ || __ppc64__
 #define CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE DUMMY_BINARY_LINUX_32
 #define CURRENT_PLATFORM_DUMMY_BINARY_BAD BAD_DUMMY_BINARY_LINUX_64
diff --git a/tests/framework/icd/CMakeLists.txt b/tests/framework/icd/CMakeLists.txt
index 9deb6d4..28548ef 100644
--- a/tests/framework/icd/CMakeLists.txt
+++ b/tests/framework/icd/CMakeLists.txt
@@ -39,9 +39,14 @@
 AddSharedLibrary(test_icd_version_6 DEF_FILE test_icd_6
     SOURCES test_icd.cpp
     DEFINITIONS TEST_ICD_EXPORT_ICD_GPDPA=1 TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES})
-
-add_custom_command(TARGET test_icd_version_2 POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy
-        "$<TARGET_FILE:test_icd_version_2>"
-        "$<TARGET_FILE_DIR:test_icd_version_2>/🌋${CMAKE_SHARED_LIBRARY_SUFFIX}"
-)
+AddSharedLibrary(test_icd_version_7 DEF_FILE test_icd_7
+    SOURCES test_icd.cpp
+    DEFINITIONS TEST_ICD_EXPOSE_VERSION_7=1 ${TEST_ICD_VERSION_2_DEFINES})
+AddSharedLibrary(test_icd_version_7_with_additional_exports DEF_FILE test_icd_7_with_exports
+    SOURCES test_icd.cpp
+    DEFINITIONS TEST_ICD_EXPOSE_VERSION_7=1 TEST_ICD_EXPORT_ICD_GPDPA=1
+    TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES})
+AddSharedLibrary(test_unicode DEF_FILE test_icd_2
+    SOURCES test_icd.cpp
+    DEFINITIONS ${TEST_ICD_VERSION_2_DEFINES})
+set_target_properties(test_unicode PROPERTIES OUTPUT_NAME "🌋") # Test unicode library
diff --git a/tests/framework/icd/export_definitions/test_icd_7.def b/tests/framework/icd/export_definitions/test_icd_7.def
new file mode 100644
index 0000000..4414bbe
--- /dev/null
+++ b/tests/framework/icd/export_definitions/test_icd_7.def
@@ -0,0 +1,3 @@
+LIBRARY test_icd_version_7
+EXPORTS
+    vk_icdGetInstanceProcAddr
diff --git a/tests/framework/icd/export_definitions/test_icd_7_with_exports.def b/tests/framework/icd/export_definitions/test_icd_7_with_exports.def
new file mode 100644
index 0000000..7861805
--- /dev/null
+++ b/tests/framework/icd/export_definitions/test_icd_7_with_exports.def
@@ -0,0 +1,6 @@
+LIBRARY test_icd_version_7_with_additional_exports
+EXPORTS
+    vk_icdGetInstanceProcAddr
+    vk_icdNegotiateLoaderICDInterfaceVersion
+    vk_icdEnumerateAdapterPhysicalDevices
+    vk_icdGetPhysicalDeviceProcAddr
diff --git a/tests/framework/icd/physical_device.h b/tests/framework/icd/physical_device.h
index e5129b0..b4b17f7 100644
--- a/tests/framework/icd/physical_device.h
+++ b/tests/framework/icd/physical_device.h
@@ -34,8 +34,7 @@
     PhysicalDevice() {}
     PhysicalDevice(std::string name) : deviceName(name) {}
     PhysicalDevice(const char* name) : deviceName(name) {}
-    PhysicalDevice(std::string name, uint32_t bus) : deviceName(name), pci_bus(bus) {}
-    PhysicalDevice(const char* name, uint32_t bus) : deviceName(name), pci_bus(bus) {}
+
     DispatchableHandle<VkPhysicalDevice> vk_physical_device;
     BUILDER_VALUE(PhysicalDevice, std::string, deviceName, "")
     BUILDER_VALUE(PhysicalDevice, VkPhysicalDeviceProperties, properties, {})
@@ -64,6 +63,13 @@
     BUILDER_VALUE(PhysicalDevice, VkDisplayModeKHR, display_mode, {})
     BUILDER_VALUE(PhysicalDevice, VkDisplayPlaneCapabilitiesKHR, display_plane_capabilities, {})
 
+    PhysicalDevice& set_api_version(uint32_t version) {
+        properties.apiVersion = version;
+        return *this;
+    }
+
+    PhysicalDevice&& finish() { return std::move(*this); }
+
     // Objects created from this physical device
     std::vector<VkDevice> device_handles;
     std::vector<DeviceCreateInfo> device_create_infos;
diff --git a/tests/framework/icd/test_icd.cpp b/tests/framework/icd/test_icd.cpp
index 079e806..a2c4757 100644
--- a/tests/framework/icd/test_icd.cpp
+++ b/tests/framework/icd/test_icd.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -28,25 +28,31 @@
 #include "test_icd.h"
 
 // export vk_icdGetInstanceProcAddr
-#ifndef TEST_ICD_EXPORT_ICD_GIPA
+#if !defined(TEST_ICD_EXPORT_ICD_GIPA)
 #define TEST_ICD_EXPORT_ICD_GIPA 0
 #endif
 
 // export vk_icdNegotiateLoaderICDInterfaceVersion
-#ifndef TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION
+#if !defined(TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION)
 #define TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION 0
 #endif
 
 // export vk_icdGetPhysicalDeviceProcAddr
-#ifndef TEST_ICD_EXPORT_ICD_GPDPA
+#if !defined(TEST_ICD_EXPORT_ICD_GPDPA)
 #define TEST_ICD_EXPORT_ICD_GPDPA 0
 #endif
 
 // export vk_icdEnumerateAdapterPhysicalDevices
-#ifndef TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES
+#if !defined(TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES)
 #define TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES 0
 #endif
 
+// expose vk_icdNegotiateLoaderICDInterfaceVersion, vk_icdEnumerateAdapterPhysicalDevices, and vk_icdGetPhysicalDeviceProcAddr
+// through vk_icdGetInstanceProcAddr or vkGetInstanceProcAddr
+#if !defined(TEST_ICD_EXPOSE_VERSION_7)
+#define TEST_ICD_EXPOSE_VERSION_7 0
+#endif
+
 TestICD icd;
 extern "C" {
 FRAMEWORK_EXPORT TestICD* get_test_icd_func() { return &icd; }
@@ -167,13 +173,14 @@
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateInstanceVersion(uint32_t* pApiVersion) {
     if (pApiVersion != nullptr) {
-        *pApiVersion = VK_API_VERSION_1_0;
+        *pApiVersion = icd.icd_api_version;
     }
     return VK_SUCCESS;
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo,
-                                                     const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) {
+                                                     [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                     VkInstance* pInstance) {
     if (pCreateInfo == nullptr || pCreateInfo->pApplicationInfo == nullptr) {
         return VK_ERROR_OUT_OF_HOST_MEMORY;
     }
@@ -199,10 +206,11 @@
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) {}
+VKAPI_ATTR void VKAPI_CALL test_vkDestroyInstance([[maybe_unused]] VkInstance instance,
+                                                  [[maybe_unused]] const VkAllocationCallbacks* pAllocator) {}
 
 // VK_SUCCESS,VK_INCOMPLETE
-VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumeratePhysicalDevices([[maybe_unused]] VkInstance instance, uint32_t* pPhysicalDeviceCount,
                                                                VkPhysicalDevice* pPhysicalDevices) {
     if (pPhysicalDevices == nullptr) {
         *pPhysicalDeviceCount = static_cast<uint32_t>(icd.physical_devices.size());
@@ -223,8 +231,9 @@
 }
 
 // VK_SUCCESS,VK_INCOMPLETE, VK_ERROR_INITIALIZATION_FAILED
-VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumeratePhysicalDeviceGroups(
-    VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) {
+VKAPI_ATTR VkResult VKAPI_CALL
+test_vkEnumeratePhysicalDeviceGroups([[maybe_unused]] VkInstance instance, uint32_t* pPhysicalDeviceGroupCount,
+                                     VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) {
     VkResult result = VK_SUCCESS;
 
     if (pPhysicalDeviceGroupProperties == nullptr) {
@@ -258,6 +267,9 @@
                 pPhysicalDeviceGroupProperties[device_group].physicalDeviceCount = 1;
                 pPhysicalDeviceGroupProperties[device_group].physicalDevices[0] =
                     icd.physical_devices[device_group].vk_physical_device.handle;
+                for (size_t i = 1; i < VK_MAX_DEVICE_GROUP_SIZE; i++) {
+                    pPhysicalDeviceGroupProperties[device_group].physicalDevices[i] = {};
+                }
             }
         } else {
             group_count = static_cast<uint32_t>(icd.physical_device_groups.size());
@@ -275,6 +287,9 @@
                     pPhysicalDeviceGroupProperties[device_group].physicalDevices[i] =
                         icd.physical_device_groups[device_group].physical_device_handles[i]->vk_physical_device.handle;
                 }
+                for (size_t i = handles_written; i < VK_MAX_DEVICE_GROUP_SIZE; i++) {
+                    pPhysicalDeviceGroupProperties[device_group].physicalDevices[i] = {};
+                }
                 pPhysicalDeviceGroupProperties[device_group].physicalDeviceCount = handles_written;
             }
         }
@@ -294,10 +309,9 @@
     return result;
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDebugUtilsMessengerEXT(VkInstance instance,
-                                                                   const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
-                                                                   const VkAllocationCallbacks* pAllocator,
-                                                                   VkDebugUtilsMessengerEXT* pMessenger) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDebugUtilsMessengerEXT(
+    [[maybe_unused]] VkInstance instance, [[maybe_unused]] const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
+    [[maybe_unused]] const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger) {
     if (nullptr != pMessenger) {
         uint64_t fake_msgr_handle = reinterpret_cast<uint64_t>(new uint8_t);
         icd.messenger_handles.push_back(fake_msgr_handle);
@@ -311,8 +325,9 @@
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger,
-                                                                const VkAllocationCallbacks* pAllocator) {
+VKAPI_ATTR void VKAPI_CALL test_vkDestroyDebugUtilsMessengerEXT([[maybe_unused]] VkInstance instance,
+                                                                VkDebugUtilsMessengerEXT messenger,
+                                                                [[maybe_unused]] const VkAllocationCallbacks* pAllocator) {
     if (messenger != VK_NULL_HANDLE) {
         uint64_t fake_msgr_handle = (uint64_t)(messenger);
         auto found_iter = std::find(icd.messenger_handles.begin(), icd.messenger_handles.end(), fake_msgr_handle);
@@ -329,29 +344,76 @@
 
 // Debug utils & debug marker ext stubs
 VKAPI_ATTR VkResult VKAPI_CALL test_vkDebugMarkerSetObjectTagEXT(VkDevice dev, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
+        VkPhysicalDevice pd = (VkPhysicalDevice)(uintptr_t)(pTagInfo->object);
+        if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
+            return VK_ERROR_DEVICE_LOST;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
+        if (pTagInfo->object != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        if (pTagInfo->object != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
+    }
     return VK_SUCCESS;
 }
 VKAPI_ATTR VkResult VKAPI_CALL test_vkDebugMarkerSetObjectNameEXT(VkDevice dev, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
+        VkPhysicalDevice pd = (VkPhysicalDevice)(uintptr_t)(pNameInfo->object);
+        if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
+            return VK_ERROR_DEVICE_LOST;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
+        if (pNameInfo->object != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        if (pNameInfo->object != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
+    }
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkSetDebugUtilsObjectNameEXT(VkDevice dev, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) {
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerBeginEXT(VkCommandBuffer, const VkDebugMarkerMarkerInfoEXT*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerEndEXT(VkCommandBuffer) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerInsertEXT(VkCommandBuffer, const VkDebugMarkerMarkerInfoEXT*) {}
+
+VKAPI_ATTR VkResult VKAPI_CALL test_vkSetDebugUtilsObjectNameEXT(VkDevice dev, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) {
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
+        VkPhysicalDevice pd = (VkPhysicalDevice)(uintptr_t)(pNameInfo->objectHandle);
+        if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
+            return VK_ERROR_DEVICE_LOST;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
+        if (pNameInfo->objectHandle != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        if (pNameInfo->objectHandle != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
+    }
     return VK_SUCCESS;
 }
 VKAPI_ATTR VkResult VKAPI_CALL test_vkSetDebugUtilsObjectTagEXT(VkDevice dev, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) {
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
+        VkPhysicalDevice pd = (VkPhysicalDevice)(uintptr_t)(pTagInfo->objectHandle);
+        if (pd != icd.physical_devices.at(icd.lookup_device(dev).phys_dev_index).vk_physical_device.handle)
+            return VK_ERROR_DEVICE_LOST;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
+        if (pTagInfo->objectHandle != icd.surface_handles.at(0)) return VK_ERROR_DEVICE_LOST;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        if (pTagInfo->objectHandle != (uint64_t)(uintptr_t)icd.instance_handle.handle) return VK_ERROR_DEVICE_LOST;
+    }
     return VK_SUCCESS;
 }
-VKAPI_ATTR void VKAPI_CALL test_vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) {}
-VKAPI_ATTR void VKAPI_CALL test_vkQueueEndDebugUtilsLabelEXT(VkQueue queue) {}
-VKAPI_ATTR void VKAPI_CALL test_vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer cmd_buf, const VkDebugUtilsLabelEXT* pLabelInfo) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer cmd_buf) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer cmd_buf, const VkDebugUtilsLabelEXT* pLabelInfo) {}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueBeginDebugUtilsLabelEXT(VkQueue, const VkDebugUtilsLabelEXT*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueEndDebugUtilsLabelEXT(VkQueue) {}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueInsertDebugUtilsLabelEXT(VkQueue, const VkDebugUtilsLabelEXT*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer, const VkDebugUtilsLabelEXT*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer, const VkDebugUtilsLabelEXT*) {}
 
 //// Physical Device functions ////
 
 // VK_SUCCESS,VK_INCOMPLETE
-VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount,
-                                                                     VkLayerProperties* pProperties) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateDeviceLayerProperties(VkPhysicalDevice, uint32_t*, VkLayerProperties*) {
     assert(false && "ICD's don't contain layers???");
     return VK_SUCCESS;
 }
@@ -377,7 +439,7 @@
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo,
-                                                   const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) {
+                                                   [[maybe_unused]] const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) {
     // VK_SUCCESS
     auto found = std::find_if(icd.physical_devices.begin(), icd.physical_devices.end(), [physicalDevice](PhysicalDevice& phys_dev) {
         return phys_dev.vk_physical_device.handle == physicalDevice;
@@ -395,7 +457,7 @@
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) {
+VKAPI_ATTR void VKAPI_CALL test_vkDestroyDevice(VkDevice device, [[maybe_unused]] const VkAllocationCallbacks* pAllocator) {
     auto found = std::find(icd.device_handles.begin(), icd.device_handles.end(), device);
     if (found != icd.device_handles.end()) icd.device_handles.erase(found);
     auto fd = icd.lookup_device(device);
@@ -405,7 +467,7 @@
     phys_dev.device_create_infos.erase(phys_dev.device_create_infos.begin() + fd.dev_index);
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL generic_tool_props_function(VkPhysicalDevice physicalDevice, uint32_t* pToolCount,
+VKAPI_ATTR VkResult VKAPI_CALL generic_tool_props_function([[maybe_unused]] VkPhysicalDevice physicalDevice, uint32_t* pToolCount,
                                                            VkPhysicalDeviceToolPropertiesEXT* pToolProperties) {
     if (icd.tooling_properties.size() == 0) {
         return VK_SUCCESS;
@@ -464,7 +526,7 @@
         *pHandle = to_nondispatch_handle<HandleType>(handles.back());
     }
 }
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
                                                               const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
@@ -473,62 +535,62 @@
 }
 #endif
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
-                                                            const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateWin32SurfaceKHR([[maybe_unused]] VkInstance instance,
+                                                            [[maybe_unused]] const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
+                                                            [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                            VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice,
-                                                                                   uint32_t queueFamilyIndex) {
-    return VK_TRUE;
-}
+VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice, uint32_t) { return VK_TRUE; }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
-                                                              const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateWaylandSurfaceKHR([[maybe_unused]] VkInstance instance,
+                                                              [[maybe_unused]] const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
+                                                              [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                              VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice,
-                                                                                     uint32_t queueFamilyIndex,
-                                                                                     struct wl_display* display) {
+VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice, uint32_t,
+                                                                                     struct wl_display*) {
     return VK_TRUE;
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
-                                                          const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateXcbSurfaceKHR([[maybe_unused]] VkInstance instance,
+                                                          [[maybe_unused]] const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
+                                                          [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                          VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice,
-                                                                                 uint32_t queueFamilyIndex,
-                                                                                 xcb_connection_t* connection,
-                                                                                 xcb_visualid_t visual_id) {
+VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice, uint32_t, xcb_connection_t*,
+                                                                                 xcb_visualid_t) {
     return VK_TRUE;
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
-                                                           const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateXlibSurfaceKHR([[maybe_unused]] VkInstance instance,
+                                                           [[maybe_unused]] const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
+                                                           [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                           VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice,
-                                                                                  uint32_t queueFamilyIndex, Display* dpy,
-                                                                                  VisualID visualID) {
+VKAPI_ATTR VkBool32 VKAPI_CALL test_vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice, uint32_t, Display*, VisualID) {
     return VK_TRUE;
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDirectFBSurfaceEXT(VkInstance instance,
                                                                const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
                                                                const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
@@ -543,23 +605,27 @@
 
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
-                                                            const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateMacOSSurfaceMVK([[maybe_unused]] VkInstance instance,
+                                                            [[maybe_unused]] const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
+                                                            [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                            VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
-                                                          const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+#if defined(VK_USE_PLATFORM_IOS_MVK)
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateIOSSurfaceMVK([[maybe_unused]] VkInstance instance,
+                                                          [[maybe_unused]] const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
+                                                          [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                          VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateStreamDescriptorSurfaceGGP(VkInstance instance,
                                                                        const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
                                                                        const VkAllocationCallbacks* pAllocator,
@@ -570,14 +636,16 @@
 #endif  // VK_USE_PLATFORM_GGP
 
 #if defined(VK_USE_PLATFORM_METAL_EXT)
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
-                                                            const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateMetalSurfaceEXT([[maybe_unused]] VkInstance instance,
+                                                            [[maybe_unused]] const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
+                                                            [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                            VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo,
                                                              const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
@@ -591,15 +659,16 @@
 }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateHeadlessSurfaceEXT(VkInstance instance,
-                                                               const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo,
-                                                               const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateHeadlessSurfaceEXT([[maybe_unused]] VkInstance instance,
+                                                               [[maybe_unused]] const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo,
+                                                               [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                               VkSurfaceKHR* pSurface) {
     common_nondispatch_handle_creation(icd.surface_handles, pSurface);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
-                                                    const VkAllocationCallbacks* pAllocator) {
+VKAPI_ATTR void VKAPI_CALL test_vkDestroySurfaceKHR([[maybe_unused]] VkInstance instance, VkSurfaceKHR surface,
+                                                    [[maybe_unused]] const VkAllocationCallbacks* pAllocator) {
     if (surface != VK_NULL_HANDLE) {
         uint64_t fake_surf_handle = from_nondispatch_handle(surface);
         auto found_iter = std::find(icd.surface_handles.begin(), icd.surface_handles.end(), fake_surf_handle);
@@ -612,13 +681,16 @@
     }
 }
 // VK_KHR_swapchain
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo,
-                                                         const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateSwapchainKHR([[maybe_unused]] VkDevice device,
+                                                         [[maybe_unused]] const VkSwapchainCreateInfoKHR* pCreateInfo,
+                                                         [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                         VkSwapchainKHR* pSwapchain) {
     common_nondispatch_handle_creation(icd.swapchain_handles, pSwapchain);
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetSwapchainImagesKHR([[maybe_unused]] VkDevice device,
+                                                            [[maybe_unused]] VkSwapchainKHR swapchain,
                                                             uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) {
     std::vector<uint64_t> handles{123, 234, 345, 345, 456};
     if (pSwapchainImages == nullptr) {
@@ -632,8 +704,8 @@
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain,
-                                                      const VkAllocationCallbacks* pAllocator) {
+VKAPI_ATTR void VKAPI_CALL test_vkDestroySwapchainKHR([[maybe_unused]] VkDevice device, VkSwapchainKHR swapchain,
+                                                      [[maybe_unused]] const VkAllocationCallbacks* pAllocator) {
     if (swapchain != VK_NULL_HANDLE) {
         uint64_t fake_swapchain_handle = from_nondispatch_handle(swapchain);
         auto found_iter = icd.swapchain_handles.erase(
@@ -645,7 +717,8 @@
     }
 }
 // VK_KHR_swapchain with 1.1
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDeviceGroupSurfacePresentModesKHR([[maybe_unused]] VkDevice device,
+                                                                           [[maybe_unused]] VkSurfaceKHR surface,
                                                                            VkDeviceGroupPresentModeFlagsKHR* pModes) {
     if (!pModes) return VK_ERROR_INITIALIZATION_FAILED;
     *pModes = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR;
@@ -725,37 +798,39 @@
     FillCountPtr(icd.GetPhysDevice(physicalDevice).display_plane_properties, pPropertyCount, pProperties);
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice,
+                                                                          [[maybe_unused]] uint32_t planeIndex,
                                                                           uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) {
     FillCountPtr(icd.GetPhysDevice(physicalDevice).displays, pDisplayCount, pDisplays);
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display,
-                                                                  uint32_t* pPropertyCount,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice,
+                                                                  [[maybe_unused]] VkDisplayKHR display, uint32_t* pPropertyCount,
                                                                   VkDisplayModePropertiesKHR* pProperties) {
     FillCountPtr(icd.GetPhysDevice(physicalDevice).display_mode_properties, pPropertyCount, pProperties);
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display,
-                                                           const VkDisplayModeCreateInfoKHR* pCreateInfo,
-                                                           const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, [[maybe_unused]] VkDisplayKHR display,
+                                                           [[maybe_unused]] const VkDisplayModeCreateInfoKHR* pCreateInfo,
+                                                           [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                           VkDisplayModeKHR* pMode) {
     if (nullptr != pMode) {
         *pMode = icd.GetPhysDevice(physicalDevice).display_mode;
     }
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode,
-                                                                     uint32_t planeIndex,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice,
+                                                                     [[maybe_unused]] VkDisplayModeKHR mode,
+                                                                     [[maybe_unused]] uint32_t planeIndex,
                                                                      VkDisplayPlaneCapabilitiesKHR* pCapabilities) {
     if (nullptr != pCapabilities) {
         *pCapabilities = icd.GetPhysDevice(physicalDevice).display_plane_capabilities;
     }
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDisplayPlaneSurfaceKHR(VkInstance instance,
-                                                                   const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
-                                                                   const VkAllocationCallbacks* pAllocator,
-                                                                   VkSurfaceKHR* pSurface) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDisplayPlaneSurfaceKHR(
+    [[maybe_unused]] VkInstance instance, [[maybe_unused]] const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
+    [[maybe_unused]] const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) {
     if (nullptr != pSurface) {
         uint64_t fake_surf_handle = reinterpret_cast<uint64_t>(new uint8_t);
         icd.surface_handles.push_back(fake_surf_handle);
@@ -797,8 +872,9 @@
     return VK_SUCCESS;
 }
 // VK_KHR_display_swapchain
-VkResult test_vkCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos,
-                                          const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) {
+VkResult test_vkCreateSharedSwapchainsKHR([[maybe_unused]] VkDevice device, uint32_t swapchainCount,
+                                          [[maybe_unused]] const VkSwapchainCreateInfoKHR* pCreateInfos,
+                                          [[maybe_unused]] const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) {
     for (uint32_t i = 0; i < swapchainCount; i++) {
         common_nondispatch_handle_creation(icd.swapchain_handles, &pSwapchains[i]);
     }
@@ -806,19 +882,21 @@
 }
 
 //// misc
-VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo,
-                                                        const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateCommandPool([[maybe_unused]] VkDevice device,
+                                                        [[maybe_unused]] const VkCommandPoolCreateInfo* pCreateInfo,
+                                                        [[maybe_unused]] const VkAllocationCallbacks* pAllocator,
+                                                        VkCommandPool* pCommandPool) {
     if (pCommandPool != nullptr) {
         pCommandPool = reinterpret_cast<VkCommandPool*>(0xdeadbeefdeadbeef);
     }
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool,
-                                                     const VkAllocationCallbacks* pAllocator) {
+VKAPI_ATTR void VKAPI_CALL test_vkDestroyCommandPool(VkDevice, VkCommandPool, const VkAllocationCallbacks*) {
     // do nothing, leak memory for now
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo,
+VKAPI_ATTR VkResult VKAPI_CALL test_vkAllocateCommandBuffers([[maybe_unused]] VkDevice device,
+                                                             const VkCommandBufferAllocateInfo* pAllocateInfo,
                                                              VkCommandBuffer* pCommandBuffers) {
     if (pAllocateInfo != nullptr && pCommandBuffers != nullptr) {
         for (size_t i = 0; i < pAllocateInfo->commandBufferCount; i++) {
@@ -829,17 +907,19 @@
     return VK_SUCCESS;
 }
 
-VKAPI_ATTR void VKAPI_CALL test_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) {
-    *pQueue = icd.physical_devices.back().queue_handles[queueIndex].handle;
+VKAPI_ATTR void VKAPI_CALL test_vkGetDeviceQueue([[maybe_unused]] VkDevice device, [[maybe_unused]] uint32_t queueFamilyIndex,
+                                                 uint32_t queueIndex, VkQueue* pQueue) {
+    auto fd = icd.lookup_device(device);
+    if (fd.found) {
+        *pQueue = icd.physical_devices.at(fd.phys_dev_index).queue_handles[queueIndex].handle;
+    }
 }
 
 // VK_EXT_acquire_drm_display
-VKAPI_ATTR VkResult VKAPI_CALL test_vkAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) {
-    return VK_SUCCESS;
-}
+VKAPI_ATTR VkResult VKAPI_CALL test_vkAcquireDrmDisplayEXT(VkPhysicalDevice, int32_t, VkDisplayKHR) { return VK_SUCCESS; }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId,
-                                                       VkDisplayKHR* display) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, [[maybe_unused]] int32_t drmFd,
+                                                       [[maybe_unused]] uint32_t connectorId, VkDisplayKHR* display) {
     if (nullptr != display && icd.GetPhysDevice(physicalDevice).displays.size() > 0) {
         *display = icd.GetPhysDevice(physicalDevice).displays[0];
     }
@@ -870,11 +950,10 @@
         memcpy(pMemoryProperties, &icd.GetPhysDevice(physicalDevice).memory_properties, sizeof(VkPhysicalDeviceMemoryProperties));
     }
 }
-VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format,
-                                                                               VkImageType type, VkSampleCountFlagBits samples,
-                                                                               VkImageUsageFlags usage, VkImageTiling tiling,
-                                                                               uint32_t* pPropertyCount,
-                                                                               VkSparseImageFormatProperties* pProperties) {
+VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceSparseImageFormatProperties(
+    VkPhysicalDevice physicalDevice, [[maybe_unused]] VkFormat format, [[maybe_unused]] VkImageType type,
+    [[maybe_unused]] VkSampleCountFlagBits samples, [[maybe_unused]] VkImageUsageFlags usage, [[maybe_unused]] VkImageTiling tiling,
+    uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) {
     FillCountPtr(icd.GetPhysDevice(physicalDevice).sparse_image_format_properties, pPropertyCount, pProperties);
 }
 VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format,
@@ -884,10 +963,10 @@
                sizeof(VkFormatProperties));
     }
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format,
-                                                                             VkImageType type, VkImageTiling tiling,
-                                                                             VkImageUsageFlags usage, VkImageCreateFlags flags,
-                                                                             VkImageFormatProperties* pImageFormatProperties) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetPhysicalDeviceImageFormatProperties(
+    VkPhysicalDevice physicalDevice, [[maybe_unused]] VkFormat format, [[maybe_unused]] VkImageType type,
+    [[maybe_unused]] VkImageTiling tiling, [[maybe_unused]] VkImageUsageFlags usage, [[maybe_unused]] VkImageCreateFlags flags,
+    VkImageFormatProperties* pImageFormatProperties) {
     if (nullptr != pImageFormatProperties) {
         memcpy(pImageFormatProperties, &icd.GetPhysDevice(physicalDevice).image_format_properties, sizeof(VkImageFormatProperties));
     }
@@ -978,7 +1057,7 @@
     return VK_SUCCESS;
 }
 VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceExternalBufferProperties(
-    VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
+    VkPhysicalDevice physicalDevice, [[maybe_unused]] const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
     VkExternalBufferProperties* pExternalBufferProperties) {
     if (nullptr != pExternalBufferProperties) {
         auto& phys_dev = icd.GetPhysDevice(physicalDevice);
@@ -987,7 +1066,7 @@
     }
 }
 VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceExternalSemaphoreProperties(
-    VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
+    VkPhysicalDevice physicalDevice, [[maybe_unused]] const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
     VkExternalSemaphoreProperties* pExternalSemaphoreProperties) {
     if (nullptr != pExternalSemaphoreProperties) {
         auto& phys_dev = icd.GetPhysDevice(physicalDevice);
@@ -995,7 +1074,7 @@
     }
 }
 VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceExternalFenceProperties(
-    VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
+    VkPhysicalDevice physicalDevice, [[maybe_unused]] const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
     VkExternalFenceProperties* pExternalFenceProperties) {
     if (nullptr != pExternalFenceProperties) {
         auto& phys_dev = icd.GetPhysDevice(physicalDevice);
@@ -1004,41 +1083,98 @@
 }
 // Entry-points associated with the VK_KHR_performance_query extension
 VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
-    VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters,
-    VkPerformanceCounterDescriptionKHR* pCounterDescriptions) {
+    VkPhysicalDevice, uint32_t, uint32_t*, VkPerformanceCounterKHR*, VkPerformanceCounterDescriptionKHR*) {
     return VK_SUCCESS;
 }
-VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
-    VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) {
-}
-VKAPI_ATTR VkResult VKAPI_CALL test_vkAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) {
-    return VK_SUCCESS;
-}
-VKAPI_ATTR void VKAPI_CALL test_vkReleaseProfilingLockKHR(VkDevice device) {}
+VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice,
+                                                                                        const VkQueryPoolPerformanceCreateInfoKHR*,
+                                                                                        uint32_t*) {}
+VKAPI_ATTR VkResult VKAPI_CALL test_vkAcquireProfilingLockKHR(VkDevice, const VkAcquireProfilingLockInfoKHR*) { return VK_SUCCESS; }
+VKAPI_ATTR void VKAPI_CALL test_vkReleaseProfilingLockKHR(VkDevice) {}
 // Entry-points associated with the VK_EXT_sample_locations extension
-VKAPI_ATTR void VKAPI_CALL test_vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer,
-                                                           const VkSampleLocationsInfoEXT* pSampleLocationsInfo) {}
-VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice,
-                                                                            VkSampleCountFlagBits samples,
-                                                                            VkMultisamplePropertiesEXT* pMultisampleProperties) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdSetSampleLocationsEXT(VkCommandBuffer, const VkSampleLocationsInfoEXT*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice, VkSampleCountFlagBits,
+                                                                            VkMultisamplePropertiesEXT*) {}
 // Entry-points associated with the VK_EXT_calibrated_timestamps extension
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice,
-                                                                                   uint32_t* pTimeDomainCount,
-                                                                                   VkTimeDomainEXT* pTimeDomains) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice, uint32_t*, VkTimeDomainEXT*) {
     return VK_SUCCESS;
 }
-VKAPI_ATTR VkResult VKAPI_CALL test_vkGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount,
-                                                                 const VkCalibratedTimestampInfoEXT* pTimestampInfos,
-                                                                 uint64_t* pTimestamps, uint64_t* pMaxDeviation) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkGetCalibratedTimestampsEXT(VkDevice, uint32_t, const VkCalibratedTimestampInfoEXT*, uint64_t*,
+                                                                 uint64_t*) {
     return VK_SUCCESS;
 }
 
+#if defined(WIN32)
+VKAPI_ATTR VkResult VKAPI_CALL test_vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
+                                                                          uint32_t* pPhysicalDeviceCount,
+                                                                          VkPhysicalDevice* pPhysicalDevices) {
+    if (adapterLUID.LowPart != icd.adapterLUID.LowPart || adapterLUID.HighPart != icd.adapterLUID.HighPart) {
+        *pPhysicalDeviceCount = 0;
+        return VK_SUCCESS;
+    }
+    icd.called_enumerate_adapter_physical_devices = true;
+    VkResult res = test_vkEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices);
+    // For this testing, flip order intentionally
+    if (nullptr != pPhysicalDevices) {
+        std::reverse(pPhysicalDevices, pPhysicalDevices + *pPhysicalDeviceCount);
+    }
+    return res;
+}
+#endif  // defined(WIN32)
+
+VkResult test_vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) {
+    if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called &&
+        icd.called_negotiate_interface == CalledNegotiateInterface::not_called)
+        icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_negotiate;
+    else if (icd.called_vk_icd_gipa != CalledICDGIPA::not_called)
+        icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_gipa_first;
+
+    // loader puts the minimum it supports in pSupportedVersion, if that is lower than our minimum
+    // If the ICD doesn't supports the interface version provided by the loader, report VK_ERROR_INCOMPATIBLE_DRIVER
+    if (icd.min_icd_interface_version > *pSupportedVersion) {
+        icd.interface_version_check = InterfaceVersionCheck::loader_version_too_old;
+        *pSupportedVersion = icd.min_icd_interface_version;
+        return VK_ERROR_INCOMPATIBLE_DRIVER;
+    }
+
+    // the loader-provided interface version is newer than that supported by the ICD
+    if (icd.max_icd_interface_version < *pSupportedVersion) {
+        icd.interface_version_check = InterfaceVersionCheck::loader_version_too_new;
+        *pSupportedVersion = icd.max_icd_interface_version;
+    }
+    // ICD interface version is greater than the loader's,  return the loader's version
+    else if (icd.max_icd_interface_version > *pSupportedVersion) {
+        icd.interface_version_check = InterfaceVersionCheck::icd_version_too_new;
+        // don't change *pSupportedVersion
+    } else {
+        icd.interface_version_check = InterfaceVersionCheck::version_is_supported;
+        *pSupportedVersion = icd.max_icd_interface_version;
+    }
+
+    return VK_SUCCESS;
+}
+
+// Forward declarations for trampolines
+extern "C" {
+#if TEST_ICD_EXPOSE_VERSION_7
+FRAMEWORK_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion);
+#if TEST_ICD_EXPORT_ICD_GPDPA
+FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName);
+#endif
+#if defined(WIN32) && TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES
+FRAMEWORK_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
+                                                                                      uint32_t* pPhysicalDeviceCount,
+                                                                                      VkPhysicalDevice* pPhysicalDevices);
+#endif
+#endif
+}
+
 //// trampolines
 
-PFN_vkVoidFunction get_instance_func_ver_1_1(VkInstance instance, const char* pName) {
+PFN_vkVoidFunction get_instance_func_ver_1_1([[maybe_unused]] VkInstance instance, const char* pName) {
     if (icd.icd_api_version >= VK_API_VERSION_1_1) {
         if (string_eq(pName, "test_vkEnumerateInstanceVersion")) {
-            return to_vkVoidFunction(test_vkEnumerateInstanceVersion);
+            return icd.can_query_vkEnumerateInstanceVersion ? to_vkVoidFunction(test_vkEnumerateInstanceVersion) : nullptr;
         }
         if (string_eq(pName, "vkEnumeratePhysicalDeviceGroups")) {
             return to_vkVoidFunction(test_vkEnumeratePhysicalDeviceGroups);
@@ -1046,14 +1182,8 @@
     }
     return nullptr;
 }
-PFN_vkVoidFunction get_instance_func_ver_1_2(VkInstance instance, const char* pName) {
-    if (icd.icd_api_version >= VK_API_VERSION_1_2) {
-        return nullptr;
-    }
-    return nullptr;
-}
 
-PFN_vkVoidFunction get_physical_device_func_wsi(VkInstance instance, const char* pName) {
+PFN_vkVoidFunction get_physical_device_func_wsi([[maybe_unused]] VkInstance instance, const char* pName) {
     if (IsInstanceExtensionEnabled("VK_KHR_surface")) {
         if (string_eq(pName, "vkGetPhysicalDeviceSurfaceSupportKHR"))
             return to_vkVoidFunction(test_vkGetPhysicalDeviceSurfaceSupportKHR);
@@ -1091,18 +1221,18 @@
 
 PFN_vkVoidFunction get_instance_func_wsi(VkInstance instance, const char* pName) {
     if (icd.min_icd_interface_version >= 3 && icd.enable_icd_wsi == true) {
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
         if (string_eq(pName, "vkCreateAndroidSurfaceKHR")) {
-            icd.is_using_icd_wsi = UsingICDProvidedWSI::is_using;
+            icd.is_using_icd_wsi = true;
             return to_vkVoidFunction(test_vkCreateAndroidSurfaceKHR);
         }
 #endif
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
         if (string_eq(pName, "vkCreateMetalSurfaceEXT")) {
             return to_vkVoidFunction(test_vkCreateMetalSurfaceEXT);
         }
 #endif
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
         if (string_eq(pName, "vkCreateWaylandSurfaceKHR")) {
             return to_vkVoidFunction(test_vkCreateWaylandSurfaceKHR);
         }
@@ -1110,7 +1240,7 @@
             return to_vkVoidFunction(test_vkGetPhysicalDeviceWaylandPresentationSupportKHR);
         }
 #endif
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
         if (string_eq(pName, "vkCreateXcbSurfaceKHR")) {
             return to_vkVoidFunction(test_vkCreateXcbSurfaceKHR);
         }
@@ -1118,7 +1248,7 @@
             return to_vkVoidFunction(test_vkGetPhysicalDeviceXcbPresentationSupportKHR);
         }
 #endif
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
         if (string_eq(pName, "vkCreateXlibSurfaceKHR")) {
             return to_vkVoidFunction(test_vkCreateXlibSurfaceKHR);
         }
@@ -1126,7 +1256,7 @@
             return to_vkVoidFunction(test_vkGetPhysicalDeviceXlibPresentationSupportKHR);
         }
 #endif
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
         if (string_eq(pName, "vkCreateWin32SurfaceKHR")) {
             return to_vkVoidFunction(test_vkCreateWin32SurfaceKHR);
         }
@@ -1134,7 +1264,7 @@
             return to_vkVoidFunction(test_vkGetPhysicalDeviceWin32PresentationSupportKHR);
         }
 #endif
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
         if (string_eq(pName, "vkCreateDirectFBSurfaceEXT")) {
             return to_vkVoidFunction(test_vkCreateDirectFBSurfaceEXT);
         }
@@ -1143,25 +1273,25 @@
         }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
         if (string_eq(pName, "vkCreateMacOSSurfaceMVK")) {
             return to_vkVoidFunction(test_vkCreateMacOSSurfaceMVK);
         }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
         if (string_eq(pName, "vkCreateIOSSurfaceMVK")) {
             return to_vkVoidFunction(test_vkCreateIOSSurfaceMVK);
         }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
         if (string_eq(pName, "vkCreateStreamDescriptorSurfaceGGP")) {
             return to_vkVoidFunction(test_vkCreateStreamDescriptorSurfaceGGP);
         }
 #endif  // VK_USE_PLATFORM_GGP
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
         if (string_eq(pName, "vkCreateScreenSurfaceQNX")) {
             return to_vkVoidFunction(test_vkCreateScreenSurfaceQNX);
         }
@@ -1175,7 +1305,7 @@
         }
 
         if (string_eq(pName, "vkDestroySurfaceKHR")) {
-            icd.is_using_icd_wsi = UsingICDProvidedWSI::is_using;
+            icd.is_using_icd_wsi = true;
             return to_vkVoidFunction(test_vkDestroySurfaceKHR);
         }
     }
@@ -1192,7 +1322,7 @@
     if (ret_phys_dev_wsi != nullptr) return ret_phys_dev_wsi;
     return nullptr;
 }
-PFN_vkVoidFunction get_physical_device_func(VkInstance instance, const char* pName) {
+PFN_vkVoidFunction get_physical_device_func([[maybe_unused]] VkInstance instance, const char* pName) {
     if (string_eq(pName, "vkEnumerateDeviceLayerProperties")) return to_vkVoidFunction(test_vkEnumerateDeviceLayerProperties);
     if (string_eq(pName, "vkEnumerateDeviceExtensionProperties"))
         return to_vkVoidFunction(test_vkEnumerateDeviceExtensionProperties);
@@ -1306,10 +1436,6 @@
 }
 
 PFN_vkVoidFunction get_instance_func(VkInstance instance, const char* pName) {
-    if (string_eq(pName, "vkEnumerateInstanceExtensionProperties"))
-        return to_vkVoidFunction(test_vkEnumerateInstanceExtensionProperties);
-    if (string_eq(pName, "vkEnumerateInstanceLayerProperties")) return to_vkVoidFunction(test_vkEnumerateInstanceLayerProperties);
-    if (string_eq(pName, "vkCreateInstance")) return to_vkVoidFunction(test_vkCreateInstance);
     if (string_eq(pName, "vkDestroyInstance")) return to_vkVoidFunction(test_vkDestroyInstance);
     if (string_eq(pName, "vkEnumeratePhysicalDevices")) return to_vkVoidFunction(test_vkEnumeratePhysicalDevices);
 
@@ -1323,9 +1449,6 @@
     PFN_vkVoidFunction ret_1_1 = get_instance_func_ver_1_1(instance, pName);
     if (ret_1_1 != nullptr) return ret_1_1;
 
-    PFN_vkVoidFunction ret_1_2 = get_instance_func_ver_1_2(instance, pName);
-    if (ret_1_2 != nullptr) return ret_1_2;
-
     PFN_vkVoidFunction ret_wsi = get_instance_func_wsi(instance, pName);
     if (ret_wsi != nullptr) return ret_wsi;
 
@@ -1379,6 +1502,9 @@
     if (should_check(create_info.enabled_extensions, device, "VK_EXT_debug_marker")) {
         if (string_eq(pName, "vkDebugMarkerSetObjectTagEXT")) return to_vkVoidFunction(test_vkDebugMarkerSetObjectTagEXT);
         if (string_eq(pName, "vkDebugMarkerSetObjectNameEXT")) return to_vkVoidFunction(test_vkDebugMarkerSetObjectNameEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerBeginEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerBeginEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerEndEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerEndEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerInsertEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerInsertEXT);
     }
     if (IsInstanceExtensionEnabled("VK_EXT_debug_utils")) {
         if (string_eq(pName, "vkSetDebugUtilsObjectNameEXT")) return to_vkVoidFunction(test_vkSetDebugUtilsObjectNameEXT);
@@ -1412,12 +1538,32 @@
 PFN_vkVoidFunction base_get_instance_proc_addr(VkInstance instance, const char* pName) {
     if (pName == nullptr) return nullptr;
     if (instance == NULL) {
+#if TEST_ICD_EXPOSE_VERSION_7
+        if (string_eq(pName, "vk_icdNegotiateLoaderICDInterfaceVersion"))
+            return icd.exposes_vk_icdNegotiateLoaderICDInterfaceVersion
+                       ? to_vkVoidFunction(vk_icdNegotiateLoaderICDInterfaceVersion)
+                       : NULL;
+#if TEST_ICD_EXPORT_ICD_GPDPA
+        if (string_eq(pName, "vk_icdGetPhysicalDeviceProcAddr"))
+            return icd.exposes_vk_icdGetPhysicalDeviceProcAddr ? to_vkVoidFunction(vk_icdGetPhysicalDeviceProcAddr) : NULL;
+#endif
+#if defined(WIN32) && TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES
+        if (string_eq(pName, "vk_icdEnumerateAdapterPhysicalDevices"))
+            return icd.exposes_vk_icdEnumerateAdapterPhysicalDevices ? to_vkVoidFunction(vk_icdEnumerateAdapterPhysicalDevices)
+                                                                     : NULL;
+#endif  // defined(WIN32)
+#endif  // TEST_ICD_EXPOSE_VERSION_7
+
         if (string_eq(pName, "vkGetInstanceProcAddr")) return to_vkVoidFunction(test_vkGetInstanceProcAddr);
         if (string_eq(pName, "vkEnumerateInstanceExtensionProperties"))
-            return to_vkVoidFunction(test_vkEnumerateInstanceExtensionProperties);
+            return icd.exposes_vkEnumerateInstanceExtensionProperties
+                       ? to_vkVoidFunction(test_vkEnumerateInstanceExtensionProperties)
+                       : NULL;
         if (string_eq(pName, "vkEnumerateInstanceLayerProperties"))
             return to_vkVoidFunction(test_vkEnumerateInstanceLayerProperties);
-        if (string_eq(pName, "vkEnumerateInstanceVersion")) return to_vkVoidFunction(test_vkEnumerateInstanceVersion);
+        if (string_eq(pName, "vkEnumerateInstanceVersion"))
+            return icd.can_query_vkEnumerateInstanceVersion ? to_vkVoidFunction(test_vkEnumerateInstanceVersion) : nullptr;
+        if (string_eq(pName, "vkCreateInstance")) return to_vkVoidFunction(test_vkCreateInstance);
     }
     if (string_eq(pName, "vkGetDeviceProcAddr")) return to_vkVoidFunction(test_vkGetDeviceProcAddr);
 
@@ -1433,36 +1579,8 @@
 // Exported functions
 extern "C" {
 #if TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION
-extern FRAMEWORK_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) {
-    if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called &&
-        icd.called_negotiate_interface == CalledNegotiateInterface::not_called)
-        icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_negotiate;
-    else if (icd.called_vk_icd_gipa != CalledICDGIPA::not_called)
-        icd.called_negotiate_interface = CalledNegotiateInterface::vk_icd_gipa_first;
-
-    // loader puts the minimum it supports in pSupportedVersion, if that is lower than our minimum
-    // If the ICD doesn't supports the interface version provided by the loader, report VK_ERROR_INCOMPATIBLE_DRIVER
-    if (icd.min_icd_interface_version > *pSupportedVersion) {
-        icd.interface_version_check = InterfaceVersionCheck::loader_version_too_old;
-        *pSupportedVersion = icd.min_icd_interface_version;
-        return VK_ERROR_INCOMPATIBLE_DRIVER;
-    }
-
-    // the loader-provided interface version is newer than that supported by the ICD
-    if (icd.max_icd_interface_version < *pSupportedVersion) {
-        icd.interface_version_check = InterfaceVersionCheck::loader_version_too_new;
-        *pSupportedVersion = icd.max_icd_interface_version;
-    }
-    // ICD interface version is greater than the loader's,  return the loader's version
-    else if (icd.max_icd_interface_version > *pSupportedVersion) {
-        icd.interface_version_check = InterfaceVersionCheck::icd_version_too_new;
-        // don't change *pSupportedVersion
-    } else {
-        icd.interface_version_check = InterfaceVersionCheck::version_is_supported;
-        *pSupportedVersion = icd.max_icd_interface_version;
-    }
-
-    return VK_SUCCESS;
+FRAMEWORK_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) {
+    return test_vk_icdNegotiateLoaderICDInterfaceVersion(pSupportedVersion);
 }
 #endif  // TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION
 
@@ -1474,16 +1592,11 @@
 
 #if TEST_ICD_EXPORT_ICD_GIPA
 FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName) {
-    // std::cout << "icdGetInstanceProcAddr: " << pName << "\n";
-
     if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called) icd.called_vk_icd_gipa = CalledICDGIPA::vk_icd_gipa;
-
     return base_get_instance_proc_addr(instance, pName);
 }
 #else   // !TEST_ICD_EXPORT_ICD_GIPA
 FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char* pName) {
-    // std::cout << "icdGetInstanceProcAddr: " << pName << "\n";
-
     if (icd.called_vk_icd_gipa == CalledICDGIPA::not_called) icd.called_vk_icd_gipa = CalledICDGIPA::vk_gipa;
     return base_get_instance_proc_addr(instance, pName);
 }
@@ -1503,17 +1616,7 @@
 FRAMEWORK_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
                                                                                       uint32_t* pPhysicalDeviceCount,
                                                                                       VkPhysicalDevice* pPhysicalDevices) {
-    if (adapterLUID.LowPart != icd.adapterLUID.LowPart || adapterLUID.HighPart != icd.adapterLUID.HighPart) {
-        *pPhysicalDeviceCount = 0;
-        return VK_SUCCESS;
-    }
-    icd.called_enumerate_adapter_physical_devices = true;
-    VkResult res = test_vkEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices);
-    // For this testing, flip order intentionally
-    if (nullptr != pPhysicalDevices) {
-        std::reverse(pPhysicalDevices, pPhysicalDevices + *pPhysicalDeviceCount);
-    }
-    return res;
+    return test_vk_icdEnumerateAdapterPhysicalDevices(instance, adapterLUID, pPhysicalDeviceCount, pPhysicalDevices);
 }
 #endif  // defined(WIN32)
 #endif  // TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES
diff --git a/tests/framework/icd/test_icd.h b/tests/framework/icd/test_icd.h
index 8134632..760a08b 100644
--- a/tests/framework/icd/test_icd.h
+++ b/tests/framework/icd/test_icd.h
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -45,25 +45,65 @@
     version_is_supported
 };
 
-enum class CalledEnumerateAdapterPhysicalDevices { not_called, called };
-
-enum class UsingICDProvidedWSI { not_using, is_using };
+// clang-format off
+inline std::ostream& operator<<(std::ostream& os, const CalledICDGIPA& result) {
+    switch (result) {
+        case (CalledICDGIPA::not_called): return os << "CalledICDGIPA::not_called";
+        case (CalledICDGIPA::vk_icd_gipa): return os << "CalledICDGIPA::vk_icd_gipa";
+        case (CalledICDGIPA::vk_gipa): return os << "CalledICDGIPA::vk_gipa";
+    }
+    return os << static_cast<uint32_t>(result);
+}
+inline std::ostream& operator<<(std::ostream& os, const CalledNegotiateInterface& result) {
+    switch (result) {
+        case (CalledNegotiateInterface::not_called): return os << "CalledNegotiateInterface::not_called";
+        case (CalledNegotiateInterface::vk_icd_negotiate): return os << "CalledNegotiateInterface::vk_icd_negotiate";
+        case (CalledNegotiateInterface::vk_icd_gipa_first): return os << "CalledNegotiateInterface::vk_icd_gipa_first";
+    }
+    return os << static_cast<uint32_t>(result);
+}
+inline std::ostream& operator<<(std::ostream& os, const InterfaceVersionCheck& result) {
+    switch (result) {
+        case (InterfaceVersionCheck::not_called): return os << "InterfaceVersionCheck::not_called";
+        case (InterfaceVersionCheck::loader_version_too_old): return os << "InterfaceVersionCheck::loader_version_too_old";
+        case (InterfaceVersionCheck::loader_version_too_new): return os << "InterfaceVersionCheck::loader_version_too_new";
+        case (InterfaceVersionCheck::icd_version_too_new): return os << "InterfaceVersionCheck::icd_version_too_new";
+        case (InterfaceVersionCheck::version_is_supported): return os << "InterfaceVersionCheck::version_is_supported";
+    }
+    return os << static_cast<uint32_t>(result);
+}
+// clang-format on
 
 struct TestICD {
     fs::path manifest_file_path;
 
+    BUILDER_VALUE(TestICD, bool, exposes_vk_icdNegotiateLoaderICDInterfaceVersion, true)
+    BUILDER_VALUE(TestICD, bool, exposes_vkEnumerateInstanceExtensionProperties, true)
+    BUILDER_VALUE(TestICD, bool, exposes_vkCreateInstance, true)
+    BUILDER_VALUE(TestICD, bool, exposes_vk_icdGetPhysicalDeviceProcAddr, true)
+#if defined(WIN32)
+    BUILDER_VALUE(TestICD, bool, exposes_vk_icdEnumerateAdapterPhysicalDevices, true)
+#endif
+
     CalledICDGIPA called_vk_icd_gipa = CalledICDGIPA::not_called;
     CalledNegotiateInterface called_negotiate_interface = CalledNegotiateInterface::not_called;
 
     InterfaceVersionCheck interface_version_check = InterfaceVersionCheck::not_called;
     BUILDER_VALUE(TestICD, uint32_t, min_icd_interface_version, 0)
-    BUILDER_VALUE(TestICD, uint32_t, max_icd_interface_version, 6)
+    BUILDER_VALUE(TestICD, uint32_t, max_icd_interface_version, 7)
     uint32_t icd_interface_version_received = 0;
 
     bool called_enumerate_adapter_physical_devices = false;
 
     BUILDER_VALUE(TestICD, bool, enable_icd_wsi, false);
-    UsingICDProvidedWSI is_using_icd_wsi = UsingICDProvidedWSI::not_using;
+    bool is_using_icd_wsi = false;
+
+    TestICD& setup_WSI(const char* api_selection = nullptr) {
+        enable_icd_wsi = true;
+        add_instance_extensions({"VK_KHR_surface", get_platform_wsi_extension(api_selection)});
+        min_icd_interface_version = (3U < min_icd_interface_version) ? min_icd_interface_version : 3U;
+        return *this;
+    }
 
     BUILDER_VALUE(TestICD, uint32_t, icd_api_version, VK_API_VERSION_1_0)
     BUILDER_VECTOR(TestICD, LayerDefinition, instance_layers, instance_layer)
@@ -80,9 +120,12 @@
     std::vector<uint64_t> messenger_handles;
     std::vector<uint64_t> swapchain_handles;
 
+    BUILDER_VALUE(TestICD, bool, can_query_vkEnumerateInstanceVersion, true);
+
     // Unknown instance functions Add a `VulkanFunction` to this list which will be searched in
-    // vkGetInstanceProcAddr for custom_instance_functions and vk_icdGetPhysicalDeviceProcAddr for custom_physical_device_functions.
-    // To add unknown device functions, add it to the PhysicalDevice directly (in the known_device_functions member)
+    // vkGetInstanceProcAddr for custom_instance_functions and vk_icdGetPhysicalDeviceProcAddr for
+    // custom_physical_device_functions. To add unknown device functions, add it to the PhysicalDevice directly (in the
+    // known_device_functions member)
     BUILDER_VECTOR(TestICD, VulkanFunction, custom_instance_functions, custom_instance_function)
 
     // Must explicitely state support for the tooling info extension, that way we can control if vkGetInstanceProcAddr returns a
@@ -90,7 +133,7 @@
     BUILDER_VALUE(TestICD, bool, supports_tooling_info_ext, false);
     BUILDER_VALUE(TestICD, bool, supports_tooling_info_core, false);
     // List of tooling properties that this driver 'supports'
-    std::vector<VkPhysicalDeviceToolPropertiesEXT> tooling_properties;
+    BUILDER_VECTOR(TestICD, VkPhysicalDeviceToolPropertiesEXT, tooling_properties, tooling_property)
     std::vector<DispatchableHandle<VkCommandBuffer>> allocated_command_buffers;
 
     VkInstanceCreateFlags passed_in_instance_create_flags{};
diff --git a/tests/framework/json_writer.h b/tests/framework/json_writer.h
new file mode 100644
index 0000000..d259ae6
--- /dev/null
+++ b/tests/framework/json_writer.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2023 The Khronos Group Inc.
+ * Copyright (c) 2023 Valve Corporation
+ * Copyright (c) 2023 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and/or associated documentation files (the "Materials"), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice(s) and this permission notice shall be included in
+ * all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE 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 MATERIALS OR THE
+ * USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ * Author: Charles Giessen <charles@lunarg.com>
+ */
+
+#pragma once
+
+#include <stack>
+#include <string>
+#include <utility>
+
+// Utility class to simplify the writing of JSON manifest files
+
+struct JsonWriter {
+    std::string output;
+
+    // the bool represents whether an object has been written & a comma is needed
+    std::stack<bool> stack;
+
+    void StartObject() {
+        CommaAndNewLine();
+        Indent();
+        output += "{";
+        stack.push(false);
+    }
+    void StartKeyedObject(std::string const& key) {
+        CommaAndNewLine();
+        Indent();
+        output += "\"" + key + "\": {";
+        stack.push(false);
+    }
+    void EndObject() {
+        stack.pop();
+        output += "\n";
+        Indent();
+        output += "}";
+    }
+    void StartKeyedArray(std::string const& key) {
+        CommaAndNewLine();
+        Indent();
+        output += "\"" + key + "\": [";
+        stack.push(false);
+    }
+    void StartArray() {
+        CommaAndNewLine();
+        Indent();
+        output += "[";
+        stack.push(false);
+    }
+    void EndArray() {
+        stack.pop();
+        output += "\n";
+        Indent();
+        output += "]";
+    }
+
+    void AddKeyedString(std::string const& key, std::string const& value) {
+        CommaAndNewLine();
+        Indent();
+        output += "\"" + key + "\": \"" + value + "\"";
+    }
+    void AddString(std::string const& value) {
+        CommaAndNewLine();
+        Indent();
+        output += "\"" + value + "\"";
+    }
+
+    void AddKeyedBool(std::string const& key, bool value) {
+        CommaAndNewLine();
+        Indent();
+        output += "\"" + key + "\": " + (value ? "true" : "false");
+    }
+    void AddBool(bool value) {
+        CommaAndNewLine();
+        Indent();
+        output += std::string(value ? "true" : "false");
+    }
+
+   private:
+    void CommaAndNewLine() {
+        if (stack.size() > 0) {
+            if (stack.top() == false) {
+                stack.top() = true;
+            } else {
+                output += ",";
+            }
+            output += "\n";
+        }
+    }
+    void Indent() {
+        for (uint32_t i = 0; i < stack.size(); i++) {
+            output += '\t';
+        }
+    }
+};
diff --git a/tests/framework/layer/CMakeLists.txt b/tests/framework/layer/CMakeLists.txt
index 7d53779..a624062 100644
--- a/tests/framework/layer/CMakeLists.txt
+++ b/tests/framework/layer/CMakeLists.txt
@@ -16,13 +16,15 @@
 # ~~~
 
 set(TEST_LAYER_BASE_EXPORTS TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS=1)
-set(TEST_LAYER_VERSION_0_EXPORTS ${TEST_LAYER_BASE_EXPORTS} TEST_LAYER_EXPORT_LAYER_NAMED_GIPA=1 TEST_LAYER_EXPORT_LAYER_NAMED_GDPA=1)
-set(TEST_LAYER_VERSION_1_EXPORTS ${TEST_LAYER_VERSION_0_EXPORTS} TEST_LAYER_EXPORT_NO_PREFIX_GIPA=1 TEST_LAYER_EXPORT_NO_PREFIX_GDPA=1)
+set(TEST_LAYER_VERSION_0_EXPORTS ${TEST_LAYER_BASE_EXPORTS} TEST_LAYER_EXPORT_LAYER_VK_GIPA=1 TEST_LAYER_EXPORT_LAYER_VK_GDPA=1)
+set(TEST_LAYER_VERSION_0_NAMED_GPA_EXPORTS ${TEST_LAYER_BASE_EXPORTS} TEST_LAYER_EXPORT_LAYER_NAMED_GIPA=1 TEST_LAYER_EXPORT_LAYER_NAMED_GDPA=1)
+set(TEST_LAYER_VERSION_1_EXPORTS ${TEST_LAYER_VERSION_0_EXPORTS} TEST_LAYER_EXPORT_OVERRIDE_GIPA=1 TEST_LAYER_EXPORT_OVERRIDE_GDPA=1)
 set(TEST_LAYER_VERSION_2_EXPORTS ${TEST_LAYER_VERSION_1_EXPORTS} TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR=1
     LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION=1)
 
 AddSharedLibrary(test_layer_export_base DEF_FILE test_layer_base SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_BASE_EXPORTS})
 AddSharedLibrary(test_layer_export_version_0 DEF_FILE test_layer_0 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_0_EXPORTS})
+AddSharedLibrary(test_layer_export_version_0_named_gpa DEF_FILE test_layer_0_named_gpa SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_0_NAMED_GPA_EXPORTS})
 AddSharedLibrary(test_layer_export_version_1 DEF_FILE test_layer_1 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_1_EXPORTS})
 AddSharedLibrary(test_layer_export_version_2 DEF_FILE test_layer_2 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_2_EXPORTS})
 
diff --git a/tests/framework/layer/export_definitions/test_layer_0.def b/tests/framework/layer/export_definitions/test_layer_0.def
index b240635..7be478a 100644
--- a/tests/framework/layer/export_definitions/test_layer_0.def
+++ b/tests/framework/layer/export_definitions/test_layer_0.def
@@ -4,5 +4,5 @@
     vkEnumerateInstanceExtensionProperties
     vkEnumerateDeviceLayerProperties
     vkEnumerateDeviceExtensionProperties
-    test_layer_GetInstanceProcAddr
-    test_layer_GetDeviceProcAddr
\ No newline at end of file
+    vkGetInstanceProcAddr
+    vkGetDeviceProcAddr
diff --git a/tests/framework/layer/export_definitions/test_layer_0_named_gpa.def b/tests/framework/layer/export_definitions/test_layer_0_named_gpa.def
new file mode 100644
index 0000000..b240635
--- /dev/null
+++ b/tests/framework/layer/export_definitions/test_layer_0_named_gpa.def
@@ -0,0 +1,8 @@
+LIBRARY test_layer_export_version_0
+EXPORTS
+    vkEnumerateInstanceLayerProperties
+    vkEnumerateInstanceExtensionProperties
+    vkEnumerateDeviceLayerProperties
+    vkEnumerateDeviceExtensionProperties
+    test_layer_GetInstanceProcAddr
+    test_layer_GetDeviceProcAddr
\ No newline at end of file
diff --git a/tests/framework/layer/export_definitions/test_layer_1.def b/tests/framework/layer/export_definitions/test_layer_1.def
index 373507d..da95aa8 100644
--- a/tests/framework/layer/export_definitions/test_layer_1.def
+++ b/tests/framework/layer/export_definitions/test_layer_1.def
@@ -4,8 +4,6 @@
     vkEnumerateInstanceExtensionProperties
     vkEnumerateDeviceLayerProperties
     vkEnumerateDeviceExtensionProperties
-    test_layer_GetInstanceProcAddr
-    test_layer_GetDeviceProcAddr
-    GetInstanceProcAddr
-    GetDeviceProcAddr
-    test_override_vkGetInstanceProcAddr
\ No newline at end of file
+    vkGetInstanceProcAddr
+    vkGetDeviceProcAddr
+    test_override_vkGetInstanceProcAddr
diff --git a/tests/framework/layer/export_definitions/test_layer_2.def b/tests/framework/layer/export_definitions/test_layer_2.def
index a29167b..7db1e74 100644
--- a/tests/framework/layer/export_definitions/test_layer_2.def
+++ b/tests/framework/layer/export_definitions/test_layer_2.def
@@ -4,13 +4,11 @@
     vkEnumerateInstanceExtensionProperties
     vkEnumerateDeviceLayerProperties
     vkEnumerateDeviceExtensionProperties
-    test_layer_GetInstanceProcAddr
-    test_layer_GetDeviceProcAddr
-    GetInstanceProcAddr
-    GetDeviceProcAddr
+    vkGetInstanceProcAddr
+    vkGetDeviceProcAddr
     vk_layerGetPhysicalDeviceProcAddr
     vkNegotiateLoaderLayerInterfaceVersion
     test_preinst_vkEnumerateInstanceLayerProperties
     test_preinst_vkEnumerateInstanceExtensionProperties
     test_preinst_vkEnumerateInstanceVersion
-    test_override_vkGetInstanceProcAddr
\ No newline at end of file
+    test_override_vkGetInstanceProcAddr
diff --git a/tests/framework/layer/layer_util.h b/tests/framework/layer/layer_util.h
index b47add0..549bfa7 100644
--- a/tests/framework/layer/layer_util.h
+++ b/tests/framework/layer/layer_util.h
@@ -36,15 +36,6 @@
     BUILDER_VALUE(LayerDefinition, std::string, description, {})
     BUILDER_VECTOR(LayerDefinition, Extension, extensions, extension)
 
-    LayerDefinition(std::string layerName, uint32_t specVersion = VK_API_VERSION_1_0,
-                    uint32_t implementationVersion = VK_API_VERSION_1_0, std::string description = "",
-                    std::vector<Extension> extensions = {})
-        : layerName(layerName),
-          specVersion(specVersion),
-          implementationVersion(implementationVersion),
-          description(description),
-          extensions(extensions) {}
-
     VkLayerProperties get() const noexcept {
         VkLayerProperties props{};
         copy_string_to_char_array(layerName, &props.layerName[0], VK_MAX_EXTENSION_NAME_SIZE);
diff --git a/tests/framework/layer/test_layer.cpp b/tests/framework/layer/test_layer.cpp
index d1cd26a..14f0ebd 100644
--- a/tests/framework/layer/test_layer.cpp
+++ b/tests/framework/layer/test_layer.cpp
@@ -27,55 +27,55 @@
 
 #include "test_layer.h"
 
-#include "loader/generated/vk_dispatch_table_helper.h"
+#include "vk_dispatch_table_helper.h"
 
 // export the enumeration functions instance|device+layer|extension
-#ifndef TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS
+#if !defined(TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS)
 #define TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS 0
 #endif
 
 // export test_layer_GetInstanceProcAddr
-#ifndef TEST_LAYER_EXPORT_LAYER_NAMED_GIPA
+#if !defined(TEST_LAYER_EXPORT_LAYER_NAMED_GIPA)
 #define TEST_LAYER_EXPORT_LAYER_NAMED_GIPA 0
 #endif
 
+// export test_override_GetInstanceProcAddr
+#if !defined(TEST_LAYER_EXPORT_OVERRIDE_GIPA)
+#define TEST_LAYER_EXPORT_OVERRIDE_GIPA 0
+#endif
+
 // export vkGetInstanceProcAddr
-#ifndef TEST_LAYER_EXPORT_LAYER_VK_GIPA
+#if !defined(TEST_LAYER_EXPORT_LAYER_VK_GIPA)
 #define TEST_LAYER_EXPORT_LAYER_VK_GIPA 0
 #endif
 
 // export test_layer_GetDeviceProcAddr
-#ifndef TEST_LAYER_EXPORT_LAYER_NAMED_GDPA
+#if !defined(TEST_LAYER_EXPORT_LAYER_NAMED_GDPA)
 #define TEST_LAYER_EXPORT_LAYER_NAMED_GDPA 0
 #endif
 
+// export test_override_GetDeviceProcAddr
+#if !defined(TEST_LAYER_EXPORT_OVERRIDE_GDPA)
+#define TEST_LAYER_EXPORT_OVERRIDE_GDPA 0
+#endif
+
 // export vkGetDeviceProcAddr
-#ifndef TEST_LAYER_EXPORT_LAYER_VK_GDPA
+#if !defined(TEST_LAYER_EXPORT_LAYER_VK_GDPA)
 #define TEST_LAYER_EXPORT_LAYER_VK_GDPA 0
 #endif
 
-// export GetInstanceProcAddr
-#ifndef TEST_LAYER_EXPORT_NO_PREFIX_GIPA
-#define TEST_LAYER_EXPORT_NO_PREFIX_GIPA 0
-#endif
-
-// export GetDeviceProcAddr
-#ifndef TEST_LAYER_EXPORT_NO_PREFIX_GDPA
-#define TEST_LAYER_EXPORT_NO_PREFIX_GDPA 0
-#endif
-
 // export vk_layerGetPhysicalDeviceProcAddr
-#ifndef TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR
+#if !defined(TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR)
 #define TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR 0
 #endif
 
 // export vkNegotiateLoaderLayerInterfaceVersion
-#ifndef LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION
+#if !defined(LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION)
 #define LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION 0
 #endif
 
-#ifndef TEST_LAYER_NAME
-#define TEST_LAYER_NAME "VkLayer_LunarG_test_layer"
+#if !defined(TEST_LAYER_NAME)
+#define TEST_LAYER_NAME "VK_LAYER_LunarG_test_layer"
 #endif
 
 TestLayer layer;
@@ -87,6 +87,32 @@
 }
 }
 
+bool IsInstanceExtensionSupported(const char* extension_name) {
+    return layer.instance_extensions.end() !=
+           std::find_if(layer.instance_extensions.begin(), layer.instance_extensions.end(),
+                        [extension_name](Extension const& ext) { return string_eq(&ext.extensionName[0], extension_name); });
+}
+
+bool IsInstanceExtensionEnabled(const char* extension_name) {
+    return layer.enabled_instance_extensions.end() !=
+           std::find_if(layer.enabled_instance_extensions.begin(), layer.enabled_instance_extensions.end(),
+                        [extension_name](Extension const& ext) { return string_eq(&ext.extensionName[0], extension_name); });
+}
+
+bool IsDeviceExtensionAvailable(VkDevice dev, const char* extension_name) {
+    for (auto& device : layer.created_devices) {
+        if ((dev == VK_NULL_HANDLE || device.device_handle == dev) &&
+            device.enabled_extensions.end() !=
+                std::find_if(device.enabled_extensions.begin(), device.enabled_extensions.end(),
+                             [extension_name](Extension const& ext) { return ext.extensionName == extension_name; })) {
+            return true;
+        }
+    }
+    return false;
+}
+
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_instance_func(VkInstance instance, const char* pName);
+
 VkLayerInstanceCreateInfo* get_chain_info(const VkInstanceCreateInfo* pCreateInfo, VkLayerFunction func) {
     VkLayerInstanceCreateInfo* chain_info = (VkLayerInstanceCreateInfo*)pCreateInfo->pNext;
     while (chain_info && !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && chain_info->function == func)) {
@@ -105,33 +131,104 @@
     return chain_info;
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties) {
-    return VK_SUCCESS;
-}
+VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateInstanceLayerProperties(uint32_t*, VkLayerProperties*) { return VK_SUCCESS; }
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount,
                                                                            VkExtensionProperties* pProperties) {
+    if (pPropertyCount == nullptr) {
+        return VK_INCOMPLETE;
+    }
     if (pLayerName && string_eq(pLayerName, TEST_LAYER_NAME)) {
-        *pPropertyCount = 0;
+        if (pProperties) {
+            if (*pPropertyCount < layer.injected_instance_extensions.size()) {
+                return VK_INCOMPLETE;
+            }
+            for (size_t i = 0; i < layer.injected_instance_extensions.size(); i++) {
+                pProperties[i] = layer.injected_instance_extensions.at(i).get();
+            }
+            *pPropertyCount = static_cast<uint32_t>(layer.injected_instance_extensions.size());
+        } else {
+            *pPropertyCount = static_cast<uint32_t>(layer.injected_instance_extensions.size());
+        }
         return VK_SUCCESS;
     }
-    return layer.instance_dispatch_table.EnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties);
+
+    uint32_t hardware_prop_count = 0;
+    if (pProperties) {
+        hardware_prop_count = *pPropertyCount - static_cast<uint32_t>(layer.injected_instance_extensions.size());
+    }
+
+    VkResult res =
+        layer.instance_dispatch_table.EnumerateInstanceExtensionProperties(pLayerName, &hardware_prop_count, pProperties);
+    if (res < 0) {
+        return res;
+    }
+
+    if (pProperties == nullptr) {
+        *pPropertyCount = hardware_prop_count + static_cast<uint32_t>(layer.injected_instance_extensions.size());
+    } else {
+        if (hardware_prop_count + layer.injected_instance_extensions.size() > *pPropertyCount) {
+            *pPropertyCount = hardware_prop_count;
+            return VK_INCOMPLETE;
+        }
+        for (size_t i = 0; i < layer.injected_instance_extensions.size(); i++) {
+            pProperties[hardware_prop_count + i] = layer.injected_instance_extensions.at(i).get();
+        }
+        *pPropertyCount = hardware_prop_count + static_cast<uint32_t>(layer.injected_instance_extensions.size());
+    }
+    return res;
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount,
-                                                                     VkLayerProperties* pProperties) {
+VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateDeviceLayerProperties(VkPhysicalDevice, uint32_t*, VkLayerProperties*) {
     return VK_SUCCESS;
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName,
                                                                          uint32_t* pPropertyCount,
                                                                          VkExtensionProperties* pProperties) {
+    if (pPropertyCount == nullptr) {
+        return VK_INCOMPLETE;
+    }
+
     if (pLayerName && string_eq(pLayerName, TEST_LAYER_NAME)) {
-        *pPropertyCount = 0;
+        if (pProperties) {
+            if (*pPropertyCount < static_cast<uint32_t>(layer.injected_device_extensions.size())) {
+                return VK_INCOMPLETE;
+            }
+            for (size_t i = 0; i < layer.injected_device_extensions.size(); i++) {
+                pProperties[i] = layer.injected_device_extensions.at(i).get();
+            }
+            *pPropertyCount = static_cast<uint32_t>(layer.injected_device_extensions.size());
+        } else {
+            *pPropertyCount = static_cast<uint32_t>(layer.injected_device_extensions.size());
+        }
         return VK_SUCCESS;
     }
-    return layer.instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount,
-                                                                            pProperties);
+
+    uint32_t hardware_prop_count = 0;
+    if (pProperties) {
+        hardware_prop_count = *pPropertyCount - static_cast<uint32_t>(layer.injected_device_extensions.size());
+    }
+
+    VkResult res = layer.instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName,
+                                                                                    &hardware_prop_count, pProperties);
+    if (res < 0) {
+        return res;
+    }
+
+    if (pProperties == nullptr) {
+        *pPropertyCount = hardware_prop_count + static_cast<uint32_t>(layer.injected_device_extensions.size());
+    } else {
+        if (hardware_prop_count + layer.injected_device_extensions.size() > *pPropertyCount) {
+            *pPropertyCount = hardware_prop_count;
+            return VK_INCOMPLETE;
+        }
+        for (size_t i = 0; i < layer.injected_device_extensions.size(); i++) {
+            pProperties[hardware_prop_count + i] = layer.injected_device_extensions.at(i).get();
+        }
+        *pPropertyCount = hardware_prop_count + static_cast<uint32_t>(layer.injected_device_extensions.size());
+    }
+    return res;
 }
 
 VKAPI_ATTR VkResult VKAPI_CALL test_vkEnumerateInstanceVersion(uint32_t* pApiVersion) {
@@ -152,6 +249,12 @@
         return VK_ERROR_INITIALIZATION_FAILED;
     }
 
+    if (layer.call_create_device_while_create_device_is_called) {
+        auto* createDeviceCallback = get_chain_info(pCreateInfo, VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK);
+        layer.callback_vkCreateDevice = createDeviceCallback->u.layerDevice.pfnLayerCreateDevice;
+        layer.callback_vkDestroyDevice = createDeviceCallback->u.layerDevice.pfnLayerDestroyDevice;
+    }
+
     // Advance the link info for the next element of the chain
     chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext;
     layer.next_vkGetInstanceProcAddr = fpGetInstanceProcAddr;
@@ -174,6 +277,10 @@
     }
     const VkInstanceCreateInfo* create_info_pointer = use_modified_create_info ? &instance_create_info : pCreateInfo;
 
+    if (layer.clobber_pInstance) {
+        memset(*pInstance, 0, 128);
+    }
+
     // Continue call down the chain
     VkResult result = fpCreateInstance(create_info_pointer, pAllocator, pInstance);
     if (result != VK_SUCCESS) {
@@ -190,6 +297,10 @@
     // next layer in the chain.
     layer_init_instance_dispatch_table(layer.instance_handle, &layer.instance_dispatch_table, fpGetInstanceProcAddr);
 
+    for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
+        layer.enabled_instance_extensions.push_back({pCreateInfo->ppEnabledExtensionNames[i]});
+    }
+
     if (layer.create_instance_callback) result = layer.create_instance_callback(layer);
 
     for (auto& func : layer.custom_physical_device_interception_functions) {
@@ -210,11 +321,54 @@
         }
     }
 
+    if (!layer.make_spurious_log_in_create_instance.empty()) {
+        auto* chain = reinterpret_cast<const VkBaseInStructure*>(pCreateInfo->pNext);
+        while (chain) {
+            if (chain->sType == VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT) {
+                auto* debug_messenger = reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(chain);
+                VkDebugUtilsMessengerCallbackDataEXT data{};
+                data.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT;
+                data.pMessage = layer.make_spurious_log_in_create_instance.c_str();
+                debug_messenger->pfnUserCallback(VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT,
+                                                 VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, &data, debug_messenger->pUserData);
+            }
+
+            chain = chain->pNext;
+        }
+    }
+
+    if (layer.buggy_query_of_vkCreateDevice) {
+        layer.instance_dispatch_table.CreateDevice =
+            reinterpret_cast<PFN_vkCreateDevice>(fpGetInstanceProcAddr(nullptr, "vkCreateDevice"));
+    }
+
+    if (layer.call_create_device_while_create_device_is_called) {
+        uint32_t phys_dev_count = 0;
+        result = layer.instance_dispatch_table.EnumeratePhysicalDevices(layer.instance_handle, &phys_dev_count, nullptr);
+        if (result != VK_SUCCESS) {
+            return result;
+        }
+        layer.queried_physical_devices.resize(phys_dev_count);
+        result = layer.instance_dispatch_table.EnumeratePhysicalDevices(layer.instance_handle, &phys_dev_count,
+                                                                        layer.queried_physical_devices.data());
+        if (result != VK_SUCCESS) {
+            return result;
+        }
+    }
+
+    if (layer.check_if_EnumDevExtProps_is_same_as_queried_function) {
+        auto chain_info_EnumDeviceExtProps = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(
+            fpGetInstanceProcAddr(layer.instance_handle, "vkEnumerateDeviceExtensionProperties"));
+        if (chain_info_EnumDeviceExtProps != layer.instance_dispatch_table.EnumerateDeviceExtensionProperties) {
+            return VK_ERROR_INITIALIZATION_FAILED;
+        }
+    }
+
     return result;
 }
 
-VKAPI_ATTR VkResult VKAPI_CALL test_override_vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo,
-                                                              const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) {
+VKAPI_ATTR VkResult VKAPI_CALL test_override_vkCreateInstance(const VkInstanceCreateInfo*, const VkAllocationCallbacks*,
+                                                              VkInstance*) {
     return VK_ERROR_INVALID_SHADER_NV;
 }
 
@@ -233,16 +387,28 @@
 
     PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr;
     PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr;
-    PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(layer.instance_handle, "vkCreateDevice");
+    VkInstance instance_to_use = layer.buggy_query_of_vkCreateDevice ? NULL : layer.instance_handle;
+    PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_to_use, "vkCreateDevice");
     if (fpCreateDevice == NULL) {
         return VK_ERROR_INITIALIZATION_FAILED;
     }
 
     layer.next_vkGetDeviceProcAddr = fpGetDeviceProcAddr;
 
+    if (layer.check_if_EnumDevExtProps_is_same_as_queried_function) {
+        auto chain_info_EnumDeviceExtProps = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(
+            fpGetInstanceProcAddr(layer.instance_handle, "vkEnumerateDeviceExtensionProperties"));
+        if (chain_info_EnumDeviceExtProps != layer.instance_dispatch_table.EnumerateDeviceExtensionProperties) {
+            return VK_ERROR_INITIALIZATION_FAILED;
+        }
+    }
     // Advance the link info for the next element on the chain
     chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext;
 
+    if (layer.clobber_pDevice) {
+        memset(*pDevice, 0, 128);
+    }
+
     VkResult result = fpCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice);
     if (result != VK_SUCCESS) {
         return result;
@@ -253,6 +419,10 @@
     // initialize layer's dispatch table
     layer_init_device_dispatch_table(device.device_handle, &device.dispatch_table, fpGetDeviceProcAddr);
 
+    for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
+        device.enabled_extensions.push_back({pCreateInfo->ppEnabledExtensionNames[i]});
+    }
+
     for (auto& func : layer.custom_device_interception_functions) {
         auto next_func = layer.next_vkGetDeviceProcAddr(*pDevice, func.name.c_str());
         layer.custom_dispatch_functions.at(func.name.c_str()) = next_func;
@@ -274,6 +444,20 @@
         }
     }
 
+    if (layer.call_create_device_while_create_device_is_called) {
+        PFN_vkGetDeviceProcAddr next_gdpa = layer.next_vkGetDeviceProcAddr;
+        result = layer.callback_vkCreateDevice(
+            instance_to_use, layer.queried_physical_devices.at(layer.physical_device_index_to_use_during_create_device),
+            pCreateInfo, pAllocator, &layer.second_device_created_during_create_device.device_handle, get_instance_func,
+            &next_gdpa);
+        if (result != VK_SUCCESS) {
+            return result;
+        }
+        // initialize the other device's dispatch table
+        layer_init_device_dispatch_table(layer.second_device_created_during_create_device.device_handle,
+                                         &layer.second_device_created_during_create_device.dispatch_table, next_gdpa);
+    }
+
     return result;
 }
 
@@ -387,10 +571,8 @@
             //       underneath us when using this test.
             uint32_t icd_group_count = 0;
             layer.instance_dispatch_table.EnumeratePhysicalDeviceGroups(instance, &icd_group_count, nullptr);
-            std::vector<VkPhysicalDeviceGroupProperties> tmp_vector(icd_group_count);
-            for (uint32_t group = 0; group < icd_group_count; ++group) {
-                tmp_vector[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-            }
+            std::vector<VkPhysicalDeviceGroupProperties> tmp_vector(icd_group_count,
+                                                                    {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
             layer.instance_dispatch_table.EnumeratePhysicalDeviceGroups(instance, &icd_group_count, tmp_vector.data());
             layer.complete_physical_device_groups.clear();
 
@@ -475,13 +657,132 @@
         }
     }
 
-    for (auto& created_device : layer.created_devices) {
-        if (created_device.device_handle == device) {
-            created_device.dispatch_table.DestroyDevice(device, pAllocator);
-            break;
-        }
+    if (layer.call_create_device_while_create_device_is_called) {
+        layer.callback_vkDestroyDevice(layer.second_device_created_during_create_device.device_handle, pAllocator,
+                                       layer.second_device_created_during_create_device.dispatch_table.DestroyDevice);
+    }
+
+    auto it = std::find_if(std::begin(layer.created_devices), std::end(layer.created_devices),
+                           [device](const TestLayer::Device& dev) { return device == dev.device_handle; });
+    if (it != std::end(layer.created_devices)) {
+        it->dispatch_table.DestroyDevice(device, pAllocator);
+        layer.created_devices.erase(it);
     }
 }
+
+VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateDebugUtilsMessengerEXT(VkInstance instance,
+                                                                   const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
+                                                                   const VkAllocationCallbacks* pAllocator,
+                                                                   VkDebugUtilsMessengerEXT* pMessenger) {
+    if (layer.instance_dispatch_table.CreateDebugUtilsMessengerEXT) {
+        return layer.instance_dispatch_table.CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger);
+    } else {
+        return VK_SUCCESS;
+    }
+}
+
+VKAPI_ATTR void VKAPI_CALL test_vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger,
+                                                                const VkAllocationCallbacks* pAllocator) {
+    if (layer.instance_dispatch_table.DestroyDebugUtilsMessengerEXT)
+        return layer.instance_dispatch_table.DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator);
+}
+
+// Debug utils & debug marker ext stubs
+VKAPI_ATTR VkResult VKAPI_CALL test_vkDebugMarkerSetObjectTagEXT(VkDevice dev, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) {
+    for (const auto& d : layer.created_devices) {
+        if (d.device_handle == dev) {
+            if (d.dispatch_table.DebugMarkerSetObjectTagEXT) {
+                return d.dispatch_table.DebugMarkerSetObjectTagEXT(dev, pTagInfo);
+            } else {
+                return VK_SUCCESS;
+            }
+        }
+    }
+    return VK_SUCCESS;
+}
+VKAPI_ATTR VkResult VKAPI_CALL test_vkDebugMarkerSetObjectNameEXT(VkDevice dev, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) {
+    for (const auto& d : layer.created_devices) {
+        if (d.device_handle == dev) {
+            if (d.dispatch_table.DebugMarkerSetObjectNameEXT) {
+                return d.dispatch_table.DebugMarkerSetObjectNameEXT(dev, pNameInfo);
+            } else {
+                return VK_SUCCESS;
+            }
+        }
+    }
+    return VK_SUCCESS;
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerBeginEXT(VkCommandBuffer cmd_buf, const VkDebugMarkerMarkerInfoEXT* marker_info) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdDebugMarkerBeginEXT)
+        layer.created_devices[0].dispatch_table.CmdDebugMarkerBeginEXT(cmd_buf, marker_info);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerEndEXT(VkCommandBuffer cmd_buf) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdDebugMarkerEndEXT)
+        layer.created_devices[0].dispatch_table.CmdDebugMarkerEndEXT(cmd_buf);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDebugMarkerInsertEXT(VkCommandBuffer cmd_buf, const VkDebugMarkerMarkerInfoEXT* marker_info) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdDebugMarkerInsertEXT)
+        layer.created_devices[0].dispatch_table.CmdDebugMarkerInsertEXT(cmd_buf, marker_info);
+}
+
+VKAPI_ATTR VkResult VKAPI_CALL test_vkSetDebugUtilsObjectNameEXT(VkDevice dev, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) {
+    for (const auto& d : layer.created_devices) {
+        if (d.device_handle == dev) {
+            if (d.dispatch_table.SetDebugUtilsObjectNameEXT) {
+                return d.dispatch_table.SetDebugUtilsObjectNameEXT(dev, pNameInfo);
+            } else {
+                return VK_SUCCESS;
+            }
+        }
+    }
+    return VK_SUCCESS;
+}
+VKAPI_ATTR VkResult VKAPI_CALL test_vkSetDebugUtilsObjectTagEXT(VkDevice dev, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) {
+    for (const auto& d : layer.created_devices) {
+        if (d.device_handle == dev) {
+            if (d.dispatch_table.SetDebugUtilsObjectTagEXT) {
+                return d.dispatch_table.SetDebugUtilsObjectTagEXT(dev, pTagInfo);
+            } else {
+                return VK_SUCCESS;
+            }
+        }
+    }
+    return VK_SUCCESS;
+}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* label) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.QueueBeginDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.QueueBeginDebugUtilsLabelEXT(queue, label);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueEndDebugUtilsLabelEXT(VkQueue queue) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.QueueEndDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.QueueEndDebugUtilsLabelEXT(queue);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* label) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.QueueInsertDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.QueueInsertDebugUtilsLabelEXT(queue, label);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer cmd_buf, const VkDebugUtilsLabelEXT* label) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdBeginDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.CmdBeginDebugUtilsLabelEXT(cmd_buf, label);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer cmd_buf) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdEndDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.CmdEndDebugUtilsLabelEXT(cmd_buf);
+}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer cmd_buf, const VkDebugUtilsLabelEXT* label) {
+    // Just call the first device -
+    if (layer.created_devices[0].dispatch_table.CmdInsertDebugUtilsLabelEXT)
+        layer.created_devices[0].dispatch_table.CmdInsertDebugUtilsLabelEXT(cmd_buf, label);
+}
+
 // forward declarations needed for trampolines
 #if TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR
 extern "C" {
@@ -491,10 +792,28 @@
 
 // trampolines
 VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_func(VkDevice device, const char* pName);
-VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_func_impl(VkDevice device, const char* pName) {
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_func_impl([[maybe_unused]] VkDevice device, const char* pName) {
     if (string_eq(pName, "vkGetDeviceProcAddr")) return to_vkVoidFunction(get_device_func);
     if (string_eq(pName, "vkDestroyDevice")) return to_vkVoidFunction(test_vkDestroyDevice);
 
+    if (IsDeviceExtensionAvailable(device, VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
+        if (string_eq(pName, "vkDebugMarkerSetObjectTagEXT")) return to_vkVoidFunction(test_vkDebugMarkerSetObjectTagEXT);
+        if (string_eq(pName, "vkDebugMarkerSetObjectNameEXT")) return to_vkVoidFunction(test_vkDebugMarkerSetObjectNameEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerBeginEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerBeginEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerEndEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerEndEXT);
+        if (string_eq(pName, "vkCmdDebugMarkerInsertEXT")) return to_vkVoidFunction(test_vkCmdDebugMarkerInsertEXT);
+    }
+    if (IsInstanceExtensionEnabled(VK_EXT_DEBUG_UTILS_EXTENSION_NAME)) {
+        if (string_eq(pName, "vkSetDebugUtilsObjectNameEXT")) return to_vkVoidFunction(test_vkSetDebugUtilsObjectNameEXT);
+        if (string_eq(pName, "vkSetDebugUtilsObjectTagEXT")) return to_vkVoidFunction(test_vkSetDebugUtilsObjectTagEXT);
+        if (string_eq(pName, "vkQueueBeginDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkQueueBeginDebugUtilsLabelEXT);
+        if (string_eq(pName, "vkQueueEndDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkQueueEndDebugUtilsLabelEXT);
+        if (string_eq(pName, "vkQueueInsertDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkQueueInsertDebugUtilsLabelEXT);
+        if (string_eq(pName, "vkCmdBeginDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkCmdBeginDebugUtilsLabelEXT);
+        if (string_eq(pName, "vkCmdEndDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkCmdEndDebugUtilsLabelEXT);
+        if (string_eq(pName, "vkCmdInsertDebugUtilsLabelEXT")) return to_vkVoidFunction(test_vkCmdInsertDebugUtilsLabelEXT);
+    }
+
     for (auto& func : layer.custom_device_interception_functions) {
         if (func.name == pName) {
             return to_vkVoidFunction(func.function);
@@ -510,14 +829,14 @@
     return nullptr;
 }
 
-VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_func(VkDevice device, const char* pName) {
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_func([[maybe_unused]] VkDevice device, const char* pName) {
     PFN_vkVoidFunction ret_dev = get_device_func_impl(device, pName);
     if (ret_dev != nullptr) return ret_dev;
 
     return layer.next_vkGetDeviceProcAddr(device, pName);
 }
 
-VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_physical_device_func(VkInstance instance, const char* pName) {
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_physical_device_func([[maybe_unused]] VkInstance instance, const char* pName) {
     if (string_eq(pName, "vkEnumerateDeviceLayerProperties")) return to_vkVoidFunction(test_vkEnumerateDeviceLayerProperties);
     if (string_eq(pName, "vkEnumerateDeviceExtensionProperties"))
         return to_vkVoidFunction(test_vkEnumerateDeviceExtensionProperties);
@@ -651,6 +970,9 @@
 FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL test_layer_GetInstanceProcAddr(VkInstance instance, const char* pName) {
     return get_instance_func(instance, pName);
 }
+#endif
+
+#if TEST_LAYER_EXPORT_OVERRIDE_GIPA
 FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL test_override_vkGetInstanceProcAddr(VkInstance instance,
                                                                                               const char* pName) {
     if (string_eq(pName, "vkCreateInstance")) return to_vkVoidFunction(test_override_vkCreateInstance);
@@ -670,20 +992,14 @@
 }
 #endif
 
-#if TEST_LAYER_EXPORT_LAYER_VK_GDPA
-FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName) {
+#if TEST_LAYER_EXPORT_OVERRIDE_GDPA
+FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL test_override_GetDeviceProcAddr(VkDevice device, const char* pName) {
     return get_device_func(device, pName);
 }
 #endif
 
-#if TEST_LAYER_EXPORT_NO_PREFIX_GIPA
-FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* pName) {
-    return get_instance_func(instance, pName);
-}
-#endif
-
-#if TEST_LAYER_EXPORT_NO_PREFIX_GDPA
-FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* pName) {
+#if TEST_LAYER_EXPORT_LAYER_VK_GDPA
+FRAMEWORK_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName) {
     return get_device_func(device, pName);
 }
 #endif
diff --git a/tests/framework/layer/test_layer.h b/tests/framework/layer/test_layer.h
index c0f0012..d6d086c 100644
--- a/tests/framework/layer/test_layer.h
+++ b/tests/framework/layer/test_layer.h
@@ -108,11 +108,18 @@
     BUILDER_VECTOR(TestLayer, std::string, alternative_function_names, alternative_function_name)
 
     BUILDER_VECTOR(TestLayer, Extension, instance_extensions, instance_extension)
+    std::vector<Extension> enabled_instance_extensions;
+
     BUILDER_VECTOR(TestLayer, Extension, device_extensions, device_extension)
 
     BUILDER_VALUE(TestLayer, std::string, enable_environment, {});
     BUILDER_VALUE(TestLayer, std::string, disable_environment, {});
 
+    // Modifies the extension list returned by vkEnumerateInstanceExtensionProperties to include what is in this vector
+    BUILDER_VECTOR(TestLayer, Extension, injected_instance_extensions, injected_instance_extension)
+    // Modifies the extension list returned by  vkEnumerateDeviceExtensionProperties to include what is in this vector
+    BUILDER_VECTOR(TestLayer, Extension, injected_device_extensions, injected_device_extension)
+
     BUILDER_VECTOR(TestLayer, LayerDefinition, meta_component_layers, meta_component_layer);
 
     BUILDER_VALUE(TestLayer, bool, intercept_vkEnumerateInstanceExtensionProperties, false)
@@ -160,6 +167,8 @@
         return nullptr;
     }
 
+    // Allows distinguishing different layers (that use the same binary)
+    BUILDER_VALUE(TestLayer, std::string, make_spurious_log_in_create_instance, "")
     BUILDER_VALUE(TestLayer, bool, do_spurious_allocations_in_create_instance, false)
     void* spurious_instance_memory_allocation = nullptr;
     BUILDER_VALUE(TestLayer, bool, do_spurious_allocations_in_create_device, false)
@@ -172,6 +181,20 @@
     // By default query GPDPA from GIPA, don't use value given from pNext
     BUILDER_VALUE(TestLayer, bool, use_gipa_GetPhysicalDeviceProcAddr, true)
 
+    // Have a layer query for vkCreateDevice with a NULL instance handle
+    BUILDER_VALUE(TestLayer, bool, buggy_query_of_vkCreateDevice, false)
+
+    // Makes the layer try to create a device using the loader provided function in the layer chain
+    BUILDER_VALUE(TestLayer, bool, call_create_device_while_create_device_is_called, false)
+    BUILDER_VALUE(TestLayer, uint32_t, physical_device_index_to_use_during_create_device, 0)
+
+    BUILDER_VALUE(TestLayer, bool, check_if_EnumDevExtProps_is_same_as_queried_function, false)
+
+    // Clober the data pointed to by pInstance to overwrite the magic value
+    BUILDER_VALUE(TestLayer, bool, clobber_pInstance, false)
+    // Clober the data pointed to by pDevice to overwrite the magic value
+    BUILDER_VALUE(TestLayer, bool, clobber_pDevice, false)
+
     PFN_vkGetInstanceProcAddr next_vkGetInstanceProcAddr = VK_NULL_HANDLE;
     PFN_GetPhysicalDeviceProcAddr next_GetPhysicalDeviceProcAddr = VK_NULL_HANDLE;
     PFN_vkGetDeviceProcAddr next_vkGetDeviceProcAddr = VK_NULL_HANDLE;
@@ -182,8 +205,15 @@
     struct Device {
         VkDevice device_handle = VK_NULL_HANDLE;
         VkLayerDispatchTable dispatch_table{};
+        std::vector<Extension> enabled_extensions;
     };
     std::vector<Device> created_devices;
+
+    // Stores the callback that allows layers to create devices on their own
+    PFN_vkLayerCreateDevice callback_vkCreateDevice{};
+    PFN_vkLayerDestroyDevice callback_vkDestroyDevice{};
+    std::vector<VkPhysicalDevice> queried_physical_devices;
+    Device second_device_created_during_create_device{};
 };
 
 using GetTestLayerFunc = TestLayer* (*)();
diff --git a/tests/framework/layer/vk_dispatch_table_helper.h b/tests/framework/layer/vk_dispatch_table_helper.h
new file mode 100644
index 0000000..bea7013
--- /dev/null
+++ b/tests/framework/layer/vk_dispatch_table_helper.h
@@ -0,0 +1,777 @@
+#pragma once
+// *** THIS FILE IS GENERATED - DO NOT EDIT ***
+// See dispatch_helper_generator.py for modifications
+
+/*
+ * Copyright (c) 2015-2021 The Khronos Group Inc.
+ * Copyright (c) 2015-2021 Valve Corporation
+ * Copyright (c) 2015-2021 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Author: Courtney Goeltzenleuchter <courtney@LunarG.com>
+ * Author: Jon Ashburn <jon@lunarg.com>
+ * Author: Mark Lobodzinski <mark@lunarg.com>
+ */
+
+#include <vulkan/vulkan.h>
+#include <vulkan/vk_layer.h>
+#include <string.h>
+#include "loader/generated/vk_layer_dispatch_table.h"
+
+
+
+
+static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDispatchTable *table, PFN_vkGetDeviceProcAddr gpa) {
+    memset(table, 0, sizeof(*table));
+    table->magic = DEVICE_DISP_TABLE_MAGIC_NUMBER;
+
+    // Device function pointers
+    table->GetDeviceProcAddr = gpa;
+    table->DestroyDevice = (PFN_vkDestroyDevice) gpa(device, "vkDestroyDevice");
+    table->GetDeviceQueue = (PFN_vkGetDeviceQueue) gpa(device, "vkGetDeviceQueue");
+    table->QueueSubmit = (PFN_vkQueueSubmit) gpa(device, "vkQueueSubmit");
+    table->QueueWaitIdle = (PFN_vkQueueWaitIdle) gpa(device, "vkQueueWaitIdle");
+    table->DeviceWaitIdle = (PFN_vkDeviceWaitIdle) gpa(device, "vkDeviceWaitIdle");
+    table->AllocateMemory = (PFN_vkAllocateMemory) gpa(device, "vkAllocateMemory");
+    table->FreeMemory = (PFN_vkFreeMemory) gpa(device, "vkFreeMemory");
+    table->MapMemory = (PFN_vkMapMemory) gpa(device, "vkMapMemory");
+    table->UnmapMemory = (PFN_vkUnmapMemory) gpa(device, "vkUnmapMemory");
+    table->FlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) gpa(device, "vkFlushMappedMemoryRanges");
+    table->InvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) gpa(device, "vkInvalidateMappedMemoryRanges");
+    table->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) gpa(device, "vkGetDeviceMemoryCommitment");
+    table->BindBufferMemory = (PFN_vkBindBufferMemory) gpa(device, "vkBindBufferMemory");
+    table->BindImageMemory = (PFN_vkBindImageMemory) gpa(device, "vkBindImageMemory");
+    table->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) gpa(device, "vkGetBufferMemoryRequirements");
+    table->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) gpa(device, "vkGetImageMemoryRequirements");
+    table->GetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) gpa(device, "vkGetImageSparseMemoryRequirements");
+    table->QueueBindSparse = (PFN_vkQueueBindSparse) gpa(device, "vkQueueBindSparse");
+    table->CreateFence = (PFN_vkCreateFence) gpa(device, "vkCreateFence");
+    table->DestroyFence = (PFN_vkDestroyFence) gpa(device, "vkDestroyFence");
+    table->ResetFences = (PFN_vkResetFences) gpa(device, "vkResetFences");
+    table->GetFenceStatus = (PFN_vkGetFenceStatus) gpa(device, "vkGetFenceStatus");
+    table->WaitForFences = (PFN_vkWaitForFences) gpa(device, "vkWaitForFences");
+    table->CreateSemaphore = (PFN_vkCreateSemaphore) gpa(device, "vkCreateSemaphore");
+    table->DestroySemaphore = (PFN_vkDestroySemaphore) gpa(device, "vkDestroySemaphore");
+    table->CreateEvent = (PFN_vkCreateEvent) gpa(device, "vkCreateEvent");
+    table->DestroyEvent = (PFN_vkDestroyEvent) gpa(device, "vkDestroyEvent");
+    table->GetEventStatus = (PFN_vkGetEventStatus) gpa(device, "vkGetEventStatus");
+    table->SetEvent = (PFN_vkSetEvent) gpa(device, "vkSetEvent");
+    table->ResetEvent = (PFN_vkResetEvent) gpa(device, "vkResetEvent");
+    table->CreateQueryPool = (PFN_vkCreateQueryPool) gpa(device, "vkCreateQueryPool");
+    table->DestroyQueryPool = (PFN_vkDestroyQueryPool) gpa(device, "vkDestroyQueryPool");
+    table->GetQueryPoolResults = (PFN_vkGetQueryPoolResults) gpa(device, "vkGetQueryPoolResults");
+    table->CreateBuffer = (PFN_vkCreateBuffer) gpa(device, "vkCreateBuffer");
+    table->DestroyBuffer = (PFN_vkDestroyBuffer) gpa(device, "vkDestroyBuffer");
+    table->CreateBufferView = (PFN_vkCreateBufferView) gpa(device, "vkCreateBufferView");
+    table->DestroyBufferView = (PFN_vkDestroyBufferView) gpa(device, "vkDestroyBufferView");
+    table->CreateImage = (PFN_vkCreateImage) gpa(device, "vkCreateImage");
+    table->DestroyImage = (PFN_vkDestroyImage) gpa(device, "vkDestroyImage");
+    table->GetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) gpa(device, "vkGetImageSubresourceLayout");
+    table->CreateImageView = (PFN_vkCreateImageView) gpa(device, "vkCreateImageView");
+    table->DestroyImageView = (PFN_vkDestroyImageView) gpa(device, "vkDestroyImageView");
+    table->CreateShaderModule = (PFN_vkCreateShaderModule) gpa(device, "vkCreateShaderModule");
+    table->DestroyShaderModule = (PFN_vkDestroyShaderModule) gpa(device, "vkDestroyShaderModule");
+    table->CreatePipelineCache = (PFN_vkCreatePipelineCache) gpa(device, "vkCreatePipelineCache");
+    table->DestroyPipelineCache = (PFN_vkDestroyPipelineCache) gpa(device, "vkDestroyPipelineCache");
+    table->GetPipelineCacheData = (PFN_vkGetPipelineCacheData) gpa(device, "vkGetPipelineCacheData");
+    table->MergePipelineCaches = (PFN_vkMergePipelineCaches) gpa(device, "vkMergePipelineCaches");
+    table->CreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) gpa(device, "vkCreateGraphicsPipelines");
+    table->CreateComputePipelines = (PFN_vkCreateComputePipelines) gpa(device, "vkCreateComputePipelines");
+    table->DestroyPipeline = (PFN_vkDestroyPipeline) gpa(device, "vkDestroyPipeline");
+    table->CreatePipelineLayout = (PFN_vkCreatePipelineLayout) gpa(device, "vkCreatePipelineLayout");
+    table->DestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) gpa(device, "vkDestroyPipelineLayout");
+    table->CreateSampler = (PFN_vkCreateSampler) gpa(device, "vkCreateSampler");
+    table->DestroySampler = (PFN_vkDestroySampler) gpa(device, "vkDestroySampler");
+    table->CreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) gpa(device, "vkCreateDescriptorSetLayout");
+    table->DestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) gpa(device, "vkDestroyDescriptorSetLayout");
+    table->CreateDescriptorPool = (PFN_vkCreateDescriptorPool) gpa(device, "vkCreateDescriptorPool");
+    table->DestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) gpa(device, "vkDestroyDescriptorPool");
+    table->ResetDescriptorPool = (PFN_vkResetDescriptorPool) gpa(device, "vkResetDescriptorPool");
+    table->AllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) gpa(device, "vkAllocateDescriptorSets");
+    table->FreeDescriptorSets = (PFN_vkFreeDescriptorSets) gpa(device, "vkFreeDescriptorSets");
+    table->UpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) gpa(device, "vkUpdateDescriptorSets");
+    table->CreateFramebuffer = (PFN_vkCreateFramebuffer) gpa(device, "vkCreateFramebuffer");
+    table->DestroyFramebuffer = (PFN_vkDestroyFramebuffer) gpa(device, "vkDestroyFramebuffer");
+    table->CreateRenderPass = (PFN_vkCreateRenderPass) gpa(device, "vkCreateRenderPass");
+    table->DestroyRenderPass = (PFN_vkDestroyRenderPass) gpa(device, "vkDestroyRenderPass");
+    table->GetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) gpa(device, "vkGetRenderAreaGranularity");
+    table->CreateCommandPool = (PFN_vkCreateCommandPool) gpa(device, "vkCreateCommandPool");
+    table->DestroyCommandPool = (PFN_vkDestroyCommandPool) gpa(device, "vkDestroyCommandPool");
+    table->ResetCommandPool = (PFN_vkResetCommandPool) gpa(device, "vkResetCommandPool");
+    table->AllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) gpa(device, "vkAllocateCommandBuffers");
+    table->FreeCommandBuffers = (PFN_vkFreeCommandBuffers) gpa(device, "vkFreeCommandBuffers");
+    table->BeginCommandBuffer = (PFN_vkBeginCommandBuffer) gpa(device, "vkBeginCommandBuffer");
+    table->EndCommandBuffer = (PFN_vkEndCommandBuffer) gpa(device, "vkEndCommandBuffer");
+    table->ResetCommandBuffer = (PFN_vkResetCommandBuffer) gpa(device, "vkResetCommandBuffer");
+    table->CmdBindPipeline = (PFN_vkCmdBindPipeline) gpa(device, "vkCmdBindPipeline");
+    table->CmdSetViewport = (PFN_vkCmdSetViewport) gpa(device, "vkCmdSetViewport");
+    table->CmdSetScissor = (PFN_vkCmdSetScissor) gpa(device, "vkCmdSetScissor");
+    table->CmdSetLineWidth = (PFN_vkCmdSetLineWidth) gpa(device, "vkCmdSetLineWidth");
+    table->CmdSetDepthBias = (PFN_vkCmdSetDepthBias) gpa(device, "vkCmdSetDepthBias");
+    table->CmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) gpa(device, "vkCmdSetBlendConstants");
+    table->CmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) gpa(device, "vkCmdSetDepthBounds");
+    table->CmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) gpa(device, "vkCmdSetStencilCompareMask");
+    table->CmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) gpa(device, "vkCmdSetStencilWriteMask");
+    table->CmdSetStencilReference = (PFN_vkCmdSetStencilReference) gpa(device, "vkCmdSetStencilReference");
+    table->CmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) gpa(device, "vkCmdBindDescriptorSets");
+    table->CmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) gpa(device, "vkCmdBindIndexBuffer");
+    table->CmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) gpa(device, "vkCmdBindVertexBuffers");
+    table->CmdDraw = (PFN_vkCmdDraw) gpa(device, "vkCmdDraw");
+    table->CmdDrawIndexed = (PFN_vkCmdDrawIndexed) gpa(device, "vkCmdDrawIndexed");
+    table->CmdDrawIndirect = (PFN_vkCmdDrawIndirect) gpa(device, "vkCmdDrawIndirect");
+    table->CmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) gpa(device, "vkCmdDrawIndexedIndirect");
+    table->CmdDispatch = (PFN_vkCmdDispatch) gpa(device, "vkCmdDispatch");
+    table->CmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) gpa(device, "vkCmdDispatchIndirect");
+    table->CmdCopyBuffer = (PFN_vkCmdCopyBuffer) gpa(device, "vkCmdCopyBuffer");
+    table->CmdCopyImage = (PFN_vkCmdCopyImage) gpa(device, "vkCmdCopyImage");
+    table->CmdBlitImage = (PFN_vkCmdBlitImage) gpa(device, "vkCmdBlitImage");
+    table->CmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) gpa(device, "vkCmdCopyBufferToImage");
+    table->CmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) gpa(device, "vkCmdCopyImageToBuffer");
+    table->CmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) gpa(device, "vkCmdUpdateBuffer");
+    table->CmdFillBuffer = (PFN_vkCmdFillBuffer) gpa(device, "vkCmdFillBuffer");
+    table->CmdClearColorImage = (PFN_vkCmdClearColorImage) gpa(device, "vkCmdClearColorImage");
+    table->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) gpa(device, "vkCmdClearDepthStencilImage");
+    table->CmdClearAttachments = (PFN_vkCmdClearAttachments) gpa(device, "vkCmdClearAttachments");
+    table->CmdResolveImage = (PFN_vkCmdResolveImage) gpa(device, "vkCmdResolveImage");
+    table->CmdSetEvent = (PFN_vkCmdSetEvent) gpa(device, "vkCmdSetEvent");
+    table->CmdResetEvent = (PFN_vkCmdResetEvent) gpa(device, "vkCmdResetEvent");
+    table->CmdWaitEvents = (PFN_vkCmdWaitEvents) gpa(device, "vkCmdWaitEvents");
+    table->CmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) gpa(device, "vkCmdPipelineBarrier");
+    table->CmdBeginQuery = (PFN_vkCmdBeginQuery) gpa(device, "vkCmdBeginQuery");
+    table->CmdEndQuery = (PFN_vkCmdEndQuery) gpa(device, "vkCmdEndQuery");
+    table->CmdResetQueryPool = (PFN_vkCmdResetQueryPool) gpa(device, "vkCmdResetQueryPool");
+    table->CmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) gpa(device, "vkCmdWriteTimestamp");
+    table->CmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) gpa(device, "vkCmdCopyQueryPoolResults");
+    table->CmdPushConstants = (PFN_vkCmdPushConstants) gpa(device, "vkCmdPushConstants");
+    table->CmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) gpa(device, "vkCmdBeginRenderPass");
+    table->CmdNextSubpass = (PFN_vkCmdNextSubpass) gpa(device, "vkCmdNextSubpass");
+    table->CmdEndRenderPass = (PFN_vkCmdEndRenderPass) gpa(device, "vkCmdEndRenderPass");
+    table->CmdExecuteCommands = (PFN_vkCmdExecuteCommands) gpa(device, "vkCmdExecuteCommands");
+    table->BindBufferMemory2 = (PFN_vkBindBufferMemory2) gpa(device, "vkBindBufferMemory2");
+    table->BindImageMemory2 = (PFN_vkBindImageMemory2) gpa(device, "vkBindImageMemory2");
+    table->GetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) gpa(device, "vkGetDeviceGroupPeerMemoryFeatures");
+    table->CmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) gpa(device, "vkCmdSetDeviceMask");
+    table->CmdDispatchBase = (PFN_vkCmdDispatchBase) gpa(device, "vkCmdDispatchBase");
+    table->GetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) gpa(device, "vkGetImageMemoryRequirements2");
+    table->GetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) gpa(device, "vkGetBufferMemoryRequirements2");
+    table->GetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) gpa(device, "vkGetImageSparseMemoryRequirements2");
+    table->TrimCommandPool = (PFN_vkTrimCommandPool) gpa(device, "vkTrimCommandPool");
+    table->GetDeviceQueue2 = (PFN_vkGetDeviceQueue2) gpa(device, "vkGetDeviceQueue2");
+    table->CreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) gpa(device, "vkCreateSamplerYcbcrConversion");
+    table->DestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) gpa(device, "vkDestroySamplerYcbcrConversion");
+    table->CreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) gpa(device, "vkCreateDescriptorUpdateTemplate");
+    table->DestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) gpa(device, "vkDestroyDescriptorUpdateTemplate");
+    table->UpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) gpa(device, "vkUpdateDescriptorSetWithTemplate");
+    table->GetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) gpa(device, "vkGetDescriptorSetLayoutSupport");
+    table->CmdDrawIndirectCount = (PFN_vkCmdDrawIndirectCount) gpa(device, "vkCmdDrawIndirectCount");
+    table->CmdDrawIndexedIndirectCount = (PFN_vkCmdDrawIndexedIndirectCount) gpa(device, "vkCmdDrawIndexedIndirectCount");
+    table->CreateRenderPass2 = (PFN_vkCreateRenderPass2) gpa(device, "vkCreateRenderPass2");
+    table->CmdBeginRenderPass2 = (PFN_vkCmdBeginRenderPass2) gpa(device, "vkCmdBeginRenderPass2");
+    table->CmdNextSubpass2 = (PFN_vkCmdNextSubpass2) gpa(device, "vkCmdNextSubpass2");
+    table->CmdEndRenderPass2 = (PFN_vkCmdEndRenderPass2) gpa(device, "vkCmdEndRenderPass2");
+    table->ResetQueryPool = (PFN_vkResetQueryPool) gpa(device, "vkResetQueryPool");
+    table->GetSemaphoreCounterValue = (PFN_vkGetSemaphoreCounterValue) gpa(device, "vkGetSemaphoreCounterValue");
+    table->WaitSemaphores = (PFN_vkWaitSemaphores) gpa(device, "vkWaitSemaphores");
+    table->SignalSemaphore = (PFN_vkSignalSemaphore) gpa(device, "vkSignalSemaphore");
+    table->GetBufferDeviceAddress = (PFN_vkGetBufferDeviceAddress) gpa(device, "vkGetBufferDeviceAddress");
+    table->GetBufferOpaqueCaptureAddress = (PFN_vkGetBufferOpaqueCaptureAddress) gpa(device, "vkGetBufferOpaqueCaptureAddress");
+    table->GetDeviceMemoryOpaqueCaptureAddress = (PFN_vkGetDeviceMemoryOpaqueCaptureAddress) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddress");
+    table->CreatePrivateDataSlot = (PFN_vkCreatePrivateDataSlot) gpa(device, "vkCreatePrivateDataSlot");
+    table->DestroyPrivateDataSlot = (PFN_vkDestroyPrivateDataSlot) gpa(device, "vkDestroyPrivateDataSlot");
+    table->SetPrivateData = (PFN_vkSetPrivateData) gpa(device, "vkSetPrivateData");
+    table->GetPrivateData = (PFN_vkGetPrivateData) gpa(device, "vkGetPrivateData");
+    table->CmdSetEvent2 = (PFN_vkCmdSetEvent2) gpa(device, "vkCmdSetEvent2");
+    table->CmdResetEvent2 = (PFN_vkCmdResetEvent2) gpa(device, "vkCmdResetEvent2");
+    table->CmdWaitEvents2 = (PFN_vkCmdWaitEvents2) gpa(device, "vkCmdWaitEvents2");
+    table->CmdPipelineBarrier2 = (PFN_vkCmdPipelineBarrier2) gpa(device, "vkCmdPipelineBarrier2");
+    table->CmdWriteTimestamp2 = (PFN_vkCmdWriteTimestamp2) gpa(device, "vkCmdWriteTimestamp2");
+    table->QueueSubmit2 = (PFN_vkQueueSubmit2) gpa(device, "vkQueueSubmit2");
+    table->CmdCopyBuffer2 = (PFN_vkCmdCopyBuffer2) gpa(device, "vkCmdCopyBuffer2");
+    table->CmdCopyImage2 = (PFN_vkCmdCopyImage2) gpa(device, "vkCmdCopyImage2");
+    table->CmdCopyBufferToImage2 = (PFN_vkCmdCopyBufferToImage2) gpa(device, "vkCmdCopyBufferToImage2");
+    table->CmdCopyImageToBuffer2 = (PFN_vkCmdCopyImageToBuffer2) gpa(device, "vkCmdCopyImageToBuffer2");
+    table->CmdBlitImage2 = (PFN_vkCmdBlitImage2) gpa(device, "vkCmdBlitImage2");
+    table->CmdResolveImage2 = (PFN_vkCmdResolveImage2) gpa(device, "vkCmdResolveImage2");
+    table->CmdBeginRendering = (PFN_vkCmdBeginRendering) gpa(device, "vkCmdBeginRendering");
+    table->CmdEndRendering = (PFN_vkCmdEndRendering) gpa(device, "vkCmdEndRendering");
+    table->CmdSetCullMode = (PFN_vkCmdSetCullMode) gpa(device, "vkCmdSetCullMode");
+    table->CmdSetFrontFace = (PFN_vkCmdSetFrontFace) gpa(device, "vkCmdSetFrontFace");
+    table->CmdSetPrimitiveTopology = (PFN_vkCmdSetPrimitiveTopology) gpa(device, "vkCmdSetPrimitiveTopology");
+    table->CmdSetViewportWithCount = (PFN_vkCmdSetViewportWithCount) gpa(device, "vkCmdSetViewportWithCount");
+    table->CmdSetScissorWithCount = (PFN_vkCmdSetScissorWithCount) gpa(device, "vkCmdSetScissorWithCount");
+    table->CmdBindVertexBuffers2 = (PFN_vkCmdBindVertexBuffers2) gpa(device, "vkCmdBindVertexBuffers2");
+    table->CmdSetDepthTestEnable = (PFN_vkCmdSetDepthTestEnable) gpa(device, "vkCmdSetDepthTestEnable");
+    table->CmdSetDepthWriteEnable = (PFN_vkCmdSetDepthWriteEnable) gpa(device, "vkCmdSetDepthWriteEnable");
+    table->CmdSetDepthCompareOp = (PFN_vkCmdSetDepthCompareOp) gpa(device, "vkCmdSetDepthCompareOp");
+    table->CmdSetDepthBoundsTestEnable = (PFN_vkCmdSetDepthBoundsTestEnable) gpa(device, "vkCmdSetDepthBoundsTestEnable");
+    table->CmdSetStencilTestEnable = (PFN_vkCmdSetStencilTestEnable) gpa(device, "vkCmdSetStencilTestEnable");
+    table->CmdSetStencilOp = (PFN_vkCmdSetStencilOp) gpa(device, "vkCmdSetStencilOp");
+    table->CmdSetRasterizerDiscardEnable = (PFN_vkCmdSetRasterizerDiscardEnable) gpa(device, "vkCmdSetRasterizerDiscardEnable");
+    table->CmdSetDepthBiasEnable = (PFN_vkCmdSetDepthBiasEnable) gpa(device, "vkCmdSetDepthBiasEnable");
+    table->CmdSetPrimitiveRestartEnable = (PFN_vkCmdSetPrimitiveRestartEnable) gpa(device, "vkCmdSetPrimitiveRestartEnable");
+    table->GetDeviceBufferMemoryRequirements = (PFN_vkGetDeviceBufferMemoryRequirements) gpa(device, "vkGetDeviceBufferMemoryRequirements");
+    table->GetDeviceImageMemoryRequirements = (PFN_vkGetDeviceImageMemoryRequirements) gpa(device, "vkGetDeviceImageMemoryRequirements");
+    table->GetDeviceImageSparseMemoryRequirements = (PFN_vkGetDeviceImageSparseMemoryRequirements) gpa(device, "vkGetDeviceImageSparseMemoryRequirements");
+    table->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
+    table->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
+    table->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
+    table->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) gpa(device, "vkAcquireNextImageKHR");
+    table->QueuePresentKHR = (PFN_vkQueuePresentKHR) gpa(device, "vkQueuePresentKHR");
+    table->GetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) gpa(device, "vkGetDeviceGroupPresentCapabilitiesKHR");
+    table->GetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) gpa(device, "vkGetDeviceGroupSurfacePresentModesKHR");
+    table->AcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) gpa(device, "vkAcquireNextImage2KHR");
+    table->CreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR) gpa(device, "vkCreateSharedSwapchainsKHR");
+    table->CreateVideoSessionKHR = (PFN_vkCreateVideoSessionKHR) gpa(device, "vkCreateVideoSessionKHR");
+    table->DestroyVideoSessionKHR = (PFN_vkDestroyVideoSessionKHR) gpa(device, "vkDestroyVideoSessionKHR");
+    table->GetVideoSessionMemoryRequirementsKHR = (PFN_vkGetVideoSessionMemoryRequirementsKHR) gpa(device, "vkGetVideoSessionMemoryRequirementsKHR");
+    table->BindVideoSessionMemoryKHR = (PFN_vkBindVideoSessionMemoryKHR) gpa(device, "vkBindVideoSessionMemoryKHR");
+    table->CreateVideoSessionParametersKHR = (PFN_vkCreateVideoSessionParametersKHR) gpa(device, "vkCreateVideoSessionParametersKHR");
+    table->UpdateVideoSessionParametersKHR = (PFN_vkUpdateVideoSessionParametersKHR) gpa(device, "vkUpdateVideoSessionParametersKHR");
+    table->DestroyVideoSessionParametersKHR = (PFN_vkDestroyVideoSessionParametersKHR) gpa(device, "vkDestroyVideoSessionParametersKHR");
+    table->CmdBeginVideoCodingKHR = (PFN_vkCmdBeginVideoCodingKHR) gpa(device, "vkCmdBeginVideoCodingKHR");
+    table->CmdEndVideoCodingKHR = (PFN_vkCmdEndVideoCodingKHR) gpa(device, "vkCmdEndVideoCodingKHR");
+    table->CmdControlVideoCodingKHR = (PFN_vkCmdControlVideoCodingKHR) gpa(device, "vkCmdControlVideoCodingKHR");
+    table->CmdDecodeVideoKHR = (PFN_vkCmdDecodeVideoKHR) gpa(device, "vkCmdDecodeVideoKHR");
+    table->CmdBeginRenderingKHR = (PFN_vkCmdBeginRenderingKHR) gpa(device, "vkCmdBeginRenderingKHR");
+    table->CmdEndRenderingKHR = (PFN_vkCmdEndRenderingKHR) gpa(device, "vkCmdEndRenderingKHR");
+    table->GetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR) gpa(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR");
+    table->CmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR) gpa(device, "vkCmdSetDeviceMaskKHR");
+    table->CmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR) gpa(device, "vkCmdDispatchBaseKHR");
+    table->TrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR) gpa(device, "vkTrimCommandPoolKHR");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR) gpa(device, "vkGetMemoryWin32HandleKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR) gpa(device, "vkGetMemoryWin32HandlePropertiesKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->GetMemoryFdKHR = (PFN_vkGetMemoryFdKHR) gpa(device, "vkGetMemoryFdKHR");
+    table->GetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR) gpa(device, "vkGetMemoryFdPropertiesKHR");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->ImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR) gpa(device, "vkImportSemaphoreWin32HandleKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR) gpa(device, "vkGetSemaphoreWin32HandleKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->ImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR) gpa(device, "vkImportSemaphoreFdKHR");
+    table->GetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR) gpa(device, "vkGetSemaphoreFdKHR");
+    table->CmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR) gpa(device, "vkCmdPushDescriptorSetKHR");
+    table->CmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR) gpa(device, "vkCmdPushDescriptorSetWithTemplateKHR");
+    table->CreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR) gpa(device, "vkCreateDescriptorUpdateTemplateKHR");
+    table->DestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR) gpa(device, "vkDestroyDescriptorUpdateTemplateKHR");
+    table->UpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR) gpa(device, "vkUpdateDescriptorSetWithTemplateKHR");
+    table->CreateRenderPass2KHR = (PFN_vkCreateRenderPass2KHR) gpa(device, "vkCreateRenderPass2KHR");
+    table->CmdBeginRenderPass2KHR = (PFN_vkCmdBeginRenderPass2KHR) gpa(device, "vkCmdBeginRenderPass2KHR");
+    table->CmdNextSubpass2KHR = (PFN_vkCmdNextSubpass2KHR) gpa(device, "vkCmdNextSubpass2KHR");
+    table->CmdEndRenderPass2KHR = (PFN_vkCmdEndRenderPass2KHR) gpa(device, "vkCmdEndRenderPass2KHR");
+    table->GetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR) gpa(device, "vkGetSwapchainStatusKHR");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->ImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR) gpa(device, "vkImportFenceWin32HandleKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR) gpa(device, "vkGetFenceWin32HandleKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->ImportFenceFdKHR = (PFN_vkImportFenceFdKHR) gpa(device, "vkImportFenceFdKHR");
+    table->GetFenceFdKHR = (PFN_vkGetFenceFdKHR) gpa(device, "vkGetFenceFdKHR");
+    table->AcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR) gpa(device, "vkAcquireProfilingLockKHR");
+    table->ReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR) gpa(device, "vkReleaseProfilingLockKHR");
+    table->GetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR) gpa(device, "vkGetImageMemoryRequirements2KHR");
+    table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR) gpa(device, "vkGetBufferMemoryRequirements2KHR");
+    table->GetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR) gpa(device, "vkGetImageSparseMemoryRequirements2KHR");
+    table->CreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR) gpa(device, "vkCreateSamplerYcbcrConversionKHR");
+    table->DestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR) gpa(device, "vkDestroySamplerYcbcrConversionKHR");
+    table->BindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR) gpa(device, "vkBindBufferMemory2KHR");
+    table->BindImageMemory2KHR = (PFN_vkBindImageMemory2KHR) gpa(device, "vkBindImageMemory2KHR");
+    table->GetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR) gpa(device, "vkGetDescriptorSetLayoutSupportKHR");
+    table->CmdDrawIndirectCountKHR = (PFN_vkCmdDrawIndirectCountKHR) gpa(device, "vkCmdDrawIndirectCountKHR");
+    table->CmdDrawIndexedIndirectCountKHR = (PFN_vkCmdDrawIndexedIndirectCountKHR) gpa(device, "vkCmdDrawIndexedIndirectCountKHR");
+    table->GetSemaphoreCounterValueKHR = (PFN_vkGetSemaphoreCounterValueKHR) gpa(device, "vkGetSemaphoreCounterValueKHR");
+    table->WaitSemaphoresKHR = (PFN_vkWaitSemaphoresKHR) gpa(device, "vkWaitSemaphoresKHR");
+    table->SignalSemaphoreKHR = (PFN_vkSignalSemaphoreKHR) gpa(device, "vkSignalSemaphoreKHR");
+    table->CmdSetFragmentShadingRateKHR = (PFN_vkCmdSetFragmentShadingRateKHR) gpa(device, "vkCmdSetFragmentShadingRateKHR");
+    table->WaitForPresentKHR = (PFN_vkWaitForPresentKHR) gpa(device, "vkWaitForPresentKHR");
+    table->GetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR) gpa(device, "vkGetBufferDeviceAddressKHR");
+    table->GetBufferOpaqueCaptureAddressKHR = (PFN_vkGetBufferOpaqueCaptureAddressKHR) gpa(device, "vkGetBufferOpaqueCaptureAddressKHR");
+    table->GetDeviceMemoryOpaqueCaptureAddressKHR = (PFN_vkGetDeviceMemoryOpaqueCaptureAddressKHR) gpa(device, "vkGetDeviceMemoryOpaqueCaptureAddressKHR");
+    table->CreateDeferredOperationKHR = (PFN_vkCreateDeferredOperationKHR) gpa(device, "vkCreateDeferredOperationKHR");
+    table->DestroyDeferredOperationKHR = (PFN_vkDestroyDeferredOperationKHR) gpa(device, "vkDestroyDeferredOperationKHR");
+    table->GetDeferredOperationMaxConcurrencyKHR = (PFN_vkGetDeferredOperationMaxConcurrencyKHR) gpa(device, "vkGetDeferredOperationMaxConcurrencyKHR");
+    table->GetDeferredOperationResultKHR = (PFN_vkGetDeferredOperationResultKHR) gpa(device, "vkGetDeferredOperationResultKHR");
+    table->DeferredOperationJoinKHR = (PFN_vkDeferredOperationJoinKHR) gpa(device, "vkDeferredOperationJoinKHR");
+    table->GetPipelineExecutablePropertiesKHR = (PFN_vkGetPipelineExecutablePropertiesKHR) gpa(device, "vkGetPipelineExecutablePropertiesKHR");
+    table->GetPipelineExecutableStatisticsKHR = (PFN_vkGetPipelineExecutableStatisticsKHR) gpa(device, "vkGetPipelineExecutableStatisticsKHR");
+    table->GetPipelineExecutableInternalRepresentationsKHR = (PFN_vkGetPipelineExecutableInternalRepresentationsKHR) gpa(device, "vkGetPipelineExecutableInternalRepresentationsKHR");
+    table->MapMemory2KHR = (PFN_vkMapMemory2KHR) gpa(device, "vkMapMemory2KHR");
+    table->UnmapMemory2KHR = (PFN_vkUnmapMemory2KHR) gpa(device, "vkUnmapMemory2KHR");
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetEncodedVideoSessionParametersKHR = (PFN_vkGetEncodedVideoSessionParametersKHR) gpa(device, "vkGetEncodedVideoSessionParametersKHR");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->CmdEncodeVideoKHR = (PFN_vkCmdEncodeVideoKHR) gpa(device, "vkCmdEncodeVideoKHR");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+    table->CmdSetEvent2KHR = (PFN_vkCmdSetEvent2KHR) gpa(device, "vkCmdSetEvent2KHR");
+    table->CmdResetEvent2KHR = (PFN_vkCmdResetEvent2KHR) gpa(device, "vkCmdResetEvent2KHR");
+    table->CmdWaitEvents2KHR = (PFN_vkCmdWaitEvents2KHR) gpa(device, "vkCmdWaitEvents2KHR");
+    table->CmdPipelineBarrier2KHR = (PFN_vkCmdPipelineBarrier2KHR) gpa(device, "vkCmdPipelineBarrier2KHR");
+    table->CmdWriteTimestamp2KHR = (PFN_vkCmdWriteTimestamp2KHR) gpa(device, "vkCmdWriteTimestamp2KHR");
+    table->QueueSubmit2KHR = (PFN_vkQueueSubmit2KHR) gpa(device, "vkQueueSubmit2KHR");
+    table->CmdWriteBufferMarker2AMD = (PFN_vkCmdWriteBufferMarker2AMD) gpa(device, "vkCmdWriteBufferMarker2AMD");
+    table->GetQueueCheckpointData2NV = (PFN_vkGetQueueCheckpointData2NV) gpa(device, "vkGetQueueCheckpointData2NV");
+    table->CmdCopyBuffer2KHR = (PFN_vkCmdCopyBuffer2KHR) gpa(device, "vkCmdCopyBuffer2KHR");
+    table->CmdCopyImage2KHR = (PFN_vkCmdCopyImage2KHR) gpa(device, "vkCmdCopyImage2KHR");
+    table->CmdCopyBufferToImage2KHR = (PFN_vkCmdCopyBufferToImage2KHR) gpa(device, "vkCmdCopyBufferToImage2KHR");
+    table->CmdCopyImageToBuffer2KHR = (PFN_vkCmdCopyImageToBuffer2KHR) gpa(device, "vkCmdCopyImageToBuffer2KHR");
+    table->CmdBlitImage2KHR = (PFN_vkCmdBlitImage2KHR) gpa(device, "vkCmdBlitImage2KHR");
+    table->CmdResolveImage2KHR = (PFN_vkCmdResolveImage2KHR) gpa(device, "vkCmdResolveImage2KHR");
+    table->CmdTraceRaysIndirect2KHR = (PFN_vkCmdTraceRaysIndirect2KHR) gpa(device, "vkCmdTraceRaysIndirect2KHR");
+    table->GetDeviceBufferMemoryRequirementsKHR = (PFN_vkGetDeviceBufferMemoryRequirementsKHR) gpa(device, "vkGetDeviceBufferMemoryRequirementsKHR");
+    table->GetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR) gpa(device, "vkGetDeviceImageMemoryRequirementsKHR");
+    table->GetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR) gpa(device, "vkGetDeviceImageSparseMemoryRequirementsKHR");
+    table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT) gpa(device, "vkDebugMarkerSetObjectTagEXT");
+    table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT) gpa(device, "vkDebugMarkerSetObjectNameEXT");
+    table->CmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT) gpa(device, "vkCmdDebugMarkerBeginEXT");
+    table->CmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT) gpa(device, "vkCmdDebugMarkerEndEXT");
+    table->CmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT) gpa(device, "vkCmdDebugMarkerInsertEXT");
+    table->CmdBindTransformFeedbackBuffersEXT = (PFN_vkCmdBindTransformFeedbackBuffersEXT) gpa(device, "vkCmdBindTransformFeedbackBuffersEXT");
+    table->CmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT) gpa(device, "vkCmdBeginTransformFeedbackEXT");
+    table->CmdEndTransformFeedbackEXT = (PFN_vkCmdEndTransformFeedbackEXT) gpa(device, "vkCmdEndTransformFeedbackEXT");
+    table->CmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT) gpa(device, "vkCmdBeginQueryIndexedEXT");
+    table->CmdEndQueryIndexedEXT = (PFN_vkCmdEndQueryIndexedEXT) gpa(device, "vkCmdEndQueryIndexedEXT");
+    table->CmdDrawIndirectByteCountEXT = (PFN_vkCmdDrawIndirectByteCountEXT) gpa(device, "vkCmdDrawIndirectByteCountEXT");
+    table->CreateCuModuleNVX = (PFN_vkCreateCuModuleNVX) gpa(device, "vkCreateCuModuleNVX");
+    table->CreateCuFunctionNVX = (PFN_vkCreateCuFunctionNVX) gpa(device, "vkCreateCuFunctionNVX");
+    table->DestroyCuModuleNVX = (PFN_vkDestroyCuModuleNVX) gpa(device, "vkDestroyCuModuleNVX");
+    table->DestroyCuFunctionNVX = (PFN_vkDestroyCuFunctionNVX) gpa(device, "vkDestroyCuFunctionNVX");
+    table->CmdCuLaunchKernelNVX = (PFN_vkCmdCuLaunchKernelNVX) gpa(device, "vkCmdCuLaunchKernelNVX");
+    table->GetImageViewHandleNVX = (PFN_vkGetImageViewHandleNVX) gpa(device, "vkGetImageViewHandleNVX");
+    table->GetImageViewAddressNVX = (PFN_vkGetImageViewAddressNVX) gpa(device, "vkGetImageViewAddressNVX");
+    table->CmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD) gpa(device, "vkCmdDrawIndirectCountAMD");
+    table->CmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD) gpa(device, "vkCmdDrawIndexedIndirectCountAMD");
+    table->GetShaderInfoAMD = (PFN_vkGetShaderInfoAMD) gpa(device, "vkGetShaderInfoAMD");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV) gpa(device, "vkGetMemoryWin32HandleNV");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->CmdBeginConditionalRenderingEXT = (PFN_vkCmdBeginConditionalRenderingEXT) gpa(device, "vkCmdBeginConditionalRenderingEXT");
+    table->CmdEndConditionalRenderingEXT = (PFN_vkCmdEndConditionalRenderingEXT) gpa(device, "vkCmdEndConditionalRenderingEXT");
+    table->CmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV) gpa(device, "vkCmdSetViewportWScalingNV");
+    table->DisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT) gpa(device, "vkDisplayPowerControlEXT");
+    table->RegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT) gpa(device, "vkRegisterDeviceEventEXT");
+    table->RegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT) gpa(device, "vkRegisterDisplayEventEXT");
+    table->GetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT) gpa(device, "vkGetSwapchainCounterEXT");
+    table->GetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE) gpa(device, "vkGetRefreshCycleDurationGOOGLE");
+    table->GetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE) gpa(device, "vkGetPastPresentationTimingGOOGLE");
+    table->CmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT) gpa(device, "vkCmdSetDiscardRectangleEXT");
+    table->CmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT) gpa(device, "vkCmdSetDiscardRectangleEnableEXT");
+    table->CmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT) gpa(device, "vkCmdSetDiscardRectangleModeEXT");
+    table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT) gpa(device, "vkSetHdrMetadataEXT");
+    table->SetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT) gpa(device, "vkSetDebugUtilsObjectNameEXT");
+    table->SetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT) gpa(device, "vkSetDebugUtilsObjectTagEXT");
+    table->QueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT) gpa(device, "vkQueueBeginDebugUtilsLabelEXT");
+    table->QueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT) gpa(device, "vkQueueEndDebugUtilsLabelEXT");
+    table->QueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT) gpa(device, "vkQueueInsertDebugUtilsLabelEXT");
+    table->CmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT) gpa(device, "vkCmdBeginDebugUtilsLabelEXT");
+    table->CmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT) gpa(device, "vkCmdEndDebugUtilsLabelEXT");
+    table->CmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT) gpa(device, "vkCmdInsertDebugUtilsLabelEXT");
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+    table->GetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID) gpa(device, "vkGetAndroidHardwareBufferPropertiesANDROID");
+#endif // VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+    table->GetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID) gpa(device, "vkGetMemoryAndroidHardwareBufferANDROID");
+#endif // VK_USE_PLATFORM_ANDROID_KHR
+    table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT) gpa(device, "vkCmdSetSampleLocationsEXT");
+    table->GetImageDrmFormatModifierPropertiesEXT = (PFN_vkGetImageDrmFormatModifierPropertiesEXT) gpa(device, "vkGetImageDrmFormatModifierPropertiesEXT");
+    table->CreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT) gpa(device, "vkCreateValidationCacheEXT");
+    table->DestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT) gpa(device, "vkDestroyValidationCacheEXT");
+    table->MergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT) gpa(device, "vkMergeValidationCachesEXT");
+    table->GetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT) gpa(device, "vkGetValidationCacheDataEXT");
+    table->CmdBindShadingRateImageNV = (PFN_vkCmdBindShadingRateImageNV) gpa(device, "vkCmdBindShadingRateImageNV");
+    table->CmdSetViewportShadingRatePaletteNV = (PFN_vkCmdSetViewportShadingRatePaletteNV) gpa(device, "vkCmdSetViewportShadingRatePaletteNV");
+    table->CmdSetCoarseSampleOrderNV = (PFN_vkCmdSetCoarseSampleOrderNV) gpa(device, "vkCmdSetCoarseSampleOrderNV");
+    table->CreateAccelerationStructureNV = (PFN_vkCreateAccelerationStructureNV) gpa(device, "vkCreateAccelerationStructureNV");
+    table->DestroyAccelerationStructureNV = (PFN_vkDestroyAccelerationStructureNV) gpa(device, "vkDestroyAccelerationStructureNV");
+    table->GetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV) gpa(device, "vkGetAccelerationStructureMemoryRequirementsNV");
+    table->BindAccelerationStructureMemoryNV = (PFN_vkBindAccelerationStructureMemoryNV) gpa(device, "vkBindAccelerationStructureMemoryNV");
+    table->CmdBuildAccelerationStructureNV = (PFN_vkCmdBuildAccelerationStructureNV) gpa(device, "vkCmdBuildAccelerationStructureNV");
+    table->CmdCopyAccelerationStructureNV = (PFN_vkCmdCopyAccelerationStructureNV) gpa(device, "vkCmdCopyAccelerationStructureNV");
+    table->CmdTraceRaysNV = (PFN_vkCmdTraceRaysNV) gpa(device, "vkCmdTraceRaysNV");
+    table->CreateRayTracingPipelinesNV = (PFN_vkCreateRayTracingPipelinesNV) gpa(device, "vkCreateRayTracingPipelinesNV");
+    table->GetRayTracingShaderGroupHandlesKHR = (PFN_vkGetRayTracingShaderGroupHandlesKHR) gpa(device, "vkGetRayTracingShaderGroupHandlesKHR");
+    table->GetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV) gpa(device, "vkGetRayTracingShaderGroupHandlesNV");
+    table->GetAccelerationStructureHandleNV = (PFN_vkGetAccelerationStructureHandleNV) gpa(device, "vkGetAccelerationStructureHandleNV");
+    table->CmdWriteAccelerationStructuresPropertiesNV = (PFN_vkCmdWriteAccelerationStructuresPropertiesNV) gpa(device, "vkCmdWriteAccelerationStructuresPropertiesNV");
+    table->CompileDeferredNV = (PFN_vkCompileDeferredNV) gpa(device, "vkCompileDeferredNV");
+    table->GetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT) gpa(device, "vkGetMemoryHostPointerPropertiesEXT");
+    table->CmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD) gpa(device, "vkCmdWriteBufferMarkerAMD");
+    table->GetCalibratedTimestampsEXT = (PFN_vkGetCalibratedTimestampsEXT) gpa(device, "vkGetCalibratedTimestampsEXT");
+    table->CmdDrawMeshTasksNV = (PFN_vkCmdDrawMeshTasksNV) gpa(device, "vkCmdDrawMeshTasksNV");
+    table->CmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV) gpa(device, "vkCmdDrawMeshTasksIndirectNV");
+    table->CmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV) gpa(device, "vkCmdDrawMeshTasksIndirectCountNV");
+    table->CmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV) gpa(device, "vkCmdSetExclusiveScissorEnableNV");
+    table->CmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV) gpa(device, "vkCmdSetExclusiveScissorNV");
+    table->CmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV) gpa(device, "vkCmdSetCheckpointNV");
+    table->GetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV) gpa(device, "vkGetQueueCheckpointDataNV");
+    table->InitializePerformanceApiINTEL = (PFN_vkInitializePerformanceApiINTEL) gpa(device, "vkInitializePerformanceApiINTEL");
+    table->UninitializePerformanceApiINTEL = (PFN_vkUninitializePerformanceApiINTEL) gpa(device, "vkUninitializePerformanceApiINTEL");
+    table->CmdSetPerformanceMarkerINTEL = (PFN_vkCmdSetPerformanceMarkerINTEL) gpa(device, "vkCmdSetPerformanceMarkerINTEL");
+    table->CmdSetPerformanceStreamMarkerINTEL = (PFN_vkCmdSetPerformanceStreamMarkerINTEL) gpa(device, "vkCmdSetPerformanceStreamMarkerINTEL");
+    table->CmdSetPerformanceOverrideINTEL = (PFN_vkCmdSetPerformanceOverrideINTEL) gpa(device, "vkCmdSetPerformanceOverrideINTEL");
+    table->AcquirePerformanceConfigurationINTEL = (PFN_vkAcquirePerformanceConfigurationINTEL) gpa(device, "vkAcquirePerformanceConfigurationINTEL");
+    table->ReleasePerformanceConfigurationINTEL = (PFN_vkReleasePerformanceConfigurationINTEL) gpa(device, "vkReleasePerformanceConfigurationINTEL");
+    table->QueueSetPerformanceConfigurationINTEL = (PFN_vkQueueSetPerformanceConfigurationINTEL) gpa(device, "vkQueueSetPerformanceConfigurationINTEL");
+    table->GetPerformanceParameterINTEL = (PFN_vkGetPerformanceParameterINTEL) gpa(device, "vkGetPerformanceParameterINTEL");
+    table->SetLocalDimmingAMD = (PFN_vkSetLocalDimmingAMD) gpa(device, "vkSetLocalDimmingAMD");
+    table->GetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT) gpa(device, "vkGetBufferDeviceAddressEXT");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->AcquireFullScreenExclusiveModeEXT = (PFN_vkAcquireFullScreenExclusiveModeEXT) gpa(device, "vkAcquireFullScreenExclusiveModeEXT");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->ReleaseFullScreenExclusiveModeEXT = (PFN_vkReleaseFullScreenExclusiveModeEXT) gpa(device, "vkReleaseFullScreenExclusiveModeEXT");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT) gpa(device, "vkGetDeviceGroupSurfacePresentModes2EXT");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->CmdSetLineStippleEXT = (PFN_vkCmdSetLineStippleEXT) gpa(device, "vkCmdSetLineStippleEXT");
+    table->ResetQueryPoolEXT = (PFN_vkResetQueryPoolEXT) gpa(device, "vkResetQueryPoolEXT");
+    table->CmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT) gpa(device, "vkCmdSetCullModeEXT");
+    table->CmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT) gpa(device, "vkCmdSetFrontFaceEXT");
+    table->CmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT) gpa(device, "vkCmdSetPrimitiveTopologyEXT");
+    table->CmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT) gpa(device, "vkCmdSetViewportWithCountEXT");
+    table->CmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT) gpa(device, "vkCmdSetScissorWithCountEXT");
+    table->CmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT) gpa(device, "vkCmdBindVertexBuffers2EXT");
+    table->CmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT) gpa(device, "vkCmdSetDepthTestEnableEXT");
+    table->CmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT) gpa(device, "vkCmdSetDepthWriteEnableEXT");
+    table->CmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT) gpa(device, "vkCmdSetDepthCompareOpEXT");
+    table->CmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT) gpa(device, "vkCmdSetDepthBoundsTestEnableEXT");
+    table->CmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT) gpa(device, "vkCmdSetStencilTestEnableEXT");
+    table->CmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT) gpa(device, "vkCmdSetStencilOpEXT");
+    table->ReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT) gpa(device, "vkReleaseSwapchainImagesEXT");
+    table->GetGeneratedCommandsMemoryRequirementsNV = (PFN_vkGetGeneratedCommandsMemoryRequirementsNV) gpa(device, "vkGetGeneratedCommandsMemoryRequirementsNV");
+    table->CmdPreprocessGeneratedCommandsNV = (PFN_vkCmdPreprocessGeneratedCommandsNV) gpa(device, "vkCmdPreprocessGeneratedCommandsNV");
+    table->CmdExecuteGeneratedCommandsNV = (PFN_vkCmdExecuteGeneratedCommandsNV) gpa(device, "vkCmdExecuteGeneratedCommandsNV");
+    table->CmdBindPipelineShaderGroupNV = (PFN_vkCmdBindPipelineShaderGroupNV) gpa(device, "vkCmdBindPipelineShaderGroupNV");
+    table->CreateIndirectCommandsLayoutNV = (PFN_vkCreateIndirectCommandsLayoutNV) gpa(device, "vkCreateIndirectCommandsLayoutNV");
+    table->DestroyIndirectCommandsLayoutNV = (PFN_vkDestroyIndirectCommandsLayoutNV) gpa(device, "vkDestroyIndirectCommandsLayoutNV");
+    table->CreatePrivateDataSlotEXT = (PFN_vkCreatePrivateDataSlotEXT) gpa(device, "vkCreatePrivateDataSlotEXT");
+    table->DestroyPrivateDataSlotEXT = (PFN_vkDestroyPrivateDataSlotEXT) gpa(device, "vkDestroyPrivateDataSlotEXT");
+    table->SetPrivateDataEXT = (PFN_vkSetPrivateDataEXT) gpa(device, "vkSetPrivateDataEXT");
+    table->GetPrivateDataEXT = (PFN_vkGetPrivateDataEXT) gpa(device, "vkGetPrivateDataEXT");
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+    table->ExportMetalObjectsEXT = (PFN_vkExportMetalObjectsEXT) gpa(device, "vkExportMetalObjectsEXT");
+#endif // VK_USE_PLATFORM_METAL_EXT
+    table->GetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT) gpa(device, "vkGetDescriptorSetLayoutSizeEXT");
+    table->GetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT) gpa(device, "vkGetDescriptorSetLayoutBindingOffsetEXT");
+    table->GetDescriptorEXT = (PFN_vkGetDescriptorEXT) gpa(device, "vkGetDescriptorEXT");
+    table->CmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT) gpa(device, "vkCmdBindDescriptorBuffersEXT");
+    table->CmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT) gpa(device, "vkCmdSetDescriptorBufferOffsetsEXT");
+    table->CmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT) gpa(device, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT");
+    table->GetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT) gpa(device, "vkGetBufferOpaqueCaptureDescriptorDataEXT");
+    table->GetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT) gpa(device, "vkGetImageOpaqueCaptureDescriptorDataEXT");
+    table->GetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT) gpa(device, "vkGetImageViewOpaqueCaptureDescriptorDataEXT");
+    table->GetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT) gpa(device, "vkGetSamplerOpaqueCaptureDescriptorDataEXT");
+    table->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT) gpa(device, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT");
+    table->CmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV) gpa(device, "vkCmdSetFragmentShadingRateEnumNV");
+    table->GetImageSubresourceLayout2EXT = (PFN_vkGetImageSubresourceLayout2EXT) gpa(device, "vkGetImageSubresourceLayout2EXT");
+    table->GetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT) gpa(device, "vkGetDeviceFaultInfoEXT");
+    table->CmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT) gpa(device, "vkCmdSetVertexInputEXT");
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->GetMemoryZirconHandleFUCHSIA = (PFN_vkGetMemoryZirconHandleFUCHSIA) gpa(device, "vkGetMemoryZirconHandleFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->GetMemoryZirconHandlePropertiesFUCHSIA = (PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA) gpa(device, "vkGetMemoryZirconHandlePropertiesFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->ImportSemaphoreZirconHandleFUCHSIA = (PFN_vkImportSemaphoreZirconHandleFUCHSIA) gpa(device, "vkImportSemaphoreZirconHandleFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->GetSemaphoreZirconHandleFUCHSIA = (PFN_vkGetSemaphoreZirconHandleFUCHSIA) gpa(device, "vkGetSemaphoreZirconHandleFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->CreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA) gpa(device, "vkCreateBufferCollectionFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->SetBufferCollectionImageConstraintsFUCHSIA = (PFN_vkSetBufferCollectionImageConstraintsFUCHSIA) gpa(device, "vkSetBufferCollectionImageConstraintsFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->SetBufferCollectionBufferConstraintsFUCHSIA = (PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA) gpa(device, "vkSetBufferCollectionBufferConstraintsFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->DestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA) gpa(device, "vkDestroyBufferCollectionFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->GetBufferCollectionPropertiesFUCHSIA = (PFN_vkGetBufferCollectionPropertiesFUCHSIA) gpa(device, "vkGetBufferCollectionPropertiesFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+    table->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = (PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI) gpa(device, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI");
+    table->CmdSubpassShadingHUAWEI = (PFN_vkCmdSubpassShadingHUAWEI) gpa(device, "vkCmdSubpassShadingHUAWEI");
+    table->CmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI) gpa(device, "vkCmdBindInvocationMaskHUAWEI");
+    table->GetMemoryRemoteAddressNV = (PFN_vkGetMemoryRemoteAddressNV) gpa(device, "vkGetMemoryRemoteAddressNV");
+    table->GetPipelinePropertiesEXT = (PFN_vkGetPipelinePropertiesEXT) gpa(device, "vkGetPipelinePropertiesEXT");
+    table->CmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT) gpa(device, "vkCmdSetPatchControlPointsEXT");
+    table->CmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT) gpa(device, "vkCmdSetRasterizerDiscardEnableEXT");
+    table->CmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT) gpa(device, "vkCmdSetDepthBiasEnableEXT");
+    table->CmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT) gpa(device, "vkCmdSetLogicOpEXT");
+    table->CmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT) gpa(device, "vkCmdSetPrimitiveRestartEnableEXT");
+    table->CmdSetColorWriteEnableEXT = (PFN_vkCmdSetColorWriteEnableEXT) gpa(device, "vkCmdSetColorWriteEnableEXT");
+    table->CmdDrawMultiEXT = (PFN_vkCmdDrawMultiEXT) gpa(device, "vkCmdDrawMultiEXT");
+    table->CmdDrawMultiIndexedEXT = (PFN_vkCmdDrawMultiIndexedEXT) gpa(device, "vkCmdDrawMultiIndexedEXT");
+    table->CreateMicromapEXT = (PFN_vkCreateMicromapEXT) gpa(device, "vkCreateMicromapEXT");
+    table->DestroyMicromapEXT = (PFN_vkDestroyMicromapEXT) gpa(device, "vkDestroyMicromapEXT");
+    table->CmdBuildMicromapsEXT = (PFN_vkCmdBuildMicromapsEXT) gpa(device, "vkCmdBuildMicromapsEXT");
+    table->BuildMicromapsEXT = (PFN_vkBuildMicromapsEXT) gpa(device, "vkBuildMicromapsEXT");
+    table->CopyMicromapEXT = (PFN_vkCopyMicromapEXT) gpa(device, "vkCopyMicromapEXT");
+    table->CopyMicromapToMemoryEXT = (PFN_vkCopyMicromapToMemoryEXT) gpa(device, "vkCopyMicromapToMemoryEXT");
+    table->CopyMemoryToMicromapEXT = (PFN_vkCopyMemoryToMicromapEXT) gpa(device, "vkCopyMemoryToMicromapEXT");
+    table->WriteMicromapsPropertiesEXT = (PFN_vkWriteMicromapsPropertiesEXT) gpa(device, "vkWriteMicromapsPropertiesEXT");
+    table->CmdCopyMicromapEXT = (PFN_vkCmdCopyMicromapEXT) gpa(device, "vkCmdCopyMicromapEXT");
+    table->CmdCopyMicromapToMemoryEXT = (PFN_vkCmdCopyMicromapToMemoryEXT) gpa(device, "vkCmdCopyMicromapToMemoryEXT");
+    table->CmdCopyMemoryToMicromapEXT = (PFN_vkCmdCopyMemoryToMicromapEXT) gpa(device, "vkCmdCopyMemoryToMicromapEXT");
+    table->CmdWriteMicromapsPropertiesEXT = (PFN_vkCmdWriteMicromapsPropertiesEXT) gpa(device, "vkCmdWriteMicromapsPropertiesEXT");
+    table->GetDeviceMicromapCompatibilityEXT = (PFN_vkGetDeviceMicromapCompatibilityEXT) gpa(device, "vkGetDeviceMicromapCompatibilityEXT");
+    table->GetMicromapBuildSizesEXT = (PFN_vkGetMicromapBuildSizesEXT) gpa(device, "vkGetMicromapBuildSizesEXT");
+    table->CmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI) gpa(device, "vkCmdDrawClusterHUAWEI");
+    table->CmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI) gpa(device, "vkCmdDrawClusterIndirectHUAWEI");
+    table->SetDeviceMemoryPriorityEXT = (PFN_vkSetDeviceMemoryPriorityEXT) gpa(device, "vkSetDeviceMemoryPriorityEXT");
+    table->GetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE) gpa(device, "vkGetDescriptorSetLayoutHostMappingInfoVALVE");
+    table->GetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE) gpa(device, "vkGetDescriptorSetHostMappingVALVE");
+    table->CmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV) gpa(device, "vkCmdCopyMemoryIndirectNV");
+    table->CmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV) gpa(device, "vkCmdCopyMemoryToImageIndirectNV");
+    table->CmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV) gpa(device, "vkCmdDecompressMemoryNV");
+    table->CmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV) gpa(device, "vkCmdDecompressMemoryIndirectCountNV");
+    table->CmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT) gpa(device, "vkCmdSetTessellationDomainOriginEXT");
+    table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT) gpa(device, "vkCmdSetDepthClampEnableEXT");
+    table->CmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT) gpa(device, "vkCmdSetPolygonModeEXT");
+    table->CmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT) gpa(device, "vkCmdSetRasterizationSamplesEXT");
+    table->CmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT) gpa(device, "vkCmdSetSampleMaskEXT");
+    table->CmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT) gpa(device, "vkCmdSetAlphaToCoverageEnableEXT");
+    table->CmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT) gpa(device, "vkCmdSetAlphaToOneEnableEXT");
+    table->CmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT) gpa(device, "vkCmdSetLogicOpEnableEXT");
+    table->CmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT) gpa(device, "vkCmdSetColorBlendEnableEXT");
+    table->CmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT) gpa(device, "vkCmdSetColorBlendEquationEXT");
+    table->CmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT) gpa(device, "vkCmdSetColorWriteMaskEXT");
+    table->CmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT) gpa(device, "vkCmdSetRasterizationStreamEXT");
+    table->CmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT) gpa(device, "vkCmdSetConservativeRasterizationModeEXT");
+    table->CmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT) gpa(device, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
+    table->CmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT) gpa(device, "vkCmdSetDepthClipEnableEXT");
+    table->CmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT) gpa(device, "vkCmdSetSampleLocationsEnableEXT");
+    table->CmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT) gpa(device, "vkCmdSetColorBlendAdvancedEXT");
+    table->CmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT) gpa(device, "vkCmdSetProvokingVertexModeEXT");
+    table->CmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT) gpa(device, "vkCmdSetLineRasterizationModeEXT");
+    table->CmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT) gpa(device, "vkCmdSetLineStippleEnableEXT");
+    table->CmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT) gpa(device, "vkCmdSetDepthClipNegativeOneToOneEXT");
+    table->CmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV) gpa(device, "vkCmdSetViewportWScalingEnableNV");
+    table->CmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV) gpa(device, "vkCmdSetViewportSwizzleNV");
+    table->CmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV) gpa(device, "vkCmdSetCoverageToColorEnableNV");
+    table->CmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV) gpa(device, "vkCmdSetCoverageToColorLocationNV");
+    table->CmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV) gpa(device, "vkCmdSetCoverageModulationModeNV");
+    table->CmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV) gpa(device, "vkCmdSetCoverageModulationTableEnableNV");
+    table->CmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV) gpa(device, "vkCmdSetCoverageModulationTableNV");
+    table->CmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV) gpa(device, "vkCmdSetShadingRateImageEnableNV");
+    table->CmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV) gpa(device, "vkCmdSetRepresentativeFragmentTestEnableNV");
+    table->CmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV) gpa(device, "vkCmdSetCoverageReductionModeNV");
+    table->GetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT) gpa(device, "vkGetShaderModuleIdentifierEXT");
+    table->GetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT) gpa(device, "vkGetShaderModuleCreateInfoIdentifierEXT");
+    table->CreateOpticalFlowSessionNV = (PFN_vkCreateOpticalFlowSessionNV) gpa(device, "vkCreateOpticalFlowSessionNV");
+    table->DestroyOpticalFlowSessionNV = (PFN_vkDestroyOpticalFlowSessionNV) gpa(device, "vkDestroyOpticalFlowSessionNV");
+    table->BindOpticalFlowSessionImageNV = (PFN_vkBindOpticalFlowSessionImageNV) gpa(device, "vkBindOpticalFlowSessionImageNV");
+    table->CmdOpticalFlowExecuteNV = (PFN_vkCmdOpticalFlowExecuteNV) gpa(device, "vkCmdOpticalFlowExecuteNV");
+    table->CreateShadersEXT = (PFN_vkCreateShadersEXT) gpa(device, "vkCreateShadersEXT");
+    table->DestroyShaderEXT = (PFN_vkDestroyShaderEXT) gpa(device, "vkDestroyShaderEXT");
+    table->GetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT) gpa(device, "vkGetShaderBinaryDataEXT");
+    table->CmdBindShadersEXT = (PFN_vkCmdBindShadersEXT) gpa(device, "vkCmdBindShadersEXT");
+    table->GetFramebufferTilePropertiesQCOM = (PFN_vkGetFramebufferTilePropertiesQCOM) gpa(device, "vkGetFramebufferTilePropertiesQCOM");
+    table->GetDynamicRenderingTilePropertiesQCOM = (PFN_vkGetDynamicRenderingTilePropertiesQCOM) gpa(device, "vkGetDynamicRenderingTilePropertiesQCOM");
+    table->CmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT) gpa(device, "vkCmdSetAttachmentFeedbackLoopEnableEXT");
+    table->CreateAccelerationStructureKHR = (PFN_vkCreateAccelerationStructureKHR) gpa(device, "vkCreateAccelerationStructureKHR");
+    table->DestroyAccelerationStructureKHR = (PFN_vkDestroyAccelerationStructureKHR) gpa(device, "vkDestroyAccelerationStructureKHR");
+    table->CmdBuildAccelerationStructuresKHR = (PFN_vkCmdBuildAccelerationStructuresKHR) gpa(device, "vkCmdBuildAccelerationStructuresKHR");
+    table->CmdBuildAccelerationStructuresIndirectKHR = (PFN_vkCmdBuildAccelerationStructuresIndirectKHR) gpa(device, "vkCmdBuildAccelerationStructuresIndirectKHR");
+    table->BuildAccelerationStructuresKHR = (PFN_vkBuildAccelerationStructuresKHR) gpa(device, "vkBuildAccelerationStructuresKHR");
+    table->CopyAccelerationStructureKHR = (PFN_vkCopyAccelerationStructureKHR) gpa(device, "vkCopyAccelerationStructureKHR");
+    table->CopyAccelerationStructureToMemoryKHR = (PFN_vkCopyAccelerationStructureToMemoryKHR) gpa(device, "vkCopyAccelerationStructureToMemoryKHR");
+    table->CopyMemoryToAccelerationStructureKHR = (PFN_vkCopyMemoryToAccelerationStructureKHR) gpa(device, "vkCopyMemoryToAccelerationStructureKHR");
+    table->WriteAccelerationStructuresPropertiesKHR = (PFN_vkWriteAccelerationStructuresPropertiesKHR) gpa(device, "vkWriteAccelerationStructuresPropertiesKHR");
+    table->CmdCopyAccelerationStructureKHR = (PFN_vkCmdCopyAccelerationStructureKHR) gpa(device, "vkCmdCopyAccelerationStructureKHR");
+    table->CmdCopyAccelerationStructureToMemoryKHR = (PFN_vkCmdCopyAccelerationStructureToMemoryKHR) gpa(device, "vkCmdCopyAccelerationStructureToMemoryKHR");
+    table->CmdCopyMemoryToAccelerationStructureKHR = (PFN_vkCmdCopyMemoryToAccelerationStructureKHR) gpa(device, "vkCmdCopyMemoryToAccelerationStructureKHR");
+    table->GetAccelerationStructureDeviceAddressKHR = (PFN_vkGetAccelerationStructureDeviceAddressKHR) gpa(device, "vkGetAccelerationStructureDeviceAddressKHR");
+    table->CmdWriteAccelerationStructuresPropertiesKHR = (PFN_vkCmdWriteAccelerationStructuresPropertiesKHR) gpa(device, "vkCmdWriteAccelerationStructuresPropertiesKHR");
+    table->GetDeviceAccelerationStructureCompatibilityKHR = (PFN_vkGetDeviceAccelerationStructureCompatibilityKHR) gpa(device, "vkGetDeviceAccelerationStructureCompatibilityKHR");
+    table->GetAccelerationStructureBuildSizesKHR = (PFN_vkGetAccelerationStructureBuildSizesKHR) gpa(device, "vkGetAccelerationStructureBuildSizesKHR");
+    table->CmdTraceRaysKHR = (PFN_vkCmdTraceRaysKHR) gpa(device, "vkCmdTraceRaysKHR");
+    table->CreateRayTracingPipelinesKHR = (PFN_vkCreateRayTracingPipelinesKHR) gpa(device, "vkCreateRayTracingPipelinesKHR");
+    table->GetRayTracingCaptureReplayShaderGroupHandlesKHR = (PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR) gpa(device, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR");
+    table->CmdTraceRaysIndirectKHR = (PFN_vkCmdTraceRaysIndirectKHR) gpa(device, "vkCmdTraceRaysIndirectKHR");
+    table->GetRayTracingShaderGroupStackSizeKHR = (PFN_vkGetRayTracingShaderGroupStackSizeKHR) gpa(device, "vkGetRayTracingShaderGroupStackSizeKHR");
+    table->CmdSetRayTracingPipelineStackSizeKHR = (PFN_vkCmdSetRayTracingPipelineStackSizeKHR) gpa(device, "vkCmdSetRayTracingPipelineStackSizeKHR");
+    table->CmdDrawMeshTasksEXT = (PFN_vkCmdDrawMeshTasksEXT) gpa(device, "vkCmdDrawMeshTasksEXT");
+    table->CmdDrawMeshTasksIndirectEXT = (PFN_vkCmdDrawMeshTasksIndirectEXT) gpa(device, "vkCmdDrawMeshTasksIndirectEXT");
+    table->CmdDrawMeshTasksIndirectCountEXT = (PFN_vkCmdDrawMeshTasksIndirectCountEXT) gpa(device, "vkCmdDrawMeshTasksIndirectCountEXT");
+}
+
+
+static inline void layer_init_instance_dispatch_table(VkInstance instance, VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa) {
+    memset(table, 0, sizeof(*table));
+
+    // Instance function pointers
+    table->DestroyInstance = (PFN_vkDestroyInstance) gpa(instance, "vkDestroyInstance");
+    table->EnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) gpa(instance, "vkEnumeratePhysicalDevices");
+    table->GetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) gpa(instance, "vkGetPhysicalDeviceFeatures");
+    table->GetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) gpa(instance, "vkGetPhysicalDeviceFormatProperties");
+    table->GetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties");
+    table->GetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) gpa(instance, "vkGetPhysicalDeviceProperties");
+    table->GetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties");
+    table->GetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) gpa(instance, "vkGetPhysicalDeviceMemoryProperties");
+    table->GetInstanceProcAddr = gpa;
+    table->EnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) gpa(instance, "vkEnumerateDeviceExtensionProperties");
+    table->EnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) gpa(instance, "vkEnumerateDeviceLayerProperties");
+    table->GetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties");
+    table->EnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) gpa(instance, "vkEnumeratePhysicalDeviceGroups");
+    table->GetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) gpa(instance, "vkGetPhysicalDeviceFeatures2");
+    table->GetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) gpa(instance, "vkGetPhysicalDeviceProperties2");
+    table->GetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) gpa(instance, "vkGetPhysicalDeviceFormatProperties2");
+    table->GetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties2");
+    table->GetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties2");
+    table->GetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) gpa(instance, "vkGetPhysicalDeviceMemoryProperties2");
+    table->GetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2");
+    table->GetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) gpa(instance, "vkGetPhysicalDeviceExternalBufferProperties");
+    table->GetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) gpa(instance, "vkGetPhysicalDeviceExternalFenceProperties");
+    table->GetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) gpa(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties");
+    table->GetPhysicalDeviceToolProperties = (PFN_vkGetPhysicalDeviceToolProperties) gpa(instance, "vkGetPhysicalDeviceToolProperties");
+    table->DestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) gpa(instance, "vkDestroySurfaceKHR");
+    table->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
+    table->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+    table->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
+    table->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
+    table->GetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) gpa(instance, "vkGetPhysicalDevicePresentRectanglesKHR");
+    table->GetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR");
+    table->GetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    table->GetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR) gpa(instance, "vkGetDisplayPlaneSupportedDisplaysKHR");
+    table->GetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR) gpa(instance, "vkGetDisplayModePropertiesKHR");
+    table->CreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR) gpa(instance, "vkCreateDisplayModeKHR");
+    table->GetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR) gpa(instance, "vkGetDisplayPlaneCapabilitiesKHR");
+    table->CreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR) gpa(instance, "vkCreateDisplayPlaneSurfaceKHR");
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+    table->CreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR) gpa(instance, "vkCreateXlibSurfaceKHR");
+#endif // VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+    table->GetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
+#endif // VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+    table->CreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR) gpa(instance, "vkCreateXcbSurfaceKHR");
+#endif // VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+    table->GetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
+#endif // VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+    table->CreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR) gpa(instance, "vkCreateWaylandSurfaceKHR");
+#endif // VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+    table->GetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
+#endif // VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+    table->CreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR) gpa(instance, "vkCreateAndroidSurfaceKHR");
+#endif // VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->CreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) gpa(instance, "vkCreateWin32SurfaceKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) gpa(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->GetPhysicalDeviceVideoCapabilitiesKHR = (PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceVideoCapabilitiesKHR");
+    table->GetPhysicalDeviceVideoFormatPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceVideoFormatPropertiesKHR");
+    table->GetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR) gpa(instance, "vkGetPhysicalDeviceFeatures2KHR");
+    table->GetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR) gpa(instance, "vkGetPhysicalDeviceProperties2KHR");
+    table->GetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceFormatProperties2KHR");
+    table->GetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR");
+    table->GetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR) gpa(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR");
+    table->GetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR) gpa(instance, "vkGetPhysicalDeviceMemoryProperties2KHR");
+    table->GetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR) gpa(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
+    table->EnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR) gpa(instance, "vkEnumeratePhysicalDeviceGroupsKHR");
+    table->GetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR");
+    table->GetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
+    table->GetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR) gpa(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR");
+    table->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR) gpa(instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
+    table->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR = (PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR) gpa(instance, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR");
+    table->GetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
+    table->GetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR");
+    table->GetPhysicalDeviceDisplayProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayProperties2KHR) gpa(instance, "vkGetPhysicalDeviceDisplayProperties2KHR");
+    table->GetPhysicalDeviceDisplayPlaneProperties2KHR = (PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR) gpa(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
+    table->GetDisplayModeProperties2KHR = (PFN_vkGetDisplayModeProperties2KHR) gpa(instance, "vkGetDisplayModeProperties2KHR");
+    table->GetDisplayPlaneCapabilities2KHR = (PFN_vkGetDisplayPlaneCapabilities2KHR) gpa(instance, "vkGetDisplayPlaneCapabilities2KHR");
+    table->GetPhysicalDeviceFragmentShadingRatesKHR = (PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR) gpa(instance, "vkGetPhysicalDeviceFragmentShadingRatesKHR");
+#if defined(VK_ENABLE_BETA_EXTENSIONS)
+    table->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = (PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR) gpa(instance, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR");
+#endif // VK_ENABLE_BETA_EXTENSIONS
+    table->CreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) gpa(instance, "vkCreateDebugReportCallbackEXT");
+    table->DestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) gpa(instance, "vkDestroyDebugReportCallbackEXT");
+    table->DebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) gpa(instance, "vkDebugReportMessageEXT");
+#if defined(VK_USE_PLATFORM_GGP)
+    table->CreateStreamDescriptorSurfaceGGP = (PFN_vkCreateStreamDescriptorSurfaceGGP) gpa(instance, "vkCreateStreamDescriptorSurfaceGGP");
+#endif // VK_USE_PLATFORM_GGP
+    table->GetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV) gpa(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
+#if defined(VK_USE_PLATFORM_VI_NN)
+    table->CreateViSurfaceNN = (PFN_vkCreateViSurfaceNN) gpa(instance, "vkCreateViSurfaceNN");
+#endif // VK_USE_PLATFORM_VI_NN
+    table->ReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT) gpa(instance, "vkReleaseDisplayEXT");
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
+    table->AcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT) gpa(instance, "vkAcquireXlibDisplayEXT");
+#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
+    table->GetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT) gpa(instance, "vkGetRandROutputDisplayEXT");
+#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
+    table->GetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT");
+#if defined(VK_USE_PLATFORM_IOS_MVK)
+    table->CreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK) gpa(instance, "vkCreateIOSSurfaceMVK");
+#endif // VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
+    table->CreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK) gpa(instance, "vkCreateMacOSSurfaceMVK");
+#endif // VK_USE_PLATFORM_MACOS_MVK
+    table->CreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT) gpa(instance, "vkCreateDebugUtilsMessengerEXT");
+    table->DestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT) gpa(instance, "vkDestroyDebugUtilsMessengerEXT");
+    table->SubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT) gpa(instance, "vkSubmitDebugUtilsMessageEXT");
+    table->GetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT) gpa(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT");
+    table->GetPhysicalDeviceCalibrateableTimeDomainsEXT = (PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT) gpa(instance, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
+#if defined(VK_USE_PLATFORM_FUCHSIA)
+    table->CreateImagePipeSurfaceFUCHSIA = (PFN_vkCreateImagePipeSurfaceFUCHSIA) gpa(instance, "vkCreateImagePipeSurfaceFUCHSIA");
+#endif // VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+    table->CreateMetalSurfaceEXT = (PFN_vkCreateMetalSurfaceEXT) gpa(instance, "vkCreateMetalSurfaceEXT");
+#endif // VK_USE_PLATFORM_METAL_EXT
+    table->GetPhysicalDeviceToolPropertiesEXT = (PFN_vkGetPhysicalDeviceToolPropertiesEXT) gpa(instance, "vkGetPhysicalDeviceToolPropertiesEXT");
+    table->GetPhysicalDeviceCooperativeMatrixPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV) gpa(instance, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV");
+    table->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV = (PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) gpa(instance, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetPhysicalDeviceSurfacePresentModes2EXT = (PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+    table->CreateHeadlessSurfaceEXT = (PFN_vkCreateHeadlessSurfaceEXT) gpa(instance, "vkCreateHeadlessSurfaceEXT");
+    table->AcquireDrmDisplayEXT = (PFN_vkAcquireDrmDisplayEXT) gpa(instance, "vkAcquireDrmDisplayEXT");
+    table->GetDrmDisplayEXT = (PFN_vkGetDrmDisplayEXT) gpa(instance, "vkGetDrmDisplayEXT");
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->AcquireWinrtDisplayNV = (PFN_vkAcquireWinrtDisplayNV) gpa(instance, "vkAcquireWinrtDisplayNV");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+    table->GetWinrtDisplayNV = (PFN_vkGetWinrtDisplayNV) gpa(instance, "vkGetWinrtDisplayNV");
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
+    table->CreateDirectFBSurfaceEXT = (PFN_vkCreateDirectFBSurfaceEXT) gpa(instance, "vkCreateDirectFBSurfaceEXT");
+#endif // VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
+    table->GetPhysicalDeviceDirectFBPresentationSupportEXT = (PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT) gpa(instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT");
+#endif // VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    table->CreateScreenSurfaceQNX = (PFN_vkCreateScreenSurfaceQNX) gpa(instance, "vkCreateScreenSurfaceQNX");
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+    table->GetPhysicalDeviceScreenPresentationSupportQNX = (PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX) gpa(instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX");
+#endif // VK_USE_PLATFORM_SCREEN_QNX
+    table->GetPhysicalDeviceOpticalFlowImageFormatsNV = (PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV) gpa(instance, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV");
+}
diff --git a/tests/framework/layer/wrap_objects.cpp b/tests/framework/layer/wrap_objects.cpp
index ae9ab43..514f904 100644
--- a/tests/framework/layer/wrap_objects.cpp
+++ b/tests/framework/layer/wrap_objects.cpp
@@ -25,28 +25,29 @@
 #include <assert.h>
 #include <unordered_map>
 #include <memory>
+#include <vector>
 
 #include "vulkan/vk_layer.h"
-#include "loader/generated/vk_dispatch_table_helper.h"
+#include "vk_dispatch_table_helper.h"
 #include "loader/vk_loader_layer.h"
 
 // Export full support of instance extension VK_EXT_direct_mode_display extension
-#ifndef TEST_LAYER_EXPORT_DIRECT_DISP
+#if !defined(TEST_LAYER_EXPORT_DIRECT_DISP)
 #define TEST_LAYER_EXPORT_DIRECT_DISP 0
 #endif
 
 // Export full support of instance extension VK_EXT_display_surface_counter extension
-#ifndef TEST_LAYER_EXPORT_DISP_SURF_COUNT
+#if !defined(TEST_LAYER_EXPORT_DISP_SURF_COUNT)
 #define TEST_LAYER_EXPORT_DISP_SURF_COUNT 0
 #endif
 
 // Export full support of device extension VK_KHR_maintenance1 extension
-#ifndef TEST_LAYER_EXPORT_MAINT_1
+#if !defined(TEST_LAYER_EXPORT_MAINT_1)
 #define TEST_LAYER_EXPORT_MAINT_1 0
 #endif
 
 // Export full support of device extension VK_KHR_shared_presentable_image extension
-#ifndef TEST_LAYER_EXPORT_PRESENT_IMAGE
+#if !defined(TEST_LAYER_EXPORT_PRESENT_IMAGE)
 #define TEST_LAYER_EXPORT_PRESENT_IMAGE 0
 #endif
 
@@ -75,6 +76,7 @@
     bool layer_is_implicit;
     bool direct_display_enabled;
     bool display_surf_counter_enabled;
+    bool debug_utils_enabled;
 };
 
 struct wrapped_dev_obj {
@@ -85,31 +87,49 @@
     VkDevice obj;
     bool maintanence_1_enabled;
     bool present_image_enabled;
+    bool debug_utils_enabled;
+    bool debug_report_enabled;
+    bool debug_marker_enabled;
 };
 
-struct wrapped_debutil_mess_obj {
+struct wrapped_debug_util_mess_obj {
     VkInstance inst;
     VkDebugUtilsMessengerEXT obj;
 };
 
+struct saved_wrapped_handles_storage {
+    std::vector<wrapped_inst_obj *> instances;
+    std::vector<wrapped_phys_dev_obj *> physical_devices;
+    std::vector<wrapped_dev_obj *> devices;
+    std::vector<wrapped_debug_util_mess_obj *> debug_util_messengers;
+};
+
+saved_wrapped_handles_storage saved_wrapped_handles;
+
 VkInstance unwrap_instance(const VkInstance instance, wrapped_inst_obj **inst) {
     *inst = reinterpret_cast<wrapped_inst_obj *>(instance);
-    return (*inst)->obj;
+    auto it = std::find(saved_wrapped_handles.instances.begin(), saved_wrapped_handles.instances.end(), *inst);
+    return (it == saved_wrapped_handles.instances.end()) ? VK_NULL_HANDLE : (*inst)->obj;
 }
 
 VkPhysicalDevice unwrap_phys_dev(const VkPhysicalDevice physical_device, wrapped_phys_dev_obj **phys_dev) {
     *phys_dev = reinterpret_cast<wrapped_phys_dev_obj *>(physical_device);
-    return reinterpret_cast<VkPhysicalDevice>((*phys_dev)->obj);
+    auto it = std::find(saved_wrapped_handles.physical_devices.begin(), saved_wrapped_handles.physical_devices.end(), *phys_dev);
+    return (it == saved_wrapped_handles.physical_devices.end()) ? VK_NULL_HANDLE
+                                                                : reinterpret_cast<VkPhysicalDevice>((*phys_dev)->obj);
 }
 
 VkDevice unwrap_device(const VkDevice device, wrapped_dev_obj **dev) {
     *dev = reinterpret_cast<wrapped_dev_obj *>(device);
-    return (*dev)->obj;
+    auto it = std::find(saved_wrapped_handles.devices.begin(), saved_wrapped_handles.devices.end(), *dev);
+    return (it == saved_wrapped_handles.devices.end()) ? VK_NULL_HANDLE : (*dev)->obj;
 }
 
-VkDebugUtilsMessengerEXT unwrap_debutil_messenger(const VkDebugUtilsMessengerEXT messenger, wrapped_debutil_mess_obj **mess) {
-    *mess = reinterpret_cast<wrapped_debutil_mess_obj *>(messenger);
-    return (*mess)->obj;
+VkDebugUtilsMessengerEXT unwrap_debug_util_messenger(const VkDebugUtilsMessengerEXT messenger, wrapped_debug_util_mess_obj **mess) {
+    *mess = reinterpret_cast<wrapped_debug_util_mess_obj *>(messenger);
+    auto it =
+        std::find(saved_wrapped_handles.debug_util_messengers.begin(), saved_wrapped_handles.debug_util_messengers.end(), *mess);
+    return (it == saved_wrapped_handles.debug_util_messengers.end()) ? VK_NULL_HANDLE : (*mess)->obj;
 }
 
 VkLayerInstanceCreateInfo *get_chain_info(const VkInstanceCreateInfo *pCreateInfo, VkLayerFunction func) {
@@ -132,7 +152,7 @@
 
 namespace wrap_objects {
 
-static const VkLayerProperties global_layer = {
+const VkLayerProperties global_layer = {
     "VK_LAYER_LUNARG_wrap_objects",
     VK_HEADER_VERSION_COMPLETE,
     1,
@@ -157,6 +177,7 @@
     }
     auto inst = new wrapped_inst_obj;
     if (!inst) return VK_ERROR_OUT_OF_HOST_MEMORY;
+    saved_wrapped_handles.instances.push_back(inst);
     memset(inst, 0, sizeof(*inst));
     inst->obj = (*pInstance);
     *pInstance = reinterpret_cast<VkInstance>(inst);
@@ -170,7 +191,7 @@
         inst->pfn_inst_init = NULL;
         inst->loader_disp = *(reinterpret_cast<VkLayerInstanceDispatchTable **>(inst->obj));
     }
-    layer_init_instance_dispatch_table(*pInstance, &inst->layer_disp, fpGetInstanceProcAddr);
+    layer_init_instance_dispatch_table(inst->obj, &inst->layer_disp, fpGetInstanceProcAddr);
     bool found = false;
     for (uint32_t layer = 0; layer < pCreateInfo->enabledLayerCount; ++layer) {
         std::string layer_name = pCreateInfo->ppEnabledLayerNames[layer];
@@ -196,6 +217,9 @@
             inst->display_surf_counter_enabled = true;
 #endif
         }
+        if (!strcmp(pCreateInfo->ppEnabledExtensionNames[ext], VK_EXT_DEBUG_UTILS_EXTENSION_NAME)) {
+            inst->debug_utils_enabled = true;
+        }
     }
 
     return result;
@@ -218,8 +242,9 @@
     auto vk_inst = unwrap_instance(instance, &inst);
     VkLayerInstanceDispatchTable *pDisp = &inst->layer_disp;
     VkResult result = pDisp->CreateDebugUtilsMessengerEXT(vk_inst, pCreateInfo, pAllocator, pMessenger);
-    auto mess = new wrapped_debutil_mess_obj;
+    auto mess = new wrapped_debug_util_mess_obj;
     if (!mess) return VK_ERROR_OUT_OF_HOST_MEMORY;
+    saved_wrapped_handles.debug_util_messengers.push_back(mess);
     memset(mess, 0, sizeof(*mess));
     mess->obj = (*pMessenger);
     *pMessenger = reinterpret_cast<VkDebugUtilsMessengerEXT>(mess);
@@ -231,8 +256,8 @@
     wrapped_inst_obj *inst;
     auto vk_inst = unwrap_instance(instance, &inst);
     VkLayerInstanceDispatchTable *pDisp = &inst->layer_disp;
-    wrapped_debutil_mess_obj *mess;
-    auto vk_mess = unwrap_debutil_messenger(messenger, &mess);
+    wrapped_debug_util_mess_obj *mess;
+    auto vk_mess = unwrap_debug_util_messenger(messenger, &mess);
     pDisp->DestroyDebugUtilsMessengerEXT(vk_inst, vk_mess, pAllocator);
     delete mess;
 }
@@ -244,7 +269,7 @@
     VkLayerInstanceDispatchTable *pDisp = &inst->layer_disp;
     pDisp->DestroySurfaceKHR(vk_inst, surface, pAllocator);
 }
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR *pCreateInfo,
                                                               const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -254,7 +279,7 @@
 }
 #endif
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
                                                             const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -264,7 +289,7 @@
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
                                                               const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -274,7 +299,7 @@
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
                                                           const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -284,7 +309,7 @@
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
                                                            const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -294,7 +319,7 @@
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateDirectFBSurfaceEXT(VkInstance instance,
                                                                const VkDirectFBSurfaceCreateInfoEXT *pCreateInfo,
                                                                const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -305,7 +330,7 @@
 }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK *pCreateInfo,
                                                             const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -315,7 +340,7 @@
 }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo,
                                                           const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -325,7 +350,7 @@
 }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateStreamDescriptorSurfaceGGP(VkInstance instance,
                                                                        const VkStreamDescriptorSurfaceCreateInfoGGP *pCreateInfo,
                                                                        const VkAllocationCallbacks *pAllocator,
@@ -347,7 +372,7 @@
 }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 VKAPI_ATTR VkResult VKAPI_CALL wrap_vkCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX *pCreateInfo,
                                                              const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     wrapped_inst_obj *inst;
@@ -369,6 +394,7 @@
         assert(pPhysicalDeviceCount);
         auto phys_devs = new wrapped_phys_dev_obj[*pPhysicalDeviceCount];
         if (!phys_devs) return VK_ERROR_OUT_OF_HOST_MEMORY;
+        saved_wrapped_handles.physical_devices.push_back(phys_devs);
         if (inst->ptr_phys_devs) delete[] inst->ptr_phys_devs;
         inst->ptr_phys_devs = phys_devs;
         for (uint32_t i = 0; i < *pPhysicalDeviceCount; i++) {
@@ -418,7 +444,7 @@
 #endif
         if (pPropertyCount) {
             if (pProperties) {
-                uint32_t count = ext_count;
+                [[maybe_unused]] uint32_t count = ext_count;
                 if (count > *pPropertyCount) {
                     count = *pPropertyCount;
                     result = VK_INCOMPLETE;
@@ -481,6 +507,7 @@
     if (!dev) {
         return VK_ERROR_OUT_OF_HOST_MEMORY;
     }
+    saved_wrapped_handles.devices.push_back(dev);
     memset(dev, 0, sizeof(*dev));
     dev->obj = *pDevice;
     dev->pfn_get_dev_proc_addr = pfn_get_dev_proc_addr;
@@ -512,7 +539,11 @@
             dev->present_image_enabled = true;
 #endif
         }
+        if (!strcmp(pCreateInfo->ppEnabledExtensionNames[ext], VK_EXT_DEBUG_MARKER_EXTENSION_NAME)) {
+            dev->debug_marker_enabled = true;
+        }
     }
+    dev->debug_utils_enabled = phys_dev->inst->debug_utils_enabled;
 
     return result;
 }
@@ -525,12 +556,9 @@
 }
 
 // Fake instance extension support
-VKAPI_ATTR VkResult VKAPI_CALL wrap_vkReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) {
-    return VK_SUCCESS;
-}
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkReleaseDisplayEXT(VkPhysicalDevice, VkDisplayKHR) { return VK_SUCCESS; }
 
-VKAPI_ATTR VkResult VKAPI_CALL wrap_vkGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice,
-                                                                               VkSurfaceKHR surface,
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice, VkSurfaceKHR,
                                                                                VkSurfaceCapabilities2EXT *pSurfaceCapabilities) {
     if (nullptr != pSurfaceCapabilities) {
         pSurfaceCapabilities->minImageCount = 7;
@@ -541,12 +569,109 @@
 }
 
 // Fake device extension support
-VKAPI_ATTR void VKAPI_CALL wrap_vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) {}
+VKAPI_ATTR void VKAPI_CALL wrap_vkTrimCommandPoolKHR(VkDevice, VkCommandPool, VkCommandPoolTrimFlags) {}
 
 // Return an odd error so we can verify that this actually got called
-VKAPI_ATTR VkResult VKAPI_CALL wrap_vkGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) {
-    return VK_ERROR_NATIVE_WINDOW_IN_USE_KHR;
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkGetSwapchainStatusKHR(VkDevice, VkSwapchainKHR) { return VK_ERROR_NATIVE_WINDOW_IN_USE_KHR; }
+
+// Debug utils & debug marker ext stubs
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT *pTagInfo) {
+    VkDebugMarkerObjectTagInfoEXT new_info = *pTagInfo;
+    wrapped_dev_obj *dev;
+    auto vk_dev = unwrap_device(device, &dev);
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
+        wrapped_phys_dev_obj *phys_dev;
+        auto vk_phys_dev = unwrap_phys_dev((VkPhysicalDevice)(uintptr_t)(pTagInfo->object), &phys_dev);
+        if (vk_phys_dev == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.object = (uint64_t)(uintptr_t)vk_phys_dev;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
+        // TODO
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        wrapped_inst_obj *inst;
+        auto instance = unwrap_instance((VkInstance)(uintptr_t)(pTagInfo->object), &inst);
+        if (instance == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.object = (uint64_t)(uintptr_t)instance;
+    }
+    return dev->disp.DebugMarkerSetObjectTagEXT(vk_dev, &new_info);
 }
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkDebugMarkerSetObjectNameEXT(VkDevice device,
+                                                                  const VkDebugMarkerObjectNameInfoEXT *pNameInfo) {
+    VkDebugMarkerObjectNameInfoEXT new_info = *pNameInfo;
+    wrapped_dev_obj *dev;
+    auto vk_dev = unwrap_device(device, &dev);
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT) {
+        wrapped_phys_dev_obj *phys_dev;
+        auto vk_phys_dev = unwrap_phys_dev((VkPhysicalDevice)(uintptr_t)(pNameInfo->object), &phys_dev);
+        if (vk_phys_dev == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.object = (uint64_t)(uintptr_t)vk_phys_dev;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT) {
+        // TODO
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT) {
+        wrapped_inst_obj *inst;
+        auto instance = unwrap_instance((VkInstance)(uintptr_t)(pNameInfo->object), &inst);
+        if (instance == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.object = (uint64_t)(uintptr_t)instance;
+    }
+    return dev->disp.DebugMarkerSetObjectNameEXT(vk_dev, &new_info);
+}
+// Debug Marker functions that are not supported:
+// vkCmdDebugMarkerBeginEXT
+// vkCmdDebugMarkerEndEXT
+// vkCmdDebugMarkerInsertEXT
+
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *pNameInfo) {
+    VkDebugUtilsObjectNameInfoEXT new_info = *pNameInfo;
+    wrapped_dev_obj *dev;
+    auto vk_dev = unwrap_device(device, &dev);
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
+        wrapped_phys_dev_obj *phys_dev;
+        auto vk_phys_dev = unwrap_phys_dev((VkPhysicalDevice)(uintptr_t)(pNameInfo->objectHandle), &phys_dev);
+        if (vk_phys_dev == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.objectHandle = (uint64_t)(uintptr_t)vk_phys_dev;
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
+        // TODO
+    }
+    if (pNameInfo && pNameInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        wrapped_inst_obj *inst;
+        auto instance = unwrap_instance((VkInstance)(uintptr_t)(pNameInfo->objectHandle), &inst);
+        if (instance == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.objectHandle = (uint64_t)(uintptr_t)instance;
+    }
+    return dev->disp.SetDebugUtilsObjectNameEXT(vk_dev, &new_info);
+}
+VKAPI_ATTR VkResult VKAPI_CALL wrap_vkSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT *pTagInfo) {
+    VkDebugUtilsObjectTagInfoEXT new_info = *pTagInfo;
+    wrapped_dev_obj *dev;
+    auto vk_dev = unwrap_device(device, &dev);
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_PHYSICAL_DEVICE) {
+        wrapped_phys_dev_obj *phys_dev;
+        auto vk_phys_dev = unwrap_phys_dev((VkPhysicalDevice)(uintptr_t)(pTagInfo->objectHandle), &phys_dev);
+        if (vk_phys_dev == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.objectHandle = (uint64_t)(uintptr_t)vk_phys_dev;
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_SURFACE_KHR) {
+        // TODO
+    }
+    if (pTagInfo && pTagInfo->objectType == VK_OBJECT_TYPE_INSTANCE) {
+        wrapped_inst_obj *inst;
+        auto instance = unwrap_instance((VkInstance)(uintptr_t)(pTagInfo->objectHandle), &inst);
+        if (instance == VK_NULL_HANDLE) return VK_ERROR_DEVICE_LOST;
+        new_info.objectHandle = (uint64_t)(uintptr_t)instance;
+    }
+    return dev->disp.SetDebugUtilsObjectTagEXT(vk_dev, &new_info);
+}
+// Debug utils functions that are not supported
+// vkQueueBeginDebugUtilsLabelEXT
+// vkQueueEndDebugUtilsLabelEXT
+// vkQueueInsertDebugUtilsLabelEXT
+// vkCmdBeginDebugUtilsLabelEXT
+// vkCmdEndDebugUtilsLabelEXT
+// vkCmdInsertDebugUtilsLabelEXT
 
 PFN_vkVoidFunction layer_intercept_device_proc(wrapped_dev_obj *dev, const char *name) {
     if (!name || name[0] != 'v' || name[1] != 'k') return NULL;
@@ -559,6 +684,15 @@
     if (dev->present_image_enabled && !strcmp(name, "GetSwapchainStatusKHR"))
         return (PFN_vkVoidFunction)wrap_vkGetSwapchainStatusKHR;
 
+    if (dev->debug_marker_enabled && !strcmp(name, "DebugMarkerSetObjectTagEXT"))
+        return (PFN_vkVoidFunction)wrap_vkDebugMarkerSetObjectTagEXT;
+    if (dev->debug_marker_enabled && !strcmp(name, "DebugMarkerSetObjectNameEXT"))
+        return (PFN_vkVoidFunction)wrap_vkDebugMarkerSetObjectNameEXT;
+    if (dev->debug_utils_enabled && !strcmp(name, "SetDebugUtilsObjectNameEXT"))
+        return (PFN_vkVoidFunction)wrap_vkSetDebugUtilsObjectNameEXT;
+    if (dev->debug_utils_enabled && !strcmp(name, "SetDebugUtilsObjectTagEXT"))
+        return (PFN_vkVoidFunction)wrap_vkSetDebugUtilsObjectTagEXT;
+
     return NULL;
 }
 
@@ -599,39 +733,39 @@
     if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties"))
         return (PFN_vkVoidFunction)wrap_vkGetPhysicalDeviceQueueFamilyProperties;
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     if (!strcmp(name, "CreateAndroidSurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkCreateAndroidSurfaceKHR;
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     if (!strcmp(name, "CreateWin32SurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkCreateWin32SurfaceKHR;
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     if (!strcmp(name, "CreateWaylandSurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkCreateWaylandSurfaceKHR;
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     if (!strcmp(name, "CreateXcbSurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkCreateXcbSurfaceKHR;
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     if (!strcmp(name, "CreateXlibSurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkCreateXlibSurfaceKHR;
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     if (!strcmp(name, "CreateDirectFBSurfaceEXT")) return (PFN_vkVoidFunction)wrap_vkCreateDirectFBSurfaceEXT;
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     if (!strcmp(name, "CreateMacOSSurfaceMVK")) return (PFN_vkVoidFunction)wrap_vkCreateMacOSSurfaceMVK;
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     if (!strcmp(name, "CreateIOSSurfaceMVK")) return (PFN_vkVoidFunction)wrap_vkCreateIOSSurfaceMVK;
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     if (!strcmp(name, "CreateStreamDescriptorSurfaceGGP")) return (PFN_vkVoidFunction)wrap_vkCreateStreamDescriptorSurfaceGGP;
 #endif  // VK_USE_PLATFORM_GGP
 
@@ -639,7 +773,7 @@
     if (!strcmp(name, "CreateMetalSurfaceEXT")) return (PFN_vkVoidFunction)wrap_vkCreateMetalSurfaceEXT;
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     if (!strcmp(name, "CreateScreenSurfaceQNX")) return (PFN_vkVoidFunction)wrap_vkCreateScreenSurfaceQNX;
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
     if (!strcmp(name, "DestroySurfaceKHR")) return (PFN_vkVoidFunction)wrap_vkDestroySurfaceKHR;
@@ -648,6 +782,18 @@
     if (inst->display_surf_counter_enabled && !strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2EXT"))
         return (PFN_vkVoidFunction)wrap_vkGetPhysicalDeviceSurfaceCapabilities2EXT;
 
+    // instance_proc needs to be able to query device commands even if the extension isn't enabled (because it isn't known at this
+    // time)
+    if (!strcmp(name, "TrimCommandPoolKHR")) return (PFN_vkVoidFunction)wrap_vkTrimCommandPoolKHR;
+    if (!strcmp(name, "GetSwapchainStatusKHR")) return (PFN_vkVoidFunction)wrap_vkGetSwapchainStatusKHR;
+
+    if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) return (PFN_vkVoidFunction)wrap_vkDebugMarkerSetObjectTagEXT;
+    if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) return (PFN_vkVoidFunction)wrap_vkDebugMarkerSetObjectNameEXT;
+    if (inst->debug_utils_enabled && !strcmp(name, "SetDebugUtilsObjectNameEXT"))
+        return (PFN_vkVoidFunction)wrap_vkSetDebugUtilsObjectNameEXT;
+    if (inst->debug_utils_enabled && !strcmp(name, "SetDebugUtilsObjectTagEXT"))
+        return (PFN_vkVoidFunction)wrap_vkSetDebugUtilsObjectTagEXT;
+
     return NULL;
 }
 
@@ -662,7 +808,7 @@
     }
 
     wrapped_inst_obj *inst;
-    (void)unwrap_instance(instance, &inst);
+    unwrap_instance(instance, &inst);
 
     addr = layer_intercept_instance_proc(inst, funcName);
     if (addr) return addr;
@@ -677,7 +823,7 @@
     assert(instance);
 
     wrapped_inst_obj *inst;
-    (void)unwrap_instance(instance, &inst);
+    unwrap_instance(instance, &inst);
     VkLayerInstanceDispatchTable *pTable = &inst->layer_disp;
 
     if (pTable->GetPhysicalDeviceProcAddr == NULL) return NULL;
@@ -696,21 +842,20 @@
     return wrap_objects::wrap_vkGetDeviceProcAddr(device, funcName);
 }
 
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount,
-                                                                                      VkExtensionProperties *pProperties) {
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *, uint32_t *,
+                                                                                      VkExtensionProperties *) {
     assert(0);  // TODO return wrap_objects::EnumerateInstanceExtensionProperties(pLayerName, pCount, pProperties);
     return VK_SUCCESS;
 }
 
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pCount,
-                                                                                  VkLayerProperties *pProperties) {
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *, VkLayerProperties *) {
     assert(0);  // TODO return wrap_objects::EnumerateInstanceLayerProperties(pCount, pProperties);
     return VK_SUCCESS;
 }
 
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
-                                                                                    const char *pLayerName, uint32_t *pCount,
-                                                                                    VkExtensionProperties *pProperties) {
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
+vkEnumerateDeviceExtensionProperties([[maybe_unused]] VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pCount,
+                                     VkExtensionProperties *pProperties) {
     // the layer command handles VK_NULL_HANDLE just fine internally
     assert(physicalDevice == VK_NULL_HANDLE);
     return wrap_objects::wrap_vkEnumerateDeviceExtensionProperties(VK_NULL_HANDLE, pLayerName, pCount, pProperties);
@@ -732,63 +877,63 @@
     return wrap_objects::wrap_vkDestroySurfaceKHR(instance, surface, pAllocator);
 }
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL test_vkCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR *pCreateInfo,
                                                               const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
                                                        const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
                                                          const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
                                                      const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
                                                       const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT *pCreateInfo,
                                                           const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK *pCreateInfo,
                                                        const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_MACOS_MVK
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK *pCreateInfo,
                                                      const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface);
 }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(VkInstance instance,
                                                                   const VkStreamDescriptorSurfaceCreateInfoGGP *pCreateInfo,
                                                                   const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
@@ -803,7 +948,7 @@
 }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX *pCreateInfo,
                                                         const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) {
     return wrap_objects::wrap_vkCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface);
diff --git a/tests/framework/shim/CMakeLists.txt b/tests/framework/shim/CMakeLists.txt
index 82c2573..183c34d 100644
--- a/tests/framework/shim/CMakeLists.txt
+++ b/tests/framework/shim/CMakeLists.txt
@@ -18,7 +18,7 @@
 add_library(shim-common STATIC shim_common.cpp)
 target_link_libraries(shim-common PUBLIC testing_framework_util)
 target_include_directories(shim-common PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-set_target_properties(shim-common ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(shim-common PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 if (WIN32)
     # need adapters.h which is in the loader folder
@@ -27,14 +27,17 @@
 
     add_library(shim-library SHARED windows_shim.cpp)
     target_link_libraries(shim-library PRIVATE detours cfgmgr32)
+    set_target_properties(shim-library PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 elseif(UNIX)
     if(APPLE)
         add_library(shim-library SHARED unix_shim.cpp)
+        target_link_libraries(shim-library PRIVATE "-framework CoreFoundation")
+        set_target_properties(shim-library PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
     else()
         add_library(shim-library STATIC unix_shim.cpp)
     endif()
 endif()
 #common attributes
 target_link_libraries(shim-library PUBLIC shim-common)
-set_target_properties(shim-library ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(shim-library PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
diff --git a/tests/framework/shim/shim.h b/tests/framework/shim/shim.h
index b619465..4a1eed4 100644
--- a/tests/framework/shim/shim.h
+++ b/tests/framework/shim/shim.h
@@ -29,6 +29,7 @@
 
 #include "test_util.h"
 
+#include <unordered_set>
 #include <stdlib.h>
 
 #if defined(WIN32)
@@ -44,7 +45,7 @@
 #include <adapters.h>
 #endif
 
-enum class ManifestCategory { implicit_layer, explicit_layer, icd };
+enum class ManifestCategory { implicit_layer, explicit_layer, icd, settings };
 enum class GpuType { unspecified, integrated, discrete, external };
 
 #if defined(WIN32)
@@ -71,8 +72,8 @@
 
 // Needed for DXGI mocking
 struct KnownDriverData {
-    const char* filename;
-    int vendor_id;
+    const char* filename = nullptr;
+    int vendor_id = 0;
 };
 static std::array<KnownDriverData, 4> known_driver_list = {
 #if defined(_WIN64)
@@ -85,17 +86,12 @@
 };
 
 struct DXGIAdapter {
-    DXGIAdapter(GpuType gpu_preference, DXGI_ADAPTER_DESC1 desc1, uint32_t adapter_index)
-        : gpu_preference(gpu_preference), desc1(desc1), adapter_index(adapter_index) {}
     GpuType gpu_preference = GpuType::unspecified;
     DXGI_ADAPTER_DESC1 desc1{};
     uint32_t adapter_index = 0;
 };
 
 struct D3DKMT_Adapter {
-    D3DKMT_Adapter() = default;
-    D3DKMT_Adapter(UINT hAdapter, LUID adapter_luid) noexcept : hAdapter(hAdapter), adapter_luid(adapter_luid) {}
-
     D3DKMT_Adapter& add_driver_manifest_path(fs::path const& src);
     D3DKMT_Adapter& add_implicit_layer_manifest_path(fs::path const& src);
     D3DKMT_Adapter& add_explicit_layer_manifest_path(fs::path const& src);
@@ -110,13 +106,15 @@
     D3DKMT_Adapter& add_path(fs::path src, std::vector<std::wstring>& dest);
 };
 
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
 
 struct DirEntry {
-    DIR* directory;
+    DIR* directory = nullptr;
     std::string folder_path;
     std::vector<struct dirent*> contents;
-    size_t current_index;
+    // the current item being read by an app (incremented by readdir, reset to zero by opendir & closedir)
+    size_t current_index = 0;
+    bool is_fake_path = false;  // true when this entry is for folder redirection
 };
 
 #endif
@@ -138,16 +136,20 @@
     void redirect_all_paths(fs::path const& path);
     void redirect_category(fs::path const& new_path, ManifestCategory category);
 
-    void set_path(ManifestCategory category, fs::path const& path);
+    // fake paths are paths that the loader normally looks in but actually point to locations inside the test framework
+    void set_fake_path(ManifestCategory category, fs::path const& path);
+
+    // known paths are real paths but since the test framework guarantee's the order files are found in, files in these paths
+    // need to be ordered correctly
+    void add_known_path(fs::path const& path);
 
     void add_manifest(ManifestCategory category, fs::path const& path);
+    void add_unsecured_manifest(ManifestCategory category, fs::path const& path);
 
 // platform specific shim interface
 #if defined(WIN32)
     // Control Platform Elevation Level
-    void set_elevated_privilege(bool elev) {
-        (elev) ? elevation_level = SECURITY_MANDATORY_HIGH_RID : elevation_level = SECURITY_MANDATORY_LOW_RID;
-    }
+    void set_elevated_privilege(bool elev) { elevation_level = (elev) ? SECURITY_MANDATORY_HIGH_RID : SECURITY_MANDATORY_LOW_RID; }
     unsigned long elevation_level = SECURITY_MANDATORY_LOW_RID;
 
     void add_dxgi_adapter(GpuType gpu_preference, DXGI_ADAPTER_DESC1 desc1);
@@ -174,6 +176,8 @@
     std::vector<RegistryEntry> hkey_local_machine_explicit_layers;
     std::vector<RegistryEntry> hkey_local_machine_implicit_layers;
     std::vector<RegistryEntry> hkey_local_machine_drivers;
+    std::vector<RegistryEntry> hkey_local_machine_settings;
+    std::vector<RegistryEntry> hkey_current_user_settings;
 
     std::wstring app_package_path;
 
@@ -181,20 +185,35 @@
     size_t created_key_count = 0;
     std::vector<HKeyHandle> created_keys;
 
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
     bool is_fake_path(fs::path const& path);
-    fs::path const& get_fake_path(fs::path const& path);
+    fs::path const& get_real_path_from_fake_path(fs::path const& path);
 
     void redirect_path(fs::path const& path, fs::path const& new_path);
     void remove_redirect(fs::path const& path);
 
+    bool is_known_path(fs::path const& path);
+    void remove_known_path(fs::path const& path);
+
+    void redirect_dlopen_name(fs::path const& filename, fs::path const& actual_path);
+    bool is_dlopen_redirect_name(fs::path const& filename);
+
+    fs::path query_default_redirect_path(ManifestCategory category);
+
     std::unordered_map<std::string, fs::path> redirection_map;
+    std::unordered_map<std::string, fs::path> dlopen_redirection_map;
+    std::unordered_set<std::string> known_path_set;
 
     void set_elevated_privilege(bool elev) { use_fake_elevation = elev; }
     bool use_fake_elevation = false;
 
     std::vector<DirEntry> dir_entries;
+
+#if defined(__APPLE__)
+    std::string bundle_contents;
 #endif
+#endif
+    bool is_during_destruction = false;
 };
 
 std::vector<std::string> parse_env_var_list(std::string const& var);
@@ -208,7 +227,7 @@
 using PFN_get_platform_shim = PlatformShim* (*)(std::vector<fs::FolderManager>* folders);
 #define GET_PLATFORM_SHIM_STR "get_platform_shim"
 
-#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 // statically link on linux
 PlatformShim* get_platform_shim(std::vector<fs::FolderManager>* folders);
 #endif
diff --git a/tests/framework/shim/shim_common.cpp b/tests/framework/shim/shim_common.cpp
index 2c16a8a..4deb7fc 100644
--- a/tests/framework/shim/shim_common.cpp
+++ b/tests/framework/shim/shim_common.cpp
@@ -42,7 +42,7 @@
     for (size_t i = 0; i < var.size(); i++) {
 #if defined(WIN32)
         if (var[i] == ';') {
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
         if (var[i] == ':') {
 #endif
             if (len != 0) {
@@ -101,20 +101,37 @@
     hkey_local_machine_explicit_layers.clear();
     hkey_local_machine_implicit_layers.clear();
     hkey_local_machine_drivers.clear();
+    hkey_local_machine_settings.clear();
+    hkey_current_user_settings.clear();
 }
 
-void PlatformShim::set_path(ManifestCategory category, fs::path const& path) {}
+void PlatformShim::set_fake_path([[maybe_unused]] ManifestCategory category, [[maybe_unused]] fs::path const& path) {}
+void PlatformShim::add_known_path([[maybe_unused]] fs::path const& path) {}
 
 void PlatformShim::add_manifest(ManifestCategory category, fs::path const& path) {
-    if (category == ManifestCategory::implicit_layer)
+    if (category == ManifestCategory::settings) {
+        hkey_local_machine_settings.emplace_back(path.str());
+    } else if (category == ManifestCategory::implicit_layer) {
         hkey_local_machine_implicit_layers.emplace_back(path.str());
-    else if (category == ManifestCategory::explicit_layer)
+    } else if (category == ManifestCategory::explicit_layer) {
         hkey_local_machine_explicit_layers.emplace_back(path.str());
-    else
+    } else {
         hkey_local_machine_drivers.emplace_back(path.str());
+    }
 }
+
+void PlatformShim::add_unsecured_manifest(ManifestCategory category, fs::path const& path) {
+    if (category == ManifestCategory::settings) {
+        hkey_current_user_settings.emplace_back(path.str());
+    } else if (category == ManifestCategory::implicit_layer) {
+        hkey_current_user_implicit_layers.emplace_back(path.str());
+    } else if (category == ManifestCategory::explicit_layer) {
+        hkey_current_user_explicit_layers.emplace_back(path.str());
+    }
+}
+
 void PlatformShim::add_dxgi_adapter(GpuType gpu_preference, DXGI_ADAPTER_DESC1 desc1) {
-    dxgi_adapters.push_back(DXGIAdapter(gpu_preference, desc1, next_adapter_handle++));
+    dxgi_adapters.push_back({gpu_preference, desc1, next_adapter_handle++});
 }
 
 void PlatformShim::add_d3dkmt_adapter(D3DKMT_Adapter const& adapter) { d3dkmt_adapters.push_back(adapter); }
@@ -125,7 +142,8 @@
 }
 
 // TODO:
-void PlatformShim::add_CM_Device_ID(std::wstring const& id, fs::path const& icd_path, fs::path const& layer_path) {
+void PlatformShim::add_CM_Device_ID([[maybe_unused]] std::wstring const& id, [[maybe_unused]] fs::path const& icd_path,
+                                    [[maybe_unused]] fs::path const& layer_path) {
     //     // append a null byte as separator if there is already id's in the list
     //     if (CM_device_ID_list.size() != 0) {
     //         CM_device_ID_list += L'\0';  // I'm sure this wont cause issues with std::string down the line... /s
@@ -144,14 +162,15 @@
     //     // add_key_value_string(id_key, "VulkanLayerName", layer_path.c_str());
 }
 
-void PlatformShim::redirect_category(fs::path const& new_path, ManifestCategory search_category) {}
+void PlatformShim::redirect_category(fs::path const&, ManifestCategory) {}
 
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
 
 #include <dirent.h>
 #include <unistd.h>
 
 std::string category_path_name(ManifestCategory category) {
+    if (category == ManifestCategory::settings) return "settings.d";
     if (category == ManifestCategory::implicit_layer) return "implicit_layer.d";
     if (category == ManifestCategory::explicit_layer)
         return "explicit_layer.d";
@@ -161,12 +180,17 @@
 
 void PlatformShim::reset() { redirection_map.clear(); }
 
+bool PlatformShim::is_fake_path(fs::path const& path) { return redirection_map.count(path.str()) > 0; }
+fs::path const& PlatformShim::get_real_path_from_fake_path(fs::path const& path) { return redirection_map.at(path.str()); }
 void PlatformShim::redirect_path(fs::path const& path, fs::path const& new_path) { redirection_map[path.str()] = new_path; }
 void PlatformShim::remove_redirect(fs::path const& path) { redirection_map.erase(path.str()); }
-bool PlatformShim::is_fake_path(fs::path const& path) { return redirection_map.count(path.str()) > 0; }
-fs::path const& PlatformShim::get_fake_path(fs::path const& path) { return redirection_map.at(path.str()); }
 
-void PlatformShim::add_manifest(ManifestCategory category, fs::path const& path) {}
+bool PlatformShim::is_known_path(fs::path const& path) { return known_path_set.count(path.str()) > 0; }
+void PlatformShim::add_known_path(fs::path const& path) { known_path_set.insert(path.str()); }
+void PlatformShim::remove_known_path(fs::path const& path) { known_path_set.erase(path.str()); }
+
+void PlatformShim::add_manifest([[maybe_unused]] ManifestCategory category, [[maybe_unused]] fs::path const& path) {}
+void PlatformShim::add_unsecured_manifest([[maybe_unused]] ManifestCategory category, [[maybe_unused]] fs::path const& path) {}
 
 void parse_and_add_env_var_override(std::vector<std::string>& paths, std::string env_var_contents) {
     auto parsed_paths = parse_env_var_list(env_var_contents);
@@ -176,14 +200,21 @@
 void PlatformShim::redirect_category(fs::path const& new_path, ManifestCategory category) {
     std::vector<std::string> paths;
     auto home = fs::path(get_env_var("HOME"));
+    if (category == ManifestCategory::settings) {
+        redirect_path(home / ".local/share/vulkan" / category_path_name(category), new_path);
+        return;
+    }
+
     if (home.size() != 0) {
         paths.push_back((home / ".config").str());
         paths.push_back((home / ".local/share").str());
     }
-    parse_and_add_env_var_override(paths, get_env_var("XDG_CONFIG_DIRS"));
-    parse_and_add_env_var_override(paths, get_env_var("XDG_CONFIG_HOME"));
-    parse_and_add_env_var_override(paths, get_env_var("XDG_DATA_DIRS"));
-    parse_and_add_env_var_override(paths, get_env_var("XDG_DATA_HOME"));
+    // Don't report errors on apple - these env-vars are not suppose to be defined
+    bool report_errors = true;
+#if defined(__APPLE__)
+    report_errors = false;
+#endif
+    parse_and_add_env_var_override(paths, get_env_var("XDG_CONFIG_HOME", report_errors));
     if (category == ManifestCategory::explicit_layer) {
         parse_and_add_env_var_override(paths, get_env_var("VK_LAYER_PATH", false));  // don't report failure
     }
@@ -210,9 +241,18 @@
     }
 }
 
-void PlatformShim::set_path(ManifestCategory category, fs::path const& path) {
+void PlatformShim::set_fake_path(ManifestCategory category, fs::path const& path) {
     // use /etc as the 'redirection path' by default since its always searched
     redirect_path(fs::path(SYSCONFDIR) / "vulkan" / category_path_name(category), path);
 }
 
+void PlatformShim::redirect_dlopen_name(fs::path const& filename, fs::path const& actual_path) {
+    dlopen_redirection_map[filename.str()] = actual_path;
+}
+
+bool PlatformShim::is_dlopen_redirect_name(fs::path const& filename) { return dlopen_redirection_map.count(filename.str()) == 1; }
+
+fs::path PlatformShim::query_default_redirect_path(ManifestCategory category) {
+    return fs::path(SYSCONFDIR) / "vulkan" / category_path_name(category);
+}
 #endif
diff --git a/tests/framework/shim/unix_shim.cpp b/tests/framework/shim/unix_shim.cpp
index e930293..12b3bfa 100644
--- a/tests/framework/shim/unix_shim.cpp
+++ b/tests/framework/shim/unix_shim.cpp
@@ -27,9 +27,15 @@
 
 #include "shim.h"
 
-static PlatformShim platform_shim;
+#include <algorithm>
+
+#if defined(__APPLE__)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+PlatformShim platform_shim;
 extern "C" {
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 PlatformShim* get_platform_shim(std::vector<fs::FolderManager>* folders) {
     platform_shim = PlatformShim(folders);
     return &platform_shim;
@@ -42,12 +48,13 @@
 #endif
 
 // Necessary for MacOS function shimming
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 #define OPENDIR_FUNC_NAME opendir
 #define READDIR_FUNC_NAME readdir
 #define CLOSEDIR_FUNC_NAME closedir
 #define ACCESS_FUNC_NAME access
 #define FOPEN_FUNC_NAME fopen
+#define DLOPEN_FUNC_NAME dlopen
 #define GETEUID_FUNC_NAME geteuid
 #define GETEGID_FUNC_NAME getegid
 #if defined(HAVE_SECURE_GETENV)
@@ -62,8 +69,10 @@
 #define CLOSEDIR_FUNC_NAME my_closedir
 #define ACCESS_FUNC_NAME my_access
 #define FOPEN_FUNC_NAME my_fopen
+#define DLOPEN_FUNC_NAME my_dlopen
 #define GETEUID_FUNC_NAME my_geteuid
 #define GETEGID_FUNC_NAME my_getegid
+#if !defined(TARGET_OS_IPHONE)
 #if defined(HAVE_SECURE_GETENV)
 #define SECURE_GETENV_FUNC_NAME my_secure_getenv
 #endif
@@ -71,12 +80,14 @@
 #define __SECURE_GETENV_FUNC_NAME my__secure_getenv
 #endif
 #endif
+#endif
 
 using PFN_OPENDIR = DIR* (*)(const char* path_name);
 using PFN_READDIR = struct dirent* (*)(DIR* dir_stream);
 using PFN_CLOSEDIR = int (*)(DIR* dir_stream);
 using PFN_ACCESS = int (*)(const char* pathname, int mode);
 using PFN_FOPEN = FILE* (*)(const char* filename, const char* mode);
+using PFN_DLOPEN = void* (*)(const char* in_filename, int flags);
 using PFN_GETEUID = uid_t (*)(void);
 using PFN_GETEGID = gid_t (*)(void);
 #if defined(HAVE_SECURE_GETENV) || defined(HAVE___SECURE_GETENV)
@@ -89,27 +100,29 @@
 #define real_closedir closedir
 #define real_access access
 #define real_fopen fopen
+#define real_dlopen dlopen
 #define real_geteuid geteuid
 #define real_getegid getegid
 #if defined(HAVE_SECURE_GETENV)
-#define real_secure_getenv _secure_getenv
+#define real_secure_getenv secure_getenv
 #endif
 #if defined(HAVE___SECURE_GETENV)
 #define real__secure_getenv __secure_getenv
 #endif
 #else
-static PFN_OPENDIR real_opendir = nullptr;
-static PFN_READDIR real_readdir = nullptr;
-static PFN_CLOSEDIR real_closedir = nullptr;
-static PFN_ACCESS real_access = nullptr;
-static PFN_FOPEN real_fopen = nullptr;
-static PFN_GETEUID real_geteuid = nullptr;
-static PFN_GETEGID real_getegid = nullptr;
+PFN_OPENDIR real_opendir = nullptr;
+PFN_READDIR real_readdir = nullptr;
+PFN_CLOSEDIR real_closedir = nullptr;
+PFN_ACCESS real_access = nullptr;
+PFN_FOPEN real_fopen = nullptr;
+PFN_DLOPEN real_dlopen = nullptr;
+PFN_GETEUID real_geteuid = nullptr;
+PFN_GETEGID real_getegid = nullptr;
 #if defined(HAVE_SECURE_GETENV)
-static PFN_SEC_GETENV real_secure_getenv = nullptr;
+PFN_SEC_GETENV real_secure_getenv = nullptr;
 #endif
 #if defined(HAVE___SECURE_GETENV)
-static PFN_SEC_GETENV real__secure_getenv = nullptr;
+PFN_SEC_GETENV real__secure_getenv = nullptr;
 #endif
 #endif
 
@@ -117,11 +130,17 @@
 #if !defined(__APPLE__)
     if (!real_opendir) real_opendir = (PFN_OPENDIR)dlsym(RTLD_NEXT, "opendir");
 #endif
+    if (platform_shim.is_during_destruction) {
+        return real_opendir(path_name);
+    }
     DIR* dir;
     if (platform_shim.is_fake_path(path_name)) {
-        auto fake_path_name = platform_shim.get_fake_path(fs::path(path_name));
-        dir = real_opendir(fake_path_name.c_str());
-        platform_shim.dir_entries.push_back(DirEntry{dir, std::string(path_name), {}, false});
+        auto real_path_name = platform_shim.get_real_path_from_fake_path(fs::path(path_name));
+        dir = real_opendir(real_path_name.c_str());
+        platform_shim.dir_entries.push_back(DirEntry{dir, std::string(path_name), {}, 0, true});
+    } else if (platform_shim.is_known_path(path_name)) {
+        dir = real_opendir(path_name);
+        platform_shim.dir_entries.push_back(DirEntry{dir, std::string(path_name), {}, 0, false});
     } else {
         dir = real_opendir(path_name);
     }
@@ -133,6 +152,9 @@
 #if !defined(__APPLE__)
     if (!real_readdir) real_readdir = (PFN_READDIR)dlsym(RTLD_NEXT, "readdir");
 #endif
+    if (platform_shim.is_during_destruction) {
+        return real_readdir(dir_stream);
+    }
     auto it = std::find_if(platform_shim.dir_entries.begin(), platform_shim.dir_entries.end(),
                            [dir_stream](DirEntry const& entry) { return entry.directory == dir_stream; });
 
@@ -151,8 +173,11 @@
             folder_contents.push_back(dir_entry);
             dirent_filenames.push_back(&dir_entry->d_name[0]);
         }
-        auto real_path = platform_shim.redirection_map.at(it->folder_path);
-        auto filenames = get_folder_contents(platform_shim.folders, real_path.str());
+        auto real_path = it->folder_path;
+        if (it->is_fake_path) {
+            real_path = platform_shim.redirection_map.at(it->folder_path).str();
+        }
+        auto filenames = get_folder_contents(platform_shim.folders, real_path);
 
         // Add the dirent structures in the order they appear in the FolderManager
         // Ignore anything which wasn't in the FolderManager
@@ -173,6 +198,9 @@
 #if !defined(__APPLE__)
     if (!real_closedir) real_closedir = (PFN_CLOSEDIR)dlsym(RTLD_NEXT, "closedir");
 #endif
+    if (platform_shim.is_during_destruction) {
+        return real_closedir(dir_stream);
+    }
     auto it = std::find_if(platform_shim.dir_entries.begin(), platform_shim.dir_entries.end(),
                            [dir_stream](DirEntry const& entry) { return entry.directory == dir_stream; });
 
@@ -193,9 +221,9 @@
     }
 
     if (platform_shim.is_fake_path(path.parent_path())) {
-        fs::path fake_path = platform_shim.get_fake_path(path.parent_path());
-        fake_path /= path.filename();
-        return real_access(fake_path.c_str(), mode);
+        fs::path real_path = platform_shim.get_real_path_from_fake_path(path.parent_path());
+        real_path /= path.filename();
+        return real_access(real_path.c_str(), mode);
     }
     return real_access(in_pathname, mode);
 }
@@ -211,8 +239,8 @@
 
     FILE* f_ptr;
     if (platform_shim.is_fake_path(path.parent_path())) {
-        auto fake_path = platform_shim.get_fake_path(path.parent_path()) / path.filename();
-        f_ptr = real_fopen(fake_path.c_str(), mode);
+        auto real_path = platform_shim.get_real_path_from_fake_path(path.parent_path()) / path.filename();
+        f_ptr = real_fopen(real_path.c_str(), mode);
     } else {
         f_ptr = real_fopen(in_filename, mode);
     }
@@ -220,6 +248,17 @@
     return f_ptr;
 }
 
+FRAMEWORK_EXPORT void* DLOPEN_FUNC_NAME(const char* in_filename, int flags) {
+#if !defined(__APPLE__)
+    if (!real_dlopen) real_dlopen = (PFN_DLOPEN)dlsym(RTLD_NEXT, "dlopen");
+#endif
+
+    if (platform_shim.is_dlopen_redirect_name(in_filename)) {
+        return real_dlopen(platform_shim.dlopen_redirection_map[in_filename].c_str(), flags);
+    }
+    return real_dlopen(in_filename, flags);
+}
+
 FRAMEWORK_EXPORT uid_t GETEUID_FUNC_NAME(void) {
 #if !defined(__APPLE__)
     if (!real_geteuid) real_geteuid = (PFN_GETEUID)dlsym(RTLD_NEXT, "geteuid");
@@ -244,6 +283,7 @@
     }
 }
 
+#if !defined(TARGET_OS_IPHONE)
 #if defined(HAVE_SECURE_GETENV)
 FRAMEWORK_EXPORT char* SECURE_GETENV_FUNC_NAME(const char* name) {
 #if !defined(__APPLE__)
@@ -269,6 +309,30 @@
     }
 }
 #endif
+#endif
+#if defined(__APPLE__)
+FRAMEWORK_EXPORT CFBundleRef my_CFBundleGetMainBundle() {
+    static CFBundleRef global_bundle{};
+    return reinterpret_cast<CFBundleRef>(&global_bundle);
+}
+FRAMEWORK_EXPORT CFURLRef my_CFBundleCopyResourcesDirectoryURL([[maybe_unused]] CFBundleRef bundle) {
+    static CFURLRef global_url{};
+    return reinterpret_cast<CFURLRef>(&global_url);
+}
+FRAMEWORK_EXPORT Boolean my_CFURLGetFileSystemRepresentation([[maybe_unused]] CFURLRef url,
+                                                             [[maybe_unused]] Boolean resolveAgainstBase, UInt8* buffer,
+                                                             CFIndex maxBufLen) {
+    if (!platform_shim.bundle_contents.empty()) {
+        CFIndex copy_len = (CFIndex)platform_shim.bundle_contents.size();
+        if (copy_len > maxBufLen) {
+            copy_len = maxBufLen;
+        }
+        strncpy(reinterpret_cast<char*>(buffer), platform_shim.bundle_contents.c_str(), copy_len);
+        return TRUE;
+    }
+    return FALSE;
+}
+#endif
 
 /* Shiming functions on apple is limited by the linker prefering to not use functions in the
  * executable in loaded dylibs. By adding an interposer, we redirect the linker to use our
@@ -289,8 +353,10 @@
 __attribute__((used)) static Interposer _interpose_closedir MACOS_ATTRIB = {VOIDP_CAST(my_closedir), VOIDP_CAST(closedir)};
 __attribute__((used)) static Interposer _interpose_access MACOS_ATTRIB = {VOIDP_CAST(my_access), VOIDP_CAST(access)};
 __attribute__((used)) static Interposer _interpose_fopen MACOS_ATTRIB = {VOIDP_CAST(my_fopen), VOIDP_CAST(fopen)};
+__attribute__((used)) static Interposer _interpose_dlopen MACOS_ATTRIB = {VOIDP_CAST(my_dlopen), VOIDP_CAST(dlopen)};
 __attribute__((used)) static Interposer _interpose_euid MACOS_ATTRIB = {VOIDP_CAST(my_geteuid), VOIDP_CAST(geteuid)};
 __attribute__((used)) static Interposer _interpose_egid MACOS_ATTRIB = {VOIDP_CAST(my_getegid), VOIDP_CAST(getegid)};
+#if !defined(TARGET_OS_IPHONE)
 #if defined(HAVE_SECURE_GETENV)
 __attribute__((used)) static Interposer _interpose_secure_getenv MACOS_ATTRIB = {VOIDP_CAST(my_secure_getenv),
                                                                                  VOIDP_CAST(secure_getenv)};
@@ -300,4 +366,12 @@
                                                                                   VOIDP_CAST(__secure_getenv)};
 #endif
 #endif
+__attribute__((used)) static Interposer _interpose_CFBundleGetMainBundle MACOS_ATTRIB = {VOIDP_CAST(my_CFBundleGetMainBundle),
+                                                                                         VOIDP_CAST(CFBundleGetMainBundle)};
+__attribute__((used)) static Interposer _interpose_CFBundleCopyResourcesDirectoryURL MACOS_ATTRIB = {
+    VOIDP_CAST(my_CFBundleCopyResourcesDirectoryURL), VOIDP_CAST(CFBundleCopyResourcesDirectoryURL)};
+__attribute__((used)) static Interposer _interpose_CFURLGetFileSystemRepresentation MACOS_ATTRIB = {
+    VOIDP_CAST(my_CFURLGetFileSystemRepresentation), VOIDP_CAST(CFURLGetFileSystemRepresentation)};
+
+#endif
 }  // extern "C"
diff --git a/tests/framework/shim/windows_shim.cpp b/tests/framework/shim/windows_shim.cpp
index c847234..1ff0153 100644
--- a/tests/framework/shim/windows_shim.cpp
+++ b/tests/framework/shim/windows_shim.cpp
@@ -26,7 +26,7 @@
  */
 
 // This needs to be defined first, or else we'll get redefinitions on NTSTATUS values
-#ifdef _WIN32
+#if defined(_WIN32)
 #define UMDF_USING_NTSTATUS
 #include <ntstatus.h>
 #endif
@@ -44,7 +44,7 @@
 using PFN_GetSidSubAuthority = PDWORD(__stdcall *)(PSID pSid, DWORD nSubAuthority);
 static PFN_GetSidSubAuthority fpGetSidSubAuthority = GetSidSubAuthority;
 
-PDWORD __stdcall ShimGetSidSubAuthority(PSID pSid, DWORD nSubAuthority) { return &platform_shim.elevation_level; }
+PDWORD __stdcall ShimGetSidSubAuthority(PSID, DWORD) { return &platform_shim.elevation_level; }
 
 static PFN_LoaderEnumAdapters2 fpEnumAdapters2 = nullptr;
 static PFN_LoaderQueryAdapterInfo fpQueryAdapterInfo = nullptr;
@@ -128,14 +128,16 @@
 static CONFIGRET(WINAPI *REAL_CM_Get_Sibling)(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) = CM_Get_Sibling;
 // clang-format on
 
-CONFIGRET WINAPI SHIM_CM_Get_Device_ID_List_SizeW(PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags) {
+CONFIGRET WINAPI SHIM_CM_Get_Device_ID_List_SizeW(PULONG pulLen, [[maybe_unused]] PCWSTR pszFilter,
+                                                  [[maybe_unused]] ULONG ulFlags) {
     if (pulLen == nullptr) {
         return CR_INVALID_POINTER;
     }
     *pulLen = static_cast<ULONG>(platform_shim.CM_device_ID_list.size());
     return CR_SUCCESS;
 }
-CONFIGRET WINAPI SHIM_CM_Get_Device_ID_ListW(PCWSTR pszFilter, PZZWSTR Buffer, ULONG BufferLen, ULONG ulFlags) {
+CONFIGRET WINAPI SHIM_CM_Get_Device_ID_ListW([[maybe_unused]] PCWSTR pszFilter, PZZWSTR Buffer, ULONG BufferLen,
+                                             [[maybe_unused]] ULONG ulFlags) {
     if (Buffer != NULL) {
         if (BufferLen < platform_shim.CM_device_ID_list.size()) return CR_BUFFER_SMALL;
         for (size_t i = 0; i < BufferLen; i++) {
@@ -145,22 +147,17 @@
     return CR_SUCCESS;
 }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Locate_DevNodeW(PDEVINST pdnDevInst, DEVINSTID_W pDeviceID, ULONG ulFlags) { return CR_FAILURE; }
+CONFIGRET WINAPI SHIM_CM_Locate_DevNodeW(PDEVINST, DEVINSTID_W, ULONG) { return CR_FAILURE; }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Get_DevNode_Status(PULONG pulStatus, PULONG pulProblemNumber, DEVINST dnDevInst, ULONG ulFlags) {
-    return CR_FAILURE;
-}
+CONFIGRET WINAPI SHIM_CM_Get_DevNode_Status(PULONG, PULONG, DEVINST, ULONG) { return CR_FAILURE; }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Get_Device_IDW(DEVINST dnDevInst, PWSTR Buffer, ULONG BufferLen, ULONG ulFlags) { return CR_FAILURE; }
+CONFIGRET WINAPI SHIM_CM_Get_Device_IDW(DEVINST, PWSTR, ULONG, ULONG) { return CR_FAILURE; }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Get_Child(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) { return CR_FAILURE; }
+CONFIGRET WINAPI SHIM_CM_Get_Child(PDEVINST, DEVINST, ULONG) { return CR_FAILURE; }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Get_DevNode_Registry_PropertyW(DEVINST dnDevInst, ULONG ulProperty, PULONG pulRegDataType, PVOID Buffer,
-                                                        PULONG pulLength, ULONG ulFlags) {
-    return CR_FAILURE;
-}
+CONFIGRET WINAPI SHIM_CM_Get_DevNode_Registry_PropertyW(DEVINST, ULONG, PULONG, PVOID, PULONG, ULONG) { return CR_FAILURE; }
 // TODO
-CONFIGRET WINAPI SHIM_CM_Get_Sibling(PDEVINST pdnDevInst, DEVINST dnDevInst, ULONG ulFlags) { return CR_FAILURE; }
+CONFIGRET WINAPI SHIM_CM_Get_Sibling(PDEVINST, DEVINST, ULONG) { return CR_FAILURE; }
 
 static LibraryWrapper dxgi_module;
 typedef HRESULT(APIENTRY *PFN_CreateDXGIFactory1)(REFIID riid, void **ppFactory);
@@ -216,7 +213,7 @@
     return adapter;
 }
 
-HRESULT __stdcall ShimEnumAdapters1_1(IDXGIFactory1 *This,
+HRESULT __stdcall ShimEnumAdapters1_1([[maybe_unused]] IDXGIFactory1 *This,
                                       /* [in] */ UINT Adapter,
                                       /* [annotation][out] */
                                       _COM_Outptr_ IDXGIAdapter1 **ppAdapter) {
@@ -231,7 +228,7 @@
     return S_OK;
 }
 
-HRESULT __stdcall ShimEnumAdapters1_6(IDXGIFactory6 *This,
+HRESULT __stdcall ShimEnumAdapters1_6([[maybe_unused]] IDXGIFactory6 *This,
                                       /* [in] */ UINT Adapter,
                                       /* [annotation][out] */
                                       _COM_Outptr_ IDXGIAdapter1 **ppAdapter) {
@@ -246,8 +243,9 @@
     return S_OK;
 }
 
-HRESULT __stdcall ShimEnumAdapterByGpuPreference(IDXGIFactory6 *This, _In_ UINT Adapter, _In_ DXGI_GPU_PREFERENCE GpuPreference,
-                                                 _In_ REFIID riid, _COM_Outptr_ void **ppvAdapter) {
+HRESULT __stdcall ShimEnumAdapterByGpuPreference([[maybe_unused]] IDXGIFactory6 *This, _In_ UINT Adapter,
+                                                 [[maybe_unused]] _In_ DXGI_GPU_PREFERENCE GpuPreference,
+                                                 [[maybe_unused]] _In_ REFIID riid, _COM_Outptr_ void **ppvAdapter) {
     if (Adapter >= platform_shim.dxgi_adapters.size()) {
         return DXGI_ERROR_NOT_FOUND;
     }
@@ -310,13 +308,15 @@
 using PFN_RegCloseKey = LSTATUS(__stdcall *)(HKEY hKey);
 static PFN_RegCloseKey fpRegCloseKey = RegCloseKey;
 
-LSTATUS __stdcall ShimRegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) {
+LSTATUS __stdcall ShimRegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, [[maybe_unused]] DWORD ulOptions,
+                                    [[maybe_unused]] REGSAM samDesired, PHKEY phkResult) {
     if (HKEY_LOCAL_MACHINE != hKey && HKEY_CURRENT_USER != hKey) return ERROR_BADKEY;
     std::string hive = "";
     if (HKEY_LOCAL_MACHINE == hKey)
         hive = "HKEY_LOCAL_MACHINE";
     else if (HKEY_CURRENT_USER == hKey)
         hive = "HKEY_CURRENT_USER";
+    if (hive == "") return ERROR_ACCESS_DENIED;
 
     platform_shim.created_keys.emplace_back(platform_shim.created_key_count++, hive + "\\" + lpSubKey);
     *phkResult = platform_shim.created_keys.back().get();
@@ -340,15 +340,17 @@
         return &platform_shim.hkey_current_user_explicit_layers;
     if (path == "HKEY_CURRENT_USER\\SOFTWARE\\Khronos\\Vulkan\\ImplicitLayers")
         return &platform_shim.hkey_current_user_implicit_layers;
+    if (path == "HKEY_LOCAL_MACHINE\\SOFTWARE\\Khronos\\Vulkan\\LoaderSettings") return &platform_shim.hkey_local_machine_settings;
+    if (path == "HKEY_CURRENT_USER\\SOFTWARE\\Khronos\\Vulkan\\LoaderSettings") return &platform_shim.hkey_current_user_settings;
     return nullptr;
 }
-LSTATUS __stdcall ShimRegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData,
-                                       LPDWORD lpcbData) {
+LSTATUS __stdcall ShimRegQueryValueExA(HKEY, LPCSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD) {
     // TODO:
     return ERROR_SUCCESS;
 }
-LSTATUS __stdcall ShimRegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcchValueName, LPDWORD lpReserved,
-                                    LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) {
+LSTATUS __stdcall ShimRegEnumValueA(HKEY hKey, DWORD dwIndex, LPSTR lpValueName, LPDWORD lpcchValueName,
+                                    [[maybe_unused]] LPDWORD lpReserved, [[maybe_unused]] LPDWORD lpType, LPBYTE lpData,
+                                    LPDWORD lpcbData) {
     const std::string *path = get_path_of_created_key(hKey);
     if (path == nullptr) return ERROR_NO_MORE_ITEMS;
 
@@ -505,7 +507,7 @@
     DetourTransactionCommit();
 }
 
-BOOL WINAPI DllMain(HINSTANCE hinst, DWORD dwReason, LPVOID reserved) {
+BOOL WINAPI DllMain([[maybe_unused]] HINSTANCE hinst, DWORD dwReason, [[maybe_unused]] LPVOID reserved) {
     if (DetourIsHelperProcess()) {
         return TRUE;
     }
diff --git a/tests/framework/test_environment.cpp b/tests/framework/test_environment.cpp
index 308230e..60acbdc 100644
--- a/tests/framework/test_environment.cpp
+++ b/tests/framework/test_environment.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -96,45 +96,45 @@
     funcs.vkGetPhysicalDeviceSurfaceCapabilities2KHR = GPA(vkGetPhysicalDeviceSurfaceCapabilities2KHR);
     funcs.vkGetPhysicalDeviceSurfaceFormats2KHR = GPA(vkGetPhysicalDeviceSurfaceFormats2KHR);
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     funcs.vkCreateAndroidSurfaceKHR = GPA(vkCreateAndroidSurfaceKHR);
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     funcs.vkCreateDirectFBSurfaceEXT = GPA(vkCreateDirectFBSurfaceEXT);
     funcs.vkGetPhysicalDeviceDirectFBPresentationSupportEXT = GPA(vkGetPhysicalDeviceDirectFBPresentationSupportEXT);
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     funcs.vkCreateImagePipeSurfaceFUCHSIA = GPA(vkCreateImagePipeSurfaceFUCHSIA);
 #endif  // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     funcs.vkCreateStreamDescriptorSurfaceGGP = GPA(vkCreateStreamDescriptorSurfaceGGP);
 #endif  // VK_USE_PLATFORM_GGP
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     funcs.vkCreateIOSSurfaceMVK = GPA(vkCreateIOSSurfaceMVK);
 #endif  // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     funcs.vkCreateMacOSSurfaceMVK = GPA(vkCreateMacOSSurfaceMVK);
 #endif  // VK_USE_PLATFORM_MACOS_MVK
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     funcs.vkCreateMetalSurfaceEXT = GPA(vkCreateMetalSurfaceEXT);
 #endif  // VK_USE_PLATFORM_METAL_EXT
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     funcs.vkCreateScreenSurfaceQNX = GPA(vkCreateScreenSurfaceQNX);
     funcs.vkGetPhysicalDeviceScreenPresentationSupportQNX = GPA(vkGetPhysicalDeviceScreenPresentationSupportQNX);
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     funcs.vkCreateWaylandSurfaceKHR = GPA(vkCreateWaylandSurfaceKHR);
     funcs.vkGetPhysicalDeviceWaylandPresentationSupportKHR = GPA(vkGetPhysicalDeviceWaylandPresentationSupportKHR);
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     funcs.vkCreateXcbSurfaceKHR = GPA(vkCreateXcbSurfaceKHR);
     funcs.vkGetPhysicalDeviceXcbPresentationSupportKHR = GPA(vkGetPhysicalDeviceXcbPresentationSupportKHR);
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     funcs.vkCreateXlibSurfaceKHR = GPA(vkCreateXlibSurfaceKHR);
     funcs.vkGetPhysicalDeviceXlibPresentationSupportKHR = GPA(vkGetPhysicalDeviceXlibPresentationSupportKHR);
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     funcs.vkCreateWin32SurfaceKHR = GPA(vkCreateWin32SurfaceKHR);
     funcs.vkGetPhysicalDeviceWin32PresentationSupportKHR = GPA(vkGetPhysicalDeviceWin32PresentationSupportKHR);
 #endif  // VK_USE_PLATFORM_WIN32_KHR
@@ -194,6 +194,10 @@
     ASSERT_EQ(result_to_check, functions->vkCreateInstance(create_info.get(), callbacks, &inst));
 }
 
+void InstWrapper::CheckCreateWithInfo(InstanceCreateInfo& create_info, VkResult result_to_check) {
+    ASSERT_EQ(result_to_check, functions->vkCreateInstance(create_info.get(), callbacks, &inst));
+}
+
 std::vector<VkPhysicalDevice> InstWrapper::GetPhysDevs(uint32_t phys_dev_count, VkResult result_to_check) {
     uint32_t physical_count = phys_dev_count;
     std::vector<VkPhysicalDevice> physical_devices;
@@ -206,6 +210,7 @@
 std::vector<VkPhysicalDevice> InstWrapper::GetPhysDevs(VkResult result_to_check) {
     uint32_t physical_count = 0;
     VkResult res = functions->vkEnumeratePhysicalDevices(inst, &physical_count, nullptr);
+    EXPECT_EQ(result_to_check, res);
     std::vector<VkPhysicalDevice> physical_devices;
     physical_devices.resize(physical_count);
     res = functions->vkEnumeratePhysicalDevices(inst, &physical_count, physical_devices.data());
@@ -221,15 +226,41 @@
     return physical_device;
 }
 
-std::vector<VkExtensionProperties> EnumerateDeviceExtensions(InstWrapper const& inst, VkPhysicalDevice physical_device) {
-    uint32_t ext_count = 1;
-    VkResult res = inst.functions->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &ext_count, nullptr);
+std::vector<VkLayerProperties> InstWrapper::GetActiveLayers(VkPhysicalDevice phys_dev, uint32_t expected_count) {
+    uint32_t count = 0;
+    VkResult res = functions->vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
     EXPECT_EQ(VK_SUCCESS, res);
-    std::vector<VkExtensionProperties> extensions;
-    extensions.resize(ext_count);
-    res = inst.functions->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &ext_count, extensions.data());
+    EXPECT_EQ(count, expected_count);
+    std::vector<VkLayerProperties> layer_props{count};
+    res = functions->vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
     EXPECT_EQ(VK_SUCCESS, res);
-    extensions.resize(ext_count);
+    EXPECT_EQ(count, expected_count);
+    return layer_props;
+}
+
+std::vector<VkExtensionProperties> InstWrapper::EnumerateDeviceExtensions(VkPhysicalDevice physical_device,
+                                                                          uint32_t expected_count) {
+    uint32_t count = 0;
+    VkResult res = functions->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &count, nullptr);
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    std::vector<VkExtensionProperties> extensions{count};
+    res = functions->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &count, extensions.data());
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    return extensions;
+}
+
+std::vector<VkExtensionProperties> InstWrapper::EnumerateLayerDeviceExtensions(VkPhysicalDevice physical_device,
+                                                                               const char* layer_name, uint32_t expected_count) {
+    uint32_t count = 0;
+    VkResult res = functions->vkEnumerateDeviceExtensionProperties(physical_device, layer_name, &count, nullptr);
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    std::vector<VkExtensionProperties> extensions{count};
+    res = functions->vkEnumerateDeviceExtensionProperties(physical_device, layer_name, &count, extensions.data());
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
     return extensions;
 }
 
@@ -296,19 +327,20 @@
     return env_log.find_prefix_then_postfix(prefix, postfix);
 }
 
-PlatformShimWrapper::PlatformShimWrapper(std::vector<fs::FolderManager>* folders, bool enable_log) noexcept {
+PlatformShimWrapper::PlatformShimWrapper(std::vector<fs::FolderManager>* folders, const char* log_filter) noexcept
+    : loader_logging{"VK_LOADER_DEBUG"} {
 #if defined(WIN32) || defined(__APPLE__)
     shim_library = LibraryWrapper(SHIM_LIBRARY_NAME);
     PFN_get_platform_shim get_platform_shim_func = shim_library.get_symbol(GET_PLATFORM_SHIM_STR);
     assert(get_platform_shim_func != NULL && "Must be able to get \"platform_shim\"");
     platform_shim = get_platform_shim_func(folders);
-#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
     platform_shim = get_platform_shim(folders);
 #endif
     platform_shim->reset();
 
-    if (enable_log) {
-        set_env_var("VK_LOADER_DEBUG", "all");
+    if (log_filter) {
+        loader_logging.set_new_value(log_filter);
     }
 }
 
@@ -329,6 +361,7 @@
 }
 fs::path TestICDHandle::get_icd_full_path() noexcept { return icd_library.lib_path; }
 fs::path TestICDHandle::get_icd_manifest_path() noexcept { return manifest_path; }
+fs::path TestICDHandle::get_shimmed_manifest_path() noexcept { return shimmed_manifest_path; }
 
 TestLayerHandle::TestLayerHandle() noexcept {}
 TestLayerHandle::TestLayerHandle(fs::path const& layer_path) noexcept : layer_library(layer_path) {
@@ -345,11 +378,11 @@
 }
 fs::path TestLayerHandle::get_layer_full_path() noexcept { return layer_library.lib_path; }
 fs::path TestLayerHandle::get_layer_manifest_path() noexcept { return manifest_path; }
+fs::path TestLayerHandle::get_shimmed_manifest_path() noexcept { return shimmed_manifest_path; }
 
-FrameworkEnvironment::FrameworkEnvironment() noexcept : FrameworkEnvironment(true, true) {}
-FrameworkEnvironment::FrameworkEnvironment(bool enable_log) noexcept : FrameworkEnvironment(enable_log, true) {}
-FrameworkEnvironment::FrameworkEnvironment(bool enable_log, bool set_default_search_paths) noexcept
-    : platform_shim(&folders, enable_log), vulkan_functions() {
+FrameworkEnvironment::FrameworkEnvironment() noexcept : FrameworkEnvironment(FrameworkSettings{}) {}
+FrameworkEnvironment::FrameworkEnvironment(FrameworkSettings const& settings) noexcept
+    : settings(settings), platform_shim(&folders, settings.log_filter) {
     // This order is important, it matches the enum ManifestLocation, used to index the folders vector
     folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("null_dir"));
     folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("icd_manifests"));
@@ -360,16 +393,54 @@
     folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("implicit_layer_manifests"));
     folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("override_layer_manifests"));
     folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("app_package_manifests"));
+    folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("macos_bundle"));
+    folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("unsecured_location"));
+    folders.emplace_back(FRAMEWORK_BUILD_DIRECTORY, std::string("settings_location"));
 
     platform_shim->redirect_all_paths(get_folder(ManifestLocation::null).location());
-    if (set_default_search_paths) {
-        platform_shim->set_path(ManifestCategory::icd, get_folder(ManifestLocation::driver).location());
-        platform_shim->set_path(ManifestCategory::explicit_layer, get_folder(ManifestLocation::explicit_layer).location());
-        platform_shim->set_path(ManifestCategory::implicit_layer, get_folder(ManifestLocation::implicit_layer).location());
+    if (settings.enable_default_search_paths) {
+        platform_shim->set_fake_path(ManifestCategory::icd, get_folder(ManifestLocation::driver).location());
+        platform_shim->set_fake_path(ManifestCategory::explicit_layer, get_folder(ManifestLocation::explicit_layer).location());
+        platform_shim->set_fake_path(ManifestCategory::implicit_layer, get_folder(ManifestLocation::implicit_layer).location());
+#if COMMON_UNIX_PLATFORMS
+        auto home = get_env_var("HOME");
+        auto unsecured_location = get_folder(ManifestLocation::unsecured_location).location();
+        platform_shim->redirect_path(home + "/.local/share/vulkan/icd.d", unsecured_location);
+        platform_shim->redirect_path(home + "/.local/share/vulkan/implicit_layer.d", unsecured_location);
+        platform_shim->redirect_path(home + "/.local/share/vulkan/explicit_layer.d", unsecured_location);
+#endif
+    }
+#if COMMON_UNIX_PLATFORMS
+    if (settings.secure_loader_settings) {
+        platform_shim->redirect_path("/etc/vulkan/loader_settings.d", get_folder(ManifestLocation::settings_location).location());
+    } else {
+        platform_shim->redirect_path(get_env_var("HOME") + "/.local/share/vulkan/loader_settings.d",
+                                     get_folder(ManifestLocation::settings_location).location());
+    }
+#endif
+
+#if defined(__APPLE__)
+    // Necessary since bundles look in sub folders for manifests, not the test framework folder itself
+    auto bundle_location = get_folder(ManifestLocation::macos_bundle).location();
+    platform_shim->redirect_path(bundle_location / "vulkan/icd.d", bundle_location);
+    platform_shim->redirect_path(bundle_location / "vulkan/explicit_layer.d", bundle_location);
+    platform_shim->redirect_path(bundle_location / "vulkan/implicit_layer.d", bundle_location);
+#endif
+    // only set the settings file if there are elements in the app_specific_settings vector
+    if (!settings.loader_settings.app_specific_settings.empty()) {
+        update_loader_settings(settings.loader_settings);
     }
 }
 
-void FrameworkEnvironment::add_icd(TestICDDetails icd_details) noexcept {
+FrameworkEnvironment::~FrameworkEnvironment() {
+    // This is necessary to prevent the folder manager from using dead memory during destruction.
+    // What happens is that each folder manager tries to cleanup itself. Except, folders that were never called did not have their
+    // DirEntry array's filled out. So when that folder calls delete_folder, which calls readdir, the shim tries to order the files.
+    // Except, the list of files is in a object that is currently being destroyed.
+    platform_shim->is_during_destruction = true;
+}
+
+TestICD& FrameworkEnvironment::add_icd(TestICDDetails icd_details) noexcept {
     size_t cur_icd_index = icds.size();
     fs::FolderManager* folder = &get_folder(ManifestLocation::driver);
     if (icd_details.discovery_type == ManifestDiscoveryType::env_var ||
@@ -379,50 +450,95 @@
     if (icd_details.discovery_type == ManifestDiscoveryType::windows_app_package) {
         folder = &get_folder(ManifestLocation::windows_app_package);
     }
+    if (icd_details.discovery_type == ManifestDiscoveryType::macos_bundle) {
+        folder = &get_folder(ManifestLocation::macos_bundle);
+    }
+    if (icd_details.discovery_type == ManifestDiscoveryType::unsecured_generic) {
+        folder = &get_folder(ManifestLocation::unsecured_location);
+    }
+    if (icd_details.discovery_type == ManifestDiscoveryType::null_dir ||
+        icd_details.discovery_type == ManifestDiscoveryType::none) {
+        folder = &get_folder(ManifestLocation::null);
+    }
     if (!icd_details.is_fake) {
         fs::path new_driver_name = fs::path(icd_details.icd_manifest.lib_path).stem() + "_" + std::to_string(cur_icd_index) +
                                    fs::path(icd_details.icd_manifest.lib_path).extension();
 
         auto new_driver_location = folder->copy_file(icd_details.icd_manifest.lib_path, new_driver_name.str());
 
+#if COMMON_UNIX_PLATFORMS
+        if (icd_details.library_path_type == LibraryPathType::default_search_paths) {
+            platform_shim->redirect_dlopen_name(new_driver_name, new_driver_location);
+        } else if (icd_details.library_path_type == LibraryPathType::relative) {
+            platform_shim->redirect_dlopen_name(fs::path(SYSCONFDIR) / "vulkan" / "icd.d" / "." / new_driver_name,
+                                                new_driver_location);
+        }
+#endif
+#if defined(WIN32)
+        if (icd_details.library_path_type == LibraryPathType::default_search_paths) {
+            SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_USER_DIRS);
+            AddDllDirectory(conver_str_to_wstr(new_driver_location.parent_path().str()).c_str());
+        }
+#endif
         icds.push_back(TestICDHandle(new_driver_location));
         icds.back().reset_icd();
-        icd_details.icd_manifest.lib_path = new_driver_location.str();
+        if (icd_details.library_path_type == LibraryPathType::relative) {
+            icd_details.icd_manifest.lib_path = fs::path(".") / new_driver_name;
+        } else if (icd_details.library_path_type == LibraryPathType::default_search_paths) {
+            icd_details.icd_manifest.lib_path = new_driver_name.str();
+        } else {
+            icd_details.icd_manifest.lib_path = new_driver_location.str();
+        }
     }
-    std::string full_json_name = icd_details.json_name;
-    if (!icd_details.disable_icd_inc) {
-        full_json_name += "_" + std::to_string(cur_icd_index);
-    }
-    full_json_name += ".json";
-
-    icds.back().manifest_path = folder->write_manifest(full_json_name, icd_details.icd_manifest.get_manifest_str());
-    switch (icd_details.discovery_type) {
-        default:
-        case (ManifestDiscoveryType::generic):
-            platform_shim->add_manifest(ManifestCategory::icd, icds.back().manifest_path);
-            break;
-        case (ManifestDiscoveryType::env_var):
-            if (!env_var_vk_icd_filenames.empty()) {
-                env_var_vk_icd_filenames += OS_ENV_VAR_LIST_SEPARATOR;
-            }
-            env_var_vk_icd_filenames += (folder->location() / full_json_name).str();
-            set_env_var("VK_DRIVER_FILES", env_var_vk_icd_filenames);
-            break;
-        case (ManifestDiscoveryType::add_env_var):
-            if (!add_env_var_vk_icd_filenames.empty()) {
-                add_env_var_vk_icd_filenames += OS_ENV_VAR_LIST_SEPARATOR;
-            }
-            add_env_var_vk_icd_filenames += (folder->location() / full_json_name).str();
-            set_env_var("VK_ADD_DRIVER_FILES", add_env_var_vk_icd_filenames);
-            break;
-        case (ManifestDiscoveryType::none):
-            break;
-#ifdef _WIN32
-        case (ManifestDiscoveryType::windows_app_package):
-            platform_shim->set_app_package_path(folder->location());
-            break;
+    if (icd_details.discovery_type != ManifestDiscoveryType::none) {
+        std::string full_json_name = icd_details.json_name;
+        if (!icd_details.disable_icd_inc) {
+            full_json_name += "_" + std::to_string(cur_icd_index);
+        }
+        full_json_name += ".json";
+        icds.back().manifest_path = folder->write_manifest(full_json_name, icd_details.icd_manifest.get_manifest_str());
+        icds.back().shimmed_manifest_path = icds.back().manifest_path;
+        switch (icd_details.discovery_type) {
+            default:
+            case (ManifestDiscoveryType::generic):
+                platform_shim->add_manifest(ManifestCategory::icd, icds.back().manifest_path);
+#if COMMON_UNIX_PLATFORMS
+                icds.back().shimmed_manifest_path =
+                    platform_shim->query_default_redirect_path(ManifestCategory::icd) / full_json_name;
 #endif
+                break;
+            case (ManifestDiscoveryType::env_var):
+                if (icd_details.is_dir) {
+                    env_var_vk_icd_filenames.add_to_list(folder->location().str());
+                } else {
+                    env_var_vk_icd_filenames.add_to_list((folder->location() / full_json_name).str());
+                }
+                platform_shim->add_known_path(folder->location());
+                break;
+            case (ManifestDiscoveryType::add_env_var):
+                if (icd_details.is_dir) {
+                    add_env_var_vk_icd_filenames.add_to_list(folder->location().str());
+                } else {
+                    add_env_var_vk_icd_filenames.add_to_list((folder->location() / full_json_name).str());
+                }
+                platform_shim->add_known_path(folder->location());
+                break;
+            case (ManifestDiscoveryType::macos_bundle):
+                platform_shim->add_manifest(ManifestCategory::icd, icds.back().manifest_path);
+                break;
+            case (ManifestDiscoveryType::unsecured_generic):
+                platform_shim->add_unsecured_manifest(ManifestCategory::icd, icds.back().manifest_path);
+                break;
+            case (ManifestDiscoveryType::null_dir):
+                break;
+#if defined(_WIN32)
+            case (ManifestDiscoveryType::windows_app_package):
+                platform_shim->set_app_package_path(folder->location());
+                break;
+#endif
+        }
     }
+    return icds.back().get_test_icd();
 }
 
 void FrameworkEnvironment::add_implicit_layer(ManifestLayer layer_manifest, const std::string& json_name) noexcept {
@@ -453,39 +569,60 @@
             break;
         case (ManifestDiscoveryType::env_var):
             fs_ptr = &get_folder(ManifestLocation::explicit_layer_env_var);
-            if (!env_var_vk_layer_paths.empty()) {
-                env_var_vk_layer_paths += OS_ENV_VAR_LIST_SEPARATOR;
-            }
-            if(layer_details.is_dir) {
-                env_var_vk_layer_paths += fs_ptr->location().str();
+            if (layer_details.is_dir) {
+                env_var_vk_layer_paths.add_to_list(fs_ptr->location().str());
             } else {
-                env_var_vk_layer_paths += fs_ptr->location().str() + OS_ENV_VAR_LIST_SEPARATOR + layer_details.json_name;
+                env_var_vk_layer_paths.add_to_list((fs_ptr->location() / layer_details.json_name).str());
             }
-            env_var_vk_layer_paths += fs_ptr->location().str();
-            set_env_var("VK_LAYER_PATH", env_var_vk_layer_paths);
+            platform_shim->add_known_path(fs_ptr->location());
             break;
         case (ManifestDiscoveryType::add_env_var):
             fs_ptr = &get_folder(ManifestLocation::explicit_layer_add_env_var);
-            if (!add_env_var_vk_layer_paths.empty()) {
-                add_env_var_vk_layer_paths += OS_ENV_VAR_LIST_SEPARATOR;
+            if (layer_details.is_dir) {
+                add_env_var_vk_layer_paths.add_to_list(fs_ptr->location().str());
+            } else {
+                add_env_var_vk_layer_paths.add_to_list((fs_ptr->location() / layer_details.json_name).str());
             }
-            add_env_var_vk_layer_paths += fs_ptr->location().str();
-            set_env_var("VK_ADD_LAYER_PATH", add_env_var_vk_layer_paths);
+            platform_shim->add_known_path(fs_ptr->location());
             break;
         case (ManifestDiscoveryType::override_folder):
             fs_ptr = &get_folder(ManifestLocation::override_layer);
             break;
+        case (ManifestDiscoveryType::macos_bundle):
+            fs_ptr = &(get_folder(ManifestLocation::macos_bundle));
+            break;
+        case (ManifestDiscoveryType::unsecured_generic):
+            fs_ptr = &(get_folder(ManifestLocation::unsecured_location));
+            break;
         case (ManifestDiscoveryType::none):
+        case (ManifestDiscoveryType::null_dir):
+            fs_ptr = &(get_folder(ManifestLocation::null));
             break;
     }
     auto& folder = *fs_ptr;
     size_t new_layers_start = layers.size();
     for (auto& layer : layer_details.layer_manifest.layers) {
-        size_t cur_layer_index = layers.size();
         if (!layer.lib_path.str().empty()) {
-            std::string new_layer_name = layer.name + "_" + std::to_string(cur_layer_index) + "_" + layer.lib_path.filename().str();
+            fs::path layer_binary_name =
+                layer.lib_path.filename().stem() + "_" + std::to_string(layers.size()) + layer.lib_path.filename().extension();
 
-            auto new_layer_location = folder.copy_file(layer.lib_path, new_layer_name);
+            auto new_layer_location = folder.copy_file(layer.lib_path, layer_binary_name.str());
+
+#if COMMON_UNIX_PLATFORMS
+            if (layer_details.library_path_type == LibraryPathType::default_search_paths) {
+                platform_shim->redirect_dlopen_name(layer_binary_name, new_layer_location);
+            }
+            if (layer_details.library_path_type == LibraryPathType::relative) {
+                platform_shim->redirect_dlopen_name(
+                    fs::path(SYSCONFDIR) / "vulkan" / category_path_name(category) / "." / layer_binary_name, new_layer_location);
+            }
+#endif
+#if defined(WIN32)
+            if (layer_details.library_path_type == LibraryPathType::default_search_paths) {
+                SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_USER_DIRS);
+                AddDllDirectory(conver_str_to_wstr(new_layer_location.parent_path().str()).c_str());
+            }
+#endif
 
             // Don't load the layer binary if using any of the wrap objects layers, since it doesn't export the same interface
             // functions
@@ -494,147 +631,244 @@
                 layers.push_back(TestLayerHandle(new_layer_location));
                 layers.back().reset_layer();
             }
-            layer.lib_path = new_layer_location;
+            if (layer_details.library_path_type == LibraryPathType::relative) {
+                layer.lib_path = fs::path(".") / layer_binary_name;
+            } else if (layer_details.library_path_type == LibraryPathType::default_search_paths) {
+                layer.lib_path = layer_binary_name;
+            } else {
+                layer.lib_path = new_layer_location;
+            }
         }
     }
     if (layer_details.discovery_type != ManifestDiscoveryType::none) {
-        auto layer_loc = folder.write_manifest(layer_details.json_name, layer_details.layer_manifest.get_manifest_str());
-        platform_shim->add_manifest(category, layer_loc);
+        // Write a manifest file to a folder as long as the discovery type isn't none
+        auto layer_manifest_loc = folder.write_manifest(layer_details.json_name, layer_details.layer_manifest.get_manifest_str());
+        // only add the manifest to the registry if its a generic location (as if it was installed) - both system and user local
+        if (layer_details.discovery_type == ManifestDiscoveryType::generic) {
+            platform_shim->add_manifest(category, layer_manifest_loc);
+        }
+        if (layer_details.discovery_type == ManifestDiscoveryType::unsecured_generic) {
+            platform_shim->add_unsecured_manifest(category, layer_manifest_loc);
+        }
         for (size_t i = new_layers_start; i < layers.size(); i++) {
-            layers.at(i).manifest_path = layer_loc;
+            layers.at(i).manifest_path = layer_manifest_loc;
+            layers.at(i).shimmed_manifest_path = layer_manifest_loc;
+#if COMMON_UNIX_PLATFORMS
+            if (layer_details.discovery_type == ManifestDiscoveryType::generic) {
+                layers.at(i).shimmed_manifest_path = platform_shim->query_default_redirect_path(category) / layer_details.json_name;
+            }
+#endif
         }
     }
 }
 
+std::string get_loader_settings_file_contents(const LoaderSettings& loader_settings) noexcept {
+    JsonWriter writer;
+    writer.StartObject();
+    writer.AddKeyedString("file_format_version", loader_settings.file_format_version.get_version_str());
+    bool one_setting_file = true;
+    if (loader_settings.app_specific_settings.size() > 1) {
+        writer.StartKeyedArray("settings_array");
+        one_setting_file = false;
+    }
+    for (const auto& setting : loader_settings.app_specific_settings) {
+        if (one_setting_file) {
+            writer.StartKeyedObject("settings");
+        } else {
+            writer.StartObject();
+        }
+        if (!setting.app_keys.empty()) {
+            writer.StartKeyedArray("app_keys");
+            for (const auto& app_key : setting.app_keys) {
+                writer.AddString(app_key);
+            }
+            writer.EndArray();
+        }
+        if (!setting.layer_configurations.empty()) {
+            writer.StartKeyedArray("layers");
+            for (const auto& config : setting.layer_configurations) {
+                writer.StartObject();
+                writer.AddKeyedString("name", config.name);
+                writer.AddKeyedString("path", fs::fixup_backslashes_in_path(config.path));
+                writer.AddKeyedString("control", config.control);
+                writer.AddKeyedBool("treat_as_implicit_manifest", config.treat_as_implicit_manifest);
+                writer.EndObject();
+            }
+            writer.EndArray();
+        }
+        if (!setting.stderr_log.empty()) {
+            writer.StartKeyedArray("stderr_log");
+            for (const auto& filter : setting.stderr_log) {
+                writer.AddString(filter);
+            }
+            writer.EndArray();
+        }
+        if (!setting.log_configurations.empty()) {
+            writer.StartKeyedArray("log_locations");
+            for (const auto& config : setting.log_configurations) {
+                writer.StartObject();
+                writer.StartKeyedArray("destinations");
+                for (const auto& dest : config.destinations) {
+                    writer.AddString(dest);
+                }
+                writer.EndArray();
+                writer.StartKeyedArray("filter");
+                for (const auto& filter : config.filters) {
+                    writer.AddString(filter);
+                }
+                writer.EndArray();
+                writer.EndObject();
+            }
+            writer.EndArray();
+        }
+        writer.EndObject();
+    }
+    if (!one_setting_file) {
+        writer.EndArray();
+    }
+
+    writer.EndObject();
+    return writer.output;
+}
+void FrameworkEnvironment::write_settings_file(std::string const& file_contents) {
+    auto out_path = get_folder(ManifestLocation::settings_location).write_manifest("vk_loader_settings.json", file_contents);
+#if defined(WIN32)
+    platform_shim->hkey_current_user_settings.clear();
+    platform_shim->hkey_local_machine_settings.clear();
+#endif
+    if (settings.secure_loader_settings)
+        platform_shim->add_manifest(ManifestCategory::settings, out_path);
+    else
+        platform_shim->add_unsecured_manifest(ManifestCategory::settings, out_path);
+}
+void FrameworkEnvironment::update_loader_settings(const LoaderSettings& settings) noexcept {
+    write_settings_file(get_loader_settings_file_contents(settings));
+}
+void FrameworkEnvironment::remove_loader_settings() {
+    get_folder(ManifestLocation::settings_location).remove("vk_loader_settings.json");
+}
+
 TestICD& FrameworkEnvironment::get_test_icd(size_t index) noexcept { return icds[index].get_test_icd(); }
 TestICD& FrameworkEnvironment::reset_icd(size_t index) noexcept { return icds[index].reset_icd(); }
 fs::path FrameworkEnvironment::get_test_icd_path(size_t index) noexcept { return icds[index].get_icd_full_path(); }
 fs::path FrameworkEnvironment::get_icd_manifest_path(size_t index) noexcept { return icds[index].get_icd_manifest_path(); }
+fs::path FrameworkEnvironment::get_shimmed_icd_manifest_path(size_t index) noexcept {
+    return icds[index].get_shimmed_manifest_path();
+}
 
 TestLayer& FrameworkEnvironment::get_test_layer(size_t index) noexcept { return layers[index].get_test_layer(); }
 TestLayer& FrameworkEnvironment::reset_layer(size_t index) noexcept { return layers[index].reset_layer(); }
 fs::path FrameworkEnvironment::get_test_layer_path(size_t index) noexcept { return layers[index].get_layer_full_path(); }
 fs::path FrameworkEnvironment::get_layer_manifest_path(size_t index) noexcept { return layers[index].get_layer_manifest_path(); }
+fs::path FrameworkEnvironment::get_shimmed_layer_manifest_path(size_t index) noexcept {
+    return layers[index].get_shimmed_manifest_path();
+}
 
 fs::FolderManager& FrameworkEnvironment::get_folder(ManifestLocation location) noexcept {
     // index it directly using the enum location since they will always be in that order
     return folders.at(static_cast<size_t>(location));
 }
-const char* get_platform_wsi_extension(const char* api_selection) {
-#if defined(VK_USE_PLATFORM_ANDROID_KHR)
-    return "VK_KHR_android_surface";
-#elif defined(VK_USE_PLATFORM_DIRECTFB_EXT)
-    return "VK_EXT_directfb_surface";
-#elif defined(VK_USE_PLATFORM_FUCHSIA)
-    return "VK_FUCHSIA_imagepipe_surface";
-#elif defined(VK_USE_PLATFORM_GGP)
-    return "VK_GGP_stream_descriptor_surface";
-#elif defined(VK_USE_PLATFORM_IOS_MVK)
-    return "VK_MVK_ios_surface";
-#elif defined(VK_USE_PLATFORM_MACOS_MVK) || defined(VK_USE_PLATFORM_METAL_EXT)
-#if defined(VK_USE_PLATFORM_MACOS_MVK)
-    if (string_eq(api_selection, "VK_USE_PLATFORM_MACOS_MVK")) return "VK_MVK_macos_surface";
-#endif
-#if defined(VK_USE_PLATFORM_METAL_EXT)
-    if (string_eq(api_selection, "VK_USE_PLATFORM_METAL_EXT")) return "VK_EXT_metal_surface";
-    return "VK_EXT_metal_surface";
-#endif
-#elif defined(VK_USE_PLATFORM_SCREEN_QNX)
-    return "VK_QNX_screen_surface";
-#elif defined(VK_USE_PLATFORM_VI_NN)
-    return "VK_NN_vi_surface";
-#elif defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_WAYLAND_KHR)
-#if defined(VK_USE_PLATFORM_XCB_KHR)
-    if (string_eq(api_selection, "VK_USE_PLATFORM_XCB_KHR")) return "VK_KHR_xcb_surface";
-#endif
-#if defined(VK_USE_PLATFORM_XLIB_KHR)
-    if (string_eq(api_selection, "VK_USE_PLATFORM_XLIB_KHR")) return "VK_KHR_xlib_surface";
-#endif
-#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
-    if (string_eq(api_selection, "VK_USE_PLATFORM_WAYLAND_KHR")) return "VK_KHR_wayland_surface";
-#endif
-#if defined(VK_USE_PLATFORM_XCB_KHR)
-    return "VK_KHR_xcb_surface";
-#endif
-#elif defined(VK_USE_PLATFORM_WIN32_KHR)
-    return "VK_KHR_win32_surface";
-#else
-    return "VK_KHR_display";
-#endif
+fs::FolderManager const& FrameworkEnvironment::get_folder(ManifestLocation location) const noexcept {
+    return folders.at(static_cast<size_t>(location));
 }
+#if defined(__APPLE__)
+void FrameworkEnvironment::setup_macos_bundle() noexcept {
+    platform_shim->bundle_contents = get_folder(ManifestLocation::macos_bundle).location().str();
+}
+#endif
 
-void setup_WSI_in_ICD(TestICD& icd, const char* api_selection) {
-    icd.enable_icd_wsi = true;
-    icd.add_instance_extensions({"VK_KHR_surface", get_platform_wsi_extension(api_selection)});
+std::vector<VkExtensionProperties> FrameworkEnvironment::GetInstanceExtensions(uint32_t expected_count, const char* layer_name) {
+    uint32_t count = 0;
+    VkResult res = vulkan_functions.vkEnumerateInstanceExtensionProperties(layer_name, &count, nullptr);
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    std::vector<VkExtensionProperties> extension_props{count};
+    res = vulkan_functions.vkEnumerateInstanceExtensionProperties(layer_name, &count, extension_props.data());
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    return extension_props;
 }
-void setup_WSI_in_create_instance(InstWrapper& inst, const char* api_selection) {
-    inst.create_info.add_extensions({"VK_KHR_surface", get_platform_wsi_extension(api_selection)});
+std::vector<VkLayerProperties> FrameworkEnvironment::GetLayerProperties(uint32_t expected_count) {
+    uint32_t count = 0;
+    VkResult res = vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    std::vector<VkLayerProperties> layer_props{count};
+    res = vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layer_props.data());
+    EXPECT_EQ(VK_SUCCESS, res);
+    EXPECT_EQ(count, expected_count);
+    return layer_props;
 }
 
 template <typename CreationFunc, typename CreateInfo>
-testing::AssertionResult create_surface_helper(InstWrapper& inst, VkSurfaceKHR& surface, const char* load_func_name) {
-    CreationFunc pfn_CreateSurface = inst.load(load_func_name);
-    if (!pfn_CreateSurface) return testing::AssertionFailure();
+VkResult create_surface_helper(VulkanFunctions* functions, VkInstance inst, VkSurfaceKHR& surface, const char* load_func_name) {
+    CreationFunc pfn_CreateSurface = functions->load(inst, load_func_name);
+    if (!pfn_CreateSurface) return VK_ERROR_EXTENSION_NOT_PRESENT;
     CreateInfo surf_create_info{};
-    VkResult res = pfn_CreateSurface(inst, &surf_create_info, nullptr, &surface);
-    return res == VK_SUCCESS ? testing::AssertionSuccess() : testing::AssertionFailure();
+    return pfn_CreateSurface(inst, &surf_create_info, nullptr, &surface);
 }
-testing::AssertionResult create_surface(InstWrapper& inst, VkSurfaceKHR& surface, const char* api_selection) {
+VkResult create_surface(VulkanFunctions* functions, VkInstance inst, VkSurfaceKHR& surface,
+                        [[maybe_unused]] const char* api_selection) {
 #if defined(VK_USE_PLATFORM_ANDROID_KHR)
-    return create_surface_helper<PFN_vkCreateAndroidSurfaceKHR, VkAndroidSurfaceCreateInfoKHR>(inst, surface,
+    return create_surface_helper<PFN_vkCreateAndroidSurfaceKHR, VkAndroidSurfaceCreateInfoKHR>(functions, inst, surface,
                                                                                                "vkCreateAndroidSurfaceKHR");
 #elif defined(VK_USE_PLATFORM_DIRECTFB_EXT)
-    return create_surface_helper<PFN_vkCreateDirectFBSurfaceEXT, VkDirectFBSurfaceCreateInfoEXT>(inst, surface,
-                                                                                                 "vkCreateDirectFBSurfaceEXT")
+    return create_surface_helper<PFN_vkCreateDirectFBSurfaceEXT, VkDirectFBSurfaceCreateInfoEXT>(functions, inst, surface,
+                                                                                                 "vkCreateDirectFBSurfaceEXT");
 #elif defined(VK_USE_PLATFORM_FUCHSIA)
     return create_surface_helper<PFN_vkCreateImagePipeSurfaceFUCHSIA, VkImagePipeSurfaceCreateInfoFUCHSIA>(
-        inst, surface, "vkCreateImagePipeSurfaceFUCHSIA");
+        functions, inst, surface, "vkCreateImagePipeSurfaceFUCHSIA");
 #elif defined(VK_USE_PLATFORM_GGP)
     return create_surface_helper<PFN__vkCreateStreamDescriptorSurfaceGGP, VkStreamDescriptorSurfaceCreateInfoGGP>(
-        inst, surface, "vkCreateStreamDescriptorSurfaceGGP");
+        functions, inst, surface, "vkCreateStreamDescriptorSurfaceGGP");
 #elif defined(VK_USE_PLATFORM_IOS_MVK)
-    return create_surface_helper<PFN_vkCreateIOSSurfaceMVK, VkIOSSurfaceCreateInfoMVK>(inst, surface, "vkCreateIOSSurfaceMVK");
+    return create_surface_helper<PFN_vkCreateIOSSurfaceMVK, VkIOSSurfaceCreateInfoMVK>(functions, inst, surface,
+                                                                                       "vkCreateIOSSurfaceMVK");
 #elif defined(VK_USE_PLATFORM_MACOS_MVK) || defined(VK_USE_PLATFORM_METAL_EXT)
 #if defined(VK_USE_PLATFORM_MACOS_MVK)
     if (api_selection != nullptr && string_eq(api_selection, "VK_USE_PLATFORM_MACOS_MVK"))
-        return create_surface_helper<PFN_vkCreateMacOSSurfaceMVK, VkMacOSSurfaceCreateInfoMVK>(inst, surface,
+        return create_surface_helper<PFN_vkCreateMacOSSurfaceMVK, VkMacOSSurfaceCreateInfoMVK>(functions, inst, surface,
                                                                                                "vkCreateMacOSSurfaceMVK");
 #endif
 #if defined(VK_USE_PLATFORM_METAL_EXT)
     if (api_selection == nullptr || (api_selection != nullptr && string_eq(api_selection, "VK_USE_PLATFORM_METAL_EXT")))
-        return create_surface_helper<PFN_vkCreateMetalSurfaceEXT, VkMetalSurfaceCreateInfoEXT>(inst, surface,
+        return create_surface_helper<PFN_vkCreateMetalSurfaceEXT, VkMetalSurfaceCreateInfoEXT>(functions, inst, surface,
                                                                                                "vkCreateMetalSurfaceEXT");
 #endif
-    return testing::AssertionFailure();
+    return VK_ERROR_NOT_PERMITTED_KHR;
 #elif defined(VK_USE_PLATFORM_SCREEN_QNX)
-    return create_surface_helper<PFN_vkCreateScreenSurfaceQNX, VkScreenSurfaceCreateInfoQNX>(inst, surface,
+    return create_surface_helper<PFN_vkCreateScreenSurfaceQNX, VkScreenSurfaceCreateInfoQNX>(functions, inst, surface,
                                                                                              "vkCreateScreenSurfaceQNX");
 #elif defined(VK_USE_PLATFORM_VI_NN)
-    return create_surface_helper<PFN_vkCreateViSurfaceNN, VkViSurfaceCreateInfoNN>(inst, surface, "vkCreateViSurfaceNN");
+    return create_surface_helper<PFN_vkCreateViSurfaceNN, VkViSurfaceCreateInfoNN>(functions, inst, surface, "vkCreateViSurfaceNN");
 #elif defined(VK_USE_PLATFORM_WIN32_KHR)
-    return create_surface_helper<PFN_vkCreateWin32SurfaceKHR, VkWin32SurfaceCreateInfoKHR>(inst, surface,
+    return create_surface_helper<PFN_vkCreateWin32SurfaceKHR, VkWin32SurfaceCreateInfoKHR>(functions, inst, surface,
                                                                                            "vkCreateWin32SurfaceKHR");
 #elif defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_WAYLAND_KHR)
 #if defined(VK_USE_PLATFORM_XLIB_KHR)
     if (string_eq(api_selection, "VK_USE_PLATFORM_XLIB_KHR"))
-        return create_surface_helper<PFN_vkCreateXlibSurfaceKHR, VkXlibSurfaceCreateInfoKHR>(inst, surface,
+        return create_surface_helper<PFN_vkCreateXlibSurfaceKHR, VkXlibSurfaceCreateInfoKHR>(functions, inst, surface,
                                                                                              "vkCreateXlibSurfaceKHR");
 #endif
 #if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     if (string_eq(api_selection, "VK_USE_PLATFORM_WAYLAND_KHR"))
-        return create_surface_helper<PFN_vkCreateWaylandSurfaceKHR, VkWaylandSurfaceCreateInfoKHR>(inst, surface,
+        return create_surface_helper<PFN_vkCreateWaylandSurfaceKHR, VkWaylandSurfaceCreateInfoKHR>(functions, inst, surface,
                                                                                                    "vkCreateWaylandSurfaceKHR");
 #endif
 #if defined(VK_USE_PLATFORM_XCB_KHR)
     if (api_selection == nullptr || string_eq(api_selection, "VK_USE_PLATFORM_XCB_KHR"))
-        return create_surface_helper<PFN_vkCreateXcbSurfaceKHR, VkXcbSurfaceCreateInfoKHR>(inst, surface, "vkCreateXcbSurfaceKHR");
+        return create_surface_helper<PFN_vkCreateXcbSurfaceKHR, VkXcbSurfaceCreateInfoKHR>(functions, inst, surface,
+                                                                                           "vkCreateXcbSurfaceKHR");
 #endif
-    return testing::AssertionFailure();
+    return VK_ERROR_NOT_PERMITTED_KHR;
 #else
     return create_surface_helper<PFN_vkCreateDisplayPlaneSurfaceKHR, VkDisplaySurfaceCreateInfoKHR>(
-        inst, surface, "vkCreateDisplayPlaneSurfaceKHR");
+        functions, inst, surface, "vkCreateDisplayPlaneSurfaceKHR");
 #endif
 }
+VkResult create_surface(InstWrapper& inst, VkSurfaceKHR& surface, const char* api_selection) {
+    return create_surface(inst.functions, inst.inst, surface, api_selection);
+}
 
 extern "C" {
 void __ubsan_on_report() { FAIL() << "Encountered an undefined behavior sanitizer error"; }
diff --git a/tests/framework/test_environment.h b/tests/framework/test_environment.h
index bcc39bf..be36c17 100644
--- a/tests/framework/test_environment.h
+++ b/tests/framework/test_environment.h
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -34,7 +34,7 @@
 
 // Must include gtest first to guard against Xlib colliding due to redefinitions of "None" and "Bool"
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
 #pragma warning(push)
 /*
     MSVC warnings 4251 and 4275 have to do with potential dll-interface mismatch
@@ -47,15 +47,15 @@
 #endif
 
 // GTest and Xlib collide due to redefinitions of "None" and "Bool"
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 #pragma push_macro("None")
 #pragma push_macro("Bool")
 #undef None
 #undef Bool
 #endif
 
-#ifdef _WIN32
-#ifndef NOMINMAX
+#if defined(_WIN32)
+#if !defined(NOMINMAX)
 #define NOMINMAX
 #endif
 #endif
@@ -72,6 +72,13 @@
 
 #include "layer/test_layer.h"
 
+// Useful defines
+#if COMMON_UNIX_PLATFORMS
+#define HOME_DIR "/home/fake_home"
+#define USER_LOCAL_SHARE_DIR HOME_DIR "/.local/share"
+#define ETC_DIR "/etc"
+#endif
+
 // handle checking
 template <typename T>
 void handle_assert_has_value(T const& handle) {
@@ -180,45 +187,45 @@
     PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR = nullptr;
     PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR = nullptr;
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
     PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR = nullptr;
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
     PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT = nullptr;
     PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT = nullptr;
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
     PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA = nullptr;
 #endif  // VK_USE_PLATFORM_FUCHSIA
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
     PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP = nullptr;
 #endif  // VK_USE_PLATFORM_GGP
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
     PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK = nullptr;
 #endif  // VK_USE_PLATFORM_IOS_MVK
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
     PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK = nullptr;
 #endif  // VK_USE_PLATFORM_MACOS_MVK
-#ifdef VK_USE_PLATFORM_METAL_EXT
+#if defined(VK_USE_PLATFORM_METAL_EXT)
     PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT = nullptr;
 #endif  // VK_USE_PLATFORM_METAL_EXT
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
     PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX = nullptr;
     PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX = nullptr;
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
     PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR = nullptr;
     PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR = nullptr;
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
     PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR = nullptr;
     PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = nullptr;
 #endif  // VK_USE_PLATFORM_XCB_KHR
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
     PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR = nullptr;
     PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = nullptr;
 #endif  // VK_USE_PLATFORM_XLIB_KHR
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
     PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR = nullptr;
     PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR = nullptr;
 #endif  // VK_USE_PLATFORM_WIN32_KHR
@@ -258,13 +265,13 @@
     }
 };
 
-// InstWrapper & DeviceWrapper - used to make creating instances & devices easier test writing
+// InstWrapper & DeviceWrapper - used to make creating instances & devices easier when writing tests
 struct InstWrapper {
     InstWrapper(VulkanFunctions& functions, VkAllocationCallbacks* callbacks = nullptr) noexcept;
     InstWrapper(VulkanFunctions& functions, VkInstance inst, VkAllocationCallbacks* callbacks = nullptr) noexcept;
     ~InstWrapper() noexcept;
 
-    // Move-nly object
+    // Move-only object
     InstWrapper(InstWrapper const&) = delete;
     InstWrapper& operator=(InstWrapper const&) = delete;
     InstWrapper(InstWrapper&& other) noexcept;
@@ -272,6 +279,7 @@
 
     // Construct this VkInstance using googletest to assert if it succeeded
     void CheckCreate(VkResult result_to_check = VK_SUCCESS);
+    void CheckCreateWithInfo(InstanceCreateInfo& create_info, VkResult result_to_check = VK_SUCCESS);
 
     // Convenience
     operator VkInstance() { return inst; }
@@ -286,14 +294,23 @@
     // Enumerate a single physical device using googletest to assert if it succeeded
     VkPhysicalDevice GetPhysDev(VkResult result_to_check = VK_SUCCESS);
 
+    // Get all the list of active layers through vkEnumerateDeviceLayerProperties
+    // Use count to specify the expected count
+    std::vector<VkLayerProperties> GetActiveLayers(VkPhysicalDevice phys_dev, uint32_t count);
+
+    // Get list of device extensions associated with a VkPhysicalDevice
+    // Use count to specify an expected count
+    std::vector<VkExtensionProperties> EnumerateDeviceExtensions(VkPhysicalDevice physical_device, uint32_t count);
+    // Same as EnumerateDeviceExtensions but for a specific layer
+    std::vector<VkExtensionProperties> EnumerateLayerDeviceExtensions(VkPhysicalDevice physical_device, const char* layer_name,
+                                                                      uint32_t expected_count);
+
     VulkanFunctions* functions = nullptr;
     VkInstance inst = VK_NULL_HANDLE;
     VkAllocationCallbacks* callbacks = nullptr;
     InstanceCreateInfo create_info{};
 };
 
-std::vector<VkExtensionProperties> EnumerateDeviceExtensions(InstWrapper const& inst, VkPhysicalDevice physical_device);
-
 struct DeviceWrapper {
     DeviceWrapper(InstWrapper& inst_wrapper, VkAllocationCallbacks* callbacks = nullptr) noexcept;
     DeviceWrapper(VulkanFunctions& functions, VkDevice device, VkAllocationCallbacks* callbacks = nullptr) noexcept;
@@ -322,10 +339,10 @@
 };
 
 struct DebugUtilsLogger {
-    static VkBool32 VKAPI_PTR DebugUtilsMessengerLoggerCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
-                                                                VkDebugUtilsMessageTypeFlagsEXT messageTypes,
-                                                                const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
-                                                                void* pUserData) {
+    static VkBool32 VKAPI_PTR
+    DebugUtilsMessengerLoggerCallback([[maybe_unused]] VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+                                      [[maybe_unused]] VkDebugUtilsMessageTypeFlagsEXT messageTypes,
+                                      const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData) {
         DebugUtilsLogger* debug = reinterpret_cast<DebugUtilsLogger*>(pUserData);
         debug->returned_output += pCallbackData->pMessage;
         debug->returned_output += '\n';
@@ -405,10 +422,45 @@
 void FillDebugUtilsCreateDetails(InstanceCreateInfo& create_info, DebugUtilsLogger& logger);
 void FillDebugUtilsCreateDetails(InstanceCreateInfo& create_info, DebugUtilsWrapper& wrapper);
 
+struct LoaderSettingsLayerConfiguration {
+    BUILDER_VALUE(LoaderSettingsLayerConfiguration, std::string, name, {})
+    BUILDER_VALUE(LoaderSettingsLayerConfiguration, std::string, path, {})
+    BUILDER_VALUE(LoaderSettingsLayerConfiguration, std::string, control, {})
+    BUILDER_VALUE(LoaderSettingsLayerConfiguration, bool, treat_as_implicit_manifest, false)
+};
+inline bool operator==(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) {
+    return a.name == b.name && a.path == b.path && a.control == b.control &&
+           a.treat_as_implicit_manifest == b.treat_as_implicit_manifest;
+}
+inline bool operator!=(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) { return !(a == b); }
+inline bool operator<(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) {
+    return a.name < b.name;
+}
+inline bool operator>(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) { return (b < a); }
+inline bool operator<=(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) { return !(b < a); }
+inline bool operator>=(LoaderSettingsLayerConfiguration const& a, LoaderSettingsLayerConfiguration const& b) { return !(a < b); }
+
+// Log files and their associated filter
+struct LoaderLogConfiguration {
+    BUILDER_VECTOR(LoaderLogConfiguration, std::string, destinations, destination)
+    BUILDER_VECTOR(LoaderLogConfiguration, std::string, filters, filter)
+};
+struct AppSpecificSettings {
+    BUILDER_VECTOR(AppSpecificSettings, std::string, app_keys, app_key)
+    BUILDER_VECTOR(AppSpecificSettings, LoaderSettingsLayerConfiguration, layer_configurations, layer_configuration)
+    BUILDER_VECTOR(AppSpecificSettings, std::string, stderr_log, stderr_log_filter)
+    BUILDER_VECTOR(AppSpecificSettings, LoaderLogConfiguration, log_configurations, log_configuration)
+};
+
+struct LoaderSettings {
+    BUILDER_VALUE(LoaderSettings, ManifestVersion, file_format_version, {})
+    BUILDER_VECTOR(LoaderSettings, AppSpecificSettings, app_specific_settings, app_specific_setting);
+};
+
 struct FrameworkEnvironment;  // forward declaration
 
 struct PlatformShimWrapper {
-    PlatformShimWrapper(std::vector<fs::FolderManager>* folders, bool enable_log) noexcept;
+    PlatformShimWrapper(std::vector<fs::FolderManager>* folders, const char* log_filter) noexcept;
     ~PlatformShimWrapper() noexcept;
     PlatformShimWrapper(PlatformShimWrapper const&) = delete;
     PlatformShimWrapper& operator=(PlatformShimWrapper const&) = delete;
@@ -417,7 +469,8 @@
     PlatformShim* operator->() { return platform_shim; }
 
     LibraryWrapper shim_library;
-    PlatformShim* platform_shim;
+    PlatformShim* platform_shim = nullptr;
+    EnvVarWrapper loader_logging;
 };
 
 struct TestICDHandle {
@@ -427,12 +480,14 @@
     TestICD& get_test_icd() noexcept;
     fs::path get_icd_full_path() noexcept;
     fs::path get_icd_manifest_path() noexcept;
+    fs::path get_shimmed_manifest_path() noexcept;
 
     // Must use statically
     LibraryWrapper icd_library;
     GetTestICDFunc proc_addr_get_test_icd = nullptr;
     GetNewTestICDFunc proc_addr_reset_icd = nullptr;
-    fs::path manifest_path;
+    fs::path manifest_path;  // path to the manifest file is on the actual filesystem (aka <build_folder>/tests/framework/<...>)
+    fs::path shimmed_manifest_path;  // path to where the loader will find the manifest file (eg /usr/local/share/vulkan/<...>)
 };
 struct TestLayerHandle {
     TestLayerHandle() noexcept;
@@ -441,33 +496,49 @@
     TestLayer& get_test_layer() noexcept;
     fs::path get_layer_full_path() noexcept;
     fs::path get_layer_manifest_path() noexcept;
+    fs::path get_shimmed_manifest_path() noexcept;
 
     // Must use statically
     LibraryWrapper layer_library;
     GetTestLayerFunc proc_addr_get_test_layer = nullptr;
     GetNewTestLayerFunc proc_addr_reset_layer = nullptr;
-    fs::path manifest_path;
+    fs::path manifest_path;  // path to the manifest file is on the actual filesystem (aka <build_folder>/tests/framework/<...>)
+    fs::path shimmed_manifest_path;  // path to where the loader will find the manifest file (eg /usr/local/share/vulkan/<...>)
 };
 
+// Controls whether to create a manifest and where to put it
 enum class ManifestDiscoveryType {
     generic,              // put the manifest in the regular locations
-    none,                 // don't add to regular locations - eg D3DKMT
+    unsecured_generic,    // put the manifest in a user folder rather than system
+    none,                 // Do not write the manifest anywhere (for Direct Driver Loading)
+    null_dir,             // put the manifest in the 'null_dir' which the loader does not search in (D3DKMT for instance)
     env_var,              // use the corresponding env-var for it
     add_env_var,          // use the corresponding add-env-var for it
     override_folder,      // add to a special folder for the override layer to use
     windows_app_package,  // let the app package search find it
+    macos_bundle,         // place it in a location only accessible to macos bundles
+};
+
+enum class LibraryPathType {
+    absolute,              // default for testing - the exact path of the binary
+    relative,              // Relative to the manifest file
+    default_search_paths,  // Dont add any path information to the library_path - force the use of the default search paths
 };
 
 struct TestICDDetails {
     TestICDDetails(ManifestICD icd_manifest) noexcept : icd_manifest(icd_manifest) {}
-    TestICDDetails(fs::path icd_path, uint32_t api_version = VK_API_VERSION_1_0) noexcept {
-        icd_manifest.set_lib_path(icd_path.str()).set_api_version(api_version);
+    TestICDDetails(fs::path icd_binary_path, uint32_t api_version = VK_API_VERSION_1_0) noexcept {
+        icd_manifest.set_lib_path(icd_binary_path.str()).set_api_version(api_version);
     }
     BUILDER_VALUE(TestICDDetails, ManifestICD, icd_manifest, {});
     BUILDER_VALUE(TestICDDetails, std::string, json_name, "test_icd");
+    // Uses the json_name without modification - default is to append _1 in the json file to distinguish drivers
     BUILDER_VALUE(TestICDDetails, bool, disable_icd_inc, false);
     BUILDER_VALUE(TestICDDetails, ManifestDiscoveryType, discovery_type, ManifestDiscoveryType::generic);
     BUILDER_VALUE(TestICDDetails, bool, is_fake, false);
+    // If discovery type is env-var, is_dir controls whether to use the path to the file or folder the manifest is in
+    BUILDER_VALUE(TestICDDetails, bool, is_dir, false);
+    BUILDER_VALUE(TestICDDetails, LibraryPathType, library_path_type, LibraryPathType::absolute);
 };
 
 struct TestLayerDetails {
@@ -477,9 +548,13 @@
     BUILDER_VALUE(TestLayerDetails, std::string, json_name, "test_layer");
     BUILDER_VALUE(TestLayerDetails, ManifestDiscoveryType, discovery_type, ManifestDiscoveryType::generic);
     BUILDER_VALUE(TestLayerDetails, bool, is_fake, false);
+    // If discovery type is env-var, is_dir controls whether to use the path to the file or folder the manifest is in
     BUILDER_VALUE(TestLayerDetails, bool, is_dir, true);
+    BUILDER_VALUE(TestLayerDetails, LibraryPathType, library_path_type, LibraryPathType::absolute);
 };
 
+// Locations manifests can go in the test framework
+// If this enum is added to - the contructor of FrameworkEnvironment also needs to be updated with the new enum value
 enum class ManifestLocation {
     null = 0,
     driver = 1,
@@ -490,14 +565,27 @@
     implicit_layer = 6,
     override_layer = 7,
     windows_app_package = 8,
+    macos_bundle = 9,
+    unsecured_location = 10,
+    settings_location = 11,
+};
+
+struct FrameworkSettings {
+    BUILDER_VALUE(FrameworkSettings, const char*, log_filter, "all");
+    BUILDER_VALUE(FrameworkSettings, bool, enable_default_search_paths, true);
+    BUILDER_VALUE(FrameworkSettings, LoaderSettings, loader_settings, {});
+    BUILDER_VALUE(FrameworkSettings, bool, secure_loader_settings, false);
 };
 
 struct FrameworkEnvironment {
     FrameworkEnvironment() noexcept;  // default is to enable VK_LOADER_DEBUG=all and enable the default search paths
-    FrameworkEnvironment(bool enable_log) noexcept;
-    FrameworkEnvironment(bool enable_log, bool enable_default_search_paths) noexcept;
+    FrameworkEnvironment(const FrameworkSettings& settings) noexcept;
+    ~FrameworkEnvironment();
+    // Delete copy constructors - this class should never move after being created
+    FrameworkEnvironment(const FrameworkEnvironment&) = delete;
+    FrameworkEnvironment& operator=(const FrameworkEnvironment&) = delete;
 
-    void add_icd(TestICDDetails icd_details) noexcept;
+    TestICD& add_icd(TestICDDetails icd_details) noexcept;
     void add_implicit_layer(ManifestLayer layer_manifest, const std::string& json_name) noexcept;
     void add_implicit_layer(TestLayerDetails layer_details) noexcept;
     void add_explicit_layer(ManifestLayer layer_manifest, const std::string& json_name) noexcept;
@@ -505,17 +593,38 @@
     void add_fake_implicit_layer(ManifestLayer layer_manifest, const std::string& json_name) noexcept;
     void add_fake_explicit_layer(ManifestLayer layer_manifest, const std::string& json_name) noexcept;
 
+    // resets the current settings with the values contained in loader_settings
+    void write_settings_file(std::string const& file_contents);
+    // apply any changes made to FrameworkEnvironment's loader_settings member
+    void update_loader_settings(const LoaderSettings& loader_settings) noexcept;
+    void remove_loader_settings();
+
     TestICD& get_test_icd(size_t index = 0) noexcept;
     TestICD& reset_icd(size_t index = 0) noexcept;
     fs::path get_test_icd_path(size_t index = 0) noexcept;
     fs::path get_icd_manifest_path(size_t index = 0) noexcept;
+    fs::path get_shimmed_icd_manifest_path(size_t index = 0) noexcept;
 
     TestLayer& get_test_layer(size_t index = 0) noexcept;
     TestLayer& reset_layer(size_t index = 0) noexcept;
     fs::path get_test_layer_path(size_t index = 0) noexcept;
     fs::path get_layer_manifest_path(size_t index = 0) noexcept;
+    fs::path get_shimmed_layer_manifest_path(size_t index = 0) noexcept;
 
     fs::FolderManager& get_folder(ManifestLocation location) noexcept;
+    fs::FolderManager const& get_folder(ManifestLocation location) const noexcept;
+#if defined(__APPLE__)
+    // Set the path of the app bundle to the appropriate test framework bundle
+    void setup_macos_bundle() noexcept;
+#endif
+
+    FrameworkSettings settings;
+
+    // Query the global extensions
+    // Optional: use layer_name to query the extensions of a specific layer
+    std::vector<VkExtensionProperties> GetInstanceExtensions(uint32_t count, const char* layer_name = nullptr);
+    // Query the available layers
+    std::vector<VkLayerProperties> GetLayerProperties(uint32_t count);
 
     PlatformShimWrapper platform_shim;
     std::vector<fs::FolderManager> folders;
@@ -526,37 +635,21 @@
     std::vector<TestICDHandle> icds;
     std::vector<TestLayerHandle> layers;
 
-    std::string env_var_vk_icd_filenames;
-    std::string add_env_var_vk_icd_filenames;
+    EnvVarWrapper env_var_vk_icd_filenames{"VK_DRIVER_FILES"};
+    EnvVarWrapper add_env_var_vk_icd_filenames{"VK_ADD_DRIVER_FILES"};
+    EnvVarWrapper env_var_vk_layer_paths{"VK_LAYER_PATH"};
+    EnvVarWrapper add_env_var_vk_layer_paths{"VK_ADD_LAYER_PATH"};
 
-    std::string env_var_vk_layer_paths;
-    std::string add_env_var_vk_layer_paths;
-
+    LoaderSettings loader_settings;  // the current settings written to disk
    private:
     void add_layer_impl(TestLayerDetails layer_details, ManifestCategory category);
 };
 
-// helper function which return a valid WSI platform extension
-// const char* api_selection: use this to select an extension on platforms that support multiple extensions
-const char* get_platform_wsi_extension(const char* api_selection = nullptr);
-
-// The following helpers setup an icd with the required extensions and setting to use with WSI
-// By default they use whatever the set VK_USE_PLATFORM_XXX macros define
-void setup_WSI_in_ICD(TestICD& icd, const char* api_selection = nullptr);
-void setup_WSI_in_create_instance(InstWrapper& inst, const char* api_selection = nullptr);
-
 // Create a surface using a platform specific API
 // api_selection: optionally provide a VK_USE_PLATFORM_XXX string to select which API to create a surface with.
 //    defaults to Metal on macOS and XCB on linux if not provided
-// Returns an assertion failure if the surface failed to be created
-testing::AssertionResult create_surface(InstWrapper& inst, VkSurfaceKHR& out_surface, const char* api_selection = nullptr);
-
-struct EnvVarCleaner {
-    std::string env_var;
-    EnvVarCleaner(std::string env_var) noexcept : env_var(env_var) {}
-    ~EnvVarCleaner() noexcept { remove_env_var(env_var); }
-
-    // delete copy operators
-    EnvVarCleaner(const EnvVarCleaner&) = delete;
-    EnvVarCleaner& operator=(const EnvVarCleaner&) = delete;
-};
+// Returns an VkResult with the result of surface creation
+// returns VK_ERROR_EXTENSION_NOT_PRESENT if it fails to load the surface creation function
+VkResult create_surface(InstWrapper& inst, VkSurfaceKHR& out_surface, const char* api_selection = nullptr);
+// Alternate parameter list for allocation callback tests
+VkResult create_surface(VulkanFunctions* functions, VkInstance inst, VkSurfaceKHR& surface, const char* api_selection = nullptr);
diff --git a/tests/framework/test_util.cpp b/tests/framework/test_util.cpp
index c98ec1f..6952a48 100644
--- a/tests/framework/test_util.cpp
+++ b/tests/framework/test_util.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -57,13 +57,13 @@
     LocalFree(lpMsgBuf);
 }
 
-void set_env_var(std::string const& name, std::string const& value) {
-    BOOL ret = SetEnvironmentVariableW(widen(name).c_str(), widen(value).c_str());
+void EnvVarWrapper::set_env_var() {
+    BOOL ret = SetEnvironmentVariableW(widen(name).c_str(), widen(cur_value).c_str());
     if (ret == 0) {
         print_error_message(ERROR_SETENV_FAILED, "SetEnvironmentVariableW");
     }
 }
-void remove_env_var(std::string const& name) { SetEnvironmentVariableW(widen(name).c_str(), nullptr); }
+void EnvVarWrapper::remove_env_var() const { SetEnvironmentVariableW(widen(name).c_str(), nullptr); }
 std::string get_env_var(std::string const& name, bool report_failure) {
     std::wstring name_utf16 = widen(name);
     DWORD value_size = GetEnvironmentVariableW(name_utf16.c_str(), nullptr, 0);
@@ -77,10 +77,10 @@
     }
     return narrow(value);
 }
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
 
-void set_env_var(std::string const& name, std::string const& value) { setenv(name.c_str(), value.c_str(), 1); }
-void remove_env_var(std::string const& name) { unsetenv(name.c_str()); }
+void EnvVarWrapper::set_env_var() { setenv(name.c_str(), cur_value.c_str(), 1); }
+void EnvVarWrapper::remove_env_var() const { unsetenv(name.c_str()); }
 std::string get_env_var(std::string const& name, bool report_failure) {
     char* ret = getenv(name.c_str());
     if (ret == nullptr) {
@@ -92,98 +92,88 @@
 #endif
 
 template <typename T>
-void print_list_of_t(std::string& out, const char* object_name, std::vector<T> const& vec) {
-    if (vec.size() > 0) {
-        out += std::string(",\n\t\t\"") + object_name + "\": {";
-        for (size_t i = 0; i < vec.size(); i++) {
-            if (i > 0) out += ",\t\t\t";
-            out += "\n\t\t\t" + vec.at(i).get_manifest_str();
-        }
-        out += "\n\t\t}";
+void print_object_of_t(JsonWriter& writer, const char* object_name, std::vector<T> const& vec) {
+    if (vec.size() == 0) return;
+    writer.StartKeyedObject(object_name);
+    for (auto& element : vec) {
+        element.get_manifest_str(writer);
     }
+    writer.EndObject();
 }
 
 template <typename T>
-void print_vector_of_t(std::string& out, const char* object_name, std::vector<T> const& vec) {
-    if (vec.size() > 0) {
-        out += std::string(",\n\t\t\"") + object_name + "\": [";
-        for (size_t i = 0; i < vec.size(); i++) {
-            if (i > 0) out += ",\t\t\t";
-            out += "\n\t\t\t" + vec.at(i).get_manifest_str();
-        }
-        out += "\n\t\t]";
+void print_array_of_t(JsonWriter& writer, const char* object_name, std::vector<T> const& vec) {
+    if (vec.size() == 0) return;
+    writer.StartKeyedArray(object_name);
+    for (auto& element : vec) {
+        element.get_manifest_str(writer);
     }
+    writer.EndArray();
 }
-void print_vector_of_strings(std::string& out, const char* object_name, std::vector<std::string> const& strings) {
-    if (strings.size() > 0) {
-        out += std::string(",\n\t\t\"") + object_name + "\": [";
-        for (size_t i = 0; i < strings.size(); i++) {
-            if (i > 0) out += ",\t\t\t";
-            out += "\"" + fs::fixup_backslashes_in_path(strings.at(i)) + "\"";
-        }
-        out += "]";
+void print_vector_of_strings(JsonWriter& writer, const char* object_name, std::vector<std::string> const& strings) {
+    if (strings.size() == 0) return;
+    writer.StartKeyedArray(object_name);
+    for (auto& str : strings) {
+        writer.AddString(fs::fixup_backslashes_in_path(str));
     }
+    writer.EndArray();
 }
 
 std::string to_text(bool b) { return b ? std::string("true") : std::string("false"); }
 
 std::string ManifestICD::get_manifest_str() const {
-    std::string out;
-    out += "{\n";
-    out += "    " + file_format_version.get_version_str() + "\n";
-    out += "    \"ICD\": {\n";
-    out += "        \"library_path\": \"" + fs::fixup_backslashes_in_path(lib_path) + "\",\n";
-    out += "        \"api_version\": \"" + version_to_string(api_version) + "\",\n";
-    out += "        \"is_portability_driver\": " + to_text(is_portability_driver);
-    if (!library_arch.empty()) {
-        out += ",\n       \"library_arch\": \"" + library_arch + "\"\n";
-    } else {
-        out += "\n";
-    }
-    out += "    }\n";
-    out += "}\n";
-    return out;
+    JsonWriter writer;
+    writer.StartObject();
+    writer.AddKeyedString("file_format_version", file_format_version.get_version_str());
+    writer.StartKeyedObject("ICD");
+    writer.AddKeyedString("library_path", fs::fixup_backslashes_in_path(lib_path).str());
+    writer.AddKeyedString("api_version", version_to_string(api_version));
+    writer.AddKeyedBool("is_portability_driver", is_portability_driver);
+    if (!library_arch.empty()) writer.AddKeyedString("library_arch", library_arch);
+    writer.EndObject();
+    writer.EndObject();
+    return writer.output;
 }
 
-std::string ManifestLayer::LayerDescription::Extension::get_manifest_str() const {
-    std::string out;
-    out += "{ \"name\":\"" + name + "\",\n\t\t\t\"spec_version\":\"" + std::to_string(spec_version) + "\"";
-    print_vector_of_strings(out, "entrypoints", entrypoints);
-    out += "\n\t\t\t}";
-    return out;
+void ManifestLayer::LayerDescription::Extension::get_manifest_str(JsonWriter& writer) const {
+    writer.StartObject();
+    writer.AddKeyedString("name", name);
+    writer.AddKeyedString("spec_version", std::to_string(spec_version));
+    writer.AddKeyedString("spec_version", std::to_string(spec_version));
+    print_vector_of_strings(writer, "entrypoints", entrypoints);
+    writer.EndObject();
 }
 
-std::string ManifestLayer::LayerDescription::get_manifest_str() const {
-    std::string out;
-    out += "\t{\n";
-    out += "\t\t\"name\":\"" + name + "\",\n";
-    out += "\t\t\"type\":\"" + get_type_str(type) + "\",\n";
-    if (lib_path.size() > 0) {
-        out += "\t\t\"library_path\": \"" + fs::fixup_backslashes_in_path(lib_path.str()) + "\",\n";
+void ManifestLayer::LayerDescription::get_manifest_str(JsonWriter& writer) const {
+    writer.AddKeyedString("name", name);
+    writer.AddKeyedString("type", get_type_str(type));
+    if (!lib_path.str().empty()) {
+        writer.AddKeyedString("library_path", fs::fixup_backslashes_in_path(lib_path.str()));
     }
-    out += "\t\t\"api_version\": \"" + version_to_string(api_version) + "\",\n";
-    out += "\t\t\"implementation_version\":\"" + std::to_string(implementation_version) + "\",\n";
-    out += "\t\t\"description\": \"" + description + "\"";
-    print_list_of_t(out, "functions", functions);
-    print_vector_of_t(out, "instance_extensions", instance_extensions);
-    print_vector_of_t(out, "device_extensions", device_extensions);
+    writer.AddKeyedString("api_version", version_to_string(api_version));
+    writer.AddKeyedString("implementation_version", std::to_string(implementation_version));
+    writer.AddKeyedString("description", description);
+    print_object_of_t(writer, "functions", functions);
+    print_array_of_t(writer, "instance_extensions", instance_extensions);
+    print_array_of_t(writer, "device_extensions", device_extensions);
     if (!enable_environment.empty()) {
-        out += ",\n\t\t\"enable_environment\": { \"" + enable_environment + "\": \"1\" }";
+        writer.StartKeyedObject("enable_environment");
+        writer.AddKeyedString(enable_environment, "1");
+        writer.EndObject();
     }
     if (!disable_environment.empty()) {
-        out += ",\n\t\t\"disable_environment\": { \"" + disable_environment + "\": \"1\" }";
+        writer.StartKeyedObject("disable_environment");
+        writer.AddKeyedString(disable_environment, "1");
+        writer.EndObject();
     }
-    print_vector_of_strings(out, "component_layers", component_layers);
-    print_vector_of_strings(out, "blacklisted_layers", blacklisted_layers);
-    print_vector_of_strings(out, "override_paths", override_paths);
-    print_vector_of_strings(out, "app_keys", app_keys);
-    print_list_of_t(out, "pre_instance_functions", pre_instance_functions);
+    print_vector_of_strings(writer, "component_layers", component_layers);
+    print_vector_of_strings(writer, "blacklisted_layers", blacklisted_layers);
+    print_vector_of_strings(writer, "override_paths", override_paths);
+    print_vector_of_strings(writer, "app_keys", app_keys);
+    print_object_of_t(writer, "pre_instance_functions", pre_instance_functions);
     if (!library_arch.empty()) {
-        out += ",\n\t\t\"library_arch\": \"" + library_arch + "\"";
+        writer.AddKeyedString("library_arch", library_arch);
     }
-    out += "\n\t}";
-
-    return out;
 }
 
 VkLayerProperties ManifestLayer::LayerDescription::get_layer_properties() const {
@@ -196,22 +186,24 @@
 }
 
 std::string ManifestLayer::get_manifest_str() const {
-    std::string out;
-    out += "{\n";
-    out += "\t" + file_format_version.get_version_str() + "\n";
+    JsonWriter writer;
+    writer.StartObject();
+    writer.AddKeyedString("file_format_version", file_format_version.get_version_str());
     if (layers.size() == 1) {
-        out += "\t\"layer\": ";
-        out += layers.at(0).get_manifest_str() + "\n";
+        writer.StartKeyedObject("layer");
+        layers.at(0).get_manifest_str(writer);
+        writer.EndObject();
     } else {
-        out += "\"\tlayers\": [";
+        writer.StartKeyedArray("layers");
         for (size_t i = 0; i < layers.size(); i++) {
-            if (i > 0) out += ",";
-            out += "\n" + layers.at(0).get_manifest_str();
+            writer.StartObject();
+            layers.at(i).get_manifest_str(writer);
+            writer.EndObject();
         }
-        out += "\n]";
+        writer.EndArray();
     }
-    out += "}\n";
-    return out;
+    writer.EndObject();
+    return writer.output;
 }
 
 namespace fs {
@@ -224,7 +216,7 @@
         else
             out += c;
     }
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
     for (size_t i = 0; i < in_path.size(); i++) {
         if (i + 1 < in_path.size() && in_path[i] == '\\' && in_path[i + 1] == '\\') {
             out += '/';
@@ -516,6 +508,49 @@
 }
 }  // namespace fs
 
+const char* get_platform_wsi_extension([[maybe_unused]] const char* api_selection) {
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+    return "VK_KHR_android_surface";
+#elif defined(VK_USE_PLATFORM_DIRECTFB_EXT)
+    return "VK_EXT_directfb_surface";
+#elif defined(VK_USE_PLATFORM_FUCHSIA)
+    return "VK_FUCHSIA_imagepipe_surface";
+#elif defined(VK_USE_PLATFORM_GGP)
+    return "VK_GGP_stream_descriptor_surface";
+#elif defined(VK_USE_PLATFORM_IOS_MVK)
+    return "VK_MVK_ios_surface";
+#elif defined(VK_USE_PLATFORM_MACOS_MVK) || defined(VK_USE_PLATFORM_METAL_EXT)
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
+    if (string_eq(api_selection, "VK_USE_PLATFORM_MACOS_MVK")) return "VK_MVK_macos_surface";
+#endif
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+    if (string_eq(api_selection, "VK_USE_PLATFORM_METAL_EXT")) return "VK_EXT_metal_surface";
+    return "VK_EXT_metal_surface";
+#endif
+#elif defined(VK_USE_PLATFORM_SCREEN_QNX)
+    return "VK_QNX_screen_surface";
+#elif defined(VK_USE_PLATFORM_VI_NN)
+    return "VK_NN_vi_surface";
+#elif defined(VK_USE_PLATFORM_XCB_KHR) || defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_WAYLAND_KHR)
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+    if (string_eq(api_selection, "VK_USE_PLATFORM_XCB_KHR")) return "VK_KHR_xcb_surface";
+#endif
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+    if (string_eq(api_selection, "VK_USE_PLATFORM_XLIB_KHR")) return "VK_KHR_xlib_surface";
+#endif
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+    if (string_eq(api_selection, "VK_USE_PLATFORM_WAYLAND_KHR")) return "VK_KHR_wayland_surface";
+#endif
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+    return "VK_KHR_xcb_surface";
+#endif
+#elif defined(VK_USE_PLATFORM_WIN32_KHR)
+    return "VK_KHR_win32_surface";
+#else
+    return "VK_KHR_display";
+#endif
+}
+
 bool string_eq(const char* a, const char* b) noexcept { return a && b && strcmp(a, b) == 0; }
 bool string_eq(const char* a, const char* b, size_t len) noexcept { return a && b && strncmp(a, b, len) == 0; }
 
@@ -544,6 +579,10 @@
     this->api_version = VK_MAKE_API_VERSION(0, major, minor, patch);
     return *this;
 }
+InstanceCreateInfo& InstanceCreateInfo::setup_WSI(const char* api_selection) {
+    add_extensions({"VK_KHR_surface", get_platform_wsi_extension(api_selection)});
+    return *this;
+}
 
 DeviceQueueCreateInfo::DeviceQueueCreateInfo() { queue_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; }
 DeviceQueueCreateInfo::DeviceQueueCreateInfo(const VkDeviceQueueCreateInfo* create_info) {
diff --git a/tests/framework/test_util.h b/tests/framework/test_util.h
index 4e20eb6..7bb4237 100644
--- a/tests/framework/test_util.h
+++ b/tests/framework/test_util.h
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -61,11 +61,19 @@
 #include <stdio.h>
 #include <stdint.h>
 
+// Set of platforms with a common set of functionality which is queried throughout the program
+#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNX__) || defined(__FreeBSD__) || \
+    defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__GNU__)
+#define COMMON_UNIX_PLATFORMS 1
+#else
+#define COMMON_UNIX_PLATFORMS 0
+#endif
+
 #if defined(WIN32)
 #include <direct.h>
 #include <windows.h>
 #include <strsafe.h>
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
 #include <dirent.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -94,25 +102,72 @@
 #define FRAMEWORK_EXPORT
 #endif
 
+#include "json_writer.h"
+
+// get_env_var() - returns a std::string of `name`. if report_failure is true, then it will log to stderr that it didn't find the
+//     env-var
+// NOTE: This is only intended for test framework code, all test code MUST use EnvVarWrapper
+std::string get_env_var(std::string const& name, bool report_failure = true);
+
 /*
- * Common Environment Variable operations
- * These operate on the actual environemnt, they are not shims.
- * set_env_var - sets the env-var with `name` to `value`.
- * remove_env_var - unsets the env-var `name`. Different than set_env_var(name, "");
- * get_env_var - returns a std::string of `name`. if report_failure is true, then it will log to stderr that it didn't find the
- *     env-var
+ * Wrapper around Environment Variables with common operations
+ * Since Environment Variables leak between tests, there needs to be RAII code to remove them during test cleanup
+
  */
 
-#if defined(WIN32)
-void set_env_var(std::string const& name, std::string const& value);
-void remove_env_var(std::string const& name);
-std::string get_env_var(std::string const& name, bool report_failure = true);
+// Wrapper to set & remove env-vars automatically
+struct EnvVarWrapper {
+    // Constructor which unsets the env-var
+    EnvVarWrapper(std::string const& name) noexcept : name(name) {
+        initial_value = get_env_var(name, false);
+        remove_env_var();
+    }
+    // Constructor which set the env-var to the specified value
+    EnvVarWrapper(std::string const& name, std::string const& value) noexcept : name(name), cur_value(value) {
+        initial_value = get_env_var(name, false);
+        set_env_var();
+    }
+    ~EnvVarWrapper() noexcept {
+        remove_env_var();
+        if (!initial_value.empty()) {
+            set_new_value(initial_value);
+        }
+    }
 
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-void set_env_var(std::string const& name, std::string const& value);
-void remove_env_var(std::string const& name);
-std::string get_env_var(std::string const& name, bool report_failure = true);
+    // delete copy operators
+    EnvVarWrapper(const EnvVarWrapper&) = delete;
+    EnvVarWrapper& operator=(const EnvVarWrapper&) = delete;
+
+    void set_new_value(std::string const& value) {
+        cur_value = value;
+        set_env_var();
+    }
+    void add_to_list(std::string const& list_item) {
+        if (!cur_value.empty()) {
+            cur_value += OS_ENV_VAR_LIST_SEPARATOR;
+        }
+        cur_value += list_item;
+        set_env_var();
+    }
+    void remove_value() const { remove_env_var(); }
+    const char* get() const { return name.c_str(); }
+    const char* value() const { return cur_value.c_str(); }
+
+   private:
+    std::string name;
+    std::string cur_value;
+    std::string initial_value;
+
+    void set_env_var();
+    void remove_env_var() const;
+#if defined(WIN32)
+    // Environment variable list separator - not for filesystem paths
+    const char OS_ENV_VAR_LIST_SEPARATOR = ';';
+#elif COMMON_UNIX_PLATFORMS
+    // Environment variable list separator - not for filesystem paths
+    const char OS_ENV_VAR_LIST_SEPARATOR = ':';
 #endif
+};
 
 // Windows specific error handling logic
 #if defined(WIN32)
@@ -125,22 +180,13 @@
 struct ManifestICD;    // forward declaration for FolderManager::write
 struct ManifestLayer;  // forward declaration for FolderManager::write
 
-#ifdef _WIN32
-// Environment variable list separator - not for filesystem paths
-const char OS_ENV_VAR_LIST_SEPARATOR = ';';
-#else
-// Environment variable list separator - not for filesystem paths
-const char OS_ENV_VAR_LIST_SEPARATOR = ':';
-#endif
-
 namespace fs {
 std::string make_native(std::string const&);
 
 struct path {
-   private:
 #if defined(WIN32)
     static const char path_separator = '\\';
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
     static const char path_separator = '/';
 #endif
 
@@ -169,12 +215,12 @@
     path operator/(std::string const& in) const;
     path operator/(const char* in) const;
 
-    // accesors
-    path parent_path() const;
-    bool has_parent_path() const;
-    path filename() const;
-    path extension() const;
-    path stem() const;
+    // accessors
+    path parent_path() const;      // Everything before the last path separator, if there is one.
+    bool has_parent_path() const;  // True if the path contains more than just a filename.
+    path filename() const;         // Everything after the last path separator.
+    path extension() const;        // The file extension, if it has one.
+    path stem() const;             // The filename minus the extension.
 
     // modifiers
     path& replace_filename(path const& replacement);
@@ -236,17 +282,7 @@
 // src - std::string to read from
 // dst - char array to write to
 // size_dst - number of characters in the dst array
-inline void copy_string_to_char_array(std::string const& src, char* dst, size_t size_dst) {
-// Creates a spurious C4996 Warning in VS 2015 - ignore it
-#if defined(WIN32)
-#pragma warning(push)
-#pragma warning(disable : 4996)
-#endif
-    dst[src.copy(dst, size_dst - 1)] = 0;
-#if defined(WIN32)
-#pragma warning(pop)
-#endif
-}
+inline void copy_string_to_char_array(std::string const& src, char* dst, size_t size_dst) { dst[src.copy(dst, size_dst - 1)] = 0; }
 
 #if defined(WIN32)
 // Convert an UTF-16 wstring to an UTF-8 string
@@ -257,7 +293,7 @@
 
 #if defined(WIN32)
 typedef HMODULE loader_platform_dl_handle;
-static loader_platform_dl_handle loader_platform_open_library(const char* lib_path) {
+inline loader_platform_dl_handle loader_platform_open_library(const char* lib_path) {
     std::wstring lib_path_utf16 = widen(lib_path);
     // Try loading the library the original way first.
     loader_platform_dl_handle lib_handle = LoadLibraryW(lib_path_utf16.c_str());
@@ -270,7 +306,7 @@
 }
 inline char* loader_platform_open_library_error(const char* libPath) {
     static char errorMsg[164];
-    (void)snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\" with error %lu", libPath, GetLastError());
+    snprintf(errorMsg, 163, "Failed to open dynamic library \"%s\" with error %lu", libPath, GetLastError());
     return errorMsg;
 }
 inline void loader_platform_close_library(loader_platform_dl_handle library) { FreeLibrary(library); }
@@ -281,24 +317,24 @@
 }
 inline char* loader_platform_get_proc_address_error(const char* name) {
     static char errorMsg[120];
-    (void)snprintf(errorMsg, 119, "Failed to find function \"%s\" in dynamic library", name);
+    snprintf(errorMsg, 119, "Failed to find function \"%s\" in dynamic library", name);
     return errorMsg;
 }
 
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif COMMON_UNIX_PLATFORMS
 
 typedef void* loader_platform_dl_handle;
 inline loader_platform_dl_handle loader_platform_open_library(const char* libPath) {
     return dlopen(libPath, RTLD_LAZY | RTLD_LOCAL);
 }
-inline const char* loader_platform_open_library_error(const char* libPath) { return dlerror(); }
+inline const char* loader_platform_open_library_error([[maybe_unused]] const char* libPath) { return dlerror(); }
 inline void loader_platform_close_library(loader_platform_dl_handle library) { dlclose(library); }
 inline void* loader_platform_get_proc_address(loader_platform_dl_handle library, const char* name) {
     assert(library);
     assert(name);
     return dlsym(library, name);
 }
-inline const char* loader_platform_get_proc_address_error(const char* name) { return dlerror(); }
+inline const char* loader_platform_get_proc_address_error([[maybe_unused]] const char* name) { return dlerror(); }
 #endif
 
 class FromVoidStarFunc {
@@ -490,10 +526,16 @@
             return os << "VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR";
         case (VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR):
             return os << "VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR";
+        case (VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR):
+            return os << "VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR";
+        case (VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT):
+            return os << "VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT";
     }
     return os << static_cast<int32_t>(result);
 }
 
+const char* get_platform_wsi_extension([[maybe_unused]] const char* api_selection);
+
 bool string_eq(const char* a, const char* b) noexcept;
 bool string_eq(const char* a, const char* b, size_t len) noexcept;
 
@@ -543,20 +585,17 @@
     BUILDER_VALUE(ManifestVersion, uint32_t, major, 1)
     BUILDER_VALUE(ManifestVersion, uint32_t, minor, 0)
     BUILDER_VALUE(ManifestVersion, uint32_t, patch, 0)
-    ManifestVersion() noexcept {};
-    ManifestVersion(uint32_t major, uint32_t minor, uint32_t patch) noexcept : major(major), minor(minor), patch(patch){};
 
     std::string get_version_str() const noexcept {
-        return std::string("\"file_format_version\": \"") + std::to_string(major) + "." + std::to_string(minor) + "." +
-               std::to_string(patch) + "\",";
+        return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch);
     }
 };
 
 // ManifestICD builder
 struct ManifestICD {
-    BUILDER_VALUE(ManifestICD, ManifestVersion, file_format_version, ManifestVersion())
+    BUILDER_VALUE(ManifestICD, ManifestVersion, file_format_version, {})
     BUILDER_VALUE(ManifestICD, uint32_t, api_version, 0)
-    BUILDER_VALUE(ManifestICD, std::string, lib_path, {})
+    BUILDER_VALUE(ManifestICD, fs::path, lib_path, {})
     BUILDER_VALUE(ManifestICD, bool, is_portability_driver, false)
     BUILDER_VALUE(ManifestICD, std::string, library_arch, "")
     std::string get_manifest_str() const;
@@ -578,7 +617,7 @@
             BUILDER_VALUE(FunctionOverride, std::string, vk_func, {})
             BUILDER_VALUE(FunctionOverride, std::string, override_name, {})
 
-            std::string get_manifest_str() const { return std::string("\"") + vk_func + "\":\"" + override_name + "\""; }
+            void get_manifest_str(JsonWriter& writer) const { writer.AddKeyedString(vk_func, override_name); }
         };
         struct Extension {
             Extension() noexcept {}
@@ -587,7 +626,7 @@
             std::string name;
             uint32_t spec_version = 0;
             std::vector<std::string> entrypoints;
-            std::string get_manifest_str() const;
+            void get_manifest_str(JsonWriter& writer) const;
         };
         BUILDER_VALUE(LayerDescription, std::string, name, {})
         BUILDER_VALUE(LayerDescription, Type, type, Type::INSTANCE)
@@ -607,7 +646,7 @@
         BUILDER_VECTOR(LayerDescription, std::string, app_keys, app_key)
         BUILDER_VALUE(LayerDescription, std::string, library_arch, "")
 
-        std::string get_manifest_str() const;
+        void get_manifest_str(JsonWriter& writer) const;
         VkLayerProperties get_layer_properties() const;
     };
     BUILDER_VALUE(ManifestLayer, ManifestVersion, file_format_version, {})
@@ -637,11 +676,6 @@
     BUILDER_VALUE(MockQueueFamilyProperties, VkQueueFamilyProperties, properties, {})
     BUILDER_VALUE(MockQueueFamilyProperties, bool, support_present, false)
 
-    MockQueueFamilyProperties() {}
-
-    MockQueueFamilyProperties(VkQueueFamilyProperties properties, bool support_present = false)
-        : properties(properties), support_present(support_present) {}
-
     VkQueueFamilyProperties get() const noexcept { return properties; }
 };
 
@@ -664,6 +698,8 @@
     VkInstanceCreateInfo* get() noexcept;
 
     InstanceCreateInfo& set_api_version(uint32_t major, uint32_t minor, uint32_t patch);
+
+    InstanceCreateInfo& setup_WSI(const char* api_selection = nullptr);
 };
 
 struct DeviceQueueCreateInfo {
@@ -715,7 +751,7 @@
 
 struct VulkanFunction {
     std::string name;
-    PFN_vkVoidFunction function;
+    PFN_vkVoidFunction function = nullptr;
 };
 
 template <typename T, size_t U>
@@ -748,10 +784,10 @@
                        [name](VkLayerProperties const& elem) { return string_eq(name, elem.layerName); });
 }
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GNU__)
 
 // find application path + name. Path cannot be longer than 1024, returns NULL if it is greater than that.
-static inline std::string test_platform_executable_path() {
+inline std::string test_platform_executable_path() {
     std::string buffer;
     buffer.resize(1024);
     ssize_t count = readlink("/proc/self/exe", &buffer[0], buffer.size());
@@ -761,9 +797,9 @@
     buffer.resize(count);
     return buffer;
 }
-#elif defined(__APPLE__)  // defined(__linux__)
+#elif defined(__APPLE__)
 #include <libproc.h>
-static inline std::string test_platform_executable_path() {
+inline std::string test_platform_executable_path() {
     std::string buffer;
     buffer.resize(1024);
     pid_t pid = getpid();
@@ -775,7 +811,7 @@
 }
 #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
 #include <sys/sysctl.h>
-static inline std::string test_platform_executable_path() {
+inline std::string test_platform_executable_path() {
     int mib[] = {
         CTL_KERN,
 #if defined(__NetBSD__)
@@ -799,15 +835,15 @@
     return buffer;
 }
 #elif defined(__Fuchsia__) || defined(__OpenBSD__)
-static inline std::string test_platform_executable_path() { return {}; }
-#elif defined(__QNXNTO__)
+inline std::string test_platform_executable_path() { return {}; }
+#elif defined(__QNX__)
 
 #define SYSCONFDIR "/etc"
 
 #include <fcntl.h>
 #include <sys/stat.h>
 
-static inline std::string test_platform_executable_path() {
+inline std::string test_platform_executable_path() {
     std::string buffer;
     buffer.resize(1024);
     int fd = open("/proc/self/exefile", O_RDONLY);
@@ -827,9 +863,9 @@
 
     return buffer;
 }
-#endif  // defined (__QNXNTO__)
+#endif  // defined (__QNX__)
 #if defined(WIN32)
-static inline std::string test_platform_executable_path() {
+inline std::string test_platform_executable_path() {
     std::string buffer;
     buffer.resize(1024);
     DWORD ret = GetModuleFileName(NULL, static_cast<LPSTR>(&buffer[0]), (DWORD)buffer.size());
@@ -839,4 +875,13 @@
     buffer[ret] = '\0';
     return buffer;
 }
+
+inline std::wstring conver_str_to_wstr(std::string const& input) {
+    std::wstring output{};
+    output.resize(input.size());
+    size_t characters_converted = 0;
+    mbstowcs_s(&characters_converted, &output[0], output.size() + 1, input.c_str(), input.size());
+    return output;
+}
+
 #endif
diff --git a/tests/live_verification/CMakeLists.txt b/tests/live_verification/CMakeLists.txt
index d9d5136..262d023 100644
--- a/tests/live_verification/CMakeLists.txt
+++ b/tests/live_verification/CMakeLists.txt
@@ -17,14 +17,14 @@
 
 add_executable(dynamic_rendering_get_proc_addr dynamic_rendering_get_proc_addr.cpp)
 target_link_libraries(dynamic_rendering_get_proc_addr testing_dependencies)
-set_target_properties(dynamic_rendering_get_proc_addr ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(dynamic_rendering_get_proc_addr PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 add_subdirectory(dynamic_loader_behavior)
 
 if(APPLE AND BUILD_STATIC_LOADER)
     add_executable(macos_static_loader_build macos_static_loader_build.cpp)
     target_link_libraries(macos_static_loader_build loader_common_options vulkan Vulkan::Headers)
-    set_target_properties(macos_static_loader_build ${LOADER_STANDARD_CXX_PROPERTIES})
+    set_target_properties(macos_static_loader_build PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
     if (TEST_USE_THREAD_SANITIZER)
         target_compile_options(macos_static_loader_build PUBLIC -fsanitize=thread)
         target_link_options(macos_static_loader_build PUBLIC -fsanitize=thread)
diff --git a/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt b/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt
index ef174c9..dfe01e3 100644
--- a/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt
+++ b/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt
@@ -21,17 +21,17 @@
 add_library(dynamic_library_a dynamic_library.cpp)
 target_link_libraries(dynamic_library_a PUBLIC testing_framework_util)
 target_compile_definitions(dynamic_library_a PRIVATE PRINT_OUTPUT_A)
-set_target_properties(dynamic_library_a ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(dynamic_library_a PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 add_library(dynamic_library_b dynamic_library.cpp)
 target_link_libraries(dynamic_library_b PUBLIC testing_framework_util)
 target_compile_definitions(dynamic_library_b PRIVATE PRINT_OUTPUT_B)
-set_target_properties(dynamic_library_b ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(dynamic_library_b PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 add_library(dynamic_library_c dynamic_library.cpp)
 target_link_libraries(dynamic_library_c PUBLIC testing_framework_util)
 target_compile_definitions(dynamic_library_c PRIVATE PRINT_OUTPUT_C)
-set_target_properties(dynamic_library_c ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(dynamic_library_c PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 add_executable(test_dynamic_linking_a_first test_dynamic_linking.cpp)
 add_executable(test_dynamic_linking_b_first test_dynamic_linking.cpp)
@@ -39,19 +39,19 @@
 target_link_libraries(test_dynamic_linking_a_first PUBLIC dynamic_library_a dynamic_library_b)
 target_link_libraries(test_dynamic_linking_b_first PUBLIC dynamic_library_b dynamic_library_a)
 target_link_libraries(test_dynamic_linking_c_then_load PUBLIC dynamic_library_c)
-set_target_properties(test_dynamic_linking_a_first ${LOADER_STANDARD_CXX_PROPERTIES})
-set_target_properties(test_dynamic_linking_b_first ${LOADER_STANDARD_CXX_PROPERTIES})
-set_target_properties(test_dynamic_linking_c_then_load ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_dynamic_linking_a_first PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_dynamic_linking_b_first PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_dynamic_linking_c_then_load PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 target_compile_definitions(test_dynamic_linking_c_then_load PRIVATE PRINT_OUTPUT_C)
 
 
 add_executable(test_dynamic_loading test_dynamic_loading.cpp)
 target_link_libraries(test_dynamic_loading PUBLIC testing_framework_util)
-set_target_properties(test_dynamic_loading ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_dynamic_loading PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
 add_executable(test_dynamic_loading_and_linking test_dynamic_loading_and_linking.cpp)
 target_link_libraries(test_dynamic_loading_and_linking PUBLIC testing_framework_util)
 target_link_libraries(test_dynamic_loading_and_linking PUBLIC dynamic_library_a)
-set_target_properties(test_dynamic_loading_and_linking ${LOADER_STANDARD_CXX_PROPERTIES})
+set_target_properties(test_dynamic_loading_and_linking PROPERTIES ${TESTS_STANDARD_CXX_PROPERTIES})
 
-endif()
\ No newline at end of file
+endif()
diff --git a/tests/live_verification/dynamic_loader_behavior/dynamic_library.h b/tests/live_verification/dynamic_loader_behavior/dynamic_library.h
index 8b6e29a..1d88d30 100644
--- a/tests/live_verification/dynamic_loader_behavior/dynamic_library.h
+++ b/tests/live_verification/dynamic_loader_behavior/dynamic_library.h
@@ -39,15 +39,15 @@
 };
 
 #if defined(WIN32)
-#ifndef LIB_EXT
+#if !defined(LIB_EXT)
 #define LIB_EXT "dll"
 #endif
 #elif defined(__APPLE__)
-#ifndef LIB_EXT
+#if !defined(LIB_EXT)
 #define LIB_EXT "dylib"
 #endif
 #else
-#ifndef LIB_EXT
+#if !defined(LIB_EXT)
 #define LIB_EXT "so"
 #endif
-#endif
\ No newline at end of file
+#endif
diff --git a/tests/live_verification/dynamic_rendering_get_proc_addr.cpp b/tests/live_verification/dynamic_rendering_get_proc_addr.cpp
index 95aea3e..61144f7 100644
--- a/tests/live_verification/dynamic_rendering_get_proc_addr.cpp
+++ b/tests/live_verification/dynamic_rendering_get_proc_addr.cpp
@@ -40,7 +40,17 @@
     auto phys_devs = inst.GetPhysDevs();
 
     for (const auto& phys_dev : phys_devs) {
-        auto extensions = EnumerateDeviceExtensions(inst, phys_dev);
+        uint32_t count = 0;
+        VkResult res = vk_funcs.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &count, nullptr);
+        if (res != VK_SUCCESS) {
+            std::cout << "Failed to query device extension count\n";
+        }
+        std::vector<VkExtensionProperties> extensions{count};
+        res = vk_funcs.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &count, extensions.data());
+        if (res != VK_SUCCESS) {
+            std::cout << "Failed to query device extensions\n";
+        }
+
         bool has_dynamic_rendering = false;
         for (const auto& ext : extensions) {
             if (string_eq("VK_KHR_dynamic_rendering", ext.extensionName)) {
@@ -68,7 +78,7 @@
                 reinterpret_cast<PFN_vkBeginCommandBuffer>(vk_funcs.vkGetInstanceProcAddr(inst.inst, "vkBeginCommandBuffer"));
             VkCommandBufferBeginInfo begin_info{};
             begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
-            VkResult res = vkBeginCommandBuffer(command_buffer, &begin_info);
+            res = vkBeginCommandBuffer(command_buffer, &begin_info);
             if (res != VK_SUCCESS) {
                 std::cout << "Failed to begin command buffer\n";
             }
diff --git a/tests/loader_alloc_callback_tests.cpp b/tests/loader_alloc_callback_tests.cpp
index 0f2f2d0..dffbf46 100644
--- a/tests/loader_alloc_callback_tests.cpp
+++ b/tests/loader_alloc_callback_tests.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -30,13 +30,6 @@
 #include <mutex>
 
 struct MemoryTrackerSettings {
-    MemoryTrackerSettings() = default;
-    MemoryTrackerSettings(bool should_fail_on_allocation, size_t fail_after_allocations, bool should_fail_after_set_number_of_calls,
-                          size_t fail_after_calls)
-        : should_fail_on_allocation(should_fail_on_allocation),
-          fail_after_allocations(fail_after_allocations),
-          should_fail_after_set_number_of_calls(should_fail_after_set_number_of_calls),
-          fail_after_calls(fail_after_calls) {}
     bool should_fail_on_allocation = false;
     size_t fail_after_allocations = 0;  // fail after this number of allocations in total
     bool should_fail_after_set_number_of_calls = false;
@@ -131,13 +124,14 @@
         std::lock_guard<std::mutex> lg(main_mutex);
         free(pMemory);
     }
-    void impl_internal_allocation_notification(size_t size, VkInternalAllocationType allocationType,
-                                               VkSystemAllocationScope allocationScope) noexcept {
+    void impl_internal_allocation_notification([[maybe_unused]] size_t size,
+                                               [[maybe_unused]] VkInternalAllocationType allocationType,
+                                               [[maybe_unused]] VkSystemAllocationScope allocationScope) noexcept {
         std::lock_guard<std::mutex> lg(main_mutex);
         // TODO?
     }
-    void impl_internal_free(size_t size, VkInternalAllocationType allocationType,
-                            VkSystemAllocationScope allocationScope) noexcept {
+    void impl_internal_free([[maybe_unused]] size_t size, [[maybe_unused]] VkInternalAllocationType allocationType,
+                            [[maybe_unused]] VkSystemAllocationScope allocationScope) noexcept {
         std::lock_guard<std::mutex> lg(main_mutex);
         // TODO?
     }
@@ -218,11 +212,9 @@
 // a vkEnumeratePhysicalDevices call pair.
 TEST(Allocation, EnumeratePhysicalDevices) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     MemoryTracker tracker;
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
     {
         InstWrapper inst{env.vulkan_functions, tracker.get()};
         ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
@@ -243,12 +235,12 @@
 // allocators used on both the instance and device.
 TEST(Allocation, InstanceAndDevice) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device(PhysicalDevice{"physical_device_0"}
+                                 .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+                                 .finish());
 
     MemoryTracker tracker;
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
     {
         InstWrapper inst{env.vulkan_functions, tracker.get()};
         ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
@@ -275,12 +267,14 @@
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), tracker.get(), &device), VK_SUCCESS);
+
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, tracker.get());
     }
     ASSERT_TRUE(tracker.empty());
@@ -290,14 +284,13 @@
 // allocators used on only the instance and not the device.
 TEST(Allocation, InstanceButNotDevice) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device(PhysicalDevice{"physical_device_0"}
+                                 .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+                                 .finish());
 
     MemoryTracker tracker;
     {
-        auto& driver = env.get_test_icd();
-        driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
-
         InstWrapper inst{env.vulkan_functions, tracker.get()};
         ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
 
@@ -323,12 +316,13 @@
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), nullptr, &device), VK_SUCCESS);
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, nullptr);
     }
     ASSERT_TRUE(tracker.empty());
@@ -339,7 +333,10 @@
 // allocators used on only the device and not the instance.
 TEST(Allocation, DeviceButNotInstance) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device(PhysicalDevice{"physical_device_0"}
+                                 .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+                                 .finish());
 
     const char* layer_name = "VkLayerImplicit0";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -351,10 +348,6 @@
 
     MemoryTracker tracker;
     {
-        auto& driver = env.get_test_icd();
-        driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
-
         InstWrapper inst{env.vulkan_functions};
         ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
 
@@ -380,12 +373,14 @@
         ASSERT_EQ(family.timestampValidBits, 0U);
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         ASSERT_EQ(inst->vkCreateDevice(physical_device, dev_create_info.get(), tracker.get(), &device), VK_SUCCESS);
+
+        VkQueue queue;
+        inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
         inst->vkDestroyDevice(device, tracker.get());
     }
     ASSERT_TRUE(tracker.empty());
@@ -394,7 +389,7 @@
 // Test failure during vkCreateInstance to make sure we don't leak memory if
 // one of the out-of-memory conditions trigger.
 TEST(Allocation, CreateInstanceIntentionalAllocFail) {
-    FrameworkEnvironment env{};
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
     const char* layer_name = "VkLayerImplicit0";
@@ -408,7 +403,7 @@
     size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
-        MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});
+        MemoryTracker tracker({false, 0, true, fail_index});
 
         VkInstance instance;
         InstanceCreateInfo inst_create_info{};
@@ -421,10 +416,143 @@
     }
 }
 
+// Test failure during vkCreateInstance & surface creation to make sure we don't leak memory if
+// one of the out-of-memory conditions trigger.
+TEST(Allocation, CreateSurfaceIntentionalAllocFail) {
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
+
+    const char* layer_name = "VkLayerImplicit0";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ENV")),
+                           "test_layer.json");
+    env.get_test_layer().set_do_spurious_allocations_in_create_instance(true).set_do_spurious_allocations_in_create_device(true);
+
+    size_t fail_index = 0;
+    VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
+    while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
+        MemoryTracker tracker({false, 0, true, fail_index});
+
+        VkInstance instance;
+        InstanceCreateInfo inst_create_info{};
+        inst_create_info.setup_WSI();
+        result = env.vulkan_functions.vkCreateInstance(inst_create_info.get(), tracker.get(), &instance);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            ASSERT_TRUE(tracker.empty());
+            fail_index++;
+            continue;
+        }
+
+        VkSurfaceKHR surface{};
+        result = create_surface(&env.vulkan_functions, instance, surface);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
+            ASSERT_TRUE(tracker.empty());
+            fail_index++;
+            continue;
+        }
+        env.vulkan_functions.vkDestroySurfaceKHR(instance, surface, tracker.get());
+
+        env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
+        ASSERT_TRUE(tracker.empty());
+        fail_index++;
+    }
+}
+
+// Test failure during vkCreateInstance to make sure we don't leak memory if
+// one of the out-of-memory conditions trigger.
+TEST(Allocation, CreateInstanceIntentionalAllocFailWithSettingsFilePresent) {
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+
+    const char* layer_name = "VkLayerImplicit0";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ENV")),
+                           "test_layer.json");
+    env.get_test_layer().set_do_spurious_allocations_in_create_instance(true).set_do_spurious_allocations_in_create_device(true);
+
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("auto")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str()))));
+
+    size_t fail_index = 0;
+    VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
+    while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
+        MemoryTracker tracker({false, 0, true, fail_index});
+
+        VkInstance instance;
+        InstanceCreateInfo inst_create_info{};
+        result = env.vulkan_functions.vkCreateInstance(inst_create_info.get(), tracker.get(), &instance);
+        if (result == VK_SUCCESS) {
+            env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
+        }
+        ASSERT_TRUE(tracker.empty());
+        fail_index++;
+    }
+}
+
+// Test failure during vkCreateInstance & surface creation to make sure we don't leak memory if
+// one of the out-of-memory conditions trigger.
+TEST(Allocation, CreateSurfaceIntentionalAllocFailWithSettingsFilePresent) {
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
+
+    const char* layer_name = "VkLayerImplicit0";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ENV")),
+                           "test_layer.json");
+    env.get_test_layer().set_do_spurious_allocations_in_create_instance(true).set_do_spurious_allocations_in_create_device(true);
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("auto")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str()))));
+
+    size_t fail_index = 0;
+    VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
+    while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
+        MemoryTracker tracker({false, 0, true, fail_index});
+
+        VkInstance instance;
+        InstanceCreateInfo inst_create_info{};
+        inst_create_info.setup_WSI();
+        result = env.vulkan_functions.vkCreateInstance(inst_create_info.get(), tracker.get(), &instance);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            ASSERT_TRUE(tracker.empty());
+            fail_index++;
+            continue;
+        }
+
+        VkSurfaceKHR surface{};
+        result = create_surface(&env.vulkan_functions, instance, surface);
+        if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
+            env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
+            ASSERT_TRUE(tracker.empty());
+            fail_index++;
+            continue;
+        }
+        env.vulkan_functions.vkDestroySurfaceKHR(instance, surface, tracker.get());
+
+        env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
+        ASSERT_TRUE(tracker.empty());
+        fail_index++;
+    }
+}
+
 // Test failure during vkCreateInstance to make sure we don't leak memory if
 // one of the out-of-memory conditions trigger.
 TEST(Allocation, DriverEnvVarIntentionalAllocFail) {
-    FrameworkEnvironment env{};
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
     env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.set_discovery_type(ManifestDiscoveryType::env_var));
 
     const char* layer_name = "VkLayerImplicit0";
@@ -435,15 +563,11 @@
                            "test_layer.json");
     env.get_test_layer().set_do_spurious_allocations_in_create_instance(true).set_do_spurious_allocations_in_create_device(true);
 
-    auto driver_files = get_env_var("VK_DRIVER_FILES");
-    driver_files += OS_ENV_VAR_LIST_SEPARATOR;
-    driver_files += (fs::path("totally_made_up") / "path_to_fake" / "jason_file.json").str();
-    set_env_var("VK_DRIVER_FILES", driver_files);
-    EnvVarCleaner cleaner("VK_DRIVER_FILES");
-    size_t fail_index = 66;  // 0
+    env.env_var_vk_icd_filenames.add_to_list((fs::path("totally_made_up") / "path_to_fake" / "jason_file.json").str());
+    size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
-        MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});
+        MemoryTracker tracker({false, 0, true, fail_index});
 
         VkInstance instance;
         InstanceCreateInfo inst_create_info{};
@@ -461,14 +585,14 @@
 // Use 2 physical devices so that anything which copies a list of devices item by item
 // may fail.
 TEST(Allocation, CreateDeviceIntentionalAllocFail) {
-    FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
-    driver.physical_devices.emplace_back("physical_device_1");
-    driver.physical_devices[1].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device(PhysicalDevice{"physical_device_0"}
+                                 .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+                                 .finish())
+        .add_physical_device(PhysicalDevice{"physical_device_1"}
+                                 .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+                                 .finish());
 
     const char* layer_name = "VK_LAYER_VkLayerImplicit0";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -505,16 +629,17 @@
     size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
-        MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});
+        MemoryTracker tracker({false, 0, true, fail_index});
 
         DeviceCreateInfo dev_create_info;
-        DeviceQueueCreateInfo queue_info;
-        queue_info.add_priority(0.0f);
-        dev_create_info.add_device_queue(queue_info);
+        dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         VkDevice device;
         result = inst->vkCreateDevice(physical_devices[0], dev_create_info.get(), tracker.get(), &device);
         if (result == VK_SUCCESS || fail_index > 10000) {
+            VkQueue queue;
+            inst->vkGetDeviceQueue(device, 0, 0, &queue);
+
             inst->vkDestroyDevice(device, tracker.get());
             break;
         }
@@ -525,24 +650,37 @@
 
 // Test failure during vkCreateInstance and vkCreateDevice to make sure we don't
 // leak memory if one of the out-of-memory conditions trigger.
+// Includes drivers with several instance extensions, drivers that will fail to load, directly loaded drivers
 TEST(Allocation, CreateInstanceDeviceIntentionalAllocFail) {
-    FrameworkEnvironment env{};
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
     uint32_t num_physical_devices = 4;
     uint32_t num_implicit_layers = 3;
     for (uint32_t i = 0; i < num_physical_devices; i++) {
         env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)
                         .icd_manifest.set_is_portability_driver(false)
-                        .set_library_arch(sizeof(void*) == 8 ? "64" : "32"));
-        auto& driver = env.get_test_icd(i);
-        driver.set_icd_api_version(VK_API_VERSION_1_1);
-        driver.add_instance_extension("VK_KHR_get_physical_device_properties2");
-        driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
-        driver.physical_devices[0].add_extensions({"VK_EXT_one", "VK_EXT_two", "VK_EXT_three", "VK_EXT_four", "VK_EXT_five"});
+                        .set_library_arch(sizeof(void*) == 8 ? "64" : "32"))
+            .set_icd_api_version(VK_API_VERSION_1_1)
+            .add_instance_extension("VK_KHR_get_physical_device_properties2")
+            .add_physical_device("physical_device_0")
+            .physical_devices.at(0)
+            .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false})
+            .add_extensions({"VK_EXT_one", "VK_EXT_two", "VK_EXT_three", "VK_EXT_four", "VK_EXT_five"});
     }
 
     env.add_icd(TestICDDetails(CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE).set_is_fake(true));
 
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none));
+
+    VkDirectDriverLoadingInfoLUNARG ddl_info{};
+    ddl_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_info.pfnGetInstanceProcAddr = env.icds.back().icd_library.get_symbol("vk_icdGetInstanceProcAddr");
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = 1;
+    ddl_list.pDrivers = &ddl_info;
+
     const char* layer_name = "VK_LAYER_ImplicitAllocFail";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(layer_name)
@@ -563,17 +701,19 @@
     custom_json_file_contents << custom_json_file.rdbuf();
 
     fs::path new_path = env.get_folder(ManifestLocation::explicit_layer)
-                            .write_manifest("VkLayer_complex_file.json", custom_json_file_contents.str());
+                            .write_manifest("VK_LAYER_complex_file.json", custom_json_file_contents.str());
     env.platform_shim->add_manifest(ManifestCategory::explicit_layer, new_path);
 
     size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
-        MemoryTracker tracker{MemoryTrackerSettings{false, 0, true, fail_index}};
+        MemoryTracker tracker{{false, 0, true, fail_index}};
         fail_index++;  // applies to the next loop
 
         VkInstance instance;
         InstanceCreateInfo inst_create_info{};
+        inst_create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+        inst_create_info.instance_info.pNext = reinterpret_cast<const void*>(&ddl_list);
         result = env.vulkan_functions.vkCreateInstance(inst_create_info.get(), tracker.get(), &instance);
         if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
             ASSERT_TRUE(tracker.empty());
@@ -615,9 +755,7 @@
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             VkDevice device;
             result = env.vulkan_functions.vkCreateDevice(physical_devices.at(i), dev_create_info.get(), tracker.get(), &device);
@@ -626,6 +764,9 @@
             }
             ASSERT_EQ(result, VK_SUCCESS);
 
+            VkQueue queue;
+            env.vulkan_functions.vkGetDeviceQueue(device, 0, 0, &queue);
+
             env.vulkan_functions.vkDestroyDevice(device, tracker.get());
         }
         env.vulkan_functions.vkDestroyInstance(instance, tracker.get());
@@ -638,7 +779,7 @@
 // to make sure the loader uses the valid ICD and doesn't report incompatible driver just because
 // an incompatible driver exists
 TEST(TryLoadWrongBinaries, CreateInstanceIntentionalAllocFail) {
-    FrameworkEnvironment env{};
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     env.add_icd(TestICDDetails(CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE).set_is_fake(true));
 
@@ -653,7 +794,7 @@
     size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
-        MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});
+        MemoryTracker tracker({false, 0, true, fail_index});
 
         VkInstance instance;
         InstanceCreateInfo inst_create_info{};
@@ -670,7 +811,7 @@
 // Test failure during vkCreateInstance and vkCreateDevice to make sure we don't
 // leak memory if one of the out-of-memory conditions trigger.
 TEST(Allocation, EnumeratePhysicalDevicesIntentionalAllocFail) {
-    FrameworkEnvironment env{};
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
     const char* layer_name = "VkLayerImplicit0";
@@ -691,10 +832,10 @@
         auto& driver = env.reset_icd();
 
         for (uint32_t i = 0; i < physical_dev_count; i++) {
-            driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
-            driver.physical_devices[i].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
+            driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i))
+                .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
         }
-        MemoryTracker tracker{MemoryTrackerSettings{false, 0, true, fail_index}};
+        MemoryTracker tracker{{false, 0, true, fail_index}};
         InstanceCreateInfo inst_create_info;
         VkInstance instance;
         result = env.vulkan_functions.vkCreateInstance(inst_create_info.get(), tracker.get(), &instance);
@@ -713,8 +854,8 @@
         ASSERT_EQ(physical_dev_count, returned_physical_count);
 
         for (uint32_t i = 0; i < 2; i++) {
-            driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(physical_dev_count));
-            driver.physical_devices.back().add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
+            driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(physical_dev_count))
+                .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
             physical_dev_count += 1;
         }
 
@@ -757,11 +898,14 @@
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             result = env.vulkan_functions.vkCreateDevice(physical_devices[i], dev_create_info.get(), tracker.get(), &devices[i]);
+
+            VkQueue queue;
+            if (result == VK_SUCCESS) {
+                env.vulkan_functions.vkGetDeviceQueue(devices[i], 0, 0, &queue);
+            }
         }
         for (uint32_t i = 0; i < returned_physical_count; i++) {
             if (result == VK_SUCCESS) {
@@ -778,14 +922,14 @@
 // Test failure during vkCreateInstance and vkCreateDevice to make sure we don't
 // leak memory if one of the out-of-memory conditions trigger.
 TEST(Allocation, CreateInstanceDeviceWithDXGIDriverIntentionalAllocFail) {
-    FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_6).set_discovery_type(ManifestDiscoveryType::none));
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("error,warn")};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_6).set_discovery_type(ManifestDiscoveryType::null_dir));
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
     for (uint32_t i = 0; i < 2; i++) {
         auto& driver = env.get_test_icd(i);
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
-        driver.physical_devices[0].add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
+        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i))
+            .add_queue_family_properties({{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, false});
     }
 
     const char* layer_name = "VkLayerImplicit0";
@@ -801,14 +945,14 @@
     desc1.VendorId = known_driver.vendor_id;
     desc1.AdapterLuid = _LUID{10, 1000};
     env.platform_shim->add_dxgi_adapter(GpuType::discrete, desc1);
-    env.get_test_icd().set_adapterLUID(desc1.AdapterLuid);
+    env.get_test_icd(0).set_adapterLUID(desc1.AdapterLuid);
 
     env.platform_shim->add_d3dkmt_adapter(D3DKMT_Adapter{0, _LUID{10, 1000}}.add_driver_manifest_path(env.get_icd_manifest_path()));
 
     size_t fail_index = 0;
     VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
     while (result == VK_ERROR_OUT_OF_HOST_MEMORY && fail_index <= 10000) {
-        MemoryTracker tracker(MemoryTrackerSettings{false, 0, true, fail_index});
+        MemoryTracker tracker({false, 0, true, fail_index});
         fail_index++;  // applies to the next loop
 
         VkInstance instance;
@@ -853,13 +997,14 @@
             ASSERT_EQ(family.timestampValidBits, 0U);
 
             DeviceCreateInfo dev_create_info;
-            DeviceQueueCreateInfo queue_info;
-            queue_info.add_priority(0.0f);
-            dev_create_info.add_device_queue(queue_info);
+            dev_create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
             result = env.vulkan_functions.vkCreateDevice(physical_devices[i], dev_create_info.get(), tracker.get(), &devices[i]);
             if (result == VK_ERROR_OUT_OF_HOST_MEMORY) {
                 devices[i] = VK_NULL_HANDLE;
+            } else {
+                VkQueue queue;
+                env.vulkan_functions.vkGetDeviceQueue(devices[i], 0, 0, &queue);
             }
         }
         for (uint32_t i = 0; i < returned_physical_count; i++) {
diff --git a/tests/loader_debug_ext_tests.cpp b/tests/loader_debug_ext_tests.cpp
index 59bb808..aa6b7f0 100644
--- a/tests/loader_debug_ext_tests.cpp
+++ b/tests/loader_debug_ext_tests.cpp
@@ -34,9 +34,9 @@
 //
 
 // Prototype declaration for callback so we can use it in class utility methods
-static VkBool32 VKAPI_CALL test_DebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType,
-                                                    uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix,
-                                                    const char* pMessage, void* pUserData);
+VkBool32 VKAPI_CALL test_DebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object,
+                                             size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage,
+                                             void* pUserData);
 
 class DebugReportTest : public ::testing::Test {
    public:
@@ -121,9 +121,10 @@
 };
 
 // This is the actual callback prototyped above.
-static VkBool32 VKAPI_CALL test_DebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType,
-                                                    uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix,
-                                                    const char* pMessage, void* pUserData) {
+VkBool32 VKAPI_CALL test_DebugReportCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType,
+                                             [[maybe_unused]] uint64_t object, [[maybe_unused]] size_t location,
+                                             [[maybe_unused]] int32_t messageCode, [[maybe_unused]] const char* pLayerPrefix,
+                                             const char* pMessage, void* pUserData) {
     DebugReportTest* debug_report_test = reinterpret_cast<DebugReportTest*>(pUserData);
     debug_report_test->VerifyExpected(flags, objectType, pMessage);
     return VK_FALSE;
@@ -360,9 +361,9 @@
 //
 
 // Prototype declaration for callback so we can use it in class utility methods
-static VkBool32 VKAPI_CALL test_DebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
-                                                   VkDebugUtilsMessageTypeFlagsEXT message_types,
-                                                   const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data);
+VkBool32 VKAPI_CALL test_DebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
+                                            VkDebugUtilsMessageTypeFlagsEXT message_types,
+                                            const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data);
 
 class DebugUtilTest : public ::testing::Test {
    public:
@@ -461,9 +462,9 @@
 
 // This is the actual callback prototyped above.
 
-static VkBool32 VKAPI_CALL test_DebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
-                                                   VkDebugUtilsMessageTypeFlagsEXT message_types,
-                                                   const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) {
+VkBool32 VKAPI_CALL test_DebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
+                                            VkDebugUtilsMessageTypeFlagsEXT message_types,
+                                            const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) {
     DebugUtilTest* debug_util_test = reinterpret_cast<DebugUtilTest*>(user_data);
     debug_util_test->VerifyExpected(message_types, message_severity, callback_data->pMessage, callback_data);
     return VK_FALSE;
@@ -850,12 +851,14 @@
     ASSERT_EQ(true, message_found);
 }
 
-void CheckDeviceFunctions(FrameworkEnvironment& env, bool use_GIPA, bool enable_debug_extensions) {
+void CheckDeviceFunctions(FrameworkEnvironment& env, bool use_GIPA, bool enable_debug_extensions,
+                          bool hardware_supports_debug_exts) {
     InstWrapper inst(env.vulkan_functions);
     if (enable_debug_extensions) {
         inst.create_info.add_extension("VK_EXT_debug_utils");
+        inst.create_info.add_extension("VK_EXT_debug_report");
     }
-    setup_WSI_in_create_instance(inst);
+    inst.create_info.setup_WSI();
     ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
 
     auto phys_dev = inst.GetPhysDev();
@@ -866,18 +869,20 @@
     if (enable_debug_extensions) {
         dev.create_info.add_extension("VK_EXT_debug_marker");
     }
-    // if the hardware doesn't support VK_EXT_debug_marker and we are trying to enable it, then we should exit since that will fail
-    // to create a device
-    if (enable_debug_extensions &&
-        env.get_test_icd().physical_devices.at(0).extensions.size() == 1 /*only swapchain should be available*/) {
+
+    if (enable_debug_extensions && !hardware_supports_debug_exts) {
+        // if the hardware doesn't support VK_EXT_debug_marker and we are trying to enable it, then we should exit since that will
+        // fail to create a device
+
         dev.CheckCreate(phys_dev, VK_ERROR_EXTENSION_NOT_PRESENT);
         return;
+    } else {
+        ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
     }
-    ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
     DeviceFunctions dev_funcs{env.vulkan_functions, dev};
 
     VkSurfaceKHR surface{};
-    ASSERT_NO_FATAL_FAILURE(create_surface(inst, surface));
+    ASSERT_EQ(VK_SUCCESS, create_surface(inst, surface));
 
     VkSwapchainCreateInfoKHR info{};
     info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
@@ -886,63 +891,87 @@
     VkSwapchainKHR swapchain{};
     ASSERT_EQ(VK_SUCCESS, dev_funcs.vkCreateSwapchainKHR(dev.dev, &info, nullptr, &swapchain));
 
-    PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT;
-    DebugMarkerSetObjectTagEXT = use_GIPA ? inst.load("vkDebugMarkerSetObjectTagEXT") : dev.load("vkDebugMarkerSetObjectTagEXT");
-    PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT;
-    DebugMarkerSetObjectNameEXT = use_GIPA ? inst.load("vkDebugMarkerSetObjectNameEXT") : dev.load("vkDebugMarkerSetObjectNameEXT");
-    PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT;
-    SetDebugUtilsObjectNameEXT = use_GIPA ? inst.load("vkSetDebugUtilsObjectNameEXT") : dev.load("vkSetDebugUtilsObjectNameEXT");
-    PFN_vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT;
-    SetDebugUtilsObjectTagEXT = use_GIPA ? inst.load("vkSetDebugUtilsObjectTagEXT") : dev.load("vkSetDebugUtilsObjectTagEXT");
-    PFN_vkQueueBeginDebugUtilsLabelEXT QueueBeginDebugUtilsLabelEXT;
-    QueueBeginDebugUtilsLabelEXT =
-        use_GIPA ? inst.load("vkQueueBeginDebugUtilsLabelEXT") : dev.load("vkQueueBeginDebugUtilsLabelEXT");
-    PFN_vkQueueEndDebugUtilsLabelEXT QueueEndDebugUtilsLabelEXT;
-    QueueEndDebugUtilsLabelEXT = use_GIPA ? inst.load("vkQueueEndDebugUtilsLabelEXT") : dev.load("vkQueueEndDebugUtilsLabelEXT");
-    PFN_vkQueueInsertDebugUtilsLabelEXT QueueInsertDebugUtilsLabelEXT;
-    QueueInsertDebugUtilsLabelEXT =
-        use_GIPA ? inst.load("vkQueueInsertDebugUtilsLabelEXT") : dev.load("vkQueueInsertDebugUtilsLabelEXT");
-    PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT;
-    CmdBeginDebugUtilsLabelEXT = use_GIPA ? inst.load("vkCmdBeginDebugUtilsLabelEXT") : dev.load("vkCmdBeginDebugUtilsLabelEXT");
-    PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT;
-    CmdEndDebugUtilsLabelEXT = use_GIPA ? inst.load("vkCmdEndDebugUtilsLabelEXT") : dev.load("vkCmdEndDebugUtilsLabelEXT");
-    PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
-    CmdInsertDebugUtilsLabelEXT = use_GIPA ? inst.load("vkCmdInsertDebugUtilsLabelEXT") : dev.load("vkCmdInsertDebugUtilsLabelEXT");
+    auto load_function = [&inst, &dev, use_GIPA](const char* func_name) {
+        return use_GIPA ? inst.load(func_name) : dev.load(func_name);
+    };
 
+    // Debug marker
+    PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT = load_function("vkDebugMarkerSetObjectTagEXT");
+    PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT = load_function("vkDebugMarkerSetObjectNameEXT");
+    PFN_vkCmdDebugMarkerBeginEXT CmdDebugMarkerBeginEXT = load_function("vkCmdDebugMarkerBeginEXT");
+    PFN_vkCmdDebugMarkerEndEXT CmdDebugMarkerEndEXT = load_function("vkCmdDebugMarkerEndEXT");
+    PFN_vkCmdDebugMarkerInsertEXT CmdDebugMarkerInsertEXT = load_function("vkCmdDebugMarkerInsertEXT");
+    // Debug utils
+    PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT = load_function("vkSetDebugUtilsObjectNameEXT");
+    PFN_vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT = load_function("vkSetDebugUtilsObjectTagEXT");
+    PFN_vkQueueBeginDebugUtilsLabelEXT QueueBeginDebugUtilsLabelEXT = load_function("vkQueueBeginDebugUtilsLabelEXT");
+    PFN_vkQueueEndDebugUtilsLabelEXT QueueEndDebugUtilsLabelEXT = load_function("vkQueueEndDebugUtilsLabelEXT");
+    PFN_vkQueueInsertDebugUtilsLabelEXT QueueInsertDebugUtilsLabelEXT = load_function("vkQueueInsertDebugUtilsLabelEXT");
+    PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT = load_function("vkCmdBeginDebugUtilsLabelEXT");
+    PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT = load_function("vkCmdEndDebugUtilsLabelEXT");
+    PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT = load_function("vkCmdInsertDebugUtilsLabelEXT");
+
+    // Debug marker functions - should always be found when using GIPA but when using GDPA found only when the extension is enabled
     if (use_GIPA) {
-        // When querying from GIPA, these functions should always be found
         ASSERT_TRUE(nullptr != DebugMarkerSetObjectTagEXT);
         ASSERT_TRUE(nullptr != DebugMarkerSetObjectNameEXT);
-        // When querying from GIPA, these functions are found only if the extensions were enabled
-        ASSERT_EQ(enable_debug_extensions, nullptr != SetDebugUtilsObjectNameEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != SetDebugUtilsObjectTagEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != QueueBeginDebugUtilsLabelEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != QueueEndDebugUtilsLabelEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != QueueInsertDebugUtilsLabelEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != CmdBeginDebugUtilsLabelEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != CmdEndDebugUtilsLabelEXT);
-        ASSERT_EQ(enable_debug_extensions, nullptr != CmdInsertDebugUtilsLabelEXT);
+        ASSERT_TRUE(nullptr != CmdDebugMarkerBeginEXT);
+        ASSERT_TRUE(nullptr != CmdDebugMarkerEndEXT);
+        ASSERT_TRUE(nullptr != CmdDebugMarkerInsertEXT);
     } else {
-        // When querying from GDPA, these functions are found only if the extensions were enabled
         ASSERT_EQ(enable_debug_extensions, nullptr != DebugMarkerSetObjectTagEXT);
         ASSERT_EQ(enable_debug_extensions, nullptr != DebugMarkerSetObjectNameEXT);
-        // When querying from GDPA, these functions should always be found
-        ASSERT_TRUE(nullptr != SetDebugUtilsObjectNameEXT);
-        ASSERT_TRUE(nullptr != SetDebugUtilsObjectTagEXT);
-        ASSERT_TRUE(nullptr != QueueBeginDebugUtilsLabelEXT);
-        ASSERT_TRUE(nullptr != QueueEndDebugUtilsLabelEXT);
-        ASSERT_TRUE(nullptr != QueueInsertDebugUtilsLabelEXT);
-        ASSERT_TRUE(nullptr != CmdBeginDebugUtilsLabelEXT);
-        ASSERT_TRUE(nullptr != CmdEndDebugUtilsLabelEXT);
-        ASSERT_TRUE(nullptr != CmdInsertDebugUtilsLabelEXT);
+        ASSERT_EQ(enable_debug_extensions, nullptr != CmdDebugMarkerBeginEXT);
+        ASSERT_EQ(enable_debug_extensions, nullptr != CmdDebugMarkerEndEXT);
+        ASSERT_EQ(enable_debug_extensions, nullptr != CmdDebugMarkerInsertEXT);
     }
-    VkDebugUtilsObjectNameInfoEXT obj_name_info{};
-    obj_name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
-    obj_name_info.objectHandle = (uint64_t)swapchain;
-    obj_name_info.objectType = VK_OBJECT_TYPE_SWAPCHAIN_KHR;
-    obj_name_info.pObjectName = " Your mom!";
-    if (SetDebugUtilsObjectNameEXT) SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info);
 
+    // Debug utils functions - should only be found if the extension was enabled (because its instance level)
+    ASSERT_EQ(enable_debug_extensions, nullptr != SetDebugUtilsObjectNameEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != SetDebugUtilsObjectTagEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != QueueBeginDebugUtilsLabelEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != QueueEndDebugUtilsLabelEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != QueueInsertDebugUtilsLabelEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != CmdBeginDebugUtilsLabelEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != CmdEndDebugUtilsLabelEXT);
+    ASSERT_EQ(enable_debug_extensions, nullptr != CmdInsertDebugUtilsLabelEXT);
+
+    if (SetDebugUtilsObjectNameEXT) {
+        VkDebugUtilsObjectNameInfoEXT obj_name_info{};
+        obj_name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
+        obj_name_info.objectHandle = (uint64_t)swapchain;
+        obj_name_info.objectType = VK_OBJECT_TYPE_SWAPCHAIN_KHR;
+        obj_name_info.pObjectName = " Your mom!";
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info));
+
+        obj_name_info.objectHandle = (uint64_t)(uintptr_t)surface;
+        obj_name_info.objectType = VK_OBJECT_TYPE_SURFACE_KHR;
+        obj_name_info.pObjectName = " Your moms surface!";
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info));
+
+        obj_name_info.objectHandle = (uint64_t)(uintptr_t)phys_dev;
+        obj_name_info.objectType = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
+        obj_name_info.pObjectName = "Physical Device AAAAAAAAA";
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info));
+
+        obj_name_info.objectHandle = (uint64_t)(uintptr_t)inst.inst;
+        obj_name_info.objectType = VK_OBJECT_TYPE_INSTANCE;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info));
+    }
+    if (SetDebugUtilsObjectTagEXT) {
+        VkDebugUtilsObjectTagInfoEXT utils_object_tag{};
+        utils_object_tag.objectHandle = (uint64_t)(uintptr_t)inst.inst;
+        utils_object_tag.objectType = VK_OBJECT_TYPE_INSTANCE;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(dev.dev, &utils_object_tag));
+
+        utils_object_tag.objectHandle = (uint64_t)(uintptr_t)phys_dev;
+        utils_object_tag.objectType = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(dev.dev, &utils_object_tag));
+
+        utils_object_tag.objectHandle = (uint64_t)surface;
+        utils_object_tag.objectType = VK_OBJECT_TYPE_SURFACE_KHR;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(dev.dev, &utils_object_tag));
+    }
     VkDebugMarkerObjectTagInfoEXT marker_object_tag{};
     VkDebugMarkerObjectNameInfoEXT marker_object_name{};
     if (use_GIPA && !enable_debug_extensions) {
@@ -950,12 +979,41 @@
         ASSERT_DEATH(DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag), "");
         ASSERT_DEATH(DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name), "");
     } else {
-        if (DebugMarkerSetObjectTagEXT) DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag);
-        if (DebugMarkerSetObjectNameEXT) DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name);
+        if (DebugMarkerSetObjectTagEXT) {
+            marker_object_tag.object = (uint64_t)(uintptr_t)swapchain;
+            marker_object_tag.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag));
+
+            marker_object_tag.object = (uint64_t)(uintptr_t)phys_dev;
+            marker_object_tag.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag));
+
+            marker_object_tag.object = (uint64_t)surface;
+            marker_object_tag.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag));
+
+            marker_object_tag.object = (uint64_t)(uintptr_t)inst.inst;
+            marker_object_tag.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(dev.dev, &marker_object_tag));
+        }
+        if (DebugMarkerSetObjectNameEXT) {
+            marker_object_name.object = (uint64_t)(uintptr_t)swapchain;
+            marker_object_name.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name));
+
+            marker_object_name.object = (uint64_t)(uintptr_t)phys_dev;
+            marker_object_name.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name));
+
+            marker_object_name.object = (uint64_t)surface;
+            marker_object_name.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name));
+
+            marker_object_name.object = (uint64_t)(uintptr_t)inst.inst;
+            marker_object_name.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT;
+            ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(dev.dev, &marker_object_name));
+        }
     }
-    if (SetDebugUtilsObjectNameEXT) SetDebugUtilsObjectNameEXT(dev.dev, &obj_name_info);
-    VkDebugUtilsObjectTagInfoEXT utils_object_tag{};
-    if (SetDebugUtilsObjectTagEXT) SetDebugUtilsObjectTagEXT(dev.dev, &utils_object_tag);
     VkQueue queue{};
     dev.functions->vkGetDeviceQueue(dev.dev, 0, 0, &queue);
     VkDebugUtilsLabelEXT utils_label{};
@@ -981,31 +1039,200 @@
     env.vulkan_functions.vkDestroySurfaceKHR(inst.inst, surface, nullptr);
 }
 
-TEST(GetDeviceProcAddr, DebugFuncsWithTerminator) {
+TEST(GetProcAddr, DebugFuncsWithTerminator) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    setup_WSI_in_ICD(env.get_test_icd());
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
-    env.get_test_icd().physical_devices.at(0).add_extensions({"VK_KHR_swapchain"});
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).setup_WSI().add_physical_device("physical_device_0");
+    driver.physical_devices.at(0).add_extensions({"VK_KHR_swapchain"});
     // Hardware doesn't support the debug extensions
 
     // Use getDeviceProcAddr & vary enabling the debug extensions
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false));
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, false));
 
     // Use getInstanceProcAddr & vary enabling the debug extensions
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false));
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, false));
 
     // Now set the hardware to support the extensions and run the situations again
-    env.get_test_icd().physical_devices.at(0).add_extensions({"VK_EXT_debug_marker"});
-    env.get_test_icd().add_instance_extension("VK_EXT_debug_utils");
+    driver.add_instance_extensions({"VK_EXT_debug_utils", "VK_EXT_debug_report"});
+    driver.physical_devices.at(0).add_extensions({"VK_EXT_debug_marker"});
 
     // Use getDeviceProcAddr & vary enabling the debug extensions
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false));
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, true));
 
     // Use getInstanceProcAddr & vary enabling the debug extensions
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false));
-    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, true));
+}
+
+TEST(GetProcAddr, DebugFuncsWithTrampoline) {
+    FrameworkEnvironment env{};
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).setup_WSI().add_physical_device("physical_device_0");
+    driver.physical_devices.at(0).add_extensions({"VK_KHR_swapchain"});
+    // Hardware doesn't support the debug extensions
+
+    // Use getDeviceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, false));
+
+    // Use getInstanceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, false));
+
+    // Now add a layer that supports the extensions and run the situations again
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("VK_LAYER_test_layer")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_instance_extensions({{VK_EXT_DEBUG_REPORT_EXTENSION_NAME},
+                                                                                   {VK_EXT_DEBUG_UTILS_EXTENSION_NAME}})
+                                                         .add_device_extension({VK_EXT_DEBUG_MARKER_EXTENSION_NAME})),
+                           "test_layer.json");
+
+    // // Use getDeviceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, true));
+
+    // Use getInstanceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, true));
+}
+
+TEST(GetProcAddr, DebugFuncsWithDebugExtsForceAdded) {
+    FrameworkEnvironment env{};
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).setup_WSI().add_physical_device("physical_device_0");
+    driver.physical_devices.at(0).add_extensions({"VK_KHR_swapchain"});
+    // Hardware doesn't support the debug extensions
+
+    // Use getDeviceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, false));
+
+    // Use getInstanceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, false));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, false));
+
+    // Now add a layer that supports the extensions and run the situations again
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("VK_LAYER_test_layer")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "test_layer.json");
+    env.get_test_layer()
+        .add_injected_instance_extensions({{VK_EXT_DEBUG_REPORT_EXTENSION_NAME}, {VK_EXT_DEBUG_UTILS_EXTENSION_NAME}})
+        .add_injected_device_extension({VK_EXT_DEBUG_MARKER_EXTENSION_NAME});
+
+    // Use getDeviceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, false, true, true));
+
+    // Use getInstanceProcAddr & vary enabling the debug extensions
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, false, true));
+    ASSERT_NO_FATAL_FAILURE(CheckDeviceFunctions(env, true, true, true));
+}
+
+TEST(DebugUtils, WrappingLayer) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .set_min_icd_interface_version(5)
+        .add_physical_device(PhysicalDevice{}.add_extension(VK_EXT_DEBUG_MARKER_EXTENSION_NAME).finish())
+        .add_instance_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
+
+    const char* wrap_objects_name = "VK_LAYER_LUNARG_wrap_objects";
+    env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(wrap_objects_name)
+                                                         .set_lib_path(TEST_LAYER_WRAP_OBJECTS)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_instance_extension({VK_EXT_DEBUG_UTILS_EXTENSION_NAME})),
+                           "wrap_objects_layer.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
+    inst.create_info.add_extension(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
+    inst.create_info.add_layer(wrap_objects_name);
+    inst.CheckCreate();
+    DebugUtilsWrapper log{inst};
+    CreateDebugUtilsMessenger(log);
+
+    auto phys_dev = inst.GetPhysDev();
+    DeviceWrapper device{inst};
+    device.create_info.add_extension(VK_EXT_DEBUG_MARKER_EXTENSION_NAME);
+    device.CheckCreate(phys_dev);
+    {
+        PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT = inst.load("vkSetDebugUtilsObjectNameEXT");
+
+        VkDebugUtilsObjectNameInfoEXT info = {};
+        info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
+        info.objectType = VK_OBJECT_TYPE_DEVICE;
+        info.objectHandle = (uint64_t)device.dev;
+        info.pObjectName = "Test Name";
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(device, &info));
+
+        info.objectType = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
+        info.objectHandle = (uint64_t)phys_dev;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(device, &info));
+
+        info.objectType = VK_OBJECT_TYPE_INSTANCE;
+        info.objectHandle = (uint64_t)inst.inst;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectNameEXT(device, &info));
+    }
+    {
+        PFN_vkSetDebugUtilsObjectTagEXT SetDebugUtilsObjectTagEXT = inst.load("vkSetDebugUtilsObjectTagEXT");
+
+        VkDebugUtilsObjectTagInfoEXT info = {};
+        info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT;
+        info.objectType = VK_OBJECT_TYPE_DEVICE;
+        info.objectHandle = (uint64_t)device.dev;
+        info.pTag = "Test Name";
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(device, &info));
+
+        info.objectType = VK_OBJECT_TYPE_PHYSICAL_DEVICE;
+        info.objectHandle = (uint64_t)phys_dev;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(device, &info));
+
+        info.objectType = VK_OBJECT_TYPE_INSTANCE;
+        info.objectHandle = (uint64_t)inst.inst;
+        ASSERT_EQ(VK_SUCCESS, SetDebugUtilsObjectTagEXT(device, &info));
+    }
+    // Debug marker
+    {
+        PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT = inst.load("vkDebugMarkerSetObjectNameEXT");
+
+        VkDebugMarkerObjectNameInfoEXT info = {};
+        info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT;
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT;
+        info.object = (uint64_t)device.dev;
+        info.pObjectName = "Test Name";
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(device, &info));
+
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
+        info.object = (uint64_t)phys_dev;
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(device, &info));
+
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT;
+        info.object = (uint64_t)inst.inst;
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectNameEXT(device, &info));
+    }
+    {
+        PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT = inst.load("vkDebugMarkerSetObjectTagEXT");
+
+        VkDebugMarkerObjectTagInfoEXT info = {};
+        info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT;
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT;
+        info.object = (uint64_t)device.dev;
+        info.pTag = "Test Name";
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(device, &info));
+
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT;
+        info.object = (uint64_t)phys_dev;
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(device, &info));
+
+        info.objectType = VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT;
+        info.object = (uint64_t)inst.inst;
+        ASSERT_EQ(VK_SUCCESS, DebugMarkerSetObjectTagEXT(device, &info));
+    }
 }
diff --git a/tests/loader_envvar_tests.cpp b/tests/loader_envvar_tests.cpp
index d5682c0..3bb7515 100644
--- a/tests/loader_envvar_tests.cpp
+++ b/tests/loader_envvar_tests.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -28,21 +28,6 @@
 
 #include "test_environment.h"
 
-class EnvVarICDOverrideSetup : public ::testing::Test {
-   protected:
-    virtual void SetUp() {
-        remove_env_var("VK_ICD_FILENAMES");
-        remove_env_var("VK_DRIVER_FILES");
-        remove_env_var("VK_ADD_DRIVER_FILES");
-    }
-
-    virtual void TearDown() {
-        remove_env_var("VK_ICD_FILENAMES");
-        remove_env_var("VK_DRIVER_FILES");
-        remove_env_var("VK_ADD_DRIVER_FILES");
-    }
-};
-
 // Don't support vk_icdNegotiateLoaderICDInterfaceVersion
 // Loader calls vk_icdGetInstanceProcAddr second
 // does not support vk_icdGetInstanceProcAddr
@@ -107,7 +92,7 @@
 TEST(EnvVarICDOverrideSetup, TestOnlyDriverEnvVar) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var));
-    env.get_test_icd(0).physical_devices.emplace_back("pd0");
+    env.get_test_icd(0).add_physical_device("pd0");
 
     InstWrapper inst1{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst1.create_info, env.debug_log);
@@ -121,9 +106,9 @@
     ASSERT_EQ(phys_dev_count, 1U);
 
     for (uint32_t add = 0; add < 2; ++add) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var));
-        env.get_test_icd(add + 1).physical_devices.emplace_back("pd" + std::to_string(add) + "0");
-        env.get_test_icd(add + 1).physical_devices.emplace_back("pd" + std::to_string(add) + "1");
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var))
+            .add_physical_device("pd" + std::to_string(add) + "0")
+            .add_physical_device("pd" + std::to_string(add) + "1");
     }
 
     env.debug_log.clear();
@@ -149,19 +134,64 @@
     env.platform_shim->set_elevated_privilege(false);
 }
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-// Make sure the loader reports the correct message based on if USE_UNSAFE_FILE_SEARCH is set or not
+// Test VK_DRIVER_FILES environment variable containing a path to a folder
+TEST(EnvVarICDOverrideSetup, TestOnlyDriverEnvVarInFolder) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var).set_is_dir(false));
+    env.get_test_icd(0).add_physical_device("pd0");
+
+    InstWrapper inst1{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst1.create_info, env.debug_log);
+    inst1.CheckCreate();
+    EXPECT_FALSE(
+        env.debug_log.find("Ignoring override VK_ICD_FILENAMES, VK_DRIVER_FILES, and VK_ADD_DRIVER_FILES due to high-integrity"));
+
+    std::array<VkPhysicalDevice, 5> phys_devs_array;
+    uint32_t phys_dev_count = 1;
+    ASSERT_EQ(inst1->vkEnumeratePhysicalDevices(inst1.inst, &phys_dev_count, phys_devs_array.data()), VK_SUCCESS);
+    ASSERT_EQ(phys_dev_count, 1U);
+
+    for (uint32_t add = 0; add < 2; ++add) {
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var))
+            .add_physical_device("pd" + std::to_string(add) + "0")
+            .add_physical_device("pd" + std::to_string(add) + "1");
+    }
+
+    env.debug_log.clear();
+
+    InstWrapper inst2{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
+    inst2.CheckCreate();
+
+    phys_dev_count = 5;
+    ASSERT_EQ(inst2->vkEnumeratePhysicalDevices(inst2.inst, &phys_dev_count, phys_devs_array.data()), VK_SUCCESS);
+    ASSERT_EQ(phys_dev_count, 5U);
+
+    env.debug_log.clear();
+
+    env.platform_shim->set_elevated_privilege(true);
+
+    InstWrapper inst3{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
+    inst3.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER);
+
+    EXPECT_TRUE(env.debug_log.find("vkCreateInstance: Found no drivers!"));
+
+    env.platform_shim->set_elevated_privilege(false);
+}
+
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
+// Make sure the loader reports the correct message based on if LOADER_USE_UNSAFE_FILE_SEARCH is set or not
 TEST(EnvVarICDOverrideSetup, NonSecureEnvVarLookup) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, log);
     inst.CheckCreate();
 
-#if !defined(USE_UNSAFE_FILE_SEARCH)
+#if !defined(LOADER_USE_UNSAFE_FILE_SEARCH)
     ASSERT_FALSE(log.find("Loader is using non-secure environment variable lookup for"));
 #else
     ASSERT_TRUE(log.find("Loader is using non-secure environment variable lookup for"));
@@ -174,40 +204,38 @@
     // so that the test app can find them.  Include some badly specified elements as well.
     // Need to redirect the 'home' directory
     fs::path HOME = "/home/fake_home";
-    set_env_var("HOME", HOME.str());
-    set_env_var("XDG_CONFIG_DIRS", ":/tmp/goober:::::/tmp/goober/::::");
-    set_env_var("XDG_CONFIG_HOME", ":/tmp/goober:::::/tmp/goober2/::::");
-    set_env_var("XDG_DATA_DIRS", "::::/tmp/goober3:/tmp/goober4/with spaces:::");
-    set_env_var("XDG_DATA_HOME", "::::/tmp/goober3:/tmp/goober4/with spaces:::");
+    EnvVarWrapper home_env_var{"HOME", HOME.str()};
+    EnvVarWrapper xdg_config_dirs_env_var{"XDG_CONFIG_DIRS", ":/tmp/goober:::::/tmp/goober/::::"};
+    EnvVarWrapper xdg_config_home_env_var{"XDG_CONFIG_HOME", ":/tmp/goober:::::/tmp/goober2/::::"};
+    EnvVarWrapper xdg_data_dirs_env_var{"XDG_DATA_DIRS", "::::/tmp/goober3:/tmp/goober4/with spaces:::"};
+    EnvVarWrapper xdg_data_home_env_var{"XDG_DATA_HOME", "::::/tmp/goober3:/tmp/goober4/with spaces:::"};
 
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
     inst.CheckCreate();
 
-    auto check_paths = [](DebugUtilsLogger const& debug_log, ManifestCategory category, fs::path const& HOME) {
+    auto check_paths = [](DebugUtilsLogger const& debug_log, ManifestCategory category) {
         EXPECT_TRUE(debug_log.find((fs::path("/tmp/goober/vulkan") / category_path_name(category)).str()));
         EXPECT_TRUE(debug_log.find((fs::path("/tmp/goober2/vulkan") / category_path_name(category)).str()));
         EXPECT_TRUE(debug_log.find((fs::path("/tmp/goober3/vulkan") / category_path_name(category)).str()));
         EXPECT_TRUE(debug_log.find((fs::path("/tmp/goober4/with spaces/vulkan") / category_path_name(category)).str()));
     };
-    check_paths(env.debug_log, ManifestCategory::icd, HOME);
-    check_paths(env.debug_log, ManifestCategory::implicit_layer, HOME);
-    check_paths(env.debug_log, ManifestCategory::explicit_layer, HOME);
+    check_paths(env.debug_log, ManifestCategory::icd);
+    check_paths(env.debug_log, ManifestCategory::implicit_layer);
+    check_paths(env.debug_log, ManifestCategory::explicit_layer);
 }
 // Check that a json file in the paths don't cause the loader to crash
 TEST(EnvVarICDOverrideSetup, XDGContainsJsonFile) {
     // Set up a layer path that includes default and user-specified locations,
     // so that the test app can find them.  Include some badly specified elements as well.
     // Need to redirect the 'home' directory
-    set_env_var("XDG_CONFIG_DIRS", "bad_file.json");
+    EnvVarWrapper xdg_config_dirs_env_var{"XDG_CONFIG_DIRS", "bad_file.json"};
 
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -247,11 +275,10 @@
 
     // Add a driver that isn't enabled with the environment variable
     env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::env_var));
-    env.get_test_icd(0).physical_devices.emplace_back("pd0");
-    env.get_test_icd(0).physical_devices.emplace_back("pd1");
+    env.get_test_icd(0).add_physical_device("pd0").add_physical_device("pd1");
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_NONE).set_discovery_type(ManifestDiscoveryType::add_env_var));
-    env.get_test_icd(0).physical_devices.emplace_back("pd2");
+    env.get_test_icd(0).add_physical_device("pd2");
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -263,12 +290,11 @@
     ASSERT_EQ(phys_dev_count, 3U);
 }
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 // Test VK_LAYER_PATH environment variable
 TEST(EnvVarICDOverrideSetup, TestOnlyLayerEnvVar) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
     env.platform_shim->redirect_path("/tmp/carol", env.get_folder(ManifestLocation::explicit_layer_env_var).location());
 
     const char* layer_name = "TestLayer";
@@ -282,11 +308,10 @@
     // so that the test app can find them.  Include some badly specified elements as well.
     // Need to redirect the 'home' directory
     fs::path HOME = "/home/fake_home";
-    set_env_var("HOME", HOME.str());
+    EnvVarWrapper home_env_var{"HOME", HOME.str()};
     std::string vk_layer_path = ":/tmp/carol::::/:";
     vk_layer_path += (HOME / "/ with spaces/:::::/tandy:").str();
-    set_env_var("VK_LAYER_PATH", vk_layer_path);
-    EnvVarCleaner layer_path_cleaner("VK_LAYER_PATH");
+    EnvVarWrapper layer_path_env_var{"VK_LAYER_PATH", vk_layer_path};
     InstWrapper inst1{env.vulkan_functions};
     inst1.create_info.add_layer(layer_name);
     FillDebugUtilsCreateDetails(inst1.create_info, env.debug_log);
@@ -314,8 +339,7 @@
 // Test VK_ADD_LAYER_PATH environment variable
 TEST(EnvVarICDOverrideSetup, TestOnlyAddLayerEnvVar) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
     env.platform_shim->redirect_path("/tmp/carol", env.get_folder(ManifestLocation::explicit_layer_add_env_var).location());
 
     const char* layer_name = "TestLayer";
@@ -329,11 +353,10 @@
     // so that the test app can find them.  Include some badly specified elements as well.
     // Need to redirect the 'home' directory
     fs::path HOME = "/home/fake_home";
-    set_env_var("HOME", HOME.str());
+    EnvVarWrapper home_env_var{"HOME", HOME.str()};
     std::string vk_layer_path = ":/tmp/carol::::/:";
     vk_layer_path += (HOME / "/ with spaces/:::::/tandy:").str();
-    set_env_var("VK_ADD_LAYER_PATH", vk_layer_path);
-    EnvVarCleaner add_layer_path_cleaner("VK_ADD_LAYER_PATH");
+    EnvVarWrapper add_layer_path_env_var{"VK_ADD_LAYER_PATH", vk_layer_path};
 
     InstWrapper inst1{env.vulkan_functions};
     inst1.create_info.add_layer(layer_name);
@@ -364,7 +387,7 @@
 // Test that the driver filter select will only enable driver manifest files that match the filter
 TEST(EnvVarICDOverrideSetup, FilterSelectDriver) {
     FrameworkEnvironment env{};
-    const char* filter_select_env_var = "VK_LOADER_DRIVERS_SELECT";
+    EnvVarWrapper filter_select_env_var{"VK_LOADER_DRIVERS_SELECT"};
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_6).set_disable_icd_inc(true).set_json_name("ABC_ICD"));
     env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_6, VK_API_VERSION_1_2}.set_disable_icd_inc(true).set_json_name("BCD_ICD"));
@@ -386,7 +409,7 @@
 
     // Match full-name
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "ABC_ICD.json");
+    filter_select_env_var.set_new_value("ABC_ICD.json");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -404,7 +427,7 @@
 
     // Match prefix
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "ABC*");
+    filter_select_env_var.set_new_value("ABC*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -422,7 +445,7 @@
 
     // Match suffix
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "*C_ICD.json");
+    filter_select_env_var.set_new_value("*C_ICD.json");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -440,7 +463,7 @@
 
     // Match sub-string
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "*BC*");
+    filter_select_env_var.set_new_value("*BC*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -458,7 +481,7 @@
 
     // Match all with star '*'
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "*");
+    filter_select_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -476,7 +499,7 @@
 
     // Match all with special name
     env.debug_log.clear();
-    set_env_var(filter_select_env_var, "~all~");
+    filter_select_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst7.create_info, env.debug_log);
@@ -491,13 +514,30 @@
     ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("Found ICD manifest file", "CDE_ICD.json"));
     ASSERT_FALSE(env.debug_log.find_prefix_then_postfix("CDE_ICD.json", "ignored because not selected by env var"));
     ASSERT_FALSE(env.debug_log.find_prefix_then_postfix("CDE_ICD.json", "ignored because it was disabled by env var"));
+
+    // The full-name string is not a valid match if it doesn't also include the file extension
+    env.debug_log.clear();
+    filter_select_env_var.set_new_value("ABC_ICD");
+
+    InstWrapper inst8{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst8.create_info, env.debug_log);
+    inst8.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER);
+
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("Found ICD manifest file", "ABC_ICD.json"));
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("ABC_ICD.json", "ignored because not selected by env var"));
+    ASSERT_FALSE(env.debug_log.find_prefix_then_postfix("ABC_ICD.json", "ignored because it was disabled by env var"));
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("Found ICD manifest file", "BCD_ICD.json"));
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("BCD_ICD.json", "ignored because not selected by env var"));
+    ASSERT_FALSE(env.debug_log.find_prefix_then_postfix("BCD_ICD.json", "ignored because it was disabled by env var"));
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("Found ICD manifest file", "CDE_ICD.json"));
+    ASSERT_TRUE(env.debug_log.find_prefix_then_postfix("CDE_ICD.json", "ignored because not selected by env var"));
+    ASSERT_FALSE(env.debug_log.find_prefix_then_postfix("CDE_ICD.json", "ignored because it was disabled by env var"));
 }
 
 // Test that the driver filter disable disables driver manifest files that match the filter
 TEST(EnvVarICDOverrideSetup, FilterDisableDriver) {
     FrameworkEnvironment env{};
-    const char* filter_disable_env_var = "VK_LOADER_DRIVERS_DISABLE";
-    EnvVarCleaner filter_disable_cleaner(filter_disable_env_var);
+    EnvVarWrapper filter_disable_env_var{"VK_LOADER_DRIVERS_DISABLE"};
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_6).set_disable_icd_inc(true).set_json_name("ABC_ICD"));
     env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_6, VK_API_VERSION_1_2}.set_disable_icd_inc(true).set_json_name("BCD_ICD"));
@@ -519,7 +559,7 @@
 
     // Match full-name
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "ABC_ICD.json");
+    filter_disable_env_var.set_new_value("ABC_ICD.json");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -537,7 +577,7 @@
 
     // Match prefix
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "ABC_*");
+    filter_disable_env_var.set_new_value("ABC_*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -555,7 +595,7 @@
 
     // Match suffix
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*C_ICD.json");
+    filter_disable_env_var.set_new_value("*C_ICD.json");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -573,7 +613,7 @@
 
     // Match substring
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*BC*");
+    filter_disable_env_var.set_new_value("*BC*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -591,7 +631,7 @@
 
     // Match all with star '*'
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*");
+    filter_disable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -609,7 +649,7 @@
 
     // Match all with special name
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "~all~");
+    filter_disable_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst7.create_info, env.debug_log);
@@ -630,10 +670,8 @@
 // appropriate drivers are enabled and disabled
 TEST(EnvVarICDOverrideSetup, FilterSelectAndDisableDriver) {
     FrameworkEnvironment env{};
-    const char* filter_select_env_var = "VK_LOADER_DRIVERS_SELECT";
-    const char* filter_disable_env_var = "VK_LOADER_DRIVERS_DISABLE";
-    EnvVarCleaner filter_select_cleaner(filter_select_env_var);
-    EnvVarCleaner filter_disable_cleaner(filter_disable_env_var);
+    EnvVarWrapper filter_disable_env_var{"VK_LOADER_DRIVERS_DISABLE"};
+    EnvVarWrapper filter_select_env_var{"VK_LOADER_DRIVERS_SELECT"};
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_6).set_disable_icd_inc(true).set_json_name("ABC_ICD"));
     env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_6, VK_API_VERSION_1_2}.set_disable_icd_inc(true).set_json_name("BCD_ICD"));
@@ -655,8 +693,8 @@
 
     // Disable two, but enable one
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*BC*");
-    set_env_var(filter_select_env_var, "BCD*");
+    filter_disable_env_var.set_new_value("*BC*");
+    filter_select_env_var.set_new_value("BCD*");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -674,8 +712,8 @@
 
     // Disable all, but enable two
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*");
-    set_env_var(filter_select_env_var, "*BC*");
+    filter_disable_env_var.set_new_value("*");
+    filter_select_env_var.set_new_value("*BC*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -693,8 +731,8 @@
 
     // Disable all, but enable all
     env.debug_log.clear();
-    set_env_var(filter_disable_env_var, "*");
-    set_env_var(filter_select_env_var, "*");
+    filter_disable_env_var.set_new_value("*");
+    filter_select_env_var.set_new_value("*");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
diff --git a/tests/loader_get_proc_addr_tests.cpp b/tests/loader_get_proc_addr_tests.cpp
index 20f7268..6a167d1 100644
--- a/tests/loader_get_proc_addr_tests.cpp
+++ b/tests/loader_get_proc_addr_tests.cpp
@@ -30,8 +30,7 @@
 // Verify that the various ways to get vkGetInstanceProcAddr return the same value
 TEST(GetProcAddr, VerifyGetInstanceProcAddr) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
     {
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.set_api_version(VK_API_VERSION_1_1);
@@ -62,8 +61,7 @@
 // Verify that the various ways to get vkGetDeviceProcAddr return the same value
 TEST(GetProcAddr, VerifyGetDeviceProcAddr) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
@@ -73,16 +71,13 @@
     // NOTE: The vulkan_functions are queried using the platform get proc addr from the loader.  So we'll compare
     //       that to what is returned by asking it what the various Vulkan get proc addr functions are.
     PFN_vkGetDeviceProcAddr gdpa_loader = env.vulkan_functions.vkGetDeviceProcAddr;
-    PFN_vkGetDeviceProcAddr gdpa_inst_queried =
-        reinterpret_cast<PFN_vkGetDeviceProcAddr>(env.vulkan_functions.vkGetInstanceProcAddr(inst.inst, "vkGetDeviceProcAddr"));
+    PFN_vkGetDeviceProcAddr gdpa_inst_queried = inst.load("vkGetDeviceProcAddr");
     ASSERT_EQ(gdpa_loader, gdpa_inst_queried);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
-    PFN_vkGetDeviceProcAddr gdpa_dev_queried =
-        reinterpret_cast<PFN_vkGetDeviceProcAddr>(env.vulkan_functions.vkGetDeviceProcAddr(dev.dev, "vkGetDeviceProcAddr"));
+    PFN_vkGetDeviceProcAddr gdpa_dev_queried = dev.load("vkGetDeviceProcAddr");
     ASSERT_EQ(gdpa_loader, gdpa_dev_queried);
 }
 
@@ -90,8 +85,7 @@
 // Call the function to make sure it is callable, don't care about what is returned.
 TEST(GetProcAddr, GlobalFunctions) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     auto& gipa = env.vulkan_functions.vkGetInstanceProcAddr;
     // global entry points with NULL instance handle
@@ -126,29 +120,28 @@
         inst.create_info.api_version = VK_MAKE_API_VERSION(0, 1, i, 0);
         inst.CheckCreate();
 
-        auto EnumerateInstanceExtensionProperties =
-            reinterpret_cast<PFN_vkEnumerateInstanceExtensionProperties>(gipa(inst, "vkEnumerateInstanceExtensionProperties"));
+        PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties =
+            inst.load("vkEnumerateInstanceExtensionProperties");
         handle_assert_has_value(EnumerateInstanceExtensionProperties);
         uint32_t ext_count = 0;
         ASSERT_EQ(VK_SUCCESS, EnumerateInstanceExtensionProperties("", &ext_count, nullptr));
 
-        auto EnumerateInstanceLayerProperties =
-            reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>(gipa(inst, "vkEnumerateInstanceLayerProperties"));
+        PFN_vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties = inst.load("vkEnumerateInstanceLayerProperties");
         handle_assert_has_value(EnumerateInstanceLayerProperties);
         uint32_t layer_count = 0;
         ASSERT_EQ(VK_SUCCESS, EnumerateInstanceLayerProperties(&layer_count, nullptr));
 
-        auto EnumerateInstanceVersion = reinterpret_cast<PFN_vkEnumerateInstanceVersion>(gipa(inst, "vkEnumerateInstanceVersion"));
+        PFN_vkEnumerateInstanceVersion EnumerateInstanceVersion = inst.load("vkEnumerateInstanceVersion");
         handle_assert_has_value(EnumerateInstanceVersion);
         uint32_t api_version = 0;
         EnumerateInstanceVersion(&api_version);
 
-        auto GetInstanceProcAddr = reinterpret_cast<PFN_vkGetInstanceProcAddr>(gipa(inst, "vkGetInstanceProcAddr"));
+        PFN_vkGetInstanceProcAddr GetInstanceProcAddr = inst.load("vkGetInstanceProcAddr");
         handle_assert_has_value(GetInstanceProcAddr);
         ASSERT_EQ(GetInstanceProcAddr,
                   reinterpret_cast<PFN_vkGetInstanceProcAddr>(GetInstanceProcAddr(inst, "vkGetInstanceProcAddr")));
 
-        auto CreateInstance = reinterpret_cast<PFN_vkCreateInstance>(gipa(inst, "vkCreateInstance"));
+        PFN_vkCreateInstance CreateInstance = inst.load("vkCreateInstance");
         handle_assert_has_value(CreateInstance);
     }
     {
@@ -157,31 +150,30 @@
         inst.create_info.api_version = VK_MAKE_API_VERSION(0, 1, 3, 0);
         inst.CheckCreate();
 
-        auto EnumerateInstanceExtensionProperties =
-            reinterpret_cast<PFN_vkEnumerateInstanceExtensionProperties>(gipa(inst, "vkEnumerateInstanceExtensionProperties"));
+        PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties =
+            inst.load("vkEnumerateInstanceExtensionProperties");
         handle_assert_null(EnumerateInstanceExtensionProperties);
 
-        auto EnumerateInstanceLayerProperties =
-            reinterpret_cast<PFN_vkEnumerateInstanceLayerProperties>(gipa(inst, "vkEnumerateInstanceLayerProperties"));
+        PFN_vkEnumerateInstanceLayerProperties EnumerateInstanceLayerProperties = inst.load("vkEnumerateInstanceLayerProperties");
         handle_assert_null(EnumerateInstanceLayerProperties);
 
-        auto EnumerateInstanceVersion = reinterpret_cast<PFN_vkEnumerateInstanceVersion>(gipa(inst, "vkEnumerateInstanceVersion"));
+        PFN_vkEnumerateInstanceVersion EnumerateInstanceVersion = inst.load("vkEnumerateInstanceVersion");
         handle_assert_null(EnumerateInstanceVersion);
 
-        auto CreateInstance = reinterpret_cast<PFN_vkCreateInstance>(gipa(inst, "vkCreateInstance"));
+        PFN_vkCreateInstance CreateInstance = inst.load("vkCreateInstance");
         handle_assert_null(CreateInstance);
 
-        auto GetInstanceProcAddr = reinterpret_cast<PFN_vkGetInstanceProcAddr>(gipa(inst, "vkGetInstanceProcAddr"));
+        PFN_vkGetInstanceProcAddr GetInstanceProcAddr = inst.load("vkGetInstanceProcAddr");
         handle_assert_equal(env.vulkan_functions.vkGetInstanceProcAddr, GetInstanceProcAddr);
         ASSERT_EQ(GetInstanceProcAddr,
                   reinterpret_cast<PFN_vkGetInstanceProcAddr>(GetInstanceProcAddr(inst, "vkGetInstanceProcAddr")));
         ASSERT_EQ(GetInstanceProcAddr,
                   reinterpret_cast<PFN_vkGetInstanceProcAddr>(GetInstanceProcAddr(NULL, "vkGetInstanceProcAddr")));
         // get a non pre-instance function pointer
-        auto EnumeratePhysicalDevices = reinterpret_cast<PFN_vkGetInstanceProcAddr>(gipa(inst, "vkEnumeratePhysicalDevices"));
+        PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices = inst.load("vkEnumeratePhysicalDevices");
         handle_assert_has_value(EnumeratePhysicalDevices);
 
-        EnumeratePhysicalDevices = reinterpret_cast<PFN_vkGetInstanceProcAddr>(gipa(NULL, "vkEnumeratePhysicalDevices"));
+        EnumeratePhysicalDevices = reinterpret_cast<PFN_vkEnumeratePhysicalDevices>(gipa(NULL, "vkEnumeratePhysicalDevices"));
         handle_assert_null(EnumeratePhysicalDevices);
     }
 }
@@ -191,24 +183,22 @@
 // and return VK_SUCCESS to maintain previous behavior.
 TEST(GetDeviceProcAddr, SwapchainFuncsWithTerminator) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    setup_WSI_in_ICD(env.get_test_icd());
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).setup_WSI().add_physical_device("physical_device_0");
 
     InstWrapper inst(env.vulkan_functions);
     inst.create_info.add_extension("VK_EXT_debug_utils");
-    setup_WSI_in_create_instance(inst);
+    inst.create_info.setup_WSI();
     ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
 
     VkSurfaceKHR surface{};
-    ASSERT_NO_FATAL_FAILURE(create_surface(inst, surface));
+    ASSERT_EQ(VK_SUCCESS, create_surface(inst, surface));
 
     DebugUtilsWrapper log{inst};
     ASSERT_EQ(VK_SUCCESS, CreateDebugUtilsMessenger(log));
     auto phys_dev = inst.GetPhysDev();
     {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
         DeviceFunctions dev_funcs{env.vulkan_functions, dev};
 
@@ -247,13 +237,10 @@
 
         if (CreateSharedSwapchainsKHR) CreateSharedSwapchainsKHR(dev.dev, 1, &info, nullptr, &swapchain);
     }
+    driver.physical_devices.at(0).add_extensions({"VK_KHR_swapchain", "VK_KHR_display_swapchain", "VK_EXT_debug_marker"});
     {
-        env.get_test_icd().physical_devices.at(0).add_extensions(
-            {"VK_KHR_swapchain", "VK_KHR_display_swapchain", "VK_EXT_debug_marker"});
-
         DeviceWrapper dev{inst};
         dev.create_info.add_extensions({"VK_KHR_swapchain", "VK_KHR_display_swapchain", "VK_EXT_debug_marker"});
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
         DeviceFunctions dev_funcs{env.vulkan_functions, dev};
 
@@ -292,3 +279,198 @@
     }
     env.vulkan_functions.vkDestroySurfaceKHR(inst.inst, surface, nullptr);
 }
+
+// Verify that the various ways to get vkGetDeviceProcAddr return the same value
+TEST(GetProcAddr, PreserveLayerGettingVkCreateDeviceWithNullInstance) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
+
+    env.add_implicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name("VK_LAYER_technically_buggy_layer")
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                          .set_disable_environment("if_you_can")),
+                                            "buggy_layer_1.json"));
+    env.get_test_layer().set_buggy_query_of_vkCreateDevice(true);
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.set_api_version(VK_API_VERSION_1_1);
+    inst.CheckCreate();
+    VkPhysicalDevice phys_dev = inst.GetPhysDev();
+
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(phys_dev);
+}
+
+// The following tests - AppQueries11FunctionsWhileOnlyEnabling10, AppQueries12FunctionsWhileOnlyEnabling11, and
+// AppQueries13FunctionsWhileOnlyEnabling12 - check that vkGetDeviceProcAddr only returning functions from core versions up to
+// the apiVersion declared in VkApplicationInfo. Function querying should succeed if VK_KHR_maintenance_5 is not enabled, and they
+// should return zero when that extension is enabled.
+
+TEST(GetDeviceProcAddr, AppQueries11FunctionsWhileOnlyEnabling10) {
+    FrameworkEnvironment env{};
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+            .set_icd_api_version(VK_API_VERSION_1_1)
+            .add_physical_device(
+                PhysicalDevice{}.set_api_version(VK_API_VERSION_1_1).add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME).finish());
+
+    std::vector<const char*> functions = {"vkGetDeviceQueue2", "vkCmdDispatchBase", "vkCreateDescriptorUpdateTemplate"};
+    for (const auto& f : functions) {
+        driver.physical_devices.back().add_device_function(VulkanFunction{f, [] {}});
+    }
+    {  // doesn't enable the feature or extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 0, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.CheckCreate(inst.GetPhysDev());
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // doesn't enable the feature
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 0, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.CheckCreate(inst.GetPhysDev());
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // enables the feature and extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 0, 0);
+        inst.CheckCreate();
+
+        VkPhysicalDeviceMaintenance5FeaturesKHR features{};
+        features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR;
+        features.maintenance5 = VK_TRUE;
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.create_info.dev.pNext = &features;
+        dev.CheckCreate(inst.GetPhysDev());
+        for (const auto& f : functions) {
+            ASSERT_EQ(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+}
+
+TEST(GetDeviceProcAddr, AppQueries12FunctionsWhileOnlyEnabling11) {
+    FrameworkEnvironment env{};
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2))
+            .set_icd_api_version(VK_API_VERSION_1_2)
+            .add_physical_device(
+                PhysicalDevice{}.set_api_version(VK_API_VERSION_1_2).add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME).finish());
+    std::vector<const char*> functions = {"vkCmdDrawIndirectCount", "vkCmdNextSubpass2", "vkGetBufferDeviceAddress",
+                                          "vkGetDeviceMemoryOpaqueCaptureAddress"};
+    for (const auto& f : functions) {
+        driver.physical_devices.back().add_device_function(VulkanFunction{f, [] {}});
+    }
+    {  // doesn't enable the feature or extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // doesn't enable the feature
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // enables the feature and extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        inst.CheckCreate();
+
+        VkPhysicalDeviceMaintenance5FeaturesKHR features{};
+        features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR;
+        features.maintenance5 = VK_TRUE;
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.create_info.dev.pNext = &features;
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_EQ(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+}
+
+TEST(GetDeviceProcAddr, AppQueries13FunctionsWhileOnlyEnabling12) {
+    FrameworkEnvironment env{};
+    auto& driver =
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_3))
+            .set_icd_api_version(VK_API_VERSION_1_3)
+            .add_physical_device(
+                PhysicalDevice{}.set_api_version(VK_API_VERSION_1_3).add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME).finish());
+    std::vector<const char*> functions = {"vkCreatePrivateDataSlot", "vkGetDeviceBufferMemoryRequirements", "vkCmdWaitEvents2",
+                                          "vkGetDeviceImageSparseMemoryRequirements"};
+
+    for (const auto& f : functions) {
+        driver.physical_devices.back().add_device_function(VulkanFunction{f, [] {}});
+    }
+    {  // doesn't enable the feature or extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 2, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // doesn't enable the feature
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 2, 0);
+        inst.CheckCreate();
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_NE(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+    {  // enables the feature and extension
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 2, 0);
+        inst.CheckCreate();
+
+        VkPhysicalDeviceMaintenance5FeaturesKHR features{};
+        features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR;
+        features.maintenance5 = VK_TRUE;
+
+        DeviceWrapper dev{inst};
+        dev.create_info.add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
+        dev.create_info.dev.pNext = &features;
+        dev.CheckCreate(inst.GetPhysDev());
+
+        for (const auto& f : functions) {
+            ASSERT_EQ(nullptr, dev->vkGetDeviceProcAddr(dev.dev, f));
+        }
+    }
+}
diff --git a/tests/loader_handle_validation_tests.cpp b/tests/loader_handle_validation_tests.cpp
index e7751ce..24cb303 100644
--- a/tests/loader_handle_validation_tests.cpp
+++ b/tests/loader_handle_validation_tests.cpp
@@ -41,9 +41,7 @@
 
 TEST(LoaderHandleValidTests, BadInstEnumPhysDevices) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
@@ -57,9 +55,7 @@
 
 TEST(LoaderHandleValidTests, BadInstGetInstProcAddr) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
@@ -71,9 +67,7 @@
 
 TEST(LoaderHandleValidTests, BadInstDestroyInstance) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
@@ -86,15 +80,14 @@
 
 TEST(LoaderHandleValidTests, BadInstDestroySurface) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
     Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
+    instance.create_info.add_extension(first_ext.extensionName.c_str());
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -105,16 +98,14 @@
 
 TEST(LoaderHandleValidTests, BadInstCreateHeadlessSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
     Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_EXT_headless_surface");
+    instance.create_info.add_extensions({first_ext.extensionName.c_str(), second_ext.extensionName.c_str()});
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -129,16 +120,14 @@
 
 TEST(LoaderHandleValidTests, BadInstCreateDisplayPlaneSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
     Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
+    instance.create_info.add_extensions({first_ext.extensionName.c_str(), second_ext.extensionName.c_str()});
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -151,16 +140,13 @@
                  "vkCreateDisplayPlaneSurfaceKHR: Invalid instance \\[VUID-vkCreateDisplayPlaneSurfaceKHR-instance-parameter\\]");
 }
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 TEST(LoaderHandleValidTests, BadInstCreateAndroidSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -174,16 +160,13 @@
 }
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 TEST(LoaderHandleValidTests, BadInstCreateDirectFBSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -197,16 +180,13 @@
 }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 TEST(LoaderHandleValidTests, BadInstCreateFuchsiaSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -220,16 +200,13 @@
 }
 #endif  // VK_USE_PLATFORM_FUCHSIA
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 TEST(LoaderHandleValidTests, BadInstCreateGGPSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -244,16 +221,13 @@
 }
 #endif  // VK_USE_PLATFORM_GGP
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 TEST(LoaderHandleValidTests, BadInstCreateIOSSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -267,16 +241,13 @@
 }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 TEST(LoaderHandleValidTests, BadInstCreateMacOSSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -293,13 +264,10 @@
 #if defined(VK_USE_PLATFORM_METAL_EXT)
 TEST(LoaderHandleValidTests, BadInstCreateMetalSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -313,16 +281,13 @@
 }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 TEST(LoaderHandleValidTests, BadInstCreateQNXSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -337,16 +302,13 @@
 }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
 TEST(LoaderHandleValidTests, BadInstCreateViNNSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -361,16 +323,13 @@
 }
 #endif  // VK_USE_PLATFORM_VI_NN
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 TEST(LoaderHandleValidTests, BadInstCreateWaylandSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -385,16 +344,13 @@
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 TEST(LoaderHandleValidTests, BadInstCreateWin32Surf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -409,16 +365,13 @@
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 TEST(LoaderHandleValidTests, BadInstCreateXCBSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -433,16 +386,13 @@
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 TEST(LoaderHandleValidTests, BadInstCreateXlibSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_instance = get_bad_handle<VkInstance>();
@@ -461,9 +411,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevFeature) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -479,9 +429,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevFormatProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -497,9 +447,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevImgFormatProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -517,9 +467,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -535,9 +485,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -552,9 +502,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDevMemProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -570,9 +520,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevCreateDevice) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -606,9 +556,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevEnumDevExtProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -623,9 +573,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevEnumDevLayerProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -640,9 +590,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSparseImgFormatProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -660,9 +610,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevFeature2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -680,9 +630,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevFormatProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -700,9 +650,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevImgFormatProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -723,9 +673,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -743,9 +693,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -760,9 +710,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDevMemProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -780,9 +730,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSparseImgFormatProps2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -801,9 +751,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevExternFenceProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -822,9 +772,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevExternBufferProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -843,9 +793,9 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevExternSemaphoreProps) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
 
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.set_api_version(1, 1, 0);
@@ -864,15 +814,14 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    Extension second_ext{"VK_KHR_display"};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
+    instance.create_info.add_extension(first_ext.extensionName.c_str());
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -885,15 +834,14 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceCapsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    Extension second_ext{"VK_KHR_display"};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
+    instance.create_info.add_extension(first_ext.extensionName.c_str());
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -905,15 +853,14 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceFormatsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    Extension second_ext{"VK_KHR_display"};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
+    instance.create_info.add_extension(first_ext.extensionName.c_str());
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -925,15 +872,14 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfacePresentModesKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_headless_surface"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+    Extension second_ext{"VK_KHR_display"};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions({first_ext, second_ext})
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
+    instance.create_info.add_extension(first_ext.extensionName.c_str());
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -943,16 +889,13 @@
                  "\\[VUID-vkGetPhysicalDeviceSurfacePresentModesKHR-physicalDevice-parameter\\]");
 }
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 TEST(LoaderHandleValidTests, BadPhysDevGetDirectFBPresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -963,16 +906,13 @@
 }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 TEST(LoaderHandleValidTests, BadPhysDevGetQNXPresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -982,16 +922,13 @@
 }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevWaylandPresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -1001,16 +938,13 @@
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevWin32PresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -1020,16 +954,13 @@
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 TEST(LoaderHandleValidTests, BadPhysDevGetXCBPresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
 
@@ -1040,16 +971,13 @@
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 TEST(LoaderHandleValidTests, BadPhysDevGetXlibPresentSupportKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.CheckCreate();
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
@@ -1061,19 +989,25 @@
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPropsKHR) {
-    FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
+InstWrapper setup_BadPhysDev_env(FrameworkEnvironment& env, std::vector<const char*> exts) {
+    std::vector<Extension> ext_modified;
+    for (const auto& ext : exts) {
+        ext_modified.push_back(Extension{ext});
+    }
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_instance_extensions(ext_modified)
+        .setup_WSI()
+        .add_physical_device("physical_device_0");
 
     InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
+    instance.create_info.add_extensions(exts);
     instance.CheckCreate();
+    return instance;
+}
+
+TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPropsKHR) {
+    FrameworkEnvironment env{};
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1084,17 +1018,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPlanePropsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1105,17 +1029,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneSupportedDisplaysKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1126,17 +1040,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDisplayModePropsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1147,17 +1051,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevCreateDisplayModeKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkDisplayModeCreateInfoKHR create_info = {};
@@ -1171,17 +1065,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneCapsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkDisplayPlaneCapabilitiesKHR caps = {};
@@ -1192,17 +1076,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevPresentRectsKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1213,17 +1087,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayProps2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_display_properties2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_get_display_properties2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_display_properties2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1234,17 +1098,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevDisplayPlaneProps2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_display_properties2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_get_display_properties2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_display_properties2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1255,17 +1109,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDisplayModeProps2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_display_properties2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_get_display_properties2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_display_properties2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1276,17 +1120,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDisplayPlaneCaps2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_display_properties2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_get_display_properties2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_display_properties2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkDisplayPlaneInfo2KHR disp_plane_info = {};
@@ -1300,17 +1134,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceCaps2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_surface_capabilities2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_surface");
-    instance.create_info.add_extension("VK_KHR_get_surface_capabilities2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_surface_capabilities2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkPhysicalDeviceSurfaceInfo2KHR phys_dev_surf_info = {};
@@ -1324,16 +1148,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfaceFormats2KHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_KHR_get_surface_capabilities2"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_KHR_get_surface_capabilities2");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_KHR_get_surface_capabilities2"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkPhysicalDeviceSurfaceInfo2KHR phys_dev_surf_info = {};
@@ -1347,12 +1162,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevEnumPhysDevQueueFamilyPerfQueryCountersKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1366,12 +1176,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevQueueFamilyPerfQueryPassesKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkQueryPoolPerformanceCreateInfoKHR create_info = {};
@@ -1388,12 +1193,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevFragmentShadingRatesKHR) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     uint32_t count = 0;
@@ -1406,12 +1206,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevMSPropsEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     VkMultisamplePropertiesEXT props = {};
@@ -1424,16 +1219,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevAcquireDrmDisplayEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_acquire_drm_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_EXT_acquire_drm_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_EXT_acquire_drm_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     PFN_vkAcquireDrmDisplayEXT pfn = instance.load("vkAcquireDrmDisplayEXT");
@@ -1444,16 +1230,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetDrmDisplayEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_acquire_drm_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_EXT_acquire_drm_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_EXT_acquire_drm_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     PFN_vkGetDrmDisplayEXT pfn = instance.load("vkGetDrmDisplayEXT");
@@ -1465,16 +1242,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevReleaseDisplayEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_direct_mode_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_EXT_direct_mode_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_EXT_direct_mode_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     PFN_vkReleaseDisplayEXT pfn = instance.load("vkReleaseDisplayEXT");
@@ -1483,19 +1251,10 @@
                  "vkReleaseDisplayEXT: Invalid physicalDevice \\[VUID-vkReleaseDisplayEXT-physicalDevice-parameter\\]");
 }
 
-#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
 TEST(LoaderHandleValidTests, BadPhysDevAcquireXlibDisplayEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_acquire_xlib_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_EXT_acquire_xlib_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_EXT_acquire_xlib_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     PFN_vkAcquireXlibDisplayEXT pfn = instance.load("vkAcquireXlibDisplayEXT");
@@ -1506,16 +1265,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetRandROutputDisplayEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    Extension first_ext{"VK_KHR_surface"};
-    Extension second_ext{"VK_EXT_acquire_xlib_display"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({first_ext, second_ext});
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.create_info.add_extension("VK_EXT_acquire_xlib_display");
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {"VK_KHR_surface", "VK_EXT_acquire_xlib_display"});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     RROutput rrout = {};
@@ -1528,13 +1278,10 @@
 }
 #endif  // VK_USE_PLATFORM_XLIB_XRANDR_EXT
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevSurfacePresentModes2EXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
@@ -1554,12 +1301,7 @@
 
 TEST(LoaderHandleValidTests, BadPhysDevGetPhysDevToolPropertiesEXT) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-
-    InstWrapper instance(env.vulkan_functions);
-    instance.CheckCreate();
+    auto instance = setup_BadPhysDev_env(env, {});
 
     auto bad_physical_dev = get_bad_handle<VkPhysicalDevice>();
     PFN_vkGetPhysicalDeviceToolPropertiesEXT pfn = instance.load("vkGetPhysicalDeviceToolPropertiesEXT");
@@ -1570,24 +1312,18 @@
                  "\\[VUID-vkGetPhysicalDeviceToolPropertiesEXT-physicalDevice-parameter\\]");
 }
 
-#ifdef VK_USE_PLATFORM_ANDROID_KHR
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingAndroidSurface) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1604,24 +1340,18 @@
 }
 #endif  // VK_USE_PLATFORM_ANDROID_KHR
 
-#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingDirectFBSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1638,24 +1368,18 @@
 }
 #endif  // VK_USE_PLATFORM_DIRECTFB_EXT
 
-#ifdef VK_USE_PLATFORM_FUCHSIA
+#if defined(VK_USE_PLATFORM_FUCHSIA)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingFuchsiaSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1672,24 +1396,18 @@
 }
 #endif  // VK_USE_PLATFORM_FUCHSIA
 
-#ifdef VK_USE_PLATFORM_GGP
+#if defined(VK_USE_PLATFORM_GGP)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingGGPSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1706,24 +1424,18 @@
 }
 #endif  // VK_USE_PLATFORM_GGP
 
-#ifdef VK_USE_PLATFORM_IOS_MVK
+#if defined(VK_USE_PLATFORM_IOS_MVK)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingIOSSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1740,24 +1452,18 @@
 }
 #endif  // VK_USE_PLATFORM_IOS_MVK
 
-#ifdef VK_USE_PLATFORM_MACOS_MVK
+#if defined(VK_USE_PLATFORM_MACOS_MVK)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingMacOSSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver, "VK_USE_PLATFORM_MACOS_MVK");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI("VK_USE_PLATFORM_MACOS_MVK");
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance, "VK_USE_PLATFORM_MACOS_MVK");
+    instance.create_info.setup_WSI("VK_USE_PLATFORM_MACOS_MVK");
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1777,21 +1483,15 @@
 #if defined(VK_USE_PLATFORM_METAL_EXT)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingMetalSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver, "VK_USE_PLATFORM_METAL_EXT");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI("VK_USE_PLATFORM_METAL_EXT");
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance, "VK_USE_PLATFORM_METAL_EXT");
+    instance.create_info.setup_WSI("VK_USE_PLATFORM_METAL_EXT");
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1808,24 +1508,18 @@
 }
 #endif  // VK_USE_PLATFORM_METAL_EXT
 
-#ifdef VK_USE_PLATFORM_SCREEN_QNX
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingQNXSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1842,24 +1536,18 @@
 }
 #endif  // VK_USE_PLATFORM_SCREEN_QNX
 
-#ifdef VK_USE_PLATFORM_VI_NN
+#if defined(VK_USE_PLATFORM_VI_NN)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingViNNSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1876,24 +1564,18 @@
 }
 #endif  // VK_USE_PLATFORM_VI_NN
 
-#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingWaylandSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver, "VK_USE_PLATFORM_WAYLAND_KHR");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI("VK_USE_PLATFORM_WAYLAND_KHR");
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance, "VK_USE_PLATFORM_WAYLAND_KHR");
+    instance.create_info.setup_WSI("VK_USE_PLATFORM_WAYLAND_KHR");
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1910,24 +1592,18 @@
 }
 #endif  // VK_USE_PLATFORM_WAYLAND_KHR
 
-#ifdef VK_USE_PLATFORM_WIN32_KHR
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingWin32Surf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1944,24 +1620,18 @@
 }
 #endif  // VK_USE_PLATFORM_WIN32_KHR
 
-#ifdef VK_USE_PLATFORM_XCB_KHR
+#if defined(VK_USE_PLATFORM_XCB_KHR)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingXCBSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI();
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance);
+    instance.create_info.setup_WSI();
     instance.create_info.add_layer(wrap_objects_name);
     instance.CheckCreate();
 
@@ -1978,26 +1648,18 @@
 }
 #endif  // VK_USE_PLATFORM_XCB_KHR
 
-#ifdef VK_USE_PLATFORM_XLIB_KHR
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
 TEST(LoaderHandleValidTests, VerifyHandleWrappingXlibSurf) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver, "VK_USE_PLATFORM_XLIB_KHR");
-    for (auto& ext : driver.instance_extensions) {
-        std::cout << ext.extensionName << "\n";
-    }
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).setup_WSI("VK_USE_PLATFORM_XLIB_KHR");
+
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
-    setup_WSI_in_create_instance(instance, "VK_USE_PLATFORM_XLIB_KHR");
+    instance.create_info.setup_WSI("VK_USE_PLATFORM_XLIB_KHR");
     //
     for (auto& ext : instance.create_info.enabled_extensions) {
         std::cout << ext << "\n";
@@ -2018,34 +1680,24 @@
 }
 #endif  // VK_USE_PLATFORM_XLIB_KHR
 
-static VKAPI_ATTR VkBool32 VKAPI_CALL JunkDebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
-                                                             VkDebugUtilsMessageTypeFlagsEXT messageTypes,
-                                                             const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
-                                                             void* pUserData) {
+VKAPI_ATTR VkBool32 VKAPI_CALL JunkDebugUtilsCallback([[maybe_unused]] VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
+                                                      [[maybe_unused]] VkDebugUtilsMessageTypeFlagsEXT messageTypes,
+                                                      [[maybe_unused]] const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData,
+                                                      [[maybe_unused]] void* pUserData) {
     // This is just a stub callback in case the loader or any other layer triggers it.
-    (void)messageSeverity;
-    (void)messageTypes;
-    (void)pCallbackData;
-    (void)pUserData;
     return VK_FALSE;
 }
 
 TEST(LoaderHandleValidTests, VerifyHandleWrappingDebugUtilsMessenger) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     Extension ext{"VK_EXT_debug_utils"};
-    auto& driver = env.get_test_icd();
-    driver.add_instance_extensions({ext});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_instance_extensions({ext});
 
     const char* wrap_objects_name = "WrapObjectsLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-
     InstWrapper instance(env.vulkan_functions);
     instance.create_info.add_extension("VK_EXT_debug_utils");
     instance.create_info.add_layer(wrap_objects_name);
diff --git a/tests/loader_layer_tests.cpp b/tests/loader_layer_tests.cpp
index 69f55be..b7c8817 100644
--- a/tests/loader_layer_tests.cpp
+++ b/tests/loader_layer_tests.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -47,76 +47,72 @@
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
-    const char* enable_env_var = "ENABLE_ME";
-    const char* disable_env_var = "DISABLE_ME";
 
-    EnvVarCleaner enable_cleaner(enable_env_var);
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    EnvVarWrapper enable_env_var{"ENABLE_ME"};
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                                         .set_disable_environment(disable_env_var)
-                                                         .set_enable_environment(enable_env_var)),
+                                                         .set_disable_environment(disable_env_var.get())
+                                                         .set_enable_environment(enable_env_var.get())),
                            "implicit_test_layer.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
     // didn't set enable env-var, layer should not load
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     // set enable env-var to 0, no layer should be found
-    set_env_var(enable_env_var, "0");
+    enable_env_var.set_new_value("0");
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    enable_env_var.set_new_value("1");
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     // remove enable env var, so we can check what happens when only disable is present
-    remove_env_var(enable_env_var);
+    enable_env_var.remove_value();
 
     // set disable env-var to 0, layer should not load
-    set_env_var(disable_env_var, "0");
+    disable_env_var.set_new_value("0");
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     // set disable env-var to 1, layer should not load
-    set_env_var(disable_env_var, "1");
+    disable_env_var.set_new_value("1");
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     // set both enable and disable env-var, layer should not load
-    set_env_var(enable_env_var, "1");
-    set_env_var(disable_env_var, "1");
+    enable_env_var.set_new_value("1");
+    disable_env_var.set_new_value("1");
     CheckLogForLayerString(env, implicit_layer_name, false);
 }
 
 TEST(ImplicitLayers, OnlyDisableEnvVar) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    const char* implicit_layer_name = "ImplicitTestLayer";
-    const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
+
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                                         .set_disable_environment(disable_env_var)),
+                                                         .set_disable_environment(disable_env_var.get())),
                            "implicit_test_layer.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
     // don't set disable env-var, layer should load
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     // set disable env-var to 0, layer should load
-    set_env_var(disable_env_var, "0");
+    disable_env_var.set_new_value("0");
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     // set disable env-var to 1, layer should not load
-    set_env_var(disable_env_var, "1");
+    disable_env_var.set_new_value("1");
     CheckLogForLayerString(env, implicit_layer_name, false);
 
     {
@@ -131,20 +127,18 @@
 TEST(ImplicitLayers, PreInstanceEnumInstLayerProps) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    const char* implicit_layer_name = "ImplicitTestLayer";
-    const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
 
     env.add_implicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}
-                           .set_name(implicit_layer_name)
-                           .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                           .set_disable_environment(disable_env_var)
-                           .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
-                                                          .set_vk_func("vkEnumerateInstanceLayerProperties")
-                                                          .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(implicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .set_disable_environment(disable_env_var.get())
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceLayerProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))),
         "implicit_test_layer.json");
 
     uint32_t layer_props = 43;
@@ -156,7 +150,7 @@
     ASSERT_EQ(count, layer_props);
 
     // set disable env-var to 1, layer should not load
-    set_env_var(disable_env_var, "1");
+    disable_env_var.set_new_value("1");
 
     count = 0;
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
@@ -167,21 +161,19 @@
 TEST(ImplicitLayers, PreInstanceEnumInstExtProps) {
     FrameworkEnvironment env;
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    const char* implicit_layer_name = "ImplicitTestLayer";
-    const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(implicit_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_disable_environment(disable_env_var)
-                                              .add_pre_instance_function(
-                                                  ManifestLayer::LayerDescription::FunctionOverride{}
-                                                      .set_vk_func("vkEnumerateInstanceExtensionProperties")
-                                                      .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))),
-                           "implicit_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(implicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .set_disable_environment(disable_env_var.get())
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceExtensionProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))),
+        "implicit_test_layer.json");
 
     uint32_t ext_props = 52;
     auto& layer = env.get_test_layer(0);
@@ -192,7 +184,7 @@
     ASSERT_EQ(count, ext_props);
 
     // set disable env-var to 1, layer should not load
-    set_env_var(disable_env_var, "1");
+    disable_env_var.set_new_value("1");
 
     count = 0;
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
@@ -202,26 +194,23 @@
 
 TEST(ImplicitLayers, PreInstanceVersion) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 3);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA))
+        .add_physical_device({})
+        .set_icd_api_version(VK_MAKE_API_VERSION(0, 1, 2, 3));
 
-    const char* implicit_layer_name = "ImplicitTestLayer";
-    const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
 
-    env.add_implicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}
-                           .set_name(implicit_layer_name)
-                           .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                           .set_api_version(VK_MAKE_API_VERSION(0, 1, 2, 3))
-                           .set_disable_environment(disable_env_var)
-                           .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
-                                                          .set_vk_func("vkEnumerateInstanceVersion")
-                                                          .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
-        "implicit_test_layer.json");
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(implicit_layer_name)
+                                   .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 2, 3))
+                                   .set_disable_environment(disable_env_var.get())
+                                   .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                                                  .set_vk_func("vkEnumerateInstanceVersion")
+                                                                  .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
+                           "implicit_test_layer.json");
 
     uint32_t layer_version = VK_MAKE_API_VERSION(1, 2, 3, 4);
     auto& layer = env.get_test_layer(0);
@@ -232,7 +221,7 @@
     ASSERT_EQ(version, layer_version);
 
     // set disable env-var to 1, layer should not load
-    set_env_var(disable_env_var, "1");
+    disable_env_var.set_new_value("1");
 
     version = 0;
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
@@ -246,22 +235,19 @@
 // tested through behavior above).
 TEST(ImplicitLayers, OverrideGetInstanceProcAddr) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
-    const char* implicit_layer_name = "ImplicitTestLayer";
-    const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner disable_cleaner(disable_env_var);
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    EnvVarWrapper disable_env_var{"DISABLE_ME"};
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 0, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(implicit_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_1)
-                                              .set_disable_environment(disable_env_var)
-                                              .add_function(ManifestLayer::LayerDescription::FunctionOverride{}
-                                                                .set_vk_func("vkGetInstanceProcAddr")
-                                                                .set_override_name("test_override_vkGetInstanceProcAddr"))),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 0, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(implicit_layer_name)
+                                   .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_1)
+                                   .set_disable_environment(disable_env_var.get())
+                                   .add_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                                     .set_vk_func("vkGetInstanceProcAddr")
+                                                     .set_override_name("test_override_vkGetInstanceProcAddr"))),
                            "implicit_test_layer.json");
 
     {
@@ -271,7 +257,7 @@
 
     {
         // set disable env-var to 1, layer should not load
-        set_env_var(disable_env_var, "1");
+        disable_env_var.set_new_value("1");
         InstWrapper inst2{env.vulkan_functions};
         inst2.CheckCreate();
     }
@@ -280,8 +266,10 @@
 // Force enable with filter env var
 TEST(ImplicitLayers, EnableWithFilter) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA))
+        .add_physical_device({})
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* implicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* implicit_json_name_1 = "First_layer.json";
@@ -319,8 +307,8 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            implicit_json_name_3);
 
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
-    EnvVarCleaner layer_1_enable_cleaner(enable_layer_name_1);
+    EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE"};
+    EnvVarWrapper layer_1_enable_env_var{enable_layer_name_1};
 
     // First, test an instance/device without the layer forced on.
     InstWrapper inst1{env.vulkan_functions};
@@ -343,7 +331,7 @@
     // Now force on one layer with its full name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", implicit_layer_name_1);
+    layers_enable_env_var.set_new_value(implicit_layer_name_1);
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -365,7 +353,7 @@
     // Match prefix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "VK_LAYER_LUNARG_*");
+    layers_enable_env_var.set_new_value("VK_LAYER_LUNARG_*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -387,7 +375,7 @@
     // Match suffix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second_layer");
+    layers_enable_env_var.set_new_value("*Second_layer");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -409,7 +397,7 @@
     // Match substring
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -431,7 +419,7 @@
     // Match all with star '*'
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*");
+    layers_enable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -453,7 +441,7 @@
     // Match all with special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "~all~");
+    layers_enable_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst7.create_info, env.debug_log);
@@ -475,8 +463,8 @@
     // Match substring, but enable the other layer manually
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var(enable_layer_name_1, "1");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layer_1_enable_env_var.set_new_value("1");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst8{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst8.create_info, env.debug_log);
@@ -499,8 +487,8 @@
 // Force disabled with new filter env var
 TEST(ImplicitLayers, DisableWithFilter) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* implicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* implicit_json_name_1 = "First_layer.json";
@@ -532,7 +520,7 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            implicit_json_name_3);
 
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
 
     // First, test an instance/device
     InstWrapper inst1{env.vulkan_functions};
@@ -555,7 +543,7 @@
     // Now force off one layer with its full name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", implicit_layer_name_1);
+    layers_disable_env_var.set_new_value(implicit_layer_name_1);
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -577,7 +565,7 @@
     // Match prefix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "VK_LAYER_LUNARG_*");
+    layers_disable_env_var.set_new_value("VK_LAYER_LUNARG_*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -599,7 +587,7 @@
     // Match suffix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second_layer");
+    layers_disable_env_var.set_new_value("*Second_layer");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -621,7 +609,7 @@
     // Match substring
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second*");
+    layers_disable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -643,7 +631,7 @@
     // Match all with star '*'
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*");
+    layers_disable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -665,7 +653,7 @@
     // Match all with special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~all~");
+    layers_disable_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst7.create_info, env.debug_log);
@@ -688,8 +676,8 @@
 // Force disabled with new filter env var
 TEST(ImplicitLayers, DisableWithFilterWhenLayersEnableEnvVarIsActive) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* implicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* implicit_json_name_1 = "First_layer.json";
@@ -715,9 +703,9 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            implicit_json_name_2);
 
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
-    EnvVarCleaner layer_1_enable_cleaner(enable_layer_name_1);
-    EnvVarCleaner layer_2_enable_cleaner(enable_layer_name_2);
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
+    EnvVarWrapper layer_1_enable_env_var{enable_layer_name_1};
+    EnvVarWrapper layer_2_enable_env_var{enable_layer_name_2};
 
     // First, test an instance/device
     InstWrapper inst1{env.vulkan_functions};
@@ -736,8 +724,8 @@
     // Set the layers enable env-var
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var(enable_layer_name_1, "1");
-    set_env_var(enable_layer_name_2, "1");
+    layer_1_enable_env_var.set_new_value("1");
+    layer_2_enable_env_var.set_new_value("1");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -755,7 +743,7 @@
     // Now force off one layer with its full name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", implicit_layer_name_1);
+    layers_disable_env_var.set_new_value(implicit_layer_name_1);
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -773,7 +761,7 @@
     // Now force off both layers
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
+    layers_disable_env_var.set_new_value("~implicit~");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -793,8 +781,8 @@
 // override the disable.
 TEST(ImplicitLayers, EnableAndDisableWithFilter) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* implicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* implicit_json_name_1 = "First_layer.json";
@@ -826,14 +814,14 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            implicit_json_name_3);
 
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
+    EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE"};
 
     // Disable 2 but enable 1
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second*");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*test_layer");
+    layers_disable_env_var.set_new_value("*Second*");
+    layers_enable_env_var.set_new_value("*test_layer");
 
     InstWrapper inst1{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst1.create_info, env.debug_log);
@@ -855,8 +843,8 @@
     // Disable all but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("*");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -878,8 +866,8 @@
     // Disable all but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~all~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~all~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -901,8 +889,8 @@
     // Disable implicit but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~implicit~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -924,8 +912,8 @@
     // Disable explicit but enable 2 (should still be everything)
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~explicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~explicit~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -947,8 +935,8 @@
     // Disable implicit but enable all
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*");
+    layers_disable_env_var.set_new_value("~implicit~");
+    layers_enable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -968,6 +956,59 @@
     ASSERT_FALSE(env.debug_log.find_prefix_then_postfix(implicit_layer_name_3, "disabled because name matches filter of env var"));
 }
 
+// Add 2 implicit layers with the same layer name and expect only one to be loaded.
+// Expect the second layer to be found first, because it'll be in a path that is searched first.
+TEST(ImplicitLayers, DuplicateLayers) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* same_layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_implicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                          .set_disable_environment("if_you_can")),
+                                            "regular_layer_1.json"));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+    layer1.set_make_spurious_log_in_create_instance("actually_layer_1");
+
+    env.add_implicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                          .set_disable_environment("if_you_can")),
+                                            "regular_layer_1.json")
+                               // use override folder as just a folder and manually add it to the implicit layer search paths
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+    layer2.set_make_spurious_log_in_create_instance("actually_layer_2");
+#if defined(WIN32)
+    env.platform_shim->add_manifest(ManifestCategory::implicit_layer, env.get_folder(ManifestLocation::override_layer).location());
+#elif COMMON_UNIX_PLATFORMS
+    env.platform_shim->redirect_path(fs::path(USER_LOCAL_SHARE_DIR "/vulkan/implicit_layer.d"),
+                                     env.get_folder(ManifestLocation::override_layer).location());
+#endif
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+
+    auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+    ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+    ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+}
+
 // Meta layer which contains component layers that do not exist.
 TEST(MetaLayers, InvalidComponentLayer) {
     FrameworkEnvironment env;
@@ -975,14 +1016,13 @@
     const char* meta_layer_name = "VK_LAYER_MetaTestLayer";
     const char* invalid_layer_name_1 = "VK_LAYER_InvalidLayer1";
     const char* invalid_layer_name_2 = "VK_LAYER_InvalidLayer2";
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(meta_layer_name)
-                                              .add_component_layers({invalid_layer_name_1, invalid_layer_name_2})
-                                              .set_disable_environment("NotGonnaWork")
-                                              .add_instance_extension({"NeverGonnaGiveYouUp"})
-                                              .add_device_extension({"NeverGonnaLetYouDown"})),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(meta_layer_name)
+                                   .add_component_layers({invalid_layer_name_1, invalid_layer_name_2})
+                                   .set_disable_environment("NotGonnaWork")
+                                   .add_instance_extension({"NeverGonnaGiveYouUp"})
+                                   .add_device_extension({"NeverGonnaLetYouDown"})),
                            "meta_test_layer.json");
 
     const char* regular_layer_name = "TestLayer";
@@ -992,23 +1032,14 @@
         "regular_test_layer.json");
 
     // should find 1, the 'regular' layer
-    uint32_t layer_count = 1;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-    EXPECT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
 
-    VkLayerProperties layer_props;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, &layer_props));
-    EXPECT_EQ(layer_count, 1U);
-    EXPECT_TRUE(string_eq(layer_props.layerName, regular_layer_name));
-
-    uint32_t extension_count = 0;
-    std::array<VkExtensionProperties, 3> extensions;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    EXPECT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
-
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-    EXPECT_EQ(extension_count, 3U);
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(meta_layer_name);
@@ -1021,14 +1052,12 @@
 // Meta layer that is an explicit layer
 TEST(MetaLayers, ExplicitMetaLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     const char* meta_layer_name = "VK_LAYER_MetaTestLayer";
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
         "meta_test_layer.json");
 
     env.add_explicit_layer(
@@ -1037,44 +1066,26 @@
         "regular_test_layer.json");
 
     {  // global functions
-        // should find 1, the 'regular' layer
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 2U);
+       // should find 1, the 'regular' layer
+        auto layer_props = env.GetLayerProperties(2);
         EXPECT_TRUE(check_permutation({regular_layer_name, meta_layer_name}, layer_props));
 
-        uint32_t extension_count = 0;
-        std::array<VkExtensionProperties, 3> extensions;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-        EXPECT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
-
-        EXPECT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-        EXPECT_EQ(extension_count, 3U);
+        auto extensions = env.GetInstanceExtensions(4);
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
     {  // don't enable the layer, shouldn't find any layers when calling vkEnumerateDeviceLayerProperties
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate(VK_SUCCESS);
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(count, 0U);
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
     }
     {
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.add_layer(meta_layer_name);
         inst.CheckCreate(VK_SUCCESS);
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(count, 2U);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(count, 2U);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         EXPECT_TRUE(check_permutation({regular_layer_name, meta_layer_name}, layer_props));
     }
 }
@@ -1085,14 +1096,13 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     const char* meta_layer_name = "VK_LAYER_MetaTestLayer";
     const char* regular_layer_name = "VK_LAYER_TestLayer";
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(meta_layer_name)
-                                              .add_component_layers({meta_layer_name, regular_layer_name})
-                                              .set_disable_environment("NotGonnaWork")
-                                              .add_instance_extension({"NeverGonnaGiveYouUp"})
-                                              .add_device_extension({"NeverGonnaLetYouDown"})),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(meta_layer_name)
+                                   .add_component_layers({meta_layer_name, regular_layer_name})
+                                   .set_disable_environment("NotGonnaWork")
+                                   .add_instance_extension({"NeverGonnaGiveYouUp"})
+                                   .add_device_extension({"NeverGonnaLetYouDown"})),
                            "meta_test_layer.json");
 
     env.add_explicit_layer(
@@ -1101,23 +1111,14 @@
         "regular_test_layer.json");
 
     // should find 1, the 'regular' layer
-    uint32_t layer_count = 1;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-    EXPECT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
 
-    VkLayerProperties layer_props;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, &layer_props));
-    EXPECT_EQ(layer_count, 1U);
-    EXPECT_TRUE(string_eq(layer_props.layerName, regular_layer_name));
-
-    uint32_t extension_count = 0;
-    std::array<VkExtensionProperties, 3> extensions;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    EXPECT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
-
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-    EXPECT_EQ(extension_count, 3U);
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(meta_layer_name);
@@ -1139,34 +1140,23 @@
             ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_test_layer.json");
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
         "meta_test_layer.json");
-    env.add_explicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(meta_meta_layer_name)
-                                              .add_component_layers({meta_layer_name, regular_layer_name})),
+    env.add_explicit_layer(ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(meta_meta_layer_name)
+                                   .add_component_layers({meta_layer_name, regular_layer_name})),
                            "meta_meta_test_layer.json");
 
-    uint32_t layer_count = 3;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-    EXPECT_EQ(layer_count, 3U);
-
-    std::array<VkLayerProperties, 3> layer_props;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-    EXPECT_EQ(layer_count, 3U);
+    auto layer_props = env.GetLayerProperties(3);
     EXPECT_TRUE(check_permutation({regular_layer_name, meta_layer_name, meta_meta_layer_name}, layer_props));
 
-    uint32_t extension_count = 0;
-    std::array<VkExtensionProperties, 3> extensions;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    EXPECT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
-
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-    EXPECT_EQ(extension_count, 3U);
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(meta_layer_name);
@@ -1178,8 +1168,8 @@
 
 TEST(MetaLayers, InstanceExtensionInComponentLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     const char* meta_layer_name = "VK_LAYER_MetaTestLayer";
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     const char* instance_ext_name = "VK_EXT_headless_surface";
@@ -1189,26 +1179,18 @@
                                                          .add_instance_extension({instance_ext_name})),
                            "regular_test_layer.json");
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
         "meta_test_layer.json");
 
-    uint32_t extension_count = 0;
-    std::array<VkExtensionProperties, 1> extensions;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(meta_layer_name, &extension_count, nullptr));
-    EXPECT_EQ(extension_count, 1U);  // return instance_ext_name
-
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(meta_layer_name, &extension_count, extensions.data()));
-    EXPECT_EQ(extension_count, 1U);
+    auto extensions = env.GetInstanceExtensions(1, meta_layer_name);
     EXPECT_TRUE(string_eq(extensions[0].extensionName, instance_ext_name));
 }
 
 TEST(MetaLayers, DeviceExtensionInComponentLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     const char* meta_layer_name = "VK_LAYER_MetaTestLayer";
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     const char* device_ext_name = "VK_EXT_fake_dev_ext";
@@ -1218,16 +1200,12 @@
                                                          .add_device_extension({device_ext_name})),
                            "regular_test_layer.json");
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(meta_layer_name).add_component_layers({regular_layer_name})),
         "meta_test_layer.json");
-    {
-        uint32_t extension_count = 0;
-        EXPECT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(meta_layer_name, &extension_count, nullptr));
-        EXPECT_EQ(extension_count, 0U);
-    }
+
+    ASSERT_NO_FATAL_FAILURE(env.GetInstanceExtensions(0, meta_layer_name));
+
     {  // layer is not enabled
         InstWrapper inst{env.vulkan_functions};
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -1235,17 +1213,8 @@
         ASSERT_TRUE(env.debug_log.find(std::string("Meta-layer ") + meta_layer_name + " component layer " + regular_layer_name +
                                        " adding device extension " + device_ext_name));
 
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t extension_count = 0;
-        std::array<VkExtensionProperties, 1> extensions;
-        EXPECT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, meta_layer_name, &extension_count, nullptr));
-        EXPECT_EQ(extension_count, 1U);  // return device_ext_name
-
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, meta_layer_name, &extension_count,
-                                                                                        extensions.data()));
-        EXPECT_EQ(extension_count, 1U);
-        EXPECT_TRUE(string_eq(extensions[0].extensionName, device_ext_name));
+        auto extensions = inst.EnumerateLayerDeviceExtensions(inst.GetPhysDev(), meta_layer_name, 1);
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, device_ext_name));
     }
     {  // layer is enabled
         InstWrapper inst{env.vulkan_functions};
@@ -1254,26 +1223,17 @@
         inst.CheckCreate();
         ASSERT_TRUE(env.debug_log.find(std::string("Meta-layer ") + meta_layer_name + " component layer " + regular_layer_name +
                                        " adding device extension " + device_ext_name));
-        auto phys_dev = inst.GetPhysDev();
 
-        uint32_t extension_count = 0;
-        std::array<VkExtensionProperties, 1> extensions;
-        EXPECT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, meta_layer_name, &extension_count, nullptr));
-        EXPECT_EQ(extension_count, 1U);  // return device_ext_name
-
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, meta_layer_name, &extension_count,
-                                                                                        extensions.data()));
-        EXPECT_EQ(extension_count, 1U);
-        EXPECT_TRUE(string_eq(extensions[0].extensionName, device_ext_name));
+        auto extensions = inst.EnumerateLayerDeviceExtensions(inst.GetPhysDev(), meta_layer_name, 1);
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, device_ext_name));
     }
 }
 
 // Override meta layer missing disable environment variable still enables the layer
 TEST(OverrideMetaLayer, InvalidDisableEnvironment) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(regular_layer_name)
@@ -1282,21 +1242,14 @@
                                                          .add_device_extension({"NeverGonnaLetYouDown"})),
                            "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layers({regular_layer_name})),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layers({regular_layer_name})),
+        "meta_test_layer.json");
 
-    uint32_t layer_count = 0;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-    EXPECT_EQ(layer_count, 1U);
-
-    std::array<VkLayerProperties, 1> layer_props;
-    EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-    EXPECT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
     EXPECT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
@@ -1306,8 +1259,8 @@
 // Override meta layer whose version is less than the api version of the instance
 TEST(OverrideMetaLayer, OlderVersionThanInstance) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(regular_layer_name)
@@ -1316,37 +1269,22 @@
                                                          .add_device_extension({"NeverGonnaLetYouDown"})),
                            "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 1, 2))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_component_layers({regular_layer_name})),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .set_disable_environment("DisableMeIfYouCan")
+                                                                         .add_component_layers({regular_layer_name})),
+        "meta_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 2U);
+        auto layer_props = env.GetLayerProperties(2);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
     {  // 1.1 instance
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.api_version = VK_API_VERSION_1_1;
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         ASSERT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
         ASSERT_TRUE(string_eq(layer_props[1].layerName, lunarg_meta_layer_name));
     }
@@ -1355,15 +1293,8 @@
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.api_version = VK_API_VERSION_1_3;
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
 
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(2U, count);
         ASSERT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
         ASSERT_TRUE(string_eq(layer_props[1].layerName, lunarg_meta_layer_name));
     }
@@ -1371,34 +1302,25 @@
 
 TEST(OverrideMetaLayer, OlderMetaLayerWithNewerInstanceVersion) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
-    env.add_explicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(regular_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
-                           "regular_test_layer.json");
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(regular_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
+        "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layers({regular_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layers({regular_layer_name})
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 2;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 2U);
+        auto layer_props = env.GetLayerProperties(2);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
     {
@@ -1406,15 +1328,7 @@
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.set_api_version(1, 1, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         ASSERT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
         ASSERT_TRUE(string_eq(layer_props[1].layerName, lunarg_meta_layer_name));
     }
@@ -1424,15 +1338,7 @@
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.set_api_version(1, 3, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         ASSERT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
         ASSERT_TRUE(string_eq(layer_props[1].layerName, lunarg_meta_layer_name));
     }
@@ -1440,34 +1346,26 @@
 
 TEST(OverrideMetaLayer, NewerComponentLayerInMetaLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
-    env.add_explicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(regular_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 2, 0))),
-                           "regular_test_layer.json");
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(regular_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_API_VERSION_1_2)),
+        "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layers({regular_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layers({regular_layer_name})
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
+
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 2U);
+        auto layer_props = env.GetLayerProperties(2);
         // Expect the explicit layer to still be found
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
@@ -1477,19 +1375,12 @@
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.create_info.set_api_version(1, 1, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         // Newer component is allowed now
         EXPECT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        env.debug_log.clear();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        EXPECT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
+    env.debug_log.clear();
 
     {
         // 1.3 instance
@@ -1497,51 +1388,35 @@
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.create_info.set_api_version(1, 3, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         // Newer component is allowed now
         EXPECT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        env.debug_log.clear();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
 
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        EXPECT_EQ(2U, count);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
 }
 
 TEST(OverrideMetaLayer, OlderComponentLayerInMetaLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
-    env.add_explicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(regular_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
-                           "regular_test_layer.json");
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(regular_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
+        "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layers({regular_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layers({regular_layer_name})
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 1U);
-
-        std::array<VkLayerProperties, 1> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 1U);
+        auto layer_props = env.GetLayerProperties(1);
         EXPECT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
     }
     {
@@ -1550,17 +1425,11 @@
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.create_info.set_api_version(1, 1, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         EXPECT_TRUE(
             env.debug_log.find("verify_meta_layer_component_layers: Meta-layer uses API version 1.1, but component layer 0 has API "
                                "version 1.0 that is lower.  Skipping this layer."));
         env.debug_log.clear();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(0U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(0U, count);
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
     }
 
     {
@@ -1569,24 +1438,17 @@
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.create_info.set_api_version(1, 2, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         ASSERT_TRUE(
             env.debug_log.find("verify_meta_layer_component_layers: Meta-layer uses API version 1.1, but component layer 0 has API "
                                "version 1.0 that is lower.  Skipping this layer."));
         env.debug_log.clear();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(0U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(0U, count);
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
     }
 }
 
 TEST(OverrideMetaLayer, ApplicationEnabledLayerInBlacklist) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* automatic_regular_layer_name = "VK_LAYER_TestLayer_1";
     const char* manual_regular_layer_name = "VK_LAYER_TestLayer_2";
@@ -1600,22 +1462,16 @@
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
                            "regular_test_layer_2.json");
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(automatic_regular_layer_name)
-                                              .add_blacklisted_layer(manual_regular_layer_name)
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layer(automatic_regular_layer_name)
+                                                                         .add_blacklisted_layer(manual_regular_layer_name)
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
     {  // Check that enumerating the layers returns only the non-blacklisted layers + override layer
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
-        ASSERT_EQ(count, 2U);
-        std::vector<VkLayerProperties> layer_props{2, VkLayerProperties{}};
-        env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layer_props.data());
-        ASSERT_EQ(count, 2U);
+        auto layer_props = env.GetLayerProperties(2);
         ASSERT_TRUE(check_permutation({automatic_regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
     {
@@ -1633,25 +1489,19 @@
         InstWrapper inst{env.vulkan_functions};
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         ASSERT_TRUE(env.debug_log.find(std::string("loader_remove_layers_in_blacklist: Override layer is active and layer ") +
                                        manual_regular_layer_name +
                                        " is in the blacklist inside of it. Removing that layer from current layer list."));
         env.debug_log.clear();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        ASSERT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         ASSERT_TRUE(check_permutation({automatic_regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
 }
 
 TEST(OverrideMetaLayer, BasicOverridePaths) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
 
     const char* regular_layer_name = "VK_LAYER_TestLayer_1";
@@ -1662,15 +1512,13 @@
                                                             .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                             .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
                                              .get_manifest_str());
-    auto override_folder_location = fs::make_native(override_layer_folder.location().str());
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(regular_layer_name)
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_override_path(override_folder_location)),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                   .add_component_layer(regular_layer_name)
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_override_path(fs::make_native(override_layer_folder.location().str()))),
                            "meta_test_layer.json");
 
     InstWrapper inst{env.vulkan_functions};
@@ -1683,18 +1531,17 @@
 
 TEST(OverrideMetaLayer, BasicOverridePathsIgnoreOtherLayers) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
     fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
-    env.add_explicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(regular_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
-                           "regular_test_layer.json");
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(regular_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
+        "regular_test_layer.json");
 
     const char* special_layer_name = "VK_LAYER_TestLayer_1";
     override_layer_folder.write_manifest("regular_test_layer.json",
@@ -1704,15 +1551,13 @@
                                                             .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                             .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
                                              .get_manifest_str());
-    auto override_folder_location = fs::make_native(override_layer_folder.location().str());
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(special_layer_name)
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_override_path(override_folder_location)),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                   .add_component_layer(special_layer_name)
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_override_path(fs::make_native(override_layer_folder.location().str()))),
                            "meta_test_layer.json");
 
     InstWrapper inst{env.vulkan_functions};
@@ -1726,18 +1571,16 @@
 
 TEST(OverrideMetaLayer, OverridePathsInteractionWithVK_LAYER_PATH) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     // add explicit layer to VK_LAYER_PATH folder
     const char* env_var_layer_name = "VK_LAYER_env_var_set_path";
-    env.add_explicit_layer(TestLayerDetails{ManifestLayer{}
-                                                .set_file_format_version(ManifestVersion(1, 2, 0))
-                                                .add_layer(ManifestLayer::LayerDescription{}
-                                                               .set_name(env_var_layer_name)
-                                                               .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                                               .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
-                                            "regular_test_layer.json"}
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(env_var_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
+        "regular_test_layer.json"}
                                .set_discovery_type(ManifestDiscoveryType::env_var));
 
     // add layer to regular explicit layer folder
@@ -1749,16 +1592,16 @@
                                             "regular_test_layer.json"}
                                .set_discovery_type(ManifestDiscoveryType::override_folder));
 
-    env.add_implicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 2, 0))
-            .add_layer(ManifestLayer::LayerDescription{}
-                           .set_name(lunarg_meta_layer_name)
-                           .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                           .add_component_layer(regular_layer_name)
-                           .set_disable_environment("DisableMeIfYouCan")
-                           .add_override_path(env.get_folder(ManifestLocation::override_layer).location().str())),
-        "meta_test_layer.json");
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                   .add_component_layer(regular_layer_name)
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_override_path(env.get_folder(ManifestLocation::override_layer).location().str())),
+                           "meta_test_layer.json");
+
+    auto meta_layer_path = env.get_folder(ManifestLocation::override_layer).location();
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(1, 1, 0);
@@ -1766,26 +1609,28 @@
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
     inst.CheckCreate(VK_ERROR_LAYER_NOT_PRESENT);
     ASSERT_FALSE(env.debug_log.find(std::string("Insert instance layer \"") + env_var_layer_name));
+    ASSERT_TRUE(env.debug_log.find(
+        std::string("Ignoring VK_LAYER_PATH. The Override layer is active and has override paths set, which takes priority. "
+                    "VK_LAYER_PATH is set to ") +
+        env.env_var_vk_layer_paths.value()));
+    ASSERT_TRUE(env.debug_log.find("Override layer has override paths set to " + meta_layer_path.str()));
 
     env.layers.clear();
-    remove_env_var("VK_LAYER_PATH");
 }
 
 // Make sure that implicit layers not in the override paths aren't found by mistake
 TEST(OverrideMetaLayer, OverridePathsEnableImplicitLayerInDefaultPaths) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
 
     const char* implicit_layer_name = "VK_LAYER_ImplicitLayer";
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(implicit_layer_name)
-                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
-                           "implicit_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(implicit_layer_name)
+                                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
+        "implicit_test_layer.json");
 
     const char* regular_layer_name = "VK_LAYER_TestLayer_1";
     override_layer_folder.write_manifest("regular_test_layer.json",
@@ -1795,15 +1640,13 @@
                                                             .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                             .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
                                              .get_manifest_str());
-    auto override_folder_location = fs::make_native(override_layer_folder.location().str());
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layers({regular_layer_name, implicit_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_override_path(override_folder_location)),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                   .add_component_layers({regular_layer_name, implicit_layer_name})
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_override_path(fs::make_native(override_layer_folder.location().str()))),
                            "meta_test_layer.json");
 
     InstWrapper inst{env.vulkan_functions};
@@ -1818,8 +1661,7 @@
 
 TEST(OverrideMetaLayer, ManifestFileFormatVersionTooOld) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
 
     const char* regular_layer_name = "VK_LAYER_TestLayer_1";
@@ -1830,15 +1672,13 @@
                                                             .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                             .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
                                              .get_manifest_str());
-    auto override_folder_location = fs::make_native(override_layer_folder.location().str());
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 0, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(regular_layer_name)
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_override_path(override_folder_location)),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 0, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                   .add_component_layer(regular_layer_name)
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_override_path(fs::make_native(override_layer_folder.location().str()))),
                            "meta_test_layer.json");
 
     InstWrapper inst{env.vulkan_functions};
@@ -1853,49 +1693,32 @@
 // app_key contains test executable name, should activate the override layer
 TEST(OverrideMetaLayer, AppKeysDoesContainCurrentApplication) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 2, 0))
-            .add_layer(
-                ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_test_layer.json");
 
     std::string cur_path = test_platform_executable_path();
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .add_component_layers({regular_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_app_key(cur_path)),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .add_component_layers({regular_layer_name})
+                                                                         .set_disable_environment("DisableMeIfYouCan")
+                                                                         .add_app_key(cur_path)),
+        "meta_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 2U);
+        auto layer_props = env.GetLayerProperties(2);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
     {
         // instance
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(2U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        EXPECT_EQ(2U, count);
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
     }
 }
@@ -1903,68 +1726,307 @@
 // app_key contains random strings, should not activate the override layer
 TEST(OverrideMetaLayer, AppKeysDoesNotContainCurrentApplication) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 2, 0))
-            .add_layer(
-                ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_test_layer.json");
 
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .add_component_layers({regular_layer_name})
-                                              .set_disable_environment("DisableMeIfYouCan")
-                                              .add_app_keys({"/Hello", "Hi", "./../Uh-oh", "C:/Windows/Only"})),
+    env.add_implicit_layer(ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                               ManifestLayer::LayerDescription{}
+                                   .set_name(lunarg_meta_layer_name)
+                                   .add_component_layers({regular_layer_name})
+                                   .set_disable_environment("DisableMeIfYouCan")
+                                   .add_app_keys({"/Hello", "Hi", "./../Uh-oh", "C:/Windows/Only"})),
                            "meta_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 1U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 1U);
+        auto layer_props = env.GetLayerProperties(1);
         EXPECT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
     }
     {
         // instance
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(0U, count);
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
-        EXPECT_EQ(0U, count);
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
     }
 }
 
+TEST(OverrideMetaLayer, RunningWithElevatedPrivilegesFromSecureLocation) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
+
+    const char* regular_layer_name = "VK_LAYER_TestLayer_1";
+    override_layer_folder.write_manifest("regular_test_layer.json",
+                                         ManifestLayer{}
+                                             .add_layer(ManifestLayer::LayerDescription{}
+                                                            .set_name(regular_layer_name)
+                                                            .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                            .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
+                                             .get_manifest_str());
+    auto override_folder_location = fs::make_native(override_layer_folder.location().str());
+    env.add_implicit_layer(TestLayerDetails{ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                                                ManifestLayer::LayerDescription{}
+                                                    .set_name(lunarg_meta_layer_name)
+                                                    .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                    .add_component_layer(regular_layer_name)
+                                                    .set_disable_environment("DisableMeIfYouCan")
+                                                    .add_override_path(fs::make_native(override_layer_folder.location().str()))),
+                                            "meta_test_layer.json"});
+
+    {  // try with no elevated privileges
+        auto layer_props = env.GetLayerProperties(2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
+        env.debug_log.clear();
+    }
+
+    env.platform_shim->set_elevated_privilege(true);
+
+    {  // try with elevated privileges
+        auto layer_props = env.GetLayerProperties(2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, active_layer_props));
+    }
+}
+
+// Override layer should not be found and thus not loaded when running with elevated privileges
+TEST(OverrideMetaLayer, RunningWithElevatedPrivilegesFromUnsecureLocation) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    fs::FolderManager override_layer_folder{FRAMEWORK_BUILD_DIRECTORY, "override_layer_folder"};
+
+    const char* regular_layer_name = "VK_LAYER_TestLayer_1";
+    override_layer_folder.write_manifest("regular_test_layer.json",
+                                         ManifestLayer{}
+                                             .add_layer(ManifestLayer::LayerDescription{}
+                                                            .set_name(regular_layer_name)
+                                                            .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                            .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0)))
+                                             .get_manifest_str());
+    env.add_implicit_layer(TestLayerDetails{ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+                                                ManifestLayer::LayerDescription{}
+                                                    .set_name(lunarg_meta_layer_name)
+                                                    .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                    .add_component_layer(regular_layer_name)
+                                                    .set_disable_environment("DisableMeIfYouCan")
+                                                    .add_override_path(fs::make_native(override_layer_folder.location().str()))),
+                                            "meta_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::unsecured_generic));
+
+    {  // try with no elevated privileges
+        auto layer_props = env.GetLayerProperties(2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, layer_props));
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
+        env.debug_log.clear();
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        EXPECT_TRUE(check_permutation({regular_layer_name, lunarg_meta_layer_name}, active_layer_props));
+    }
+
+    env.platform_shim->set_elevated_privilege(true);
+
+    {  // try with no elevated privileges
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.set_api_version(1, 1, 0);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+
+// Makes sure explicit layers can't override pre-instance functions even if enabled by the override layer
+TEST(ExplicitLayers, OverridePreInstanceFunctions) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    const char* explicit_layer_name = "VK_LAYER_enabled_by_override";
+    const char* disable_env_var = "DISABLE_ME";
+
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(explicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceLayerProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceExtensionProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceVersion")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
+        "explicit_test_layer.json");
+
+    auto& layer = env.get_test_layer(0);
+    layer.set_reported_layer_props(34);
+    layer.set_reported_extension_props(22);
+    layer.set_reported_instance_version(VK_MAKE_API_VERSION(1, 0, 0, 1));
+
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .add_component_layers({explicit_layer_name})
+                                                                         .set_disable_environment(disable_env_var)),
+        "override_meta_layer.json");
+
+    uint32_t count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+    ASSERT_EQ(count, 2U);
+    count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+    ASSERT_EQ(count, 4U);
+
+    uint32_t version = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+    ASSERT_EQ(version, VK_HEADER_VERSION_COMPLETE);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name));
+    ASSERT_TRUE(string_eq(layers.at(1).layerName, lunarg_meta_layer_name));
+}
+
+TEST(ExplicitLayers, LayerSettingsPreInstanceFunctions) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    const char* explicit_layer_name = "VK_LAYER_enabled_by_override";
+
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(explicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceLayerProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceExtensionProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceVersion")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
+        "explicit_test_layer.json");
+
+    env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+        LoaderSettingsLayerConfiguration{}
+            .set_name(explicit_layer_name)
+            .set_control("on")
+            .set_path(env.get_shimmed_layer_manifest_path(0).str())
+            .set_treat_as_implicit_manifest(false)));
+    env.update_loader_settings(env.loader_settings);
+
+    auto& layer = env.get_test_layer(0);
+    layer.set_reported_layer_props(34);
+    layer.set_reported_extension_props(22);
+    layer.set_reported_instance_version(VK_MAKE_API_VERSION(1, 0, 0, 1));
+
+    uint32_t count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+    ASSERT_EQ(count, 1U);
+    count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+    ASSERT_EQ(count, 4U);
+
+    uint32_t version = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+    ASSERT_EQ(version, VK_HEADER_VERSION_COMPLETE);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name));
+}
+
+TEST(ExplicitLayers, ContainsPreInstanceFunctions) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    const char* explicit_layer_name = "VK_LAYER_enabled_by_override";
+
+    env.add_explicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(explicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceLayerProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceExtensionProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceVersion")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
+        "explicit_test_layer.json");
+
+    auto& layer = env.get_test_layer(0);
+    layer.set_reported_layer_props(34);
+    layer.set_reported_extension_props(22);
+    layer.set_reported_instance_version(VK_MAKE_API_VERSION(1, 0, 0, 1));
+
+    uint32_t count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+    ASSERT_EQ(count, 1U);
+    count = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+    ASSERT_EQ(count, 4U);
+
+    uint32_t version = 0;
+    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+    ASSERT_EQ(version, VK_HEADER_VERSION_COMPLETE);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_layer(explicit_layer_name);
+    inst.CheckCreate();
+
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name));
+}
+
 // This test makes sure that any layer calling GetPhysicalDeviceProperties2 inside of CreateInstance
 // succeeds and doesn't crash.
 TEST(LayerCreateInstance, GetPhysicalDeviceProperties2) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 1, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA))
+        .add_physical_device({})
+        .set_icd_api_version(VK_API_VERSION_1_1);
 
-    const char* regular_layer_name = "TestLayer";
+    const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(
-        ManifestLayer{}
-            .set_file_format_version(ManifestVersion(1, 1, 2))
-            .add_layer(
-                ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_test_layer.json");
 
-    auto& layer = env.get_test_layer(0);
-    layer.set_create_instance_callback([](TestLayer& layer) -> VkResult {
+    auto& layer_handle = env.get_test_layer(0);
+    layer_handle.set_create_instance_callback([](TestLayer& layer) -> VkResult {
         uint32_t phys_dev_count = 0;
         VkResult res = layer.instance_dispatch_table.EnumeratePhysicalDevices(layer.instance_handle, &phys_dev_count, nullptr);
         if (res != VK_SUCCESS || phys_dev_count > 1) {
@@ -1992,9 +2054,9 @@
 
 TEST(LayerCreateInstance, GetPhysicalDeviceProperties2KHR) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
-    env.get_test_icd().add_instance_extension({"VK_KHR_get_physical_device_properties2", 0});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA))
+        .add_physical_device({})
+        .add_instance_extension({"VK_KHR_get_physical_device_properties2", 0});
 
     const char* regular_layer_name = "VK_LAYER_TestLayer";
     env.add_explicit_layer(
@@ -2002,8 +2064,8 @@
             ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_test_layer.json");
 
-    auto& layer = env.get_test_layer(0);
-    layer.set_create_instance_callback([](TestLayer& layer) -> VkResult {
+    auto& layer_handle = env.get_test_layer(0);
+    layer_handle.set_create_instance_callback([](TestLayer& layer) -> VkResult {
         uint32_t phys_dev_count = 1;
         VkPhysicalDevice phys_dev{};
         layer.instance_dispatch_table.EnumeratePhysicalDevices(layer.instance_handle, &phys_dev_count, &phys_dev);
@@ -2023,32 +2085,52 @@
     inst.CheckCreate();
 }
 
+TEST(ExplicitLayers, MultipleLayersInSingleManifest) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* regular_layer_name_1 = "VK_LAYER_RegularLayer1";
+    const char* regular_layer_name_2 = "VK_LAYER_RegularLayer2";
+    const char* regular_layer_name_3 = "VK_LAYER_RegularLayer3";
+    env.add_explicit_layer(TestLayerDetails(
+        ManifestLayer{}
+            .set_file_format_version({1, 0, 1})
+            .add_layer(
+                ManifestLayer::LayerDescription{}.set_name(regular_layer_name_1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2))
+            .add_layer(
+                ManifestLayer::LayerDescription{}.set_name(regular_layer_name_2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2))
+            .add_layer(
+                ManifestLayer::LayerDescription{}.set_name(regular_layer_name_3).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "multi_layer_manifest.json"));
+
+    auto layer_props = env.GetLayerProperties(3);
+    ASSERT_TRUE(string_eq(regular_layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(regular_layer_name_2, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(regular_layer_name_3, layer_props[2].layerName));
+}
+
 TEST(ExplicitLayers, WrapObjects) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device("physical_device_0");
 
     const char* wrap_objects_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(ManifestLayer{}.add_layer(
                                ManifestLayer::LayerDescription{}.set_name(wrap_objects_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
                            "wrap_objects_layer.json");
 
-    const char* regular_layer_name_1 = "RegularLayer1";
+    const char* regular_layer_name_1 = "VK_LAYER_RegularLayer1";
     env.add_explicit_layer(
         ManifestLayer{}.add_layer(
             ManifestLayer::LayerDescription{}.set_name(regular_layer_name_1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_layer_1.json");
 
-    const char* regular_layer_name_2 = "RegularLayer2";
+    const char* regular_layer_name_2 = "VK_LAYER_RegularLayer2";
     env.add_explicit_layer(
         ManifestLayer{}.add_layer(
             ManifestLayer::LayerDescription{}.set_name(regular_layer_name_2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
         "regular_layer_2.json");
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
     {  // just the wrap layer
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.add_layer(wrap_objects_name);
@@ -2056,7 +2138,6 @@
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer first
@@ -2066,7 +2147,6 @@
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer last
@@ -2076,7 +2156,6 @@
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
     {  // wrap layer last
@@ -2086,110 +2165,426 @@
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_dev);
     }
 }
 
 TEST(ExplicitLayers, VkLayerPathEnvVar) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
-    { 
+    {
         // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
-        const char* regular_layer_name_1 = "RegularLayer1";
-        env.add_explicit_layer(
-        TestLayerDetails(
-            ManifestLayer{}.add_layer(
-                ManifestLayer::LayerDescription{}.set_name(regular_layer_name_1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
-            "regular_layer_1.json").set_discovery_type(ManifestDiscoveryType::env_var).set_is_dir(false));
+        const char* regular_layer_name_1 = "VK_LAYER_RegularLayer1";
+        env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(regular_layer_name_1)
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                "regular_layer_1.json")
+                                   .set_discovery_type(ManifestDiscoveryType::env_var)
+                                   .set_is_dir(false));
 
         InstWrapper inst(env.vulkan_functions);
         inst.create_info.add_layer(regular_layer_name_1);
         inst.CheckCreate(VK_SUCCESS);
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(count, 1U);
-
-        VkLayerProperties layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_TRUE(string_eq(layer_props.layerName, regular_layer_name_1));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name_1));
     }
-    { 
+    {
         // verify layers load successfully when setting VK_LAYER_PATH to multiple full filepaths
-        const char* regular_layer_name_1 = "RegularLayer1";
-        env.add_explicit_layer(
-            TestLayerDetails(
-                ManifestLayer{}.add_layer(
-                    ManifestLayer::LayerDescription{}.set_name(regular_layer_name_1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
-                "regular_layer_1.json").set_discovery_type(ManifestDiscoveryType::env_var).set_is_dir(false));
+        const char* regular_layer_name_1 = "VK_LAYER_RegularLayer1";
+        env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(regular_layer_name_1)
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                "regular_layer_1.json")
+                                   .set_discovery_type(ManifestDiscoveryType::env_var)
+                                   .set_is_dir(false));
 
-        const char* regular_layer_name_2 = "RegularLayer2";
-        env.add_explicit_layer(
-            TestLayerDetails(
-                ManifestLayer{}.add_layer(
-                    ManifestLayer::LayerDescription{}.set_name(regular_layer_name_2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
-                "regular_layer_2.json").set_discovery_type(ManifestDiscoveryType::env_var).set_is_dir(false));
+        const char* regular_layer_name_2 = "VK_LAYER_RegularLayer2";
+        env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(regular_layer_name_2)
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                "regular_layer_2.json")
+                                   .set_discovery_type(ManifestDiscoveryType::env_var)
+                                   .set_is_dir(false));
 
         InstWrapper inst(env.vulkan_functions);
         inst.create_info.add_layer(regular_layer_name_1);
         inst.create_info.add_layer(regular_layer_name_2);
         inst.CheckCreate(VK_SUCCESS);
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         EXPECT_TRUE(check_permutation({regular_layer_name_1, regular_layer_name_2}, layer_props));
     }
-    { 
+    {
         // verify layers load successfully when setting VK_LAYER_PATH to a directory
-        const char* regular_layer_name_1 = "RegularLayer1";
-        env.add_explicit_layer(
-            TestLayerDetails(
-                ManifestLayer{}.add_layer(
-                    ManifestLayer::LayerDescription{}.set_name(regular_layer_name_1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
-                "regular_layer_1.json").set_discovery_type(ManifestDiscoveryType::env_var));
+        const char* regular_layer_name_1 = "VK_LAYER_RegularLayer1";
+        env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(regular_layer_name_1)
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                "regular_layer_1.json")
+                                   .set_discovery_type(ManifestDiscoveryType::env_var));
 
-        const char* regular_layer_name_2 = "RegularLayer2";
-        env.add_explicit_layer(
-            TestLayerDetails(
-                ManifestLayer{}.add_layer(
-                    ManifestLayer::LayerDescription{}.set_name(regular_layer_name_2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
-                "regular_layer_2.json").set_discovery_type(ManifestDiscoveryType::env_var));
+        const char* regular_layer_name_2 = "VK_LAYER_RegularLayer2";
+        env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(regular_layer_name_2)
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                "regular_layer_2.json")
+                                   .set_discovery_type(ManifestDiscoveryType::env_var));
 
         InstWrapper inst(env.vulkan_functions);
         inst.create_info.add_layer(regular_layer_name_1);
         inst.create_info.add_layer(regular_layer_name_2);
         inst.CheckCreate(VK_SUCCESS);
-        auto phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(count, 2U);
-
-        std::array<VkLayerProperties, 2> layer_props;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, layer_props.data());
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
         EXPECT_TRUE(check_permutation({regular_layer_name_1, regular_layer_name_2}, layer_props));
     }
 }
 
+TEST(ExplicitLayers, DuplicateLayersInVK_LAYER_PATH) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* same_layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json")
+                               // use override folder as just a folder and manually set the VK_LAYER_PATH env-var to it
+                               .set_discovery_type(ManifestDiscoveryType::override_folder)
+                               .set_is_dir(true));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+    layer1.set_make_spurious_log_in_create_instance("actually_layer_1");
+    env.env_var_vk_layer_paths.add_to_list(env.get_folder(ManifestLocation::override_layer).location().str());
+
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json")
+                               .set_discovery_type(ManifestDiscoveryType::env_var)
+                               .set_is_dir(true));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+    layer2.set_make_spurious_log_in_create_instance("actually_layer_2");
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(same_layer_name_1);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+
+    {
+        EnvVarWrapper layers_enable_env_var{"VK_INSTANCE_LAYERS", same_layer_name_1};
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+
+    {
+        EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE", same_layer_name_1};
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+}
+
+TEST(ExplicitLayers, DuplicateLayersInVK_ADD_LAYER_PATH) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* same_layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json")
+                               // use override folder as just a folder and manually set the VK_ADD_LAYER_PATH env-var to it
+                               .set_discovery_type(ManifestDiscoveryType::override_folder)
+                               .set_is_dir(true));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+    layer1.set_make_spurious_log_in_create_instance("actually_layer_1");
+    env.add_env_var_vk_layer_paths.add_to_list(env.get_folder(ManifestLocation::override_layer).location().str());
+
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(same_layer_name_1)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json")
+                               .set_discovery_type(ManifestDiscoveryType::add_env_var)
+                               .set_is_dir(true));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+    layer2.set_make_spurious_log_in_create_instance("actually_layer_2");
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(same_layer_name_1, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(same_layer_name_1);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+
+    {
+        EnvVarWrapper layers_enable_env_var{"VK_INSTANCE_LAYERS", same_layer_name_1};
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+
+    {
+        EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE", same_layer_name_1};
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(same_layer_name_1, enabled_layer_props.at(0).layerName));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props.at(0).description));
+        ASSERT_TRUE(env.debug_log.find("actually_layer_1"));
+        ASSERT_FALSE(env.debug_log.find("actually_layer_2"));
+    }
+    env.debug_log.clear();
+}
+
+TEST(ExplicitLayers, CorrectOrderOfEnvVarEnabledLayers) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json")
+                               .set_discovery_type(ManifestDiscoveryType::env_var)
+                               .set_is_dir(true));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+
+    const char* layer_name_2 = "VK_LAYER_RegularLayer2";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_2)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_2.json")
+                               .set_discovery_type(ManifestDiscoveryType::env_var)
+                               .set_is_dir(true));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(layer_name_2, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+    // 1 then 2
+    {
+        EnvVarWrapper inst_layers_env_var{"VK_INSTANCE_LAYERS"};
+        inst_layers_env_var.add_to_list(layer_name_1);
+        inst_layers_env_var.add_to_list(layer_name_2);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        // Expect the env-var layer to be first
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[1].layerName));
+    }
+    // 2 then 1
+    {
+        EnvVarWrapper inst_layers_env_var{"VK_INSTANCE_LAYERS"};
+        inst_layers_env_var.add_to_list(layer_name_2);
+        inst_layers_env_var.add_to_list(layer_name_1);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        // Expect the env-var layer to be first
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[1].layerName));
+    }
+}
+
+TEST(ExplicitLayers, CorrectOrderOfEnvVarEnabledLayersFromSystemLocations) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json"));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+
+    const char* layer_name_2 = "VK_LAYER_RegularLayer2";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_2)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_2.json"));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(layer_name_2, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+    // 1 then 2
+    {
+        EnvVarWrapper inst_layers_env_var{"VK_INSTANCE_LAYERS"};
+        inst_layers_env_var.add_to_list(layer_name_1);
+        inst_layers_env_var.add_to_list(layer_name_2);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[1].layerName));
+    }
+    // 2 then 1
+    {
+        EnvVarWrapper inst_layers_env_var{"VK_INSTANCE_LAYERS"};
+        inst_layers_env_var.add_to_list(layer_name_2);
+        inst_layers_env_var.add_to_list(layer_name_1);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        // Expect the env-var layer to be first
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[1].layerName));
+    }
+}
+
+TEST(ExplicitLayers, CorrectOrderOfApplicationEnabledLayers) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    // verify layer loads successfully when setting VK_LAYER_PATH to a full filepath
+    const char* layer_name_1 = "VK_LAYER_RegularLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_1)
+                                                                          .set_description("actually_layer_1")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_1.json"));
+    auto& layer1 = env.get_test_layer(0);
+    layer1.set_description("actually_layer_1");
+    layer1.set_make_spurious_log_in_create_instance("actually_layer_1");
+
+    const char* layer_name_2 = "VK_LAYER_RegularLayer2";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name_2)
+                                                                          .set_description("actually_layer_2")
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "regular_layer_2.json"));
+    auto& layer2 = env.get_test_layer(1);
+    layer2.set_description("actually_layer_2");
+    layer2.set_make_spurious_log_in_create_instance("actually_layer_2");
+
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(layer_name_1, layer_props[0].layerName));
+    ASSERT_TRUE(string_eq(layer_name_2, layer_props[1].layerName));
+    ASSERT_TRUE(string_eq(layer1.description.c_str(), layer_props[0].description));
+    ASSERT_TRUE(string_eq(layer2.description.c_str(), layer_props[1].description));
+
+    // 1 then 2
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name_1);
+        inst.create_info.add_layer(layer_name_2);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        // Expect the env-var layer to be first
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[1].layerName));
+    }
+    // 2 then 1
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name_2);
+        inst.create_info.add_layer(layer_name_1);
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        // Expect the env-var layer to be first
+        auto enabled_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layer2.description.c_str(), enabled_layer_props[0].description));
+        ASSERT_TRUE(string_eq(layer1.description.c_str(), enabled_layer_props[1].description));
+        ASSERT_TRUE(string_eq(layer_name_2, enabled_layer_props[0].layerName));
+        ASSERT_TRUE(string_eq(layer_name_1, enabled_layer_props[1].layerName));
+    }
+}
+
 TEST(LayerExtensions, ImplicitNoAdditionalInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
@@ -2198,26 +2593,22 @@
                                                          .set_enable_environment(enable_env_var)),
                            "implicit_wrap_layer_no_ext.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
     // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 3U);  // debug_utils, debug_report, and portability enumeration
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     // Make sure the extensions that are implemented only in the test layers is not present.
-    ASSERT_FALSE(contains(extension_props, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-    ASSERT_FALSE(contains(extension_props, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
+    ASSERT_FALSE(contains(extensions, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
+    ASSERT_FALSE(contains(extensions, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -2229,17 +2620,11 @@
 
 TEST(LayerExtensions, ImplicitDirDispModeInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(
         ManifestLayer{}.add_layer(
@@ -2251,26 +2636,22 @@
                 .add_instance_extension({VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, 1, {"vkReleaseDisplayEXT"}})),
         "implicit_wrap_layer_dir_disp_mode.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 4U);  // the instance extension, debug_utils, debug_report, and portability enumeration
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 4U);
+    auto extensions = env.GetInstanceExtensions(5);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
 
     // Make sure the extensions that are implemented only in the test layers is not present.
-    ASSERT_TRUE(contains(extension_props, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-    ASSERT_FALSE(contains(extension_props, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
+    ASSERT_FALSE(contains(extensions, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_extension(VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME);
@@ -2283,17 +2664,11 @@
 
 TEST(LayerExtensions, ImplicitDispSurfCountInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
@@ -2305,26 +2680,19 @@
                                                                                   {"vkGetPhysicalDeviceSurfaceCapabilities2EXT"}})),
                            "implicit_wrap_layer_disp_surf_count.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 4U);  // the instance extension, debug_utils, debug_report, and portability enumeration
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 4U);
-
-    // Make sure the extensions that are implemented only in the test layers is not present.
-    ASSERT_FALSE(contains(extension_props, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-    ASSERT_TRUE(contains(extension_props, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
+    auto extensions = env.GetInstanceExtensions(5);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_extension(VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME);
@@ -2337,17 +2705,11 @@
 
 TEST(LayerExtensions, ImplicitBothInstanceExtensions) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(
         ManifestLayer{}.add_layer(
@@ -2361,26 +2723,20 @@
                     {VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME, 1, {"vkGetPhysicalDeviceSurfaceCapabilities2EXT"}})),
         "implicit_wrap_layer_both_inst.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 5U);  // the two instance extension plus debug_utils, debug_report, portability enumeration
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 5U);
-
-    // Make sure the extensions that are implemented only in the test layers is not present.
-    ASSERT_TRUE(contains(extension_props, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-    ASSERT_TRUE(contains(extension_props, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
+    auto extensions = env.GetInstanceExtensions(6);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(5).extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_extension(VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)
@@ -2394,12 +2750,7 @@
 
 TEST(LayerExtensions, ExplicitNoAdditionalInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2407,31 +2758,17 @@
             ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
         "explicit_wrap_layer_no_ext.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 3U);  // debug utils, debug report, portability enumeration
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 3U);
-
-    // Make sure the extensions are not present
-    for (const auto& ext : extension_props) {
-        ASSERT_FALSE(string_eq(ext.extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-        ASSERT_FALSE(string_eq(ext.extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
-    }
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 0U);
+    ASSERT_NO_FATAL_FAILURE(env.GetInstanceExtensions(0, explicit_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -2443,12 +2780,7 @@
 
 TEST(LayerExtensions, ExplicitDirDispModeInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2459,43 +2791,18 @@
                 .add_instance_extension({VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME, 1, {"vkReleaseDisplayEXT"}})),
         "explicit_wrap_layer_dir_disp_mode.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 3U);  // debug utils, debug report, portability enumeration
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-    ASSERT_EQ(extension_count, 3U);
-    // Make sure the extensions are not present
-    for (const auto& ext : extension_props) {
-        ASSERT_FALSE(string_eq(ext.extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-        ASSERT_FALSE(string_eq(ext.extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
-    }
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count,
-                                                                                      extension_props.data()));
-
-    // Make sure the extensions still aren't present in this layer
-    bool found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)) {
-            found = true;
-        }
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
-    }
-    ASSERT_EQ(true, found);
+    auto layer_extensions = env.GetInstanceExtensions(1, explicit_layer_name);
+    EXPECT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
 
     InstWrapper inst1{env.vulkan_functions};
     inst1.create_info.add_extension(VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME);
@@ -2516,12 +2823,7 @@
 
 TEST(LayerExtensions, ExplicitDispSurfCountInstanceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -2532,44 +2834,18 @@
                                                                                   {"vkGetPhysicalDeviceSurfaceCapabilities2EXT"}})),
                            "explicit_wrap_layer_disp_surf_count.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
-        }
-    }
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count,
-                                                                                      extension_props.data()));
-
-    // Make sure the extensions still aren't present in this layer
-    bool found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) {
-            found = true;
-        }
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-    }
-    ASSERT_EQ(true, found);
+    auto layer_extensions = env.GetInstanceExtensions(1, explicit_layer_name);
+    EXPECT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst1{env.vulkan_functions};
     inst1.create_info.add_extension(VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME);
@@ -2590,12 +2866,7 @@
 
 TEST(LayerExtensions, ExplicitBothInstanceExtensions) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2608,48 +2879,19 @@
                     {VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME, 1, {"vkGetPhysicalDeviceSurfaceCapabilities2EXT"}})),
         "explicit_wrap_layer_both_inst.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
-        }
-    }
-
-    // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 2U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(explicit_layer_name, &extension_count,
-                                                                                      extension_props.data()));
+    auto extensions = env.GetInstanceExtensions(4);
+    EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
 
     // Make sure the extensions still aren't present in this layer
-    bool found[2] = {false, false};
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)) {
-            found[0] = true;
-        }
-        if (!strcmp(extension_props[ext].extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) {
-            found[1] = true;
-        }
-    }
-    for (uint32_t ext = 0; ext < 2; ++ext) {
-        ASSERT_EQ(true, found[ext]);
-    }
+    auto layer_extensions = env.GetInstanceExtensions(2, explicit_layer_name);
+    EXPECT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME));
+    EXPECT_TRUE(string_eq(layer_extensions.at(1).extensionName, VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME));
 
     InstWrapper inst1{env.vulkan_functions};
     inst1.create_info.add_extension(VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME)
@@ -2670,8 +2912,7 @@
     // Make sure only the appropriate function pointers are NULL as well
     handle_assert_has_value(env.vulkan_functions.vkGetInstanceProcAddr(inst2.inst, "vkReleaseDisplayEXT"));
     PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT pfnGetPhysicalDeviceSurfaceCapabilities2EXT =
-        reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT>(
-            env.vulkan_functions.vkGetInstanceProcAddr(inst2.inst, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"));
+        inst2.load("vkGetPhysicalDeviceSurfaceCapabilities2EXT");
     handle_assert_has_value(pfnGetPhysicalDeviceSurfaceCapabilities2EXT);
 
     VkSurfaceCapabilities2EXT surf_caps{VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT};
@@ -2685,12 +2926,7 @@
 
 TEST(LayerExtensions, ImplicitNoAdditionalDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
@@ -2703,57 +2939,34 @@
                                                          .set_enable_environment(enable_env_var)),
                            "implicit_wrap_layer_no_ext.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
-    EnvVarCleaner enable_cleaner(enable_env_var);
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                        extension_props.data()));
-
-        // Make sure the extensions that are implemented only in the test layers is not present.
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateDeviceExtensions(phys_dev, 0));
 
     // Device functions queried using vkGetInstanceProcAddr should be non-NULL since this could be available for any attached
     // physical device.
-    PFN_vkTrimCommandPoolKHR pfn_vkTrimCommandPool =
-        reinterpret_cast<PFN_vkTrimCommandPoolKHR>(inst->vkGetInstanceProcAddr(inst.inst, "vkTrimCommandPoolKHR"));
-    PFN_vkGetSwapchainStatusKHR pfn_vkGetSwapchainStatus =
-        reinterpret_cast<PFN_vkGetSwapchainStatusKHR>(inst->vkGetInstanceProcAddr(inst.inst, "vkGetSwapchainStatusKHR"));
-    PFN_vkSetDeviceMemoryPriorityEXT pfn_vkSetDeviceMemoryPriority =
-        reinterpret_cast<PFN_vkSetDeviceMemoryPriorityEXT>(inst->vkGetInstanceProcAddr(inst.inst, "vkSetDeviceMemoryPriorityEXT"));
+    PFN_vkTrimCommandPoolKHR pfn_vkTrimCommandPool = inst.load("vkTrimCommandPoolKHR");
+    PFN_vkGetSwapchainStatusKHR pfn_vkGetSwapchainStatus = inst.load("vkGetSwapchainStatusKHR");
+    PFN_vkSetDeviceMemoryPriorityEXT pfn_vkSetDeviceMemoryPriority = inst.load("vkSetDeviceMemoryPriorityEXT");
     handle_assert_has_value(pfn_vkTrimCommandPool);
     handle_assert_has_value(pfn_vkGetSwapchainStatus);
     handle_assert_has_value(pfn_vkSetDeviceMemoryPriority);
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
     // Query again after create device to make sure the value returned by vkGetInstanceProcAddr did not change
-    PFN_vkTrimCommandPoolKHR pfn_vkTrimCommandPool2 =
-        reinterpret_cast<PFN_vkTrimCommandPoolKHR>(inst->vkGetInstanceProcAddr(inst.inst, "vkTrimCommandPoolKHR"));
-    PFN_vkGetSwapchainStatusKHR pfn_vkGetSwapchainStatus2 =
-        reinterpret_cast<PFN_vkGetSwapchainStatusKHR>(inst->vkGetInstanceProcAddr(inst.inst, "vkGetSwapchainStatusKHR"));
-    PFN_vkSetDeviceMemoryPriorityEXT pfn_vkSetDeviceMemoryPriority2 =
-        reinterpret_cast<PFN_vkSetDeviceMemoryPriorityEXT>(inst->vkGetInstanceProcAddr(inst.inst, "vkSetDeviceMemoryPriorityEXT"));
+    PFN_vkTrimCommandPoolKHR pfn_vkTrimCommandPool2 = inst.load("vkTrimCommandPoolKHR");
+    PFN_vkGetSwapchainStatusKHR pfn_vkGetSwapchainStatus2 = inst.load("vkGetSwapchainStatusKHR");
+    PFN_vkSetDeviceMemoryPriorityEXT pfn_vkSetDeviceMemoryPriority2 = inst.load("vkSetDeviceMemoryPriorityEXT");
     ASSERT_EQ(pfn_vkTrimCommandPool, pfn_vkTrimCommandPool2);
     ASSERT_EQ(pfn_vkGetSwapchainStatus, pfn_vkGetSwapchainStatus2);
     ASSERT_EQ(pfn_vkSetDeviceMemoryPriority, pfn_vkSetDeviceMemoryPriority2);
@@ -2771,17 +2984,11 @@
 
 TEST(LayerExtensions, ImplicitMaintenanceDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
@@ -2790,38 +2997,21 @@
                                                          .set_enable_environment(enable_env_var)),
                            "implicit_wrap_layer_maint.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) {
-            found = true;
-        }
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-    }
-    ASSERT_EQ(true, found);
+    auto device_extensions = inst.EnumerateDeviceExtensions(phys_dev, 1);
+    ASSERT_TRUE(string_eq(device_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -2831,17 +3021,11 @@
 
 TEST(LayerExtensions, ImplicitPresentImageDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
@@ -2850,39 +3034,21 @@
                                                          .set_enable_environment(enable_env_var)),
                            "implicit_wrap_layer_pres.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            found = true;
-        }
-    }
-    ASSERT_EQ(true, found);
+    auto device_extensions = inst.EnumerateDeviceExtensions(phys_dev, 1);
+    ASSERT_TRUE(string_eq(device_extensions.at(0).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -2892,17 +3058,11 @@
 
 TEST(LayerExtensions, ImplicitBothDeviceExtensions) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     const char* enable_env_var = "ENABLE_ME";
     const char* disable_env_var = "DISABLE_ME";
-    EnvVarCleaner enable_cleaner(enable_env_var);
 
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name(implicit_layer_name)
@@ -2911,44 +3071,22 @@
                                                          .set_enable_environment(enable_env_var)),
                            "implicit_wrap_layer_both_dev.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
 
-    // // set enable env-var, layer should load
-    set_env_var(enable_env_var, "1");
+    // set enable env-var, layer should load
+    EnvVarWrapper wrap_enable_env_var{enable_env_var, "1"};
     CheckLogForLayerString(env, implicit_layer_name, true);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 2U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found[2] = {false, false};
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) {
-            found[0] = true;
-        }
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            found[1] = true;
-        }
-    }
-    for (uint32_t ext = 0; ext < 2; ++ext) {
-        ASSERT_EQ(true, found[ext]);
-    }
+    auto device_extensions = inst.EnumerateDeviceExtensions(phys_dev, 2);
+    ASSERT_TRUE(string_eq(device_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
+    ASSERT_TRUE(string_eq(device_extensions.at(1).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -2958,12 +3096,7 @@
 
 TEST(LayerExtensions, ExplicitNoAdditionalDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -2971,49 +3104,18 @@
             ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_WRAP_OBJECTS)),
         "explicit_wrap_layer_no_ext.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(explicit_layer_name);
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                        extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
-
-    // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name,
-                                                                                        &extension_count, extension_props.data()));
-
-        // Make sure the extensions still aren't present in this layer
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateDeviceExtensions(phys_dev, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateLayerDeviceExtensions(phys_dev, explicit_layer_name, 0));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev.CheckCreate(phys_dev);
 
     // Make sure all the function pointers are NULL as well
@@ -3024,12 +3126,7 @@
 
 TEST(LayerExtensions, ExplicitMaintenanceDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3040,52 +3137,20 @@
                                       .add_device_extension({VK_KHR_MAINTENANCE1_EXTENSION_NAME, 1, {"vkTrimCommandPoolKHR"}})),
         "explicit_wrap_layer_maint.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(explicit_layer_name);
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                        extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
-
-    // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found = true;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) {
-            found = true;
-        }
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-    }
-    ASSERT_EQ(true, found);
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateDeviceExtensions(phys_dev, 0));
+    auto layer_extensions = inst.EnumerateLayerDeviceExtensions(phys_dev, explicit_layer_name, 1);
+    ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3095,12 +3160,7 @@
 
 TEST(LayerExtensions, ExplicitPresentImageDeviceExtension) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3112,53 +3172,20 @@
                 .add_device_extension({VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, 1, {"vkGetSwapchainStatusKHR"}})),
         "explicit_wrap_layer_pres.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(explicit_layer_name);
     inst.CheckCreate();
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                        extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
-
-    // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 1U);
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            found = true;
-        }
-    }
-    ASSERT_EQ(true, found);
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateDeviceExtensions(phys_dev, 0));
+    auto layer_extensions = inst.EnumerateLayerDeviceExtensions(phys_dev, explicit_layer_name, 1);
+    ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
@@ -3168,12 +3195,7 @@
 
 TEST(LayerExtensions, ExplicitBothDeviceExtensions) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3186,9 +3208,8 @@
                 .add_device_extension({VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME, 1, {"vkGetSwapchainStatusKHR"}})),
         "explicit_wrap_layer_both_dev.json");
 
-    uint32_t count = 0;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
-    ASSERT_EQ(count, 1U);
+    auto layers = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layers[0].layerName, explicit_layer_name));
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_layer(explicit_layer_name);
@@ -3196,58 +3217,20 @@
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
     handle_assert_has_value(phys_dev);
 
-    uint32_t extension_count = 0;
-    std::vector<VkExtensionProperties> extension_props;
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count, nullptr));
-    if (extension_count > 0) {
-        extension_props.resize(extension_count);
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, nullptr, &extension_count,
-                                                                                        extension_props.data()));
-
-        // Make sure the extensions are not present
-        for (uint32_t ext = 0; ext < extension_count; ++ext) {
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
-            ASSERT_NE(0, strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
-        }
-    }
-
-    // Now query by layer name.
-    extension_count = 0;
-    extension_props.clear();
-    ASSERT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count, nullptr));
-    ASSERT_EQ(extension_count, 2U);  // debug_utils, and debug_report
-    extension_props.resize(extension_count);
-    ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev, explicit_layer_name, &extension_count,
-                                                                                    extension_props.data()));
-
-    // Make sure only the one extension implemented by the enabled implicit layer is present.
-    bool found[2] = {false, false};
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) {
-            found[0] = true;
-        }
-        if (!strcmp(extension_props[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            found[1] = true;
-        }
-    }
-    for (uint32_t ext = 0; ext < 2; ++ext) {
-        ASSERT_EQ(true, found[ext]);
-    }
+    ASSERT_NO_FATAL_FAILURE(inst.EnumerateDeviceExtensions(phys_dev, 0));
+    auto layer_extensions = inst.EnumerateLayerDeviceExtensions(phys_dev, explicit_layer_name, 2);
+    ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
+    ASSERT_TRUE(string_eq(layer_extensions.at(1).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME).add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev.CheckCreate(phys_dev);
 
     // Make sure only the appropriate function pointers are NULL as well
     handle_assert_has_value(dev->vkGetDeviceProcAddr(dev.dev, "vkTrimCommandPoolKHR"));
 
-    PFN_vkGetSwapchainStatusKHR gipa_pfnGetSwapchainStatusKHR =
-        reinterpret_cast<PFN_vkGetSwapchainStatusKHR>(inst->vkGetInstanceProcAddr(inst.inst, "vkGetSwapchainStatusKHR"));
-    PFN_vkGetSwapchainStatusKHR gdpa_pfnGetSwapchainStatusKHR =
-        reinterpret_cast<PFN_vkGetSwapchainStatusKHR>(dev->vkGetDeviceProcAddr(dev.dev, "vkGetSwapchainStatusKHR"));
+    PFN_vkGetSwapchainStatusKHR gipa_pfnGetSwapchainStatusKHR = inst.load("vkGetSwapchainStatusKHR");
+    PFN_vkGetSwapchainStatusKHR gdpa_pfnGetSwapchainStatusKHR = dev.load("vkGetSwapchainStatusKHR");
     handle_assert_has_value(gipa_pfnGetSwapchainStatusKHR);
     handle_assert_has_value(gdpa_pfnGetSwapchainStatusKHR);
 
@@ -3258,12 +3241,10 @@
 
 TEST(TestLayers, ExplicitlyEnableImplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    uint32_t api_version = VK_API_VERSION_1_2;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, api_version))
+        .set_icd_api_version(api_version)
+        .add_physical_device(PhysicalDevice{}.set_api_version(api_version).finish());
 
     const char* regular_layer_name = "VK_LAYER_TestLayer1";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -3277,40 +3258,24 @@
         inst.create_info.add_layer(regular_layer_name);
         inst.create_info.set_api_version(1, 1, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
     {  // 1.2 instance
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.add_layer(regular_layer_name);
         inst.create_info.set_api_version(1, 2, 0);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        ASSERT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        ASSERT_EQ(1U, count);
+        inst.GetActiveLayers(inst.GetPhysDev(), 1);
     }
 }
 
 TEST(TestLayers, NewerInstanceVersionThanImplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    uint32_t api_version = VK_API_VERSION_1_2;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, api_version))
+        .set_icd_api_version(api_version)
+        .add_physical_device(PhysicalDevice{}.set_api_version(api_version).finish());
 
     const char* regular_layer_name = "VK_LAYER_TestLayer1";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -3320,13 +3285,7 @@
                                                          .set_disable_environment("DisableMeIfYouCan")),
                            "regular_test_layer.json");
     {  // global functions
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 1U);
-
-        std::array<VkLayerProperties, 1> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 1U);
+        auto layer_props = env.GetLayerProperties(1);
         EXPECT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
     }
     {  // 1.1 instance - should find the implicit layer
@@ -3336,15 +3295,8 @@
         inst.CheckCreate();
         EXPECT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
         env.debug_log.clear();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
     {  // 1.2 instance -- instance layer should be found
         InstWrapper inst{env.vulkan_functions};
@@ -3354,25 +3306,17 @@
         EXPECT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + regular_layer_name));
         env.debug_log.clear();
 
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
 }
 
 TEST(TestLayers, ImplicitLayerPre10APIVersion) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    uint32_t api_version = VK_API_VERSION_1_2;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, api_version))
+        .set_icd_api_version(api_version)
+        .add_physical_device(PhysicalDevice{}.set_api_version(api_version).finish());
 
     const char* regular_layer_name = "VK_LAYER_TestLayer1";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -3382,14 +3326,7 @@
                                                          .set_disable_environment("DisableMeIfYouCan")),
                            "regular_test_layer.json");
     {  // global functions
-
-        uint32_t layer_count = 0;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr));
-        EXPECT_EQ(layer_count, 1U);
-
-        std::array<VkLayerProperties, 1> layer_props;
-        EXPECT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()));
-        EXPECT_EQ(layer_count, 1U);
+        auto layer_props = env.GetLayerProperties(1);
         EXPECT_TRUE(string_eq(layer_props[0].layerName, regular_layer_name));
     }
     {  // 1.0 instance
@@ -3399,15 +3336,8 @@
         FillDebugUtilsCreateDetails(inst.create_info, log);
         inst.CheckCreate();
         EXPECT_TRUE(log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
     {  // 1.1 instance
         DebugUtilsLogger log;
@@ -3416,14 +3346,8 @@
         FillDebugUtilsCreateDetails(inst.create_info, log);
         inst.CheckCreate();
         EXPECT_TRUE(log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
     {  // 1.2 instance
         DebugUtilsLogger log;
@@ -3431,32 +3355,19 @@
         inst.create_info.set_api_version(1, 2, 0);
         FillDebugUtilsCreateDetails(inst.create_info, log);
         inst.CheckCreate();
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
         EXPECT_TRUE(log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
-    {  // application doesn't state its API version
+    {  // application sets its API version to 0
         DebugUtilsLogger log;
         InstWrapper inst{env.vulkan_functions};
-        inst.create_info.set_fill_in_application_info(false);
+        inst.create_info.set_api_version(0);
         FillDebugUtilsCreateDetails(inst.create_info, log);
         inst.CheckCreate();
         EXPECT_TRUE(log.find(std::string("Insert instance layer \"") + regular_layer_name));
-        VkPhysicalDevice phys_dev = inst.GetPhysDev();
-
-        uint32_t count = 0;
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, nullptr);
-        EXPECT_EQ(1U, count);
-        VkLayerProperties layer_props{};
-        env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &count, &layer_props);
-        EXPECT_EQ(1U, count);
-        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.layerName));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(regular_layer_name, layer_props.at(0).layerName));
     }
 }
 
@@ -3464,12 +3375,10 @@
 // it is set with VK_INSTANCE_LAYERS
 TEST(TestLayers, InstEnvironEnableExplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    uint32_t api_version = VK_API_VERSION_1_2;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, api_version))
+        .set_icd_api_version(api_version)
+        .add_physical_device(PhysicalDevice{}.set_api_version(api_version).finish());
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -3488,21 +3397,10 @@
     inst1.CheckCreate();
     VkPhysicalDevice phys_dev1 = inst1.GetPhysDev();
 
-    // Make sure the extensions in the layer aren't present
-    uint32_t extension_count = 40;
-    std::array<VkExtensionProperties, 40> extensions;
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev1, nullptr, &extension_count, extensions.data()));
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (string_eq(extensions[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME) ||
-            string_eq(extensions[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            FAIL() << "Extension should not be present";
-        }
-    }
+    ASSERT_NO_FATAL_FAILURE(inst1.EnumerateDeviceExtensions(phys_dev1, 0));
 
     // Create a device and query the function pointers
     DeviceWrapper dev1{inst1};
-    dev1.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev1.CheckCreate(phys_dev1);
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolBefore = dev1.load("vkTrimCommandPoolKHR");
     PFN_vkGetSwapchainStatusKHR pfn_GetSwapchainStatusBefore = dev1.load("vkGetSwapchainStatusKHR");
@@ -3510,8 +3408,7 @@
     handle_assert_null(pfn_GetSwapchainStatusBefore);
 
     // Now setup the instance layer
-    set_env_var("VK_INSTANCE_LAYERS", explicit_layer_name);
-    EnvVarCleaner instance_layers_cleaner("VK_INSTANCE_LAYERS");
+    EnvVarWrapper instance_layers_env_var{"VK_INSTANCE_LAYERS", explicit_layer_name};
 
     // Now, test an instance/device with the layer forced on.  The extensions should be present and
     // the function pointers should be valid.
@@ -3519,27 +3416,13 @@
     inst2.CheckCreate();
     VkPhysicalDevice phys_dev2 = inst2.GetPhysDev();
 
-    // Make sure the extensions in the layer are present
-    extension_count = 40;
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev2, nullptr, &extension_count, extensions.data()));
-    bool maint_found = false;
-    bool pres_found = false;
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (string_eq(extensions[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME)) {
-            maint_found = true;
-        }
-        if (string_eq(extensions[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            pres_found = true;
-        }
-    }
-    ASSERT_EQ(true, maint_found);
-    ASSERT_EQ(true, pres_found);
+    auto layer_extensions = inst2.EnumerateLayerDeviceExtensions(phys_dev2, explicit_layer_name, 2);
+    ASSERT_TRUE(string_eq(layer_extensions.at(0).extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME));
+    ASSERT_TRUE(string_eq(layer_extensions.at(1).extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME));
 
     DeviceWrapper dev2{inst2};
     dev2.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
-        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+        .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME);
     dev2.CheckCreate(phys_dev2);
 
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolAfter = dev2.load("vkTrimCommandPoolKHR");
@@ -3554,8 +3437,10 @@
 // it is set with VK_LOADER_LAYERS_ENABLE
 TEST(TestLayers, EnvironLayerEnableExplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    uint32_t api_version = VK_API_VERSION_1_2;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, api_version))
+        .set_icd_api_version(api_version)
+        .add_physical_device(PhysicalDevice{});
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -3581,7 +3466,7 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            explicit_json_name_3);
 
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
+    EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE"};
 
     // First, test an instance/device without the layer forced on.
     InstWrapper inst1{env.vulkan_functions};
@@ -3604,7 +3489,7 @@
     // Now force on one layer with its full name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", explicit_layer_name_1);
+    layers_enable_env_var.set_new_value(explicit_layer_name_1);
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -3626,7 +3511,7 @@
     // Match prefix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "VK_LAYER_LUNARG_*");
+    layers_enable_env_var.set_new_value("VK_LAYER_LUNARG_*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -3648,7 +3533,7 @@
     // Match suffix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second_layer");
+    layers_enable_env_var.set_new_value("*Second_layer");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -3670,7 +3555,7 @@
     // Match substring
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -3692,7 +3577,7 @@
     // Match all with star '*'
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*");
+    layers_enable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst6.create_info, env.debug_log);
@@ -3714,7 +3599,7 @@
     // Match all with special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "~all~");
+    layers_enable_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst7.create_info, env.debug_log);
@@ -3738,8 +3623,9 @@
 // it is set with VK_LOADER_LAYERS_DISABLE
 TEST(TestLayers, EnvironLayerDisableExplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2)
+        .add_physical_device(PhysicalDevice{});
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -3764,7 +3650,7 @@
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            explicit_json_name_3);
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
 
     // First, test an instance/device without the layer forced on.
     InstWrapper inst1{env.vulkan_functions};
@@ -3788,7 +3674,7 @@
     // Now force on one layer with its full name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", explicit_layer_name_1);
+    layers_disable_env_var.set_new_value(explicit_layer_name_1);
 
     InstWrapper inst2{env.vulkan_functions};
     inst2.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3811,7 +3697,7 @@
     // Match prefix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "VK_LAYER_LUNARG_*");
+    layers_disable_env_var.set_new_value("VK_LAYER_LUNARG_*");
 
     InstWrapper inst3{env.vulkan_functions};
     inst3.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3834,7 +3720,7 @@
     // Match suffix
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second_layer");
+    layers_disable_env_var.set_new_value("*Second_layer");
 
     InstWrapper inst4{env.vulkan_functions};
     inst4.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3857,7 +3743,7 @@
     // Match substring
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second*");
+    layers_disable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     inst5.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3880,7 +3766,7 @@
     // Match all with star '*'
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*");
+    layers_disable_env_var.set_new_value("*");
 
     InstWrapper inst6{env.vulkan_functions};
     inst6.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3903,7 +3789,7 @@
     // Match all with special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~all~");
+    layers_disable_env_var.set_new_value("~all~");
 
     InstWrapper inst7{env.vulkan_functions};
     inst7.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3926,7 +3812,7 @@
     // Match explicit special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~explicit~");
+    layers_disable_env_var.set_new_value("~explicit~");
 
     InstWrapper inst8{env.vulkan_functions};
     inst8.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3949,7 +3835,7 @@
     // No match implicit special name
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
+    layers_disable_env_var.set_new_value("~implicit~");
 
     InstWrapper inst9{env.vulkan_functions};
     inst9.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -3974,8 +3860,8 @@
 // enabled)
 TEST(TestLayers, EnvironLayerEnableDisableExplicitLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4001,8 +3887,8 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            explicit_json_name_3);
 
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE"};
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
 
     // First, test an instance/device without the layer forced on.
     InstWrapper inst1{env.vulkan_functions};
@@ -4026,8 +3912,8 @@
     // Disable 2 but enable 1
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*Second*");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*test_layer");
+    layers_disable_env_var.set_new_value("*Second*");
+    layers_enable_env_var.set_new_value("*test_layer");
 
     InstWrapper inst2{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst2.create_info, env.debug_log);
@@ -4049,8 +3935,8 @@
     // Disable all but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("*");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst3{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst3.create_info, env.debug_log);
@@ -4072,8 +3958,8 @@
     // Disable all but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~all~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~all~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst4{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst4.create_info, env.debug_log);
@@ -4095,8 +3981,8 @@
     // Disable explicit but enable 2
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~explicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~explicit~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst5{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst5.create_info, env.debug_log);
@@ -4118,8 +4004,8 @@
     // Disable implicit but enable 2 (should still be everything)
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~implicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*Second*");
+    layers_disable_env_var.set_new_value("~implicit~");
+    layers_enable_env_var.set_new_value("*Second*");
 
     InstWrapper inst6{env.vulkan_functions};
     inst6.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -4142,8 +4028,8 @@
     // Disable explicit but enable all
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "~explicit~");
-    set_env_var("VK_LOADER_LAYERS_ENABLE", "*");
+    layers_disable_env_var.set_new_value("~explicit~");
+    layers_enable_env_var.set_new_value("*");
 
     InstWrapper inst7{env.vulkan_functions};
     inst7.create_info.add_layer(explicit_layer_name_1).add_layer(explicit_layer_name_2).add_layer(explicit_layer_name_3);
@@ -4168,8 +4054,8 @@
 // enabled)
 TEST(TestLayers, EnvironVkInstanceLayersAndDisableFilters) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4187,8 +4073,8 @@
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))),
                            explicit_json_name_2);
 
-    EnvVarCleaner instance_layers_cleaner("VK_INSTANCE_LAYERS");
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_enable_env_var{"VK_INSTANCE_LAYERS"};
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
 
     // First, test an instance/device without the layer forced on.
     InstWrapper inst1{env.vulkan_functions};
@@ -4208,7 +4094,7 @@
     // Enable the non-default enabled layer with VK_INSTANCE_LAYERS
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_INSTANCE_LAYERS", explicit_layer_name_2);
+    layers_enable_env_var.set_new_value(explicit_layer_name_2);
 
     InstWrapper inst2{env.vulkan_functions};
     inst2.create_info.add_layer(explicit_layer_name_1);
@@ -4227,7 +4113,7 @@
     // Try to disable all
     // ------------------------------------------
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", "*");
+    layers_disable_env_var.set_new_value("*");
 
     InstWrapper inst3{env.vulkan_functions};
     inst3.create_info.add_layer(explicit_layer_name_1);
@@ -4244,10 +4130,80 @@
     ASSERT_TRUE(env.debug_log.find_prefix_then_postfix(explicit_layer_name_2, "disabled because name matches filter of env var"));
 }
 
+// Verify that layers enabled through VK_INSTANCE_LAYERS which were not found get the proper error message
+TEST(TestLayers, NonExistantLayerInVK_INSTANCE_LAYERS) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    const char* layer_name = "VK_LAYER_test_layer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer.json");
+
+    EnvVarWrapper layers_enable_env_var{"VK_INSTANCE_LAYERS", "VK_LAYER_I_dont_exist"};
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(
+            env.debug_log.find("Layer \"VK_LAYER_I_dont_exist\" was not found but was requested by env var VK_INSTANCE_LAYERS!"));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    // Make sure layers that do exist are loaded
+    env.debug_log.clear();
+    layers_enable_env_var.add_to_list(layer_name);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(
+            env.debug_log.find("Layer \"VK_LAYER_I_dont_exist\" was not found but was requested by env var VK_INSTANCE_LAYERS!"));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
+    }
+    // Make sure that if the layer appears twice in the env-var nothing bad happens
+    env.debug_log.clear();
+    layers_enable_env_var.add_to_list("VK_LAYER_I_dont_exist");
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(
+            env.debug_log.find("Layer \"VK_LAYER_I_dont_exist\" was not found but was requested by env var VK_INSTANCE_LAYERS!"));
+        auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
+    }
+}
+
+// Verify that if the same layer appears twice in VK_INSTANCE_LAYERS nothing bad happens
+TEST(TestLayers, DuplicatesInEnvironVK_INSTANCE_LAYERS) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    const char* layer_name = "VK_LAYER_test_layer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer.json");
+
+    EnvVarWrapper layers_enable_env_var{"VK_INSTANCE_LAYERS"};
+
+    layers_enable_env_var.add_to_list(layer_name);
+    layers_enable_env_var.add_to_list(layer_name);
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    auto layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
+}
+
 TEST(TestLayers, AppEnabledExplicitLayerFails) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4258,16 +4214,9 @@
                            explicit_json_name_1);
 
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", explicit_layer_name_1);
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE", explicit_layer_name_1};
 
-    uint32_t count = 0;
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
-    EXPECT_EQ(count, 0U);
-    std::vector<VkLayerProperties> layers;
-    layers.resize(1);
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layers.data());
-    EXPECT_EQ(count, 0U);
+    ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
 
     InstWrapper inst3{env.vulkan_functions};
     inst3.create_info.add_layer(explicit_layer_name_1);
@@ -4282,8 +4231,8 @@
 
 TEST(TestLayers, OverrideEnabledExplicitLayerWithDisableFilter) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4292,27 +4241,19 @@
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
                            explicit_json_name_1);
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(explicit_layer_name_1)
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layer(explicit_layer_name_1)
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
 
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", explicit_layer_name_1);
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE", explicit_layer_name_1};
 
-    uint32_t count = 0;
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
-    EXPECT_EQ(count, 1U);
-    std::vector<VkLayerProperties> layers;
-    layers.resize(1);
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layers.data());
-    EXPECT_EQ(count, 1U);
-    EXPECT_TRUE(string_eq(lunarg_meta_layer_name, &layers[0].layerName[0]));
+    auto layers = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(lunarg_meta_layer_name, layers[0].layerName));
 
     {  // both override layer and Disable env var
         InstWrapper inst{env.vulkan_functions};
@@ -4340,8 +4281,8 @@
 
 TEST(TestLayers, OverrideEnabledExplicitLayerWithDisableFilterForOverrideLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4350,27 +4291,19 @@
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
                            explicit_json_name_1);
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_component_layer(explicit_layer_name_1)
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_component_layer(explicit_layer_name_1)
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
 
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_DISABLE", lunarg_meta_layer_name);
-    EnvVarCleaner layers_disable_cleaner("VK_LOADER_LAYERS_DISABLE");
+    EnvVarWrapper layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE", lunarg_meta_layer_name};
 
-    uint32_t count = 0;
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
-    EXPECT_EQ(count, 1U);
-    std::vector<VkLayerProperties> layers;
-    layers.resize(1);
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layers.data());
-    EXPECT_EQ(count, 1U);
-    EXPECT_TRUE(string_eq(explicit_layer_name_1, &layers[0].layerName[0]));
+    auto layers = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(explicit_layer_name_1, layers[0].layerName));
 
     {  // both override layer and Disable env var
         InstWrapper inst{env.vulkan_functions};
@@ -4398,8 +4331,8 @@
 
 TEST(TestLayers, OverrideBlacklistedLayerWithEnableFilter) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2);
 
     const char* explicit_layer_name_1 = "VK_LAYER_LUNARG_First_layer";
     const char* explicit_json_name_1 = "First_layer.json";
@@ -4408,27 +4341,19 @@
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))),
                            explicit_json_name_1);
-    env.add_implicit_layer(ManifestLayer{}
-                               .set_file_format_version(ManifestVersion(1, 2, 0))
-                               .add_layer(ManifestLayer::LayerDescription{}
-                                              .set_name(lunarg_meta_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
-                                              .add_blacklisted_layer(explicit_layer_name_1)
-                                              .set_disable_environment("DisableMeIfYouCan")),
-                           "meta_test_layer.json");
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(lunarg_meta_layer_name)
+                                                                         .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                                                                         .add_blacklisted_layer(explicit_layer_name_1)
+                                                                         .set_disable_environment("DisableMeIfYouCan")),
+        "meta_test_layer.json");
 
     env.debug_log.clear();
-    set_env_var("VK_LOADER_LAYERS_ENABLE", explicit_layer_name_1);
-    EnvVarCleaner layers_enable_cleaner("VK_LOADER_LAYERS_ENABLE");
+    EnvVarWrapper layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE", explicit_layer_name_1};
 
-    uint32_t count = 0;
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr);
-    EXPECT_EQ(count, 1U);
-    std::vector<VkLayerProperties> layers;
-    layers.resize(1);
-    env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, layers.data());
-    EXPECT_EQ(count, 1U);
-    EXPECT_TRUE(string_eq(explicit_layer_name_1, &layers[0].layerName[0]));
+    auto layers = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(explicit_layer_name_1, layers[0].layerName));
     {
         InstWrapper inst{env.vulkan_functions};
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -4456,12 +4381,9 @@
 // Add a device layer, should not work
 TEST(TestLayers, DoNotUseDeviceLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2)
+        .add_physical_device(PhysicalDevice{}.set_api_version(VK_API_VERSION_1_2).finish());
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -4481,20 +4403,10 @@
     VkPhysicalDevice phys_dev1 = inst1.GetPhysDev();
 
     // Make sure the extensions in the layer aren't present
-    uint32_t extension_count = 40;
-    std::array<VkExtensionProperties, 40> extensions;
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev1, nullptr, &extension_count, extensions.data()));
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (string_eq(extensions[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME) ||
-            string_eq(extensions[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            FAIL() << "Extension should not be present";
-        }
-    }
+    ASSERT_NO_FATAL_FAILURE(inst1.EnumerateDeviceExtensions(phys_dev1, 0));
 
     // Create a device and query the function pointers
     DeviceWrapper dev1{inst1};
-    dev1.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
     dev1.CheckCreate(phys_dev1);
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolBefore = dev1.load("vkTrimCommandPoolKHR");
     PFN_vkGetSwapchainStatusKHR pfn_GetSwapchainStatusBefore = dev1.load("vkGetSwapchainStatusKHR");
@@ -4508,25 +4420,16 @@
     VkPhysicalDevice phys_dev2 = inst2.GetPhysDev();
 
     // Make sure the extensions in the layer aren't present
-    extension_count = 40;
-    EXPECT_EQ(VK_SUCCESS,
-              env.vulkan_functions.vkEnumerateDeviceExtensionProperties(phys_dev1, nullptr, &extension_count, extensions.data()));
-    for (uint32_t ext = 0; ext < extension_count; ++ext) {
-        if (string_eq(extensions[ext].extensionName, VK_KHR_MAINTENANCE1_EXTENSION_NAME) ||
-            string_eq(extensions[ext].extensionName, VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)) {
-            FAIL() << "Extension should not be present";
-        }
-    }
+    ASSERT_NO_FATAL_FAILURE(inst2.EnumerateDeviceExtensions(phys_dev2, 0));
 
     DeviceWrapper dev2{inst2};
     dev2.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
         .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f))
         .add_layer(explicit_layer_name);
     dev2.CheckCreate(phys_dev2, VK_ERROR_EXTENSION_NOT_PRESENT);
 
     DeviceWrapper dev3{inst2};
-    dev3.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f)).add_layer(explicit_layer_name);
+    dev3.create_info.add_layer(explicit_layer_name);
     dev3.CheckCreate(phys_dev2);
 
     PFN_vkTrimCommandPoolKHR pfn_TrimCommandPoolAfter = dev3.load("vkTrimCommandPoolKHR");
@@ -4538,12 +4441,9 @@
 // Make sure that a layer enabled as both an instance and device layer works properly.
 TEST(TestLayers, InstanceAndDeviceLayer) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2)
+        .add_physical_device(PhysicalDevice{}.set_api_version(VK_API_VERSION_1_2).finish());
 
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
     env.add_explicit_layer(
@@ -4564,7 +4464,6 @@
     DeviceWrapper dev{inst};
     dev.create_info.add_extension(VK_KHR_MAINTENANCE1_EXTENSION_NAME)
         .add_extension(VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME)
-        .add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f))
         .add_layer(explicit_layer_name);
     dev.CheckCreate(phys_dev);
 
@@ -4579,13 +4478,9 @@
 // Make sure loader does not throw an error for a device layer  that is not present
 TEST(TestLayers, DeviceLayerNotPresent) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 2, 0)));
-    env.get_test_icd().icd_api_version = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    VkPhysicalDeviceProperties properties{};
-    properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 2, 0);
-    env.get_test_icd().add_physical_device({});
-    env.get_test_icd().physical_devices.back().set_properties(properties);
-
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_2))
+        .set_icd_api_version(VK_API_VERSION_1_2)
+        .add_physical_device(PhysicalDevice{}.set_api_version(VK_API_VERSION_1_2).finish());
     const char* explicit_layer_name = "VK_LAYER_LUNARG_wrap_objects";
 
     InstWrapper inst{env.vulkan_functions};
@@ -4599,9 +4494,8 @@
 
 TEST(LayerPhysDeviceMod, AddPhysicalDevices) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_add_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_add_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_ADD_PHYS_DEV")),
@@ -4611,9 +4505,8 @@
     layer.set_add_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4678,9 +4571,8 @@
 
 TEST(LayerPhysDeviceMod, RemovePhysicalDevices) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_remove_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_remove_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_REMOVE_PHYS_DEV")),
@@ -4690,9 +4582,8 @@
     layer.set_remove_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4730,9 +4621,8 @@
 
 TEST(LayerPhysDeviceMod, ReorderPhysicalDevices) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_reorder_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_reorder_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_REORDER_PHYS_DEV")),
@@ -4742,9 +4632,8 @@
     layer.set_reorder_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4782,9 +4671,8 @@
 
 TEST(LayerPhysDeviceMod, AddRemoveAndReorderPhysicalDevices) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_all_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_all_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_ALL_PHYS_DEV")),
@@ -4794,9 +4682,8 @@
     layer.set_add_phys_devs(true).set_remove_phys_devs(true).set_reorder_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4846,7 +4733,7 @@
     ASSERT_EQ(found_added_count, 3U);
 }
 
-static bool GroupsAreTheSame(VkPhysicalDeviceGroupProperties a, VkPhysicalDeviceGroupProperties b) {
+bool GroupsAreTheSame(VkPhysicalDeviceGroupProperties a, VkPhysicalDeviceGroupProperties b) {
     if (a.physicalDeviceCount != b.physicalDeviceCount) {
         return false;
     }
@@ -4860,9 +4747,8 @@
 
 TEST(LayerPhysDeviceMod, AddPhysicalDeviceGroups) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_add_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_add_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_ADD_PHYS_DEV")),
@@ -4872,9 +4758,8 @@
     layer.set_add_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4904,18 +4789,16 @@
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &grp_count, nullptr));
     ASSERT_GT(grp_count, icd_groups);
 
-    auto not_exp_phys_dev_groups = std::vector<VkPhysicalDeviceGroupProperties>(icd_groups);
-    for (uint32_t group = 0; group < icd_groups; ++group) {
-        not_exp_phys_dev_groups[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-    }
+    auto not_exp_phys_dev_groups =
+        std::vector<VkPhysicalDeviceGroupProperties>(icd_groups, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
+
     uint32_t returned_group_count = icd_groups;
     ASSERT_EQ(VK_INCOMPLETE, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, not_exp_phys_dev_groups.data()));
     ASSERT_EQ(icd_groups, returned_group_count);
 
-    auto phys_dev_groups = std::vector<VkPhysicalDeviceGroupProperties>(grp_count);
-    for (uint32_t group = 0; group < grp_count; ++group) {
-        phys_dev_groups[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-    }
+    auto phys_dev_groups =
+        std::vector<VkPhysicalDeviceGroupProperties>(grp_count, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
+
     returned_group_count = grp_count;
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, phys_dev_groups.data()));
     ASSERT_EQ(grp_count, returned_group_count);
@@ -4950,9 +4833,9 @@
 
 TEST(LayerPhysDeviceMod, RemovePhysicalDeviceGroups) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    EnvVarWrapper disable_linux_sort("VK_LOADER_DISABLE_SELECT", "1");
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_remove_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_remove_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_REMOVE_PHYS_DEV")),
@@ -4962,9 +4845,8 @@
     layer.set_remove_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -4984,7 +4866,7 @@
         cur_icd.physical_device_groups.emplace_back(cur_icd.physical_devices[1]);
         cur_icd.physical_device_groups.back().use_physical_device(cur_icd.physical_devices[2]);
     }
-    const uint32_t icd_groups = 4;
+    const uint32_t icd_groups = 3;
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
@@ -4992,12 +4874,11 @@
 
     uint32_t grp_count = 0;
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &grp_count, nullptr));
-    ASSERT_LT(grp_count, icd_groups);
+    ASSERT_EQ(grp_count, icd_groups);
 
-    auto phys_dev_groups = std::vector<VkPhysicalDeviceGroupProperties>(grp_count);
-    for (uint32_t group = 0; group < grp_count; ++group) {
-        phys_dev_groups[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-    }
+    auto phys_dev_groups =
+        std::vector<VkPhysicalDeviceGroupProperties>(grp_count, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
+
     uint32_t returned_group_count = grp_count;
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, phys_dev_groups.data()));
     ASSERT_EQ(grp_count, returned_group_count);
@@ -5005,9 +4886,8 @@
 
 TEST(LayerPhysDeviceMod, ReorderPhysicalDeviceGroups) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_reorder_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_reorder_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_REORDER_PHYS_DEV")),
@@ -5017,9 +4897,8 @@
     layer.set_reorder_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -5049,10 +4928,9 @@
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &grp_count, nullptr));
     ASSERT_EQ(grp_count, icd_groups);
 
-    auto phys_dev_groups = std::vector<VkPhysicalDeviceGroupProperties>(grp_count);
-    for (uint32_t group = 0; group < grp_count; ++group) {
-        phys_dev_groups[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-    }
+    auto phys_dev_groups =
+        std::vector<VkPhysicalDeviceGroupProperties>(grp_count, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
+
     uint32_t returned_group_count = grp_count;
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, phys_dev_groups.data()));
     ASSERT_EQ(grp_count, returned_group_count);
@@ -5060,9 +4938,8 @@
 
 TEST(LayerPhysDeviceMod, AddRemoveAndReorderPhysicalDeviceGroups) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
-                                                         .set_name("VkLayer_LunarG_all_phys_dev")
+                                                         .set_name("VK_LAYER_LunarG_all_phys_dev")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                                          .set_api_version(VK_API_VERSION_1_1)
                                                          .set_disable_environment("TEST_DISABLE_ALL_PHYS_DEV")),
@@ -5072,9 +4949,8 @@
     layer.set_add_phys_devs(true).set_remove_phys_devs(true).set_reorder_phys_devs(true);
 
     for (uint32_t icd = 0; icd < 2; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-        auto& cur_icd = env.get_test_icd(icd);
-        cur_icd.icd_api_version = VK_API_VERSION_1_2;
+        auto& cur_icd =
+            env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_2)).set_icd_api_version(VK_API_VERSION_1_2);
         VkPhysicalDeviceProperties properties{};
         properties.apiVersion = VK_API_VERSION_1_2;
         properties.vendorID = 0x11000000 + (icd << 6);
@@ -5091,8 +4967,8 @@
             cur_icd.physical_devices.back().set_properties(properties);
         }
         cur_icd.physical_device_groups.emplace_back(cur_icd.physical_devices[0]);
-        cur_icd.physical_device_groups.emplace_back(cur_icd.physical_devices[1]);
-        cur_icd.physical_device_groups.back().use_physical_device(cur_icd.physical_devices[2]);
+        cur_icd.physical_device_groups.back().use_physical_device(cur_icd.physical_devices[1]);
+        cur_icd.physical_device_groups.emplace_back(cur_icd.physical_devices[2]);
     }
     const uint32_t icd_groups = 4;
 
@@ -5104,10 +4980,9 @@
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &grp_count, nullptr));
     ASSERT_GT(grp_count, icd_groups);
 
-    auto phys_dev_groups = std::vector<VkPhysicalDeviceGroupProperties>(grp_count);
-    for (uint32_t group = 0; group < grp_count; ++group) {
-        phys_dev_groups[group].sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES;
-    }
+    auto phys_dev_groups =
+        std::vector<VkPhysicalDeviceGroupProperties>(grp_count, {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES});
+
     uint32_t returned_group_count = grp_count;
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, phys_dev_groups.data()));
     ASSERT_EQ(grp_count, returned_group_count);
@@ -5133,3 +5008,487 @@
     ASSERT_EQ(2U, diff_count);
     ASSERT_EQ(found_added_count, 3U);
 }
+
+TEST(TestLayers, AllowFilterWithExplicitLayer) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* layer_name = "VK_LAYER_test_layer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer_all.json");
+
+    EnvVarWrapper allow{"VK_LOADER_LAYERS_ALLOW", layer_name};
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(false)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+
+TEST(TestLayers, AllowFilterWithImplicitLayer) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* layer_name = "VK_LAYER_test_layer";
+    const char* disable_env_var = "TEST_DISABLE_ENV_VAR";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment(disable_env_var)),
+                           "test_layer_all.json");
+
+    EnvVarWrapper allow{"VK_LOADER_LAYERS_ALLOW", layer_name};
+
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(true)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+
+    env.remove_loader_settings();
+
+    // Set the disable_environment variable
+    EnvVarWrapper set_disable_env_var{disable_env_var, "1"};
+
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        // layer's disable_environment takes priority
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(true)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+
+TEST(TestLayers, AllowFilterWithConditionallyImlicitLayer) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* layer_name = "VK_LAYER_test_layer";
+    const char* enable_env_var = "TEST_ENABLE_ENV_VAR";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("TEST_DISABLE_ENV_VAR")
+                                                         .set_enable_environment(enable_env_var)),
+                           "test_layer_all.json");
+
+    EnvVarWrapper allow{"VK_LOADER_LAYERS_ALLOW", layer_name};
+
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(true)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+
+    env.remove_loader_settings();
+
+    // Repeate the above tests but with the enable_environment variable set
+    EnvVarWrapper set_enable_env_var{enable_env_var, "1"};
+
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(true)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+}
+
+TEST(TestLayers, AllowFilterWithConditionallyImlicitLayerWithOverrideLayer) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* layer_name = "VK_LAYER_test_layer";
+    const char* enable_env_var = "TEST_ENABLE_ENV_VAR";
+    env.add_implicit_layer(TestLayerDetails{ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(layer_name)
+                                                                          .set_api_version(VK_API_VERSION_1_1)
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                                          .set_disable_environment("TEST_DISABLE_ENV_VAR")
+                                                                          .set_enable_environment(enable_env_var)),
+                                            "test_layer_all.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 2, 0}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(lunarg_meta_layer_name)
+                .set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0))
+                .add_component_layer(layer_name)
+                .set_disable_environment("DisableMeIfYouCan")
+                .add_override_path(fs::make_native(env.get_folder(ManifestLocation::override_layer).location().str()))),
+        "meta_test_layer.json");
+
+    EnvVarWrapper allow{"VK_LOADER_LAYERS_ALLOW", layer_name};
+
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, lunarg_meta_layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, lunarg_meta_layer_name));
+    }
+    {
+        EnvVarWrapper disable{"VK_LOADER_LAYERS_DISABLE", layer_name};
+        EnvVarWrapper enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, lunarg_meta_layer_name));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        inst.create_info.add_layer(layer_name);
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, lunarg_meta_layer_name));
+    }
+    {
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_treat_as_implicit_manifest(true)));
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+        env.update_loader_settings(env.loader_settings);
+
+        InstWrapper inst{env.vulkan_functions};
+        inst.CheckCreate();
+
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
diff --git a/tests/loader_phys_dev_inst_ext_tests.cpp b/tests/loader_phys_dev_inst_ext_tests.cpp
index f6bd061..85d58bd 100644
--- a/tests/loader_phys_dev_inst_ext_tests.cpp
+++ b/tests/loader_phys_dev_inst_ext_tests.cpp
@@ -35,13 +35,13 @@
 // validation.
 
 // Fill in random but valid data into the device properties struct for the current physical device
-static void FillInRandomICDInfo(uint32_t& vendor_id, uint32_t& driver_vers) {
+void FillInRandomICDInfo(uint32_t& vendor_id, uint32_t& driver_vers) {
     vendor_id = VK_MAKE_API_VERSION(0, rand() % 64, rand() % 255, rand() % 255);
     driver_vers = VK_MAKE_API_VERSION(0, rand() % 64, rand() % 255, rand() % 255);
 }
 
 // Fill in random but valid data into the device properties struct for the current physical device
-static void FillInRandomDeviceProps(VkPhysicalDeviceProperties& props, uint32_t api_vers, uint32_t vendor, uint32_t driver_vers) {
+void FillInRandomDeviceProps(VkPhysicalDeviceProperties& props, uint32_t api_vers, uint32_t vendor, uint32_t driver_vers) {
     props.apiVersion = api_vers;
     props.driverVersion = driver_vers;
     props.vendorID = vendor;
@@ -65,8 +65,7 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
+    PFN_vkGetPhysicalDeviceProperties2KHR GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2KHR");
     ASSERT_EQ(GetPhysDevProps2, nullptr);
 }
 
@@ -80,8 +79,7 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
+    PFN_vkGetPhysicalDeviceProperties2KHR GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2KHR");
     ASSERT_EQ(GetPhysDevProps2, nullptr);
 }
 
@@ -97,8 +95,7 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
+    PFN_vkGetPhysicalDeviceProperties2KHR GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2KHR");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     uint32_t driver_count = 1;
@@ -125,7 +122,7 @@
 // Also check if the application didn't enable 1.1 and when a layer 'upgrades' the api version to 1.1
 TEST(LoaderInstPhysDevExts, PhysDevProps2Simple) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_1));
     env.get_test_icd(0).icd_api_version = VK_API_VERSION_1_1;
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
     env.get_test_icd(0).physical_devices.push_back({});
@@ -136,8 +133,7 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+        PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
         ASSERT_NE(GetPhysDevProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -166,8 +162,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+        PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
         ASSERT_NE(GetPhysDevProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -202,8 +197,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+        PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
         ASSERT_NE(GetPhysDevProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -245,12 +239,10 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
-    auto GetPhysDevProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2KHR = instance.load("vkGetPhysicalDeviceProperties2KHR");
     ASSERT_NE(GetPhysDevProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -305,15 +297,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -338,8 +328,7 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -364,7 +353,7 @@
 }
 
 // Fill in random but valid data into the features struct for the current physical device
-static void FillInRandomFeatures(VkPhysicalDeviceFeatures& feats) {
+void FillInRandomFeatures(VkPhysicalDeviceFeatures& feats) {
     feats.robustBufferAccess = (rand() % 2) == 0 ? VK_FALSE : VK_TRUE;
     feats.fullDrawIndexUint32 = (rand() % 2) == 0 ? VK_FALSE : VK_TRUE;
     feats.imageCubeArray = (rand() % 2) == 0 ? VK_FALSE : VK_TRUE;
@@ -423,7 +412,7 @@
 }
 
 // Compare the contents of the feature structs
-static bool CompareFeatures(const VkPhysicalDeviceFeatures& feats1, const VkPhysicalDeviceFeatures2& feats2) {
+bool CompareFeatures(const VkPhysicalDeviceFeatures& feats1, const VkPhysicalDeviceFeatures2& feats2) {
     return feats1.robustBufferAccess == feats2.features.robustBufferAccess &&
            feats1.fullDrawIndexUint32 == feats2.features.fullDrawIndexUint32 &&
            feats1.imageCubeArray == feats2.features.imageCubeArray && feats1.independentBlend == feats2.features.independentBlend &&
@@ -482,9 +471,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR"));
-    ASSERT_EQ(GetPhysDevFeats2, nullptr);
+    PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysDevFeats2KHR = instance.load("vkGetPhysicalDeviceFeatures2KHR");
+    ASSERT_EQ(GetPhysDevFeats2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceFeatures2KHR where instance supports it, but nothing else.
@@ -497,9 +485,8 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR"));
-    ASSERT_EQ(GetPhysDevFeats2, nullptr);
+    PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysDevFeats2KHR = instance.load("vkGetPhysicalDeviceFeatures2KHR");
+    ASSERT_EQ(GetPhysDevFeats2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceFeatures2KHR where instance and ICD supports it, but device does not support it.
@@ -514,9 +501,8 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR"));
-    ASSERT_NE(GetPhysDevFeats2, nullptr);
+    PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysDevFeats2KHR = instance.load("vkGetPhysicalDeviceFeatures2KHR");
+    ASSERT_NE(GetPhysDevFeats2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -526,7 +512,7 @@
     VkPhysicalDeviceFeatures feats{};
     instance->vkGetPhysicalDeviceFeatures(physical_device, &feats);
     VkPhysicalDeviceFeatures2 feats2{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR};
-    GetPhysDevFeats2(physical_device, &feats2);
+    GetPhysDevFeats2KHR(physical_device, &feats2);
     ASSERT_TRUE(CompareFeatures(feats, feats2));
 }
 
@@ -535,19 +521,19 @@
 // Also check if the application didn't enable 1.1 and when a layer 'upgrades' the api version to 1.1
 TEST(LoaderInstPhysDevExts, PhysDevFeats2Simple) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_1));
     env.get_test_icd(0).icd_api_version = VK_API_VERSION_1_1;
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
     env.get_test_icd(0).physical_devices.push_back({});
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, 0});
+    env.get_test_icd(0).physical_devices.back().set_api_version(VK_API_VERSION_1_1);
     FillInRandomFeatures(env.get_test_icd(0).physical_devices.back().features);
     {
         InstWrapper instance(env.vulkan_functions);
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2"));
+        PFN_vkGetPhysicalDeviceFeatures2 GetPhysDevFeats2 = instance.load("vkGetPhysicalDeviceFeatures2");
         ASSERT_NE(GetPhysDevFeats2, nullptr);
 
         uint32_t driver_count = 1;
@@ -568,8 +554,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2"));
+        PFN_vkGetPhysicalDeviceFeatures2 GetPhysDevFeats2 = instance.load("vkGetPhysicalDeviceFeatures2");
         ASSERT_NE(GetPhysDevFeats2, nullptr);
 
         uint32_t driver_count = 1;
@@ -598,8 +583,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2"));
+        PFN_vkGetPhysicalDeviceFeatures2 GetPhysDevFeats2 = instance.load("vkGetPhysicalDeviceFeatures2");
         ASSERT_NE(GetPhysDevFeats2, nullptr);
 
         uint32_t driver_count = 1;
@@ -635,12 +619,10 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevFeats2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR"));
+    PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysDevFeats2KHR = instance.load("vkGetPhysicalDeviceFeatures2KHR");
     ASSERT_NE(GetPhysDevFeats2KHR, nullptr);
 
-    auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2"));
+    PFN_vkGetPhysicalDeviceFeatures2 GetPhysDevFeats2 = instance.load("vkGetPhysicalDeviceFeatures2");
     ASSERT_NE(GetPhysDevFeats2, nullptr);
 
     uint32_t driver_count = 1;
@@ -682,15 +664,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -718,8 +698,7 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevFeats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2"));
+    PFN_vkGetPhysicalDeviceFeatures2 GetPhysDevFeats2 = instance.load("vkGetPhysicalDeviceFeatures2");
     ASSERT_NE(GetPhysDevFeats2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -737,7 +716,7 @@
 }
 
 // Fill in random but valid data into the format properties struct for the current physical device
-static void FillInRandomFormatProperties(std::vector<VkFormatProperties>& props) {
+void FillInRandomFormatProperties(std::vector<VkFormatProperties>& props) {
     props.resize(5);
     for (uint8_t form = 0; form < 5; ++form) {
         props[form].bufferFeatures = static_cast<VkFormatFeatureFlags>(rand());
@@ -755,9 +734,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR"));
-    ASSERT_EQ(GetPhysDevFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceFormatProperties2KHR GetPhysDevFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceFormatProperties2KHR");
+    ASSERT_EQ(GetPhysDevFormatProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceFormatProperties2KHR where instance supports it, but nothing else.
@@ -770,9 +749,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR"));
-    ASSERT_EQ(GetPhysDevFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceFormatProperties2KHR GetPhysDevFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceFormatProperties2KHR");
+    ASSERT_EQ(GetPhysDevFormatProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceFormatProperties2KHR where instance and ICD supports it, but device does not support it.
@@ -790,9 +769,9 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR"));
-    ASSERT_NE(GetPhysDevFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceFormatProperties2KHR GetPhysDevFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceFormatProperties2KHR");
+    ASSERT_NE(GetPhysDevFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -802,7 +781,7 @@
     VkFormatProperties props{};
     instance->vkGetPhysicalDeviceFormatProperties(physical_device, VK_FORMAT_R4G4_UNORM_PACK8, &props);
     VkFormatProperties2 props2{VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2};
-    GetPhysDevFormatProps2(physical_device, VK_FORMAT_R4G4_UNORM_PACK8, &props2);
+    GetPhysDevFormatProps2KHR(physical_device, VK_FORMAT_R4G4_UNORM_PACK8, &props2);
 
     ASSERT_EQ(props.bufferFeatures, props2.formatProperties.bufferFeatures);
     ASSERT_EQ(props.linearTilingFeatures, props2.formatProperties.linearTilingFeatures);
@@ -814,19 +793,19 @@
 // Also check if the application didn't enable 1.1 and when a layer 'upgrades' the api version to 1.1
 TEST(LoaderInstPhysDevExts, PhysDevFormatProps2Simple) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_1));
     env.get_test_icd(0).icd_api_version = VK_API_VERSION_1_1;
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
     env.get_test_icd(0).physical_devices.push_back({});
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, 0});
+    env.get_test_icd(0).physical_devices.back().set_api_version(VK_API_VERSION_1_1);
     FillInRandomFormatProperties(env.get_test_icd(0).physical_devices.back().format_properties);
     {
         InstWrapper instance(env.vulkan_functions);
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2"));
+        PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysDevFormatProps2 = instance.load("vkGetPhysicalDeviceFormatProperties2");
         ASSERT_NE(GetPhysDevFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -850,8 +829,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2"));
+        PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysDevFormatProps2 = instance.load("vkGetPhysicalDeviceFormatProperties2");
         ASSERT_NE(GetPhysDevFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -882,8 +860,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2"));
+        PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysDevFormatProps2 = instance.load("vkGetPhysicalDeviceFormatProperties2");
         ASSERT_NE(GetPhysDevFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -920,12 +897,11 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2"));
+    PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysDevFormatProps2 = instance.load("vkGetPhysicalDeviceFormatProperties2");
     ASSERT_NE(GetPhysDevFormatProps2, nullptr);
 
-    auto GetPhysDevFormatProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR"));
+    PFN_vkGetPhysicalDeviceFormatProperties2KHR GetPhysDevFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceFormatProperties2KHR");
     ASSERT_NE(GetPhysDevFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -972,15 +948,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -1008,8 +982,7 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2"));
+    PFN_vkGetPhysicalDeviceFormatProperties2 GetPhysDevFormatProps2 = instance.load("vkGetPhysicalDeviceFormatProperties2");
     ASSERT_NE(GetPhysDevFormatProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -1031,7 +1004,7 @@
 }
 
 // Fill in random but valid data into the image format data struct for the current physical device
-static void FillInRandomImageFormatData(VkImageFormatProperties& props) {
+void FillInRandomImageFormatData(VkImageFormatProperties& props) {
     props.maxExtent = {static_cast<uint32_t>(rand() % 512), static_cast<uint32_t>(rand() % 512),
                        static_cast<uint32_t>(rand() % 512)};
     props.maxMipLevels = static_cast<uint32_t>(1 << (rand() % 16));
@@ -1049,8 +1022,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"));
+    PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPhysDevImageFormatProps2 =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2KHR");
     ASSERT_EQ(GetPhysDevImageFormatProps2, nullptr);
 }
 
@@ -1064,9 +1037,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"));
-    ASSERT_EQ(GetPhysDevImageFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPhysDevImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2KHR");
+    ASSERT_EQ(GetPhysDevImageFormatProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceImageFormatProperties2KHR where instance and ICD supports it, but device does not support it.
@@ -1081,9 +1054,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"));
-    ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPhysDevImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2KHR");
+    ASSERT_NE(GetPhysDevImageFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -1105,7 +1078,7 @@
         0,                                                      // flags
     };
     VkImageFormatProperties2 props2{VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2};
-    ASSERT_EQ(VK_SUCCESS, GetPhysDevImageFormatProps2(physical_device, &info2, &props2));
+    ASSERT_EQ(VK_SUCCESS, GetPhysDevImageFormatProps2KHR(physical_device, &info2, &props2));
 
     ASSERT_EQ(props.maxExtent.width, props2.imageFormatProperties.maxExtent.width);
     ASSERT_EQ(props.maxExtent.height, props2.imageFormatProperties.maxExtent.height);
@@ -1132,8 +1105,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysDevImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceImageFormatProperties2");
         ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1174,8 +1147,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysDevImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceImageFormatProperties2");
         ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1223,8 +1196,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysDevImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceImageFormatProperties2");
         ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1279,12 +1252,12 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2"));
+    PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysDevImageFormatProps2 =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2");
     ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
 
-    auto GetPhysDevImageFormatProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"));
+    PFN_vkGetPhysicalDeviceImageFormatProperties2KHR GetPhysDevImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2KHR");
     ASSERT_NE(GetPhysDevImageFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -1352,15 +1325,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -1388,8 +1359,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2"));
+    PFN_vkGetPhysicalDeviceImageFormatProperties2 GetPhysDevImageFormatProps2 =
+        instance.load("vkGetPhysicalDeviceImageFormatProperties2");
     ASSERT_NE(GetPhysDevImageFormatProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -1434,9 +1405,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"));
-    ASSERT_EQ(GetPhysDevMemoryProps2, nullptr);
+    PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysDevMemoryProps2KHR =
+        instance.load("vkGetPhysicalDeviceMemoryProperties2KHR");
+    ASSERT_EQ(GetPhysDevMemoryProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceMemoryProperties2KHR where instance supports it, but nothing else.
@@ -1449,13 +1420,13 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"));
-    ASSERT_EQ(GetPhysDevMemoryProps2, nullptr);
+    PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysDevMemoryProps2KHR =
+        instance.load("vkGetPhysicalDeviceMemoryProperties2KHR");
+    ASSERT_EQ(GetPhysDevMemoryProps2KHR, nullptr);
 }
 
 // Fill in random but valid data into the memory data struct for the current physical device
-static void FillInRandomMemoryData(VkPhysicalDeviceMemoryProperties& props) {
+void FillInRandomMemoryData(VkPhysicalDeviceMemoryProperties& props) {
     props.memoryTypeCount = (rand() % 7) + 1;
     props.memoryHeapCount = (rand() % 7) + 1;
     for (uint32_t i = 0; i < props.memoryHeapCount; ++i) {
@@ -1469,7 +1440,7 @@
 }
 
 // Compare the memory structs
-static bool CompareMemoryData(const VkPhysicalDeviceMemoryProperties& props1, const VkPhysicalDeviceMemoryProperties2& props2) {
+bool CompareMemoryData(const VkPhysicalDeviceMemoryProperties& props1, const VkPhysicalDeviceMemoryProperties2& props2) {
     bool equal = true;
     equal = equal && props1.memoryTypeCount == props2.memoryProperties.memoryTypeCount;
     equal = equal && props1.memoryHeapCount == props2.memoryProperties.memoryHeapCount;
@@ -1496,9 +1467,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"));
-    ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
+    PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysDevMemoryProps2KHR =
+        instance.load("vkGetPhysicalDeviceMemoryProperties2KHR");
+    ASSERT_NE(GetPhysDevMemoryProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -1509,7 +1480,7 @@
     instance->vkGetPhysicalDeviceMemoryProperties(physical_device, &props);
 
     VkPhysicalDeviceMemoryProperties2 props2{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2};
-    GetPhysDevMemoryProps2(physical_device, &props2);
+    GetPhysDevMemoryProps2KHR(physical_device, &props2);
     ASSERT_TRUE(CompareMemoryData(props, props2));
 }
 
@@ -1529,8 +1500,7 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2"));
+        PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysDevMemoryProps2 = instance.load("vkGetPhysicalDeviceMemoryProperties2");
         ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1552,8 +1522,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2"));
+        PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysDevMemoryProps2 = instance.load("vkGetPhysicalDeviceMemoryProperties2");
         ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1582,8 +1551,7 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2"));
+        PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysDevMemoryProps2 = instance.load("vkGetPhysicalDeviceMemoryProperties2");
         ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1619,12 +1587,11 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2"));
+    PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysDevMemoryProps2 = instance.load("vkGetPhysicalDeviceMemoryProperties2");
     ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
 
-    auto GetPhysDevMemoryProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"));
+    PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysDevMemoryProps2KHR =
+        instance.load("vkGetPhysicalDeviceMemoryProperties2KHR");
     ASSERT_NE(GetPhysDevMemoryProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -1665,15 +1632,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -1701,8 +1666,7 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevMemoryProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2"));
+    PFN_vkGetPhysicalDeviceMemoryProperties2 GetPhysDevMemoryProps2 = instance.load("vkGetPhysicalDeviceMemoryProperties2");
     ASSERT_NE(GetPhysDevMemoryProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -1729,9 +1693,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"));
-    ASSERT_EQ(GetPhysDevQueueFamilyProps2, nullptr);
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR GetPhysDevQueueFamilyProps2KHR =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2KHR");
+    ASSERT_EQ(GetPhysDevQueueFamilyProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceQueueFamilyProperties2KHR where instance supports it, but nothing else.
@@ -1744,13 +1708,13 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"));
-    ASSERT_EQ(GetPhysDevQueueFamilyProps2, nullptr);
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR GetPhysDevQueueFamilyProps2KHR =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2KHR");
+    ASSERT_EQ(GetPhysDevQueueFamilyProps2KHR, nullptr);
 }
 
 // Fill in random but valid data into the queue family data struct for the current physical device
-static uint32_t FillInRandomQueueFamilyData(std::vector<MockQueueFamilyProperties>& props) {
+uint32_t FillInRandomQueueFamilyData(std::vector<MockQueueFamilyProperties>& props) {
     props.resize((rand() % 4) + 1);
     for (uint32_t i = 0; i < props.size(); ++i) {
         props[i].properties.queueFlags = (rand() % 30) + 1;
@@ -1765,8 +1729,8 @@
 }
 
 // Compare the queue family structs
-static bool CompareQueueFamilyData(const std::vector<VkQueueFamilyProperties>& props1,
-                                   const std::vector<VkQueueFamilyProperties2>& props2) {
+bool CompareQueueFamilyData(const std::vector<VkQueueFamilyProperties>& props1,
+                            const std::vector<VkQueueFamilyProperties2>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -1795,9 +1759,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"));
-    ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR GetPhysDevQueueFamilyProps2KHR =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2KHR");
+    ASSERT_NE(GetPhysDevQueueFamilyProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -1814,10 +1778,10 @@
 
     std::vector<VkQueueFamilyProperties2> props2{};
     uint32_t ret_fam_2 = 0;
-    GetPhysDevQueueFamilyProps2(physical_device, &ret_fam_2, nullptr);
+    GetPhysDevQueueFamilyProps2KHR(physical_device, &ret_fam_2, nullptr);
     ASSERT_EQ(ret_fam_1, ret_fam_2);
     props2.resize(ret_fam_2, VkQueueFamilyProperties2{VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2});
-    GetPhysDevQueueFamilyProps2(physical_device, &ret_fam_2, props2.data());
+    GetPhysDevQueueFamilyProps2KHR(physical_device, &ret_fam_2, props2.data());
     ASSERT_TRUE(CompareQueueFamilyData(props, props2));
 }
 
@@ -1837,8 +1801,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"));
+        PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysDevQueueFamilyProps2 =
+            instance.load("vkGetPhysicalDeviceQueueFamilyProperties2");
         ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1869,8 +1833,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"));
+        PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysDevQueueFamilyProps2 =
+            instance.load("vkGetPhysicalDeviceQueueFamilyProperties2");
         ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1908,8 +1872,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"));
+        PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysDevQueueFamilyProps2 =
+            instance.load("vkGetPhysicalDeviceQueueFamilyProperties2");
         ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -1954,12 +1918,12 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"));
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysDevQueueFamilyProps2 =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2");
     ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
 
-    auto GetPhysDevQueueFamilyProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"));
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR GetPhysDevQueueFamilyProps2KHR =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2KHR");
     ASSERT_NE(GetPhysDevQueueFamilyProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -2014,15 +1978,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -2050,8 +2012,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevQueueFamilyProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"));
+    PFN_vkGetPhysicalDeviceQueueFamilyProperties2 GetPhysDevQueueFamilyProps2 =
+        instance.load("vkGetPhysicalDeviceQueueFamilyProperties2");
     ASSERT_NE(GetPhysDevQueueFamilyProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -2085,9 +2047,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"));
-    ASSERT_EQ(GetPhysDevSparseImageFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysDevSparseImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
+    ASSERT_EQ(GetPhysDevSparseImageFormatProps2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceSparseImageFormatProperties2KHR where instance supports it, but nothing else.
@@ -2100,13 +2062,13 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"));
-    ASSERT_EQ(GetPhysDevSparseImageFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysDevSparseImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
+    ASSERT_EQ(GetPhysDevSparseImageFormatProps2KHR, nullptr);
 }
 
 // Fill in random but valid data into the sparse image format data struct for the current physical device
-static void FillInRandomSparseImageFormatData(std::vector<VkSparseImageFormatProperties>& props) {
+void FillInRandomSparseImageFormatData(std::vector<VkSparseImageFormatProperties>& props) {
     props.resize((rand() % 4) + 1);
     for (uint32_t i = 0; i < props.size(); ++i) {
         props[i].aspectMask = static_cast<VkImageAspectFlags>((rand() % 0x7FE) + 1);
@@ -2117,8 +2079,8 @@
 }
 
 // Compare the sparse image format structs
-static bool CompareSparseImageFormatData(const std::vector<VkSparseImageFormatProperties>& props1,
-                                         const std::vector<VkSparseImageFormatProperties2>& props2) {
+bool CompareSparseImageFormatData(const std::vector<VkSparseImageFormatProperties>& props1,
+                                  const std::vector<VkSparseImageFormatProperties2>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -2143,9 +2105,9 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"));
-    ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysDevSparseImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
+    ASSERT_NE(GetPhysDevSparseImageFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -2175,10 +2137,10 @@
     };
     std::vector<VkSparseImageFormatProperties2> props2{};
     uint32_t sparse_count_2 = 0;
-    GetPhysDevSparseImageFormatProps2(physical_device, &info2, &sparse_count_2, nullptr);
+    GetPhysDevSparseImageFormatProps2KHR(physical_device, &info2, &sparse_count_2, nullptr);
     ASSERT_EQ(sparse_count_1, sparse_count_2);
     props2.resize(sparse_count_2, VkSparseImageFormatProperties2{VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2});
-    GetPhysDevSparseImageFormatProps2(physical_device, &info2, &sparse_count_2, props2.data());
+    GetPhysDevSparseImageFormatProps2KHR(physical_device, &info2, &sparse_count_2, props2.data());
     ASSERT_EQ(sparse_count_1, sparse_count_2);
     ASSERT_TRUE(CompareSparseImageFormatData(props, props2));
 }
@@ -2199,8 +2161,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysDevSparseImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2");
         ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -2245,8 +2207,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysDevSparseImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2");
         ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -2298,8 +2260,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+        PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysDevSparseImageFormatProps2 =
+            instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2");
         ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
 
         uint32_t driver_count = 1;
@@ -2358,12 +2320,12 @@
     DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     CreateDebugUtilsMessenger(log);
 
-    auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysDevSparseImageFormatProps2 =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2");
     ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
 
-    auto GetPhysDevSparseImageFormatProps2KHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"));
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysDevSparseImageFormatProps2KHR =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
     ASSERT_NE(GetPhysDevSparseImageFormatProps2KHR, nullptr);
 
     uint32_t driver_count = 1;
@@ -2433,15 +2395,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -2469,8 +2429,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevSparseImageFormatProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"));
+    PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 GetPhysDevSparseImageFormatProps2 =
+        instance.load("vkGetPhysicalDeviceSparseImageFormatProperties2");
     ASSERT_NE(GetPhysDevSparseImageFormatProps2, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -2524,9 +2484,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalBufferProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalBufferPropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalBufferPropertiesKHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceExternalBufferPropertiesKHR where instance supports it, but nothing else.
@@ -2539,21 +2499,21 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalBufferProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalBufferPropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalBufferPropertiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the external memorydata struct for the current physical device
-static void FillInRandomExtMemoryData(VkExternalMemoryProperties& props) {
+void FillInRandomExtMemoryData(VkExternalMemoryProperties& props) {
     props.externalMemoryFeatures = static_cast<VkExternalMemoryFeatureFlags>((rand() % 6) + 1);
     props.exportFromImportedHandleTypes = static_cast<VkExternalMemoryHandleTypeFlags>((rand() % 0x1FFE) + 1);
     props.compatibleHandleTypes = static_cast<VkExternalMemoryHandleTypeFlags>((rand() % 0x1FFE) + 1);
 }
 
 // Compare the external memory data structs
-static bool CompareExtMemoryData(const VkExternalMemoryProperties& props1, const VkExternalMemoryProperties& props2,
-                                 bool supported = true) {
+bool CompareExtMemoryData(const VkExternalMemoryProperties& props1, const VkExternalMemoryProperties& props2,
+                          bool supported = true) {
     bool equal = true;
     if (supported) {
         equal = equal && props1.externalMemoryFeatures == props2.externalMemoryFeatures;
@@ -2579,9 +2539,9 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceExternalBufferProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalBufferPropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceExternalBufferPropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -2590,7 +2550,7 @@
 
     VkPhysicalDeviceExternalBufferInfoKHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR};
     VkExternalBufferPropertiesKHR props{VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR};
-    GetPhysicalDeviceExternalBufferProperties(physical_device, &info, &props);
+    GetPhysicalDeviceExternalBufferPropertiesKHR(physical_device, &info, &props);
     ASSERT_TRUE(CompareExtMemoryData(env.get_test_icd(0).physical_devices.back().external_memory_properties,
                                      props.externalMemoryProperties));
 }
@@ -2611,8 +2571,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferProperties"));
+        PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties =
+            instance.load("vkGetPhysicalDeviceExternalBufferProperties");
         ASSERT_NE(GetPhysicalDeviceExternalBufferProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2633,8 +2593,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferProperties"));
+        PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties =
+            instance.load("vkGetPhysicalDeviceExternalBufferProperties");
         ASSERT_NE(GetPhysicalDeviceExternalBufferProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2662,8 +2622,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferProperties"));
+        PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties =
+            instance.load("vkGetPhysicalDeviceExternalBufferProperties");
         ASSERT_NE(GetPhysicalDeviceExternalBufferProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2700,15 +2660,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -2736,8 +2694,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferProperties>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferProperties"));
+    PFN_vkGetPhysicalDeviceExternalBufferProperties GetPhysicalDeviceExternalBufferProperties =
+        instance.load("vkGetPhysicalDeviceExternalBufferProperties");
     ASSERT_NE(GetPhysicalDeviceExternalBufferProperties, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -2789,9 +2747,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphorePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalSemaphorePropertiesKHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceExternalSemaphorePropertiesKHR where instance supports it, but nothing else.
@@ -2804,13 +2762,13 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphorePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalSemaphorePropertiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the external semaphore data struct for the current physical device
-static void FillInRandomExtSemData(VkExternalSemaphoreProperties& props) {
+void FillInRandomExtSemData(VkExternalSemaphoreProperties& props) {
     props.sType = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES;
     props.pNext = nullptr;
     props.exportFromImportedHandleTypes = static_cast<VkExternalSemaphoreHandleTypeFlags>((rand() % 0xFFF) + 1);
@@ -2819,8 +2777,8 @@
 }
 
 // Compare the external semaphore data structs
-static bool CompareExtSemaphoreData(const VkExternalSemaphoreProperties& props1, const VkExternalSemaphoreProperties& props2,
-                                    bool supported = true) {
+bool CompareExtSemaphoreData(const VkExternalSemaphoreProperties& props1, const VkExternalSemaphoreProperties& props2,
+                             bool supported = true) {
     bool equal = true;
     if (supported) {
         equal = equal && props1.externalSemaphoreFeatures == props2.externalSemaphoreFeatures;
@@ -2846,9 +2804,9 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphorePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceExternalSemaphorePropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -2857,7 +2815,7 @@
 
     VkPhysicalDeviceExternalSemaphoreInfoKHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR};
     VkExternalSemaphorePropertiesKHR props{VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR};
-    GetPhysicalDeviceExternalSemaphoreProperties(physical_device, &info, &props);
+    GetPhysicalDeviceExternalSemaphorePropertiesKHR(physical_device, &info, &props);
     ASSERT_TRUE(CompareExtSemaphoreData(env.get_test_icd(0).physical_devices.back().external_semaphore_properties, props));
 }
 
@@ -2877,8 +2835,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphoreProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"));
+        PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties =
+            instance.load("vkGetPhysicalDeviceExternalSemaphoreProperties");
         ASSERT_NE(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2897,8 +2855,8 @@
         instance.CheckCreate();
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
-        auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphoreProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"));
+        PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties =
+            instance.load("vkGetPhysicalDeviceExternalSemaphoreProperties");
         ASSERT_NE(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2925,8 +2883,8 @@
         instance.CheckCreate();
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
-        auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphoreProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"));
+        PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties =
+            instance.load("vkGetPhysicalDeviceExternalSemaphoreProperties");
         ASSERT_NE(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -2962,15 +2920,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -2998,8 +2954,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphoreProperties>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"));
+    PFN_vkGetPhysicalDeviceExternalSemaphoreProperties GetPhysicalDeviceExternalSemaphoreProperties =
+        instance.load("vkGetPhysicalDeviceExternalSemaphoreProperties");
     ASSERT_NE(GetPhysicalDeviceExternalSemaphoreProperties, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -3051,9 +3007,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalFenceProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalFencePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalFencePropertiesKHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceExternalFencePropertiesKHR where instance supports it, but nothing else.
@@ -3066,13 +3022,13 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceExternalFenceProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalFencePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceExternalFencePropertiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the external fence data struct for the current physical device
-static void FillInRandomExtFenceData(VkExternalFenceProperties& props) {
+void FillInRandomExtFenceData(VkExternalFenceProperties& props) {
     props.sType = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES;
     props.pNext = nullptr;
     props.exportFromImportedHandleTypes = static_cast<VkExternalFenceHandleTypeFlags>((rand() % 0xFFF) + 1);
@@ -3081,8 +3037,7 @@
 }
 
 // Compare the external fence data structs
-static bool CompareExtFenceData(const VkExternalFenceProperties& props1, const VkExternalFenceProperties& props2,
-                                bool supported = true) {
+bool CompareExtFenceData(const VkExternalFenceProperties& props1, const VkExternalFenceProperties& props2, bool supported = true) {
     bool equal = true;
     if (supported) {
         equal = equal && props1.externalFenceFeatures == props2.externalFenceFeatures;
@@ -3108,9 +3063,9 @@
     instance.create_info.add_extension(VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceExternalFenceProperties, nullptr);
+    PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceExternalFencePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceExternalFencePropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -3119,7 +3074,7 @@
 
     VkPhysicalDeviceExternalFenceInfoKHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR};
     VkExternalFencePropertiesKHR props{VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR};
-    GetPhysicalDeviceExternalFenceProperties(physical_device, &info, &props);
+    GetPhysicalDeviceExternalFencePropertiesKHR(physical_device, &info, &props);
     ASSERT_TRUE(CompareExtFenceData(env.get_test_icd(0).physical_devices.back().external_fence_properties, props));
 }
 
@@ -3139,8 +3094,8 @@
         instance.create_info.set_api_version(VK_API_VERSION_1_1);
         instance.CheckCreate();
 
-        auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFenceProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFenceProperties"));
+        PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties =
+            instance.load("vkGetPhysicalDeviceExternalFenceProperties");
         ASSERT_NE(GetPhysicalDeviceExternalFenceProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -3160,8 +3115,8 @@
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
 
-        auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFenceProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFenceProperties"));
+        PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties =
+            instance.load("vkGetPhysicalDeviceExternalFenceProperties");
         ASSERT_NE(GetPhysicalDeviceExternalFenceProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -3188,8 +3143,8 @@
         instance.CheckCreate();
         DebugUtilsWrapper log{instance, VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
         CreateDebugUtilsMessenger(log);
-        auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFenceProperties>(
-            instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFenceProperties"));
+        PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties =
+            instance.load("vkGetPhysicalDeviceExternalFenceProperties");
         ASSERT_NE(GetPhysicalDeviceExternalFenceProperties, nullptr);
 
         uint32_t driver_count = 1;
@@ -3224,15 +3179,13 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
 
         // ICD 1 should not have 1.1
         if (icd != 1) {
             cur_icd.icd_api_version = VK_API_VERSION_1_1;
             cur_icd.add_instance_extension({VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME});
-        } else {
-            cur_icd.icd_api_version = VK_API_VERSION_1_0;
         }
 
         uint32_t rand_vendor_id;
@@ -3260,8 +3213,8 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFenceProperties>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFenceProperties"));
+    PFN_vkGetPhysicalDeviceExternalFenceProperties GetPhysicalDeviceExternalFenceProperties =
+        instance.load("vkGetPhysicalDeviceExternalFenceProperties");
     ASSERT_NE(GetPhysicalDeviceExternalFenceProperties, nullptr);
 
     uint32_t device_count = max_phys_devs;
@@ -3313,9 +3266,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceCapabilities2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceSurfaceCapabilities2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilities2KHR");
+    ASSERT_EQ(GetPhysicalDeviceSurfaceCapabilities2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceSurfaceCapabilities2KHR where instance supports it, but nothing else.
@@ -3328,13 +3281,13 @@
     instance.create_info.add_extension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceSurfaceCapabilities2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceSurfaceCapabilities2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilities2KHR");
+    ASSERT_EQ(GetPhysicalDeviceSurfaceCapabilities2KHR, nullptr);
 }
 
 // Fill in random but valid data into the surface capability data struct for the current physical device
-static void FillInRandomSurfaceCapsData(VkSurfaceCapabilitiesKHR& props) {
+void FillInRandomSurfaceCapsData(VkSurfaceCapabilitiesKHR& props) {
     props.minImageCount = (rand() % 0xFFF) + 1;
     props.maxImageCount = (rand() % 0xFFF) + 1;
     props.currentExtent.width = (rand() % 0xFFF) + 1;
@@ -3351,8 +3304,7 @@
 }
 
 // Compare the surface capability data structs
-static bool CompareSurfaceCapsData(const VkSurfaceCapabilitiesKHR& props1, const VkSurfaceCapabilitiesKHR& props2,
-                                   bool supported = true) {
+bool CompareSurfaceCapsData(const VkSurfaceCapabilitiesKHR& props1, const VkSurfaceCapabilitiesKHR& props2, bool supported = true) {
     bool equal = true;
     if (supported) {
         equal = equal && props1.minImageCount == props2.minImageCount;
@@ -3405,18 +3357,16 @@
         {VK_KHR_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceCapabilities = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities, nullptr);
-    auto CreateHeadlessSurfaceEXT = reinterpret_cast<PFN_vkCreateHeadlessSurfaceEXT>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT"));
+    PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilitiesKHR, nullptr);
+    PFN_vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT = instance.load("vkCreateHeadlessSurfaceEXT");
     ASSERT_NE(CreateHeadlessSurfaceEXT, nullptr);
-    auto DestroySurfaceKHR =
-        reinterpret_cast<PFN_vkDestroySurfaceKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"));
+    PFN_vkDestroySurfaceKHR DestroySurfaceKHR = instance.load("vkDestroySurfaceKHR");
     ASSERT_NE(DestroySurfaceKHR, nullptr);
-    auto GetPhysicalDeviceSurfaceCapabilities2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilities2KHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -3428,11 +3378,11 @@
     ASSERT_EQ(VK_SUCCESS, CreateHeadlessSurfaceEXT(instance.inst, &create_info, nullptr, &surface));
 
     VkSurfaceCapabilitiesKHR props{};
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities(physical_device, surface, &props));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, surface, &props));
 
     VkPhysicalDeviceSurfaceInfo2KHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, surface};
     VkSurfaceCapabilities2KHR props2{VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR};
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities2(physical_device, &info, &props2));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities2KHR(physical_device, &info, &props2));
     ASSERT_TRUE(CompareSurfaceCapsData(props, props2.surfaceCapabilities));
 
     DestroySurfaceKHR(instance.inst, surface, nullptr);
@@ -3461,7 +3411,7 @@
     Extension third_ext{VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME};
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.min_icd_interface_version = 3;
@@ -3502,18 +3452,16 @@
         {VK_KHR_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceCapabilities = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities, nullptr);
-    auto CreateHeadlessSurfaceEXT = reinterpret_cast<PFN_vkCreateHeadlessSurfaceEXT>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT"));
+    PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilitiesKHR, nullptr);
+    PFN_vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT = instance.load("vkCreateHeadlessSurfaceEXT");
     ASSERT_NE(CreateHeadlessSurfaceEXT, nullptr);
-    auto DestroySurfaceKHR =
-        reinterpret_cast<PFN_vkDestroySurfaceKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"));
+    PFN_vkDestroySurfaceKHR DestroySurfaceKHR = instance.load("vkDestroySurfaceKHR");
     ASSERT_NE(DestroySurfaceKHR, nullptr);
-    auto GetPhysicalDeviceSurfaceCapabilities2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceCapabilities2KHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceCapabilities2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -3526,11 +3474,11 @@
 
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         VkSurfaceCapabilitiesKHR props{};
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities(physical_devices[dev], surface, &props));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilitiesKHR(physical_devices[dev], surface, &props));
 
         VkPhysicalDeviceSurfaceInfo2KHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, surface};
         VkSurfaceCapabilities2KHR props2{VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR};
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities2(physical_devices[dev], &info, &props2));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceCapabilities2KHR(physical_devices[dev], &info, &props2));
         ASSERT_TRUE(CompareSurfaceCapsData(props, props2.surfaceCapabilities));
     }
 
@@ -3546,9 +3494,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceFormats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormats2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceSurfaceFormats2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormats2KHR");
+    ASSERT_EQ(GetPhysicalDeviceSurfaceFormats2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceSurfaceFormats2KHR where instance supports it, but nothing else.
@@ -3561,13 +3509,13 @@
     instance.create_info.add_extension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceSurfaceFormats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormats2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceSurfaceFormats2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormats2KHR");
+    ASSERT_EQ(GetPhysicalDeviceSurfaceFormats2KHR, nullptr);
 }
 
 // Fill in random but valid data into the surface formats data struct for the current physical device
-static void FillInRandomSurfaceFormatsData(std::vector<VkSurfaceFormatKHR>& props) {
+void FillInRandomSurfaceFormatsData(std::vector<VkSurfaceFormatKHR>& props) {
     props.resize((rand() % 5) + 1);
     for (uint32_t i = 0; i < props.size(); ++i) {
         props[i].format = static_cast<VkFormat>((rand() % 0xFFF) + 1);
@@ -3576,8 +3524,8 @@
 }
 
 // Compare the surface formats data structs
-static bool CompareSurfaceFormatsData(const std::vector<VkSurfaceFormatKHR>& props1, const std::vector<VkSurfaceFormat2KHR>& props2,
-                                      bool supported = true) {
+bool CompareSurfaceFormatsData(const std::vector<VkSurfaceFormatKHR>& props1, const std::vector<VkSurfaceFormat2KHR>& props2,
+                               bool supported = true) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -3611,18 +3559,16 @@
         {VK_KHR_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceFormats = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceFormats, nullptr);
-    auto CreateHeadlessSurfaceEXT = reinterpret_cast<PFN_vkCreateHeadlessSurfaceEXT>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT"));
+    PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormatsKHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceFormatsKHR, nullptr);
+    PFN_vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT = instance.load("vkCreateHeadlessSurfaceEXT");
     ASSERT_NE(CreateHeadlessSurfaceEXT, nullptr);
-    auto DestroySurfaceKHR =
-        reinterpret_cast<PFN_vkDestroySurfaceKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"));
+    PFN_vkDestroySurfaceKHR DestroySurfaceKHR = instance.load("vkDestroySurfaceKHR");
     ASSERT_NE(DestroySurfaceKHR, nullptr);
-    auto GetPhysicalDeviceSurfaceFormats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormats2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceFormats2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormats2KHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceFormats2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -3635,19 +3581,19 @@
 
     std::vector<VkSurfaceFormatKHR> props{};
     uint32_t count_1 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats(physical_device, surface, &count_1, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &count_1, nullptr));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().surface_formats.size(), count_1);
     props.resize(count_1);
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats(physical_device, surface, &count_1, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &count_1, props.data()));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().surface_formats.size(), count_1);
 
     VkPhysicalDeviceSurfaceInfo2KHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, surface};
     std::vector<VkSurfaceFormat2KHR> props2{};
     uint32_t count_2 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2(physical_device, &info, &count_2, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2KHR(physical_device, &info, &count_2, nullptr));
     ASSERT_EQ(count_1, count_2);
     props2.resize(count_2, VkSurfaceFormat2KHR{VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR});
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2(physical_device, &info, &count_2, props2.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2KHR(physical_device, &info, &count_2, props2.data()));
     ASSERT_TRUE(CompareSurfaceFormatsData(props, props2));
 
     DestroySurfaceKHR(instance.inst, surface, nullptr);
@@ -3676,7 +3622,7 @@
     Extension third_ext{VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME};
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.enable_icd_wsi = true;
@@ -3717,18 +3663,16 @@
         {VK_KHR_SURFACE_EXTENSION_NAME, VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceSurfaceFormats = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceFormats, nullptr);
-    auto CreateHeadlessSurfaceEXT = reinterpret_cast<PFN_vkCreateHeadlessSurfaceEXT>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkCreateHeadlessSurfaceEXT"));
+    PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormatsKHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceFormatsKHR, nullptr);
+    PFN_vkCreateHeadlessSurfaceEXT CreateHeadlessSurfaceEXT = instance.load("vkCreateHeadlessSurfaceEXT");
     ASSERT_NE(CreateHeadlessSurfaceEXT, nullptr);
-    auto DestroySurfaceKHR =
-        reinterpret_cast<PFN_vkDestroySurfaceKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"));
+    PFN_vkDestroySurfaceKHR DestroySurfaceKHR = instance.load("vkDestroySurfaceKHR");
     ASSERT_NE(DestroySurfaceKHR, nullptr);
-    auto GetPhysicalDeviceSurfaceFormats2 = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormats2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"));
-    ASSERT_NE(GetPhysicalDeviceSurfaceFormats2, nullptr);
+    PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR =
+        instance.load("vkGetPhysicalDeviceSurfaceFormats2KHR");
+    ASSERT_NE(GetPhysicalDeviceSurfaceFormats2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -3742,19 +3686,19 @@
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         std::vector<VkSurfaceFormatKHR> props{};
         uint32_t count_1 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats(physical_devices[dev], surface, &count_1, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormatsKHR(physical_devices[dev], surface, &count_1, nullptr));
         ASSERT_NE(0U, count_1);
         props.resize(count_1);
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats(physical_devices[dev], surface, &count_1, props.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormatsKHR(physical_devices[dev], surface, &count_1, props.data()));
         ASSERT_NE(0U, count_1);
 
         VkPhysicalDeviceSurfaceInfo2KHR info{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, surface};
         std::vector<VkSurfaceFormat2KHR> props2{};
         uint32_t count_2 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2(physical_devices[dev], &info, &count_2, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2KHR(physical_devices[dev], &info, &count_2, nullptr));
         ASSERT_EQ(count_1, count_2);
         props2.resize(count_2, VkSurfaceFormat2KHR{VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR});
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2(physical_devices[dev], &info, &count_2, props2.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceSurfaceFormats2KHR(physical_devices[dev], &info, &count_2, props2.data()));
         ASSERT_EQ(count_1, count_2);
         ASSERT_TRUE(CompareSurfaceFormatsData(props, props2));
     }
@@ -3775,9 +3719,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceDisplayPropertiesKHR where instance supports it, but nothing else.
@@ -3790,9 +3734,9 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
 }
 
 VkDisplayKHR CreateRandomDisplay() { return (VkDisplayKHR)(((rand() % 0xFFFFFFFBull) << 12) * (rand() % 0xFFFFFFFull) + 1); }
@@ -3802,7 +3746,7 @@
 }
 
 // Fill in random but valid data into the display property data struct for the current physical device
-static void FillInRandomDisplayPropData(std::vector<VkDisplayPropertiesKHR>& props) {
+void FillInRandomDisplayPropData(std::vector<VkDisplayPropertiesKHR>& props) {
     props.resize((rand() % 5) + 1);
     for (uint32_t i = 0; i < props.size(); ++i) {
         props[i].display = CreateRandomDisplay();
@@ -3817,8 +3761,7 @@
 }
 
 // Compare the display property data structs
-static bool CompareDisplayPropData(const std::vector<VkDisplayPropertiesKHR>& props1,
-                                   const std::vector<VkDisplayPropertiesKHR>& props2) {
+bool CompareDisplayPropData(const std::vector<VkDisplayPropertiesKHR>& props1, const std::vector<VkDisplayPropertiesKHR>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -3846,9 +3789,9 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -3857,10 +3800,10 @@
 
     std::vector<VkDisplayPropertiesKHR> props{};
     uint32_t prop_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_device, &prop_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_device, &prop_count, nullptr));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_properties.size(), prop_count);
     props.resize(prop_count);
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_device, &prop_count, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_device, &prop_count, props.data()));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_properties.size(), prop_count);
 
     ASSERT_TRUE(CompareDisplayPropData(props, env.get_test_icd(0).physical_devices.back().display_properties));
@@ -3886,7 +3829,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -3921,9 +3864,9 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -3947,7 +3890,7 @@
                     cur_dev.properties.vendorID == pd_props.vendorID) {
                     std::vector<VkDisplayPropertiesKHR> props{};
                     uint32_t prop_count = 0;
-                    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_devices[dev], &prop_count, nullptr));
+                    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_devices[dev], &prop_count, nullptr));
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
@@ -3955,7 +3898,8 @@
                     } else {
                         ASSERT_EQ(cur_dev.display_properties.size(), prop_count);
                         props.resize(prop_count);
-                        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_devices[dev], &prop_count, props.data()));
+                        ASSERT_EQ(VK_SUCCESS,
+                                  GetPhysicalDeviceDisplayPropertiesKHR(physical_devices[dev], &prop_count, props.data()));
                         ASSERT_EQ(cur_dev.display_properties.size(), prop_count);
 
                         ASSERT_TRUE(CompareDisplayPropData(props, cur_dev.display_properties));
@@ -3980,9 +3924,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceDisplayPlanePropertiesKHR where instance supports it, but nothing else.
@@ -3995,13 +3939,13 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the display plane property data struct for the current physical device
-static void FillInRandomDisplayPlanePropData(std::vector<VkDisplayPlanePropertiesKHR>& props) {
+void FillInRandomDisplayPlanePropData(std::vector<VkDisplayPlanePropertiesKHR>& props) {
     props.resize((rand() % 5) + 1);
     for (uint32_t i = 0; i < props.size(); ++i) {
         props[i].currentDisplay = CreateRandomDisplay();
@@ -4010,8 +3954,8 @@
 }
 
 // Compare the display plane property data structs
-static bool CompareDisplayPlanePropData(const std::vector<VkDisplayPlanePropertiesKHR>& props1,
-                                        const std::vector<VkDisplayPlanePropertiesKHR>& props2) {
+bool CompareDisplayPlanePropData(const std::vector<VkDisplayPlanePropertiesKHR>& props1,
+                                 const std::vector<VkDisplayPlanePropertiesKHR>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -4033,9 +3977,9 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4044,10 +3988,10 @@
 
     std::vector<VkDisplayPlanePropertiesKHR> props{};
     uint32_t prop_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_device, &prop_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_device, &prop_count, nullptr));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_plane_properties.size(), prop_count);
     props.resize(prop_count);
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_device, &prop_count, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_device, &prop_count, props.data()));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_plane_properties.size(), prop_count);
 
     ASSERT_TRUE(CompareDisplayPlanePropData(props, env.get_test_icd(0).physical_devices.back().display_plane_properties));
@@ -4073,7 +4017,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -4108,9 +4052,9 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -4134,7 +4078,7 @@
                     cur_dev.properties.vendorID == pd_props.vendorID) {
                     std::vector<VkDisplayPlanePropertiesKHR> props{};
                     uint32_t prop_count = 0;
-                    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_devices[dev], &prop_count, nullptr));
+                    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_devices[dev], &prop_count, nullptr));
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
@@ -4143,7 +4087,7 @@
                         ASSERT_EQ(cur_dev.display_plane_properties.size(), prop_count);
                         props.resize(prop_count);
                         ASSERT_EQ(VK_SUCCESS,
-                                  GetPhysicalDeviceDisplayPlaneProperties(physical_devices[dev], &prop_count, props.data()));
+                                  GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_devices[dev], &prop_count, props.data()));
                         ASSERT_EQ(cur_dev.display_plane_properties.size(), prop_count);
 
                         ASSERT_TRUE(CompareDisplayPlanePropData(props, cur_dev.display_plane_properties));
@@ -4168,9 +4112,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDisplayPlaneSupportedDisplays = reinterpret_cast<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"));
-    ASSERT_EQ(GetDisplayPlaneSupportedDisplays, nullptr);
+    PFN_vkGetDisplayPlaneSupportedDisplaysKHR GetDisplayPlaneSupportedDisplaysKHR =
+        instance.load("vkGetDisplayPlaneSupportedDisplaysKHR");
+    ASSERT_EQ(GetDisplayPlaneSupportedDisplaysKHR, nullptr);
 }
 
 // Test vkGetDisplayPlaneSupportedDisplaysKHR where instance supports it, but nothing else.
@@ -4183,13 +4127,13 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDisplayPlaneSupportedDisplays = reinterpret_cast<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"));
-    ASSERT_EQ(GetDisplayPlaneSupportedDisplays, nullptr);
+    PFN_vkGetDisplayPlaneSupportedDisplaysKHR GetDisplayPlaneSupportedDisplaysKHR =
+        instance.load("vkGetDisplayPlaneSupportedDisplaysKHR");
+    ASSERT_EQ(GetDisplayPlaneSupportedDisplaysKHR, nullptr);
 }
 
 // Fill in random but valid data into the display plane property data struct for the current physical device
-static void GenerateRandomDisplays(std::vector<VkDisplayKHR>& disps) {
+void GenerateRandomDisplays(std::vector<VkDisplayKHR>& disps) {
     disps.resize((rand() % 5) + 1);
     for (uint32_t i = 0; i < disps.size(); ++i) {
         disps[i] = CreateRandomDisplay();
@@ -4197,7 +4141,7 @@
 }
 
 // Compare the display plane property data structs
-static bool CompareDisplays(const std::vector<VkDisplayKHR>& disps1, const std::vector<VkDisplayKHR>& disps2) {
+bool CompareDisplays(const std::vector<VkDisplayKHR>& disps1, const std::vector<VkDisplayKHR>& disps2) {
     if (disps1.size() != disps2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < disps1.size(); ++i) {
@@ -4218,9 +4162,9 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayPlaneSupportedDisplays = reinterpret_cast<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"));
-    ASSERT_NE(GetDisplayPlaneSupportedDisplays, nullptr);
+    PFN_vkGetDisplayPlaneSupportedDisplaysKHR GetDisplayPlaneSupportedDisplaysKHR =
+        instance.load("vkGetDisplayPlaneSupportedDisplaysKHR");
+    ASSERT_NE(GetDisplayPlaneSupportedDisplaysKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4229,10 +4173,10 @@
 
     std::vector<VkDisplayKHR> disps{};
     uint32_t disp_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplays(physical_device, 0, &disp_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplaysKHR(physical_device, 0, &disp_count, nullptr));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().displays.size(), disp_count);
     disps.resize(disp_count);
-    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplays(physical_device, 0, &disp_count, disps.data()));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplaysKHR(physical_device, 0, &disp_count, disps.data()));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().displays.size(), disp_count);
 
     ASSERT_TRUE(CompareDisplays(disps, env.get_test_icd(0).physical_devices.back().displays));
@@ -4258,7 +4202,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -4293,9 +4237,9 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetDisplayPlaneSupportedDisplays = reinterpret_cast<PFN_vkGetDisplayPlaneSupportedDisplaysKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"));
-    ASSERT_NE(GetDisplayPlaneSupportedDisplays, nullptr);
+    PFN_vkGetDisplayPlaneSupportedDisplaysKHR GetDisplayPlaneSupportedDisplaysKHR =
+        instance.load("vkGetDisplayPlaneSupportedDisplaysKHR");
+    ASSERT_NE(GetDisplayPlaneSupportedDisplaysKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -4319,7 +4263,7 @@
                     cur_dev.properties.vendorID == pd_props.vendorID) {
                     std::vector<VkDisplayKHR> disps{};
                     uint32_t disp_count = 0;
-                    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplays(physical_devices[dev], 0, &disp_count, nullptr));
+                    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneSupportedDisplaysKHR(physical_devices[dev], 0, &disp_count, nullptr));
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
@@ -4328,7 +4272,7 @@
                         ASSERT_EQ(cur_dev.displays.size(), disp_count);
                         disps.resize(disp_count);
                         ASSERT_EQ(VK_SUCCESS,
-                                  GetDisplayPlaneSupportedDisplays(physical_devices[dev], 0, &disp_count, disps.data()));
+                                  GetDisplayPlaneSupportedDisplaysKHR(physical_devices[dev], 0, &disp_count, disps.data()));
                         ASSERT_EQ(cur_dev.displays.size(), disp_count);
 
                         ASSERT_TRUE(CompareDisplays(disps, cur_dev.displays));
@@ -4353,9 +4297,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_EQ(GetDisplayModeProperties, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_EQ(GetDisplayModePropertiesKHR, nullptr);
 }
 
 // Test vkGetDisplayModePropertiesKHR where instance supports it, but nothing else.
@@ -4368,13 +4311,12 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_EQ(GetDisplayModeProperties, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_EQ(GetDisplayModePropertiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the display mode properties data struct for the current physical device
-static void GenerateRandomDisplayModeProps(std::vector<VkDisplayModePropertiesKHR>& disps) {
+void GenerateRandomDisplayModeProps(std::vector<VkDisplayModePropertiesKHR>& disps) {
     disps.resize((rand() % 5) + 1);
     for (uint32_t i = 0; i < disps.size(); ++i) {
         disps[i].displayMode = CreateRandomDisplayMode();
@@ -4385,8 +4327,8 @@
 }
 
 // Compare the display mode properties data structs
-static bool CompareDisplayModeProps(const std::vector<VkDisplayModePropertiesKHR>& disps1,
-                                    const std::vector<VkDisplayModePropertiesKHR>& disps2) {
+bool CompareDisplayModeProps(const std::vector<VkDisplayModePropertiesKHR>& disps1,
+                             const std::vector<VkDisplayModePropertiesKHR>& disps2) {
     if (disps1.size() != disps2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < disps1.size(); ++i) {
@@ -4410,9 +4352,8 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_NE(GetDisplayModeProperties, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_NE(GetDisplayModePropertiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4421,10 +4362,10 @@
 
     std::vector<VkDisplayModePropertiesKHR> props{};
     uint32_t props_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_device, VK_NULL_HANDLE, &props_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_device, VK_NULL_HANDLE, &props_count, nullptr));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_mode_properties.size(), props_count);
     props.resize(props_count);
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_device, VK_NULL_HANDLE, &props_count, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_device, VK_NULL_HANDLE, &props_count, props.data()));
     ASSERT_EQ(env.get_test_icd(0).physical_devices.back().display_mode_properties.size(), props_count);
 
     ASSERT_TRUE(CompareDisplayModeProps(props, env.get_test_icd(0).physical_devices.back().display_mode_properties));
@@ -4450,7 +4391,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -4485,9 +4426,8 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_NE(GetDisplayModeProperties, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_NE(GetDisplayModePropertiesKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -4510,7 +4450,8 @@
                     cur_dev.properties.driverVersion == pd_props.driverVersion &&
                     cur_dev.properties.vendorID == pd_props.vendorID) {
                     uint32_t props_count = 0;
-                    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_devices[dev], VK_NULL_HANDLE, &props_count, nullptr));
+                    ASSERT_EQ(VK_SUCCESS,
+                              GetDisplayModePropertiesKHR(physical_devices[dev], VK_NULL_HANDLE, &props_count, nullptr));
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
@@ -4520,7 +4461,7 @@
                         ASSERT_EQ(cur_dev.display_mode_properties.size(), props_count);
                         props.resize(props_count);
                         ASSERT_EQ(VK_SUCCESS,
-                                  GetDisplayModeProperties(physical_devices[dev], VK_NULL_HANDLE, &props_count, props.data()));
+                                  GetDisplayModePropertiesKHR(physical_devices[dev], VK_NULL_HANDLE, &props_count, props.data()));
                         ASSERT_EQ(cur_dev.display_mode_properties.size(), props_count);
 
                         ASSERT_TRUE(CompareDisplayModeProps(props, cur_dev.display_mode_properties));
@@ -4545,9 +4486,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto CreateDisplayMode =
-        reinterpret_cast<PFN_vkCreateDisplayModeKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkCreateDisplayModeKHR"));
-    ASSERT_EQ(CreateDisplayMode, nullptr);
+    PFN_vkCreateDisplayModeKHR CreateDisplayModeKHR = instance.load("vkCreateDisplayModeKHR");
+    ASSERT_EQ(CreateDisplayModeKHR, nullptr);
 }
 
 // Test vkCreateDisplayModeKHR where instance supports it, but nothing else.
@@ -4560,13 +4500,12 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto CreateDisplayMode =
-        reinterpret_cast<PFN_vkCreateDisplayModeKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkCreateDisplayModeKHR"));
-    ASSERT_EQ(CreateDisplayMode, nullptr);
+    PFN_vkCreateDisplayModeKHR CreateDisplayModeKHR = instance.load("vkCreateDisplayModeKHR");
+    ASSERT_EQ(CreateDisplayModeKHR, nullptr);
 }
 
 // Compare the display modes
-static bool CompareDisplayModes(const VkDisplayModeKHR& disps1, VkDisplayModeKHR& disps2) { return disps1 == disps2; }
+bool CompareDisplayModes(const VkDisplayModeKHR& disps1, VkDisplayModeKHR& disps2) { return disps1 == disps2; }
 
 // Test vkCreateDisplayModeKHR where instance and ICD supports it, but device does not support it.
 TEST(LoaderInstPhysDevExts, GetDispModesKHRInstanceAndICDSupport) {
@@ -4580,9 +4519,8 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto CreateDisplayMode =
-        reinterpret_cast<PFN_vkCreateDisplayModeKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkCreateDisplayModeKHR"));
-    ASSERT_NE(CreateDisplayMode, nullptr);
+    PFN_vkCreateDisplayModeKHR CreateDisplayModeKHR = instance.load("vkCreateDisplayModeKHR");
+    ASSERT_NE(CreateDisplayModeKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4591,7 +4529,7 @@
 
     VkDisplayModeKHR mode{};
     VkDisplayModeCreateInfoKHR create_info{VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR};
-    ASSERT_EQ(VK_SUCCESS, CreateDisplayMode(physical_device, VK_NULL_HANDLE, &create_info, nullptr, &mode));
+    ASSERT_EQ(VK_SUCCESS, CreateDisplayModeKHR(physical_device, VK_NULL_HANDLE, &create_info, nullptr, &mode));
     ASSERT_TRUE(CompareDisplayModes(mode, env.get_test_icd(0).physical_devices.back().display_mode));
 }
 
@@ -4615,7 +4553,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -4650,9 +4588,8 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto CreateDisplayMode =
-        reinterpret_cast<PFN_vkCreateDisplayModeKHR>(instance.functions->vkGetInstanceProcAddr(instance, "vkCreateDisplayModeKHR"));
-    ASSERT_NE(CreateDisplayMode, nullptr);
+    PFN_vkCreateDisplayModeKHR CreateDisplayModeKHR = instance.load("vkCreateDisplayModeKHR");
+    ASSERT_NE(CreateDisplayModeKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -4679,10 +4616,10 @@
                     if (icd == 1) {
                         // Unsupported ICD should return initialization failed (instead of crash)
                         ASSERT_EQ(VK_ERROR_INITIALIZATION_FAILED,
-                                  CreateDisplayMode(physical_devices[dev], VK_NULL_HANDLE, &create_info, nullptr, &mode));
+                                  CreateDisplayModeKHR(physical_devices[dev], VK_NULL_HANDLE, &create_info, nullptr, &mode));
                     } else {
                         ASSERT_EQ(VK_SUCCESS,
-                                  CreateDisplayMode(physical_devices[dev], VK_NULL_HANDLE, &create_info, nullptr, &mode));
+                                  CreateDisplayModeKHR(physical_devices[dev], VK_NULL_HANDLE, &create_info, nullptr, &mode));
                         ASSERT_TRUE(CompareDisplayModes(mode, cur_dev.display_mode));
                     }
                     found = true;
@@ -4705,9 +4642,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_EQ(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_EQ(GetDisplayPlaneCapabilitiesKHR, nullptr);
 }
 
 // Test vkGetDisplayPlaneCapabilitiesKHR where instance supports it, but nothing else.
@@ -4720,13 +4656,12 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_EQ(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_EQ(GetDisplayPlaneCapabilitiesKHR, nullptr);
 }
 
 // Fill in random but valid data into the display plane caps for the current physical device
-static void GenerateRandomDisplayPlaneCaps(VkDisplayPlaneCapabilitiesKHR& caps) {
+void GenerateRandomDisplayPlaneCaps(VkDisplayPlaneCapabilitiesKHR& caps) {
     caps.supportedAlpha = static_cast<VkDisplayPlaneAlphaFlagsKHR>((rand() % 0xFFFFFFF) + 1);
     caps.minSrcPosition.x = static_cast<uint32_t>((rand() % 0xFFFFFFF) + 1);
     caps.minSrcPosition.y = static_cast<uint32_t>((rand() % 0xFFFFFFF) + 1);
@@ -4747,8 +4682,8 @@
 }
 
 // Compare the display plane caps
-static bool CompareDisplayPlaneCaps(const VkDisplayPlaneCapabilitiesKHR& caps1, VkDisplayPlaneCapabilitiesKHR& caps2,
-                                    bool supported = true) {
+bool CompareDisplayPlaneCaps(const VkDisplayPlaneCapabilitiesKHR& caps1, VkDisplayPlaneCapabilitiesKHR& caps2,
+                             bool supported = true) {
     bool equal = true;
     if (supported) {
         equal = equal && caps1.supportedAlpha == caps2.supportedAlpha;
@@ -4802,9 +4737,8 @@
     instance.create_info.add_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_NE(GetDisplayPlaneCapabilitiesKHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4812,7 +4746,7 @@
     ASSERT_EQ(driver_count, 1U);
 
     VkDisplayPlaneCapabilitiesKHR caps{};
-    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities(physical_device, 0, 0, &caps));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilitiesKHR(physical_device, 0, 0, &caps));
     ASSERT_TRUE(CompareDisplayPlaneCaps(caps, env.get_test_icd(0).physical_devices.back().display_plane_capabilities));
 }
 
@@ -4836,7 +4770,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
 
@@ -4871,9 +4805,8 @@
     instance.create_info.add_extension(VK_KHR_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_NE(GetDisplayPlaneCapabilitiesKHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -4896,7 +4829,7 @@
                     cur_dev.properties.driverVersion == pd_props.driverVersion &&
                     cur_dev.properties.vendorID == pd_props.vendorID) {
                     VkDisplayPlaneCapabilitiesKHR caps{};
-                    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities(physical_devices[dev], 0, 0, &caps));
+                    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilitiesKHR(physical_devices[dev], 0, 0, &caps));
                     ASSERT_TRUE(CompareDisplayPlaneCaps(caps, cur_dev.display_plane_capabilities, icd != 1));
                     found = true;
                     break;
@@ -4922,9 +4855,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayProperties2KHR GetPhysicalDeviceDisplayProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayProperties2KHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayProperties2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceDisplayProperties2KHR where instance supports it, but nothing else.
@@ -4937,14 +4870,13 @@
     instance.create_info.add_extension(VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceDisplayProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayProperties2KHR GetPhysicalDeviceDisplayProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayProperties2KHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayProperties2KHR, nullptr);
 }
 
 // Compare the display property data structs
-static bool CompareDisplayPropData(const std::vector<VkDisplayPropertiesKHR>& props1,
-                                   const std::vector<VkDisplayProperties2KHR>& props2) {
+bool CompareDisplayPropData(const std::vector<VkDisplayPropertiesKHR>& props1, const std::vector<VkDisplayProperties2KHR>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -4974,12 +4906,12 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties, nullptr);
-    auto GetPhysicalDeviceDisplayProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayProperties2KHR GetPhysicalDeviceDisplayProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayProperties2KHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayProperties2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -4988,17 +4920,17 @@
 
     std::vector<VkDisplayPropertiesKHR> props{};
     uint32_t prop_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_device, &prop_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_device, &prop_count, nullptr));
     ASSERT_NE(0U, prop_count);
     props.resize(prop_count);
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_device, &prop_count, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_device, &prop_count, props.data()));
 
     std::vector<VkDisplayProperties2KHR> props2{};
     uint32_t prop_count_2 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2(physical_device, &prop_count_2, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2KHR(physical_device, &prop_count_2, nullptr));
     ASSERT_EQ(prop_count, prop_count_2);
     props2.resize(prop_count_2, {VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR});
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2(physical_device, &prop_count_2, props2.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2KHR(physical_device, &prop_count_2, props2.data()));
     ASSERT_EQ(prop_count, prop_count_2);
 
     ASSERT_TRUE(CompareDisplayPropData(props, props2));
@@ -5024,7 +4956,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5061,12 +4993,12 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties, nullptr);
-    auto GetPhysicalDeviceDisplayProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayProperties2KHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPropertiesKHR GetPhysicalDeviceDisplayPropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPropertiesKHR, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayProperties2KHR GetPhysicalDeviceDisplayProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayProperties2KHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayProperties2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5076,17 +5008,17 @@
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         std::vector<VkDisplayPropertiesKHR> props{};
         uint32_t prop_count = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_devices[dev], &prop_count, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_devices[dev], &prop_count, nullptr));
         ASSERT_NE(0U, prop_count);
         props.resize(prop_count);
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties(physical_devices[dev], &prop_count, props.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPropertiesKHR(physical_devices[dev], &prop_count, props.data()));
 
         std::vector<VkDisplayProperties2KHR> props2{};
         uint32_t prop_count_2 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2(physical_devices[dev], &prop_count_2, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2KHR(physical_devices[dev], &prop_count_2, nullptr));
         ASSERT_EQ(prop_count, prop_count_2);
         props2.resize(prop_count_2, {VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR});
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2(physical_devices[dev], &prop_count_2, props2.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayProperties2KHR(physical_devices[dev], &prop_count_2, props2.data()));
         ASSERT_EQ(prop_count, prop_count_2);
 
         ASSERT_TRUE(CompareDisplayPropData(props, props2));
@@ -5102,9 +5034,9 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR GetPhysicalDeviceDisplayPlaneProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties2KHR, nullptr);
 }
 
 // Test vkGetPhysicalDeviceDisplayPlaneProperties2KHR where instance supports it, but nothing else.
@@ -5117,14 +5049,14 @@
     instance.create_info.add_extension(VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetPhysicalDeviceDisplayPlaneProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"));
-    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR GetPhysicalDeviceDisplayPlaneProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
+    ASSERT_EQ(GetPhysicalDeviceDisplayPlaneProperties2KHR, nullptr);
 }
 
 // Compare the display plane property data structs
-static bool CompareDisplayPlanePropData(const std::vector<VkDisplayPlanePropertiesKHR>& props1,
-                                        const std::vector<VkDisplayPlaneProperties2KHR>& props2) {
+bool CompareDisplayPlanePropData(const std::vector<VkDisplayPlanePropertiesKHR>& props1,
+                                 const std::vector<VkDisplayPlaneProperties2KHR>& props2) {
     if (props1.size() != props2.size()) return false;
     bool equal = true;
     for (uint32_t i = 0; i < props1.size(); ++i) {
@@ -5148,12 +5080,12 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
-    auto GetPhysicalDeviceDisplayPlaneProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR GetPhysicalDeviceDisplayPlaneProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -5162,17 +5094,17 @@
 
     std::vector<VkDisplayPlanePropertiesKHR> props{};
     uint32_t prop_count = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_device, &prop_count, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_device, &prop_count, nullptr));
     ASSERT_NE(0U, prop_count);
     props.resize(prop_count);
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_device, &prop_count, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_device, &prop_count, props.data()));
 
     std::vector<VkDisplayPlaneProperties2KHR> props2{};
     uint32_t prop_count2 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2(physical_device, &prop_count2, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2KHR(physical_device, &prop_count2, nullptr));
     ASSERT_EQ(prop_count, prop_count2);
     props2.resize(prop_count2, {VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR});
-    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2(physical_device, &prop_count2, props2.data()));
+    ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2KHR(physical_device, &prop_count2, props2.data()));
 
     ASSERT_TRUE(CompareDisplayPlanePropData(props, props2));
 }
@@ -5197,7 +5129,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5234,12 +5166,12 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetPhysicalDeviceDisplayPlaneProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties, nullptr);
-    auto GetPhysicalDeviceDisplayPlaneProperties2 = reinterpret_cast<PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"));
-    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties2, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR GetPhysicalDeviceDisplayPlanePropertiesKHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlanePropertiesKHR, nullptr);
+    PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR GetPhysicalDeviceDisplayPlaneProperties2KHR =
+        instance.load("vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
+    ASSERT_NE(GetPhysicalDeviceDisplayPlaneProperties2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5249,17 +5181,17 @@
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         std::vector<VkDisplayPlanePropertiesKHR> props{};
         uint32_t prop_count = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_devices[dev], &prop_count, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_devices[dev], &prop_count, nullptr));
         ASSERT_NE(0U, prop_count);
         props.resize(prop_count);
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties(physical_devices[dev], &prop_count, props.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlanePropertiesKHR(physical_devices[dev], &prop_count, props.data()));
 
         std::vector<VkDisplayPlaneProperties2KHR> props2{};
         uint32_t prop_count2 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2(physical_devices[dev], &prop_count2, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2KHR(physical_devices[dev], &prop_count2, nullptr));
         ASSERT_EQ(prop_count, prop_count2);
         props2.resize(prop_count2, {VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR});
-        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2(physical_devices[dev], &prop_count2, props2.data()));
+        ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceDisplayPlaneProperties2KHR(physical_devices[dev], &prop_count2, props2.data()));
 
         ASSERT_TRUE(CompareDisplayPlanePropData(props, props2));
     }
@@ -5274,9 +5206,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties2 = reinterpret_cast<PFN_vkGetDisplayModeProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModeProperties2KHR"));
-    ASSERT_EQ(GetDisplayModeProperties2, nullptr);
+    PFN_vkGetDisplayModeProperties2KHR GetDisplayModeProperties2KHR = instance.load("vkGetDisplayModeProperties2KHR");
+    ASSERT_EQ(GetDisplayModeProperties2KHR, nullptr);
 }
 
 // Test vkGetDisplayModeProperties2KHR where instance supports it, but nothing else.
@@ -5289,14 +5220,13 @@
     instance.create_info.add_extension(VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDisplayModeProperties2 = reinterpret_cast<PFN_vkGetDisplayModeProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModeProperties2KHR"));
-    ASSERT_EQ(GetDisplayModeProperties2, nullptr);
+    PFN_vkGetDisplayModeProperties2KHR GetDisplayModeProperties2KHR = instance.load("vkGetDisplayModeProperties2KHR");
+    ASSERT_EQ(GetDisplayModeProperties2KHR, nullptr);
 }
 
 // Compare the display mode properties data structs
-static bool CompareDisplayModeProps(const std::vector<VkDisplayModePropertiesKHR>& disps1,
-                                    const std::vector<VkDisplayModeProperties2KHR>& disps2) {
+bool CompareDisplayModeProps(const std::vector<VkDisplayModePropertiesKHR>& disps1,
+                             const std::vector<VkDisplayModeProperties2KHR>& disps2) {
     if (disps1.size() != disps2.size()) return false;
 
     bool equal = true;
@@ -5324,12 +5254,10 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_NE(GetDisplayModeProperties, nullptr);
-    auto GetDisplayModeProperties2 = reinterpret_cast<PFN_vkGetDisplayModeProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModeProperties2KHR"));
-    ASSERT_NE(GetDisplayModeProperties2, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_NE(GetDisplayModePropertiesKHR, nullptr);
+    PFN_vkGetDisplayModeProperties2KHR GetDisplayModeProperties2KHR = instance.load("vkGetDisplayModeProperties2KHR");
+    ASSERT_NE(GetDisplayModeProperties2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -5338,17 +5266,17 @@
 
     std::vector<VkDisplayModePropertiesKHR> props{};
     uint32_t props_count1 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_device, VK_NULL_HANDLE, &props_count1, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_device, VK_NULL_HANDLE, &props_count1, nullptr));
     ASSERT_NE(0U, props_count1);
     props.resize(props_count1);
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_device, VK_NULL_HANDLE, &props_count1, props.data()));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_device, VK_NULL_HANDLE, &props_count1, props.data()));
 
     std::vector<VkDisplayModeProperties2KHR> props2{};
     uint32_t props_count2 = 0;
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2(physical_device, VK_NULL_HANDLE, &props_count2, nullptr));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2KHR(physical_device, VK_NULL_HANDLE, &props_count2, nullptr));
     ASSERT_EQ(props_count1, props_count2);
     props2.resize(props_count2, {VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR});
-    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2(physical_device, VK_NULL_HANDLE, &props_count2, props2.data()));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2KHR(physical_device, VK_NULL_HANDLE, &props_count2, props2.data()));
 
     ASSERT_TRUE(CompareDisplayModeProps(props, props2));
 }
@@ -5373,7 +5301,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5410,12 +5338,10 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayModeProperties = reinterpret_cast<PFN_vkGetDisplayModePropertiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"));
-    ASSERT_NE(GetDisplayModeProperties, nullptr);
-    auto GetDisplayModeProperties2 = reinterpret_cast<PFN_vkGetDisplayModeProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayModeProperties2KHR"));
-    ASSERT_NE(GetDisplayModeProperties2, nullptr);
+    PFN_vkGetDisplayModePropertiesKHR GetDisplayModePropertiesKHR = instance.load("vkGetDisplayModePropertiesKHR");
+    ASSERT_NE(GetDisplayModePropertiesKHR, nullptr);
+    PFN_vkGetDisplayModeProperties2KHR GetDisplayModeProperties2KHR = instance.load("vkGetDisplayModeProperties2KHR");
+    ASSERT_NE(GetDisplayModeProperties2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5425,17 +5351,17 @@
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         std::vector<VkDisplayModePropertiesKHR> props{};
         uint32_t props_count1 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_devices[dev], VK_NULL_HANDLE, &props_count1, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_devices[dev], VK_NULL_HANDLE, &props_count1, nullptr));
         ASSERT_NE(0U, props_count1);
         props.resize(props_count1);
-        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties(physical_devices[dev], VK_NULL_HANDLE, &props_count1, props.data()));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayModePropertiesKHR(physical_devices[dev], VK_NULL_HANDLE, &props_count1, props.data()));
 
         std::vector<VkDisplayModeProperties2KHR> props2{};
         uint32_t props_count2 = 0;
-        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2(physical_devices[dev], VK_NULL_HANDLE, &props_count2, nullptr));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2KHR(physical_devices[dev], VK_NULL_HANDLE, &props_count2, nullptr));
         ASSERT_EQ(props_count1, props_count2);
         props2.resize(props_count2, {VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR});
-        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2(physical_devices[dev], VK_NULL_HANDLE, &props_count2, props2.data()));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayModeProperties2KHR(physical_devices[dev], VK_NULL_HANDLE, &props_count2, props2.data()));
 
         ASSERT_TRUE(CompareDisplayModeProps(props, props2));
     }
@@ -5450,9 +5376,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_EQ(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_EQ(GetDisplayPlaneCapabilitiesKHR, nullptr);
 }
 
 // Test vkGetDisplayPlaneCapabilities2KHR where instance supports it, but nothing else.
@@ -5465,13 +5390,12 @@
     instance.create_info.add_extension(VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_EQ(GetDisplayPlaneCapabilities, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_EQ(GetDisplayPlaneCapabilitiesKHR, nullptr);
 }
 
 // Compare the display plane caps
-static bool CompareDisplayPlaneCaps(const VkDisplayPlaneCapabilitiesKHR& caps1, VkDisplayPlaneCapabilities2KHR& caps2) {
+bool CompareDisplayPlaneCaps(const VkDisplayPlaneCapabilitiesKHR& caps1, VkDisplayPlaneCapabilities2KHR& caps2) {
     bool equal = true;
     equal = equal && caps1.supportedAlpha == caps2.capabilities.supportedAlpha;
     equal = equal && caps1.minSrcPosition.x == caps2.capabilities.minSrcPosition.x;
@@ -5507,12 +5431,10 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities, nullptr);
-    auto GetDisplayPlaneCapabilities2 = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilities2KHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities2, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_NE(GetDisplayPlaneCapabilitiesKHR, nullptr);
+    PFN_vkGetDisplayPlaneCapabilities2KHR GetDisplayPlaneCapabilities2KHR = instance.load("vkGetDisplayPlaneCapabilities2KHR");
+    ASSERT_NE(GetDisplayPlaneCapabilities2KHR, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -5520,10 +5442,10 @@
     ASSERT_EQ(driver_count, 1U);
 
     VkDisplayPlaneCapabilitiesKHR caps{};
-    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities(physical_device, 0, 0, &caps));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilitiesKHR(physical_device, 0, 0, &caps));
     VkDisplayPlaneCapabilities2KHR caps2{};
     VkDisplayPlaneInfo2KHR info{VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR};
-    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities2(physical_device, &info, &caps2));
+    ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities2KHR(physical_device, &info, &caps2));
     ASSERT_TRUE(CompareDisplayPlaneCaps(caps, caps2));
 }
 
@@ -5547,7 +5469,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5584,12 +5506,10 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDisplayPlaneCapabilities = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilitiesKHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities, nullptr);
-    auto GetDisplayPlaneCapabilities2 = reinterpret_cast<PFN_vkGetDisplayPlaneCapabilities2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilities2KHR"));
-    ASSERT_NE(GetDisplayPlaneCapabilities2, nullptr);
+    PFN_vkGetDisplayPlaneCapabilitiesKHR GetDisplayPlaneCapabilitiesKHR = instance.load("vkGetDisplayPlaneCapabilitiesKHR");
+    ASSERT_NE(GetDisplayPlaneCapabilitiesKHR, nullptr);
+    PFN_vkGetDisplayPlaneCapabilities2KHR GetDisplayPlaneCapabilities2KHR = instance.load("vkGetDisplayPlaneCapabilities2KHR");
+    ASSERT_NE(GetDisplayPlaneCapabilities2KHR, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5598,10 +5518,10 @@
 
     for (uint32_t dev = 0; dev < device_count; ++dev) {
         VkDisplayPlaneCapabilitiesKHR caps{};
-        ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities(physical_devices[dev], 0, 0, &caps));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilitiesKHR(physical_devices[dev], 0, 0, &caps));
         VkDisplayPlaneCapabilities2KHR caps2{};
         VkDisplayPlaneInfo2KHR info{VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR};
-        ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities2(physical_devices[dev], &info, &caps2));
+        ASSERT_EQ(VK_SUCCESS, GetDisplayPlaneCapabilities2KHR(physical_devices[dev], &info, &caps2));
         CompareDisplayPlaneCaps(caps, caps2);
     }
 }
@@ -5619,9 +5539,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto AcquireDrmDisplay =
-        reinterpret_cast<PFN_vkAcquireDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT"));
-    ASSERT_EQ(AcquireDrmDisplay, nullptr);
+    PFN_vkAcquireDrmDisplayEXT AcquireDrmDisplayEXT = instance.load("vkAcquireDrmDisplayEXT");
+    ASSERT_EQ(AcquireDrmDisplayEXT, nullptr);
 }
 
 // Test vkAcquireDrmDisplayEXT where instance supports it, but nothing else.
@@ -5634,9 +5553,8 @@
     instance.create_info.add_extension(VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto AcquireDrmDisplay =
-        reinterpret_cast<PFN_vkAcquireDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT"));
-    ASSERT_EQ(AcquireDrmDisplay, nullptr);
+    PFN_vkAcquireDrmDisplayEXT AcquireDrmDisplayEXT = instance.load("vkAcquireDrmDisplayEXT");
+    ASSERT_EQ(AcquireDrmDisplayEXT, nullptr);
 }
 
 // Test vkAcquireDrmDisplayEXT where instance and ICD supports it, but device does not support it.
@@ -5653,9 +5571,8 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto AcquireDrmDisplay =
-        reinterpret_cast<PFN_vkAcquireDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT"));
-    ASSERT_NE(AcquireDrmDisplay, nullptr);
+    PFN_vkAcquireDrmDisplayEXT AcquireDrmDisplayEXT = instance.load("vkAcquireDrmDisplayEXT");
+    ASSERT_NE(AcquireDrmDisplayEXT, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -5663,7 +5580,7 @@
     ASSERT_EQ(driver_count, 1U);
 
     VkDisplayKHR display = VK_NULL_HANDLE;
-    ASSERT_EQ(VK_SUCCESS, AcquireDrmDisplay(physical_device, 0, display));
+    ASSERT_EQ(VK_SUCCESS, AcquireDrmDisplayEXT(physical_device, 0, display));
 }
 
 // Test vkAcquireDrmDisplayEXT where instance supports it with some ICDs that both support
@@ -5686,7 +5603,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5723,9 +5640,8 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto AcquireDrmDisplay =
-        reinterpret_cast<PFN_vkAcquireDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkAcquireDrmDisplayEXT"));
-    ASSERT_NE(AcquireDrmDisplay, nullptr);
+    PFN_vkAcquireDrmDisplayEXT AcquireDrmDisplayEXT = instance.load("vkAcquireDrmDisplayEXT");
+    ASSERT_NE(AcquireDrmDisplayEXT, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5751,9 +5667,9 @@
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
-                        ASSERT_EQ(VK_ERROR_INITIALIZATION_FAILED, AcquireDrmDisplay(physical_devices[dev], 0, display));
+                        ASSERT_EQ(VK_ERROR_INITIALIZATION_FAILED, AcquireDrmDisplayEXT(physical_devices[dev], 0, display));
                     } else {
-                        ASSERT_EQ(VK_SUCCESS, AcquireDrmDisplay(physical_devices[dev], 0, display));
+                        ASSERT_EQ(VK_SUCCESS, AcquireDrmDisplayEXT(physical_devices[dev], 0, display));
                     }
                     found = true;
                     break;
@@ -5775,9 +5691,8 @@
     InstWrapper instance(env.vulkan_functions);
     instance.CheckCreate();
 
-    auto GetDrmDisplay =
-        reinterpret_cast<PFN_vkGetDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkGetDrmDisplayEXT"));
-    ASSERT_EQ(GetDrmDisplay, nullptr);
+    PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT = instance.load("vkGetDrmDisplayEXT");
+    ASSERT_EQ(GetDrmDisplayEXT, nullptr);
 }
 
 // Test vkGetDrmDisplayEXT where instance supports it, but nothing else.
@@ -5790,9 +5705,8 @@
     instance.create_info.add_extension(VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME);
     instance.CheckCreate(VK_ERROR_EXTENSION_NOT_PRESENT);
 
-    auto GetDrmDisplay =
-        reinterpret_cast<PFN_vkGetDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkGetDrmDisplayEXT"));
-    ASSERT_EQ(GetDrmDisplay, nullptr);
+    PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT = instance.load("vkGetDrmDisplayEXT");
+    ASSERT_EQ(GetDrmDisplayEXT, nullptr);
 }
 
 // Test vkGetDrmDisplayEXT where instance and ICD supports it, but device does not support it.
@@ -5809,9 +5723,8 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDrmDisplay =
-        reinterpret_cast<PFN_vkGetDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkGetDrmDisplayEXT"));
-    ASSERT_NE(GetDrmDisplay, nullptr);
+    PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT = instance.load("vkGetDrmDisplayEXT");
+    ASSERT_NE(GetDrmDisplayEXT, nullptr);
 
     uint32_t driver_count = 1;
     VkPhysicalDevice physical_device;
@@ -5819,7 +5732,7 @@
     ASSERT_EQ(driver_count, 1U);
 
     VkDisplayKHR display = VK_NULL_HANDLE;
-    ASSERT_EQ(VK_SUCCESS, GetDrmDisplay(physical_device, 0, 0, &display));
+    ASSERT_EQ(VK_SUCCESS, GetDrmDisplayEXT(physical_device, 0, 0, &display));
     ASSERT_EQ(display, env.get_test_icd(0).physical_devices.back().displays[0]);
 }
 
@@ -5843,7 +5756,7 @@
     const uint32_t max_phys_devs = 7;
 
     for (uint32_t icd = 0; icd < max_icd_count; ++icd) {
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, icd != 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0));
         auto& cur_icd = env.get_test_icd(icd);
         cur_icd.icd_api_version = VK_API_VERSION_1_0;
         cur_icd.add_instance_extension({VK_KHR_DISPLAY_EXTENSION_NAME});
@@ -5880,9 +5793,8 @@
     instance.create_info.add_extensions({VK_KHR_DISPLAY_EXTENSION_NAME, VK_EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME});
     instance.CheckCreate();
 
-    auto GetDrmDisplay =
-        reinterpret_cast<PFN_vkGetDrmDisplayEXT>(instance.functions->vkGetInstanceProcAddr(instance, "vkGetDrmDisplayEXT"));
-    ASSERT_NE(GetDrmDisplay, nullptr);
+    PFN_vkGetDrmDisplayEXT GetDrmDisplayEXT = instance.load("vkGetDrmDisplayEXT");
+    ASSERT_NE(GetDrmDisplayEXT, nullptr);
 
     uint32_t device_count = max_phys_devs;
     std::array<VkPhysicalDevice, max_phys_devs> physical_devices;
@@ -5908,9 +5820,9 @@
                     if (icd == 1) {
                         // For this extension, if no support exists (like for ICD 1), the value of 0 should be returned by the
                         // loader.
-                        ASSERT_EQ(VK_ERROR_INITIALIZATION_FAILED, GetDrmDisplay(physical_devices[dev], 0, 0, &display));
+                        ASSERT_EQ(VK_ERROR_INITIALIZATION_FAILED, GetDrmDisplayEXT(physical_devices[dev], 0, 0, &display));
                     } else {
-                        ASSERT_EQ(VK_SUCCESS, GetDrmDisplay(physical_devices[dev], 0, 0, &display));
+                        ASSERT_EQ(VK_SUCCESS, GetDrmDisplayEXT(physical_devices[dev], 0, 0, &display));
                         ASSERT_EQ(display, cur_dev.displays[0]);
                     }
                     found = true;
@@ -5930,17 +5842,17 @@
     // Add 3 drivers each of which supports a different instance extension
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(0).add_instance_extension({VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME});
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+    env.get_test_icd(0).physical_devices.push_back({"pd0"});
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(1).add_instance_extension({VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME});
-    env.get_test_icd(1).physical_devices.push_back({"pd1", 0});
+    env.get_test_icd(1).physical_devices.push_back({"pd1"});
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(2).add_instance_extension({VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME});
-    env.get_test_icd(2).physical_devices.push_back({"pd2", 1});
+    env.get_test_icd(2).physical_devices.push_back({"pd2"});
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME, 0});
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT};
@@ -5954,12 +5866,12 @@
     const uint32_t expected_device_count = 3;
     auto physical_devices = inst.GetPhysDevs(expected_device_count);
 
-    auto GetPhysicalDeviceExternalBufferProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"));
-    auto GetPhysicalDeviceExternalSemaphoreProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"));
-    auto GetPhysicalDeviceExternalFenceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceExternalFencePropertiesKHR"));
+    PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferProperties =
+        inst.load("vkGetPhysicalDeviceExternalBufferPropertiesKHR");
+    PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphoreProperties =
+        inst.load("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
+    PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFenceProperties =
+        inst.load("vkGetPhysicalDeviceExternalFencePropertiesKHR");
     ASSERT_NE(nullptr, GetPhysicalDeviceExternalBufferProperties);
     ASSERT_NE(nullptr, GetPhysicalDeviceExternalSemaphoreProperties);
     ASSERT_NE(nullptr, GetPhysicalDeviceExternalFenceProperties);
@@ -5984,15 +5896,15 @@
 
     // Add 3 drivers each of which supports a different physical device extension
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+    env.get_test_icd(0).physical_devices.push_back("pd0");
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
-    env.get_test_icd(1).physical_devices.push_back({"pd1", 0});
+    env.get_test_icd(1).physical_devices.push_back("pd1");
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
-    env.get_test_icd(2).physical_devices.push_back({"pd2", 1});
+    env.get_test_icd(2).physical_devices.push_back("pd2");
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME, 0});
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT};
@@ -6003,16 +5915,16 @@
     const uint32_t expected_device_count = 3;
     auto physical_devices = inst.GetPhysDevs(expected_device_count);
 
-    auto EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCounters =
-        reinterpret_cast<PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR>(
-            inst.functions->vkGetInstanceProcAddr(inst, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"));
-    auto GetPhysicalDeviceMultisampleProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceMultisamplePropertiesEXT"));
-    auto GetPhysicalDeviceCalibrateableTimeDomains = reinterpret_cast<PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"));
-    ASSERT_NE(nullptr, EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCounters);
-    ASSERT_NE(nullptr, GetPhysicalDeviceMultisampleProperties);
-    ASSERT_NE(nullptr, GetPhysicalDeviceCalibrateableTimeDomains);
+    PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
+        EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR =
+            inst.load("vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR");
+    PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT =
+        inst.load("vkGetPhysicalDeviceMultisamplePropertiesEXT");
+    PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT GetPhysicalDeviceCalibrateableTimeDomainsEXT =
+        inst.load("vkGetPhysicalDeviceCalibrateableTimeDomainsEXT");
+    ASSERT_NE(nullptr, EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR);
+    ASSERT_NE(nullptr, GetPhysicalDeviceMultisamplePropertiesEXT);
+    ASSERT_NE(nullptr, GetPhysicalDeviceCalibrateableTimeDomainsEXT);
 
     for (uint32_t dev = 0; dev < expected_device_count; ++dev) {
         uint32_t extension_count = 0;
@@ -6040,27 +5952,27 @@
 
         // For physical device extensions, they should work for devices that support it and crash for those that don't.
         if (supports_query) {
-            ASSERT_EQ(VK_SUCCESS, EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCounters(physical_devices[dev], 0, nullptr,
-                                                                                             nullptr, nullptr));
+            ASSERT_EQ(VK_SUCCESS, EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(physical_devices[dev], 0, nullptr,
+                                                                                                nullptr, nullptr));
         } else {
             ASSERT_DEATH(
-                EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCounters(physical_devices[dev], 0, nullptr, nullptr, nullptr),
+                EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(physical_devices[dev], 0, nullptr, nullptr, nullptr),
                 "");
             ASSERT_FALSE(
                 log.find("ICD associated with VkPhysicalDevice does not support "
                          "EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"));
         }
         if (supports_samples) {
-            GetPhysicalDeviceMultisampleProperties(physical_devices[dev], VK_SAMPLE_COUNT_2_BIT, nullptr);
+            GetPhysicalDeviceMultisamplePropertiesEXT(physical_devices[dev], VK_SAMPLE_COUNT_2_BIT, nullptr);
         } else {
-            ASSERT_DEATH(GetPhysicalDeviceMultisampleProperties(physical_devices[dev], VK_SAMPLE_COUNT_2_BIT, nullptr), "");
+            ASSERT_DEATH(GetPhysicalDeviceMultisamplePropertiesEXT(physical_devices[dev], VK_SAMPLE_COUNT_2_BIT, nullptr), "");
             ASSERT_FALSE(
                 log.find("ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceMultisamplePropertiesEXT"));
         }
         if (supports_timestamps) {
-            ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceCalibrateableTimeDomains(physical_devices[dev], nullptr, nullptr));
+            ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceCalibrateableTimeDomainsEXT(physical_devices[dev], nullptr, nullptr));
         } else {
-            ASSERT_DEATH(GetPhysicalDeviceCalibrateableTimeDomains(physical_devices[dev], nullptr, nullptr), "");
+            ASSERT_DEATH(GetPhysicalDeviceCalibrateableTimeDomainsEXT(physical_devices[dev], nullptr, nullptr), "");
             ASSERT_FALSE(
                 log.find("ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceCalibrateableTimeDomainsEXT"));
         }
diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp
index 204a1c8..831f313 100644
--- a/tests/loader_regression_tests.cpp
+++ b/tests/loader_regression_tests.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -36,10 +36,7 @@
 
 TEST(CreateInstance, BasicRun) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd();
-    driver.set_min_icd_interface_version(5);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -96,7 +93,7 @@
 
 TEST(CreateInstance, LayerPresent) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}).add_physical_device({});
 
     const char* layer_name = "TestLayer";
     env.add_explicit_layer(
@@ -109,6 +106,25 @@
     inst.CheckCreate();
 }
 
+TEST(CreateInstance, RelativePaths) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.set_library_path_type(LibraryPathType::relative)).add_physical_device({});
+
+    const char* layer_name = "VK_LAYER_TestLayer";
+    env.add_explicit_layer(
+        TestLayerDetails{ManifestLayer{}.add_layer(
+                             ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                         "test_layer.json"}
+            .set_library_path_type(LibraryPathType::relative));
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_layer(layer_name);
+    inst.CheckCreate();
+
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+}
+
 TEST(CreateInstance, ConsecutiveCreate) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
@@ -158,6 +174,7 @@
         uint32_t layer_count = 2;
         ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props));
         ASSERT_EQ(layer_count, 2U);
+        auto layers = env.GetLayerProperties(2);
         ASSERT_TRUE(string_eq(layer_name_1, layer_props[0].layerName));
         ASSERT_TRUE(string_eq(layer_name_2, layer_props[1].layerName));
     }
@@ -189,34 +206,28 @@
     env.reset_icd().add_instance_extensions({first_ext, second_ext});
 
     {  // One Pass
-        uint32_t extension_count = 5;
-        std::array<VkExtensionProperties, 5> extensions;
+        uint32_t extension_count = 6;
+        std::array<VkExtensionProperties, 6> extensions;
         ASSERT_EQ(VK_SUCCESS,
                   env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-        ASSERT_EQ(extension_count, 5U);  // return debug report & debug utils & portability enumeration + our two extensions
+        ASSERT_EQ(extension_count, 6U);  // default extensions + our two extensions
 
-        // loader always adds the debug report & debug utils extensions
-        ASSERT_TRUE(first_ext.extensionName == extensions[0].extensionName);
-        ASSERT_TRUE(second_ext.extensionName == extensions[1].extensionName);
-        ASSERT_TRUE(string_eq("VK_EXT_debug_report", extensions[2].extensionName));
-        ASSERT_TRUE(string_eq("VK_EXT_debug_utils", extensions[3].extensionName));
-        ASSERT_TRUE(string_eq("VK_KHR_portability_enumeration", extensions[4].extensionName));
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, first_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, second_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(5).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
     {  // Two Pass
-        uint32_t extension_count = 0;
-        std::array<VkExtensionProperties, 5> extensions;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 5U);  // return debug report & debug utils + our two extensions
-
-        ASSERT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-        ASSERT_EQ(extension_count, 5U);
+        auto extensions = env.GetInstanceExtensions(6);
         // loader always adds the debug report & debug utils extensions
-        ASSERT_TRUE(first_ext.extensionName == extensions[0].extensionName);
-        ASSERT_TRUE(second_ext.extensionName == extensions[1].extensionName);
-        ASSERT_TRUE(string_eq("VK_EXT_debug_report", extensions[2].extensionName));
-        ASSERT_TRUE(string_eq("VK_EXT_debug_utils", extensions[3].extensionName));
-        ASSERT_TRUE(string_eq("VK_KHR_portability_enumeration", extensions[4].extensionName));
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, first_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, second_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(5).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
 }
 
@@ -225,10 +236,10 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
     uint32_t extension_count = 0;
-    std::array<VkExtensionProperties, 2> extensions;
+    std::array<VkExtensionProperties, 4> extensions;
     {  // use nullptr for null string
         ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
+        ASSERT_EQ(extension_count, 4U);  // return debug report & debug utils & portability enumeration & direct driver loading
         extension_count = 1;             // artificially remove one extension
 
         ASSERT_EQ(VK_INCOMPLETE,
@@ -239,7 +250,7 @@
     }
     {  // use "" for null string
         ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties("", &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
+        ASSERT_EQ(extension_count, 4U);  // return debug report & debug utils & portability enumeration & direct driver loading
         extension_count = 1;             // artificially remove one extension
 
         ASSERT_EQ(VK_INCOMPLETE,
@@ -258,44 +269,29 @@
     Extension second_ext{"SecondTestExtension"};
     env.reset_icd().add_instance_extensions({first_ext, second_ext});
     {
-        uint32_t extension_count = 0;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties("", &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 3U);  // return debug report & debug utils & portability enumeration
-
-        std::array<VkExtensionProperties, 3> extensions;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties("", &extension_count, extensions.data()));
-        ASSERT_EQ(extension_count, 3U);
+        auto extensions = env.GetInstanceExtensions(4);
         // loader always adds the debug report & debug utils extensions
-        ASSERT_TRUE(string_eq(extensions[0].extensionName, "VK_EXT_debug_report"));
-        ASSERT_TRUE(string_eq(extensions[1].extensionName, "VK_EXT_debug_utils"));
-        ASSERT_TRUE(string_eq(extensions[2].extensionName, "VK_KHR_portability_enumeration"));
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
     {  // Disable unknown instance extension filtering
-        set_env_var("VK_LOADER_DISABLE_INST_EXT_FILTER", "1");
+        EnvVarWrapper disable_inst_ext_filter_env_var{"VK_LOADER_DISABLE_INST_EXT_FILTER", "1"};
 
-        uint32_t extension_count = 0;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties("", &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 5U);
-
-        std::array<VkExtensionProperties, 5> extensions;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties("", &extension_count, extensions.data()));
-        ASSERT_EQ(extension_count, 5U);
-
-        ASSERT_EQ(extensions[0], first_ext.get());
-        ASSERT_EQ(extensions[1], second_ext.get());
-        // Loader always adds these two extensions
-        ASSERT_TRUE(string_eq(extensions[2].extensionName, "VK_EXT_debug_report"));
-        ASSERT_TRUE(string_eq(extensions[3].extensionName, "VK_EXT_debug_utils"));
-        ASSERT_TRUE(string_eq(extensions[4].extensionName, "VK_KHR_portability_enumeration"));
+        auto extensions = env.GetInstanceExtensions(6);
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, first_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, second_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(5).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
 }
 
 TEST(EnumerateDeviceLayerProperties, LayersMatch) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name = "TestLayer";
     env.add_explicit_layer(
@@ -309,14 +305,8 @@
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
     {  // LayersMatch
-
-        uint32_t layer_count = 0;
-        ASSERT_EQ(env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &layer_count, nullptr), VK_SUCCESS);
-        ASSERT_EQ(layer_count, 1U);
-        VkLayerProperties layer_props;
-        ASSERT_EQ(env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &layer_count, &layer_props), VK_SUCCESS);
-        ASSERT_EQ(layer_count, 1U);
-        ASSERT_TRUE(string_eq(layer_props.layerName, layer_name));
+        auto layer_props = inst.GetActiveLayers(phys_dev, 1);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
     }
     {  // Property count less than available
         VkLayerProperties layer_props;
@@ -328,10 +318,7 @@
 
 TEST(EnumerateDeviceExtensionProperties, DeviceExtensionEnumerated) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     std::array<Extension, 2> device_extensions = {Extension{"MyExtension0", 4}, Extension{"MyExtension1", 7}};
     for (auto& ext : device_extensions) {
@@ -358,10 +345,7 @@
 
 TEST(EnumerateDeviceExtensionProperties, PropertyCountLessThanAvailable) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     std::array<Extension, 2> device_extensions = {Extension{"MyExtension0", 4}, Extension{"MyExtension1", 7}};
     for (auto& ext : device_extensions) {
@@ -389,9 +373,8 @@
 
 TEST(EnumerateDeviceExtensionProperties, ZeroPhysicalDeviceExtensions) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
 
-    env.get_test_icd().add_physical_device({});
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 1, 0));
     inst.CheckCreate(VK_SUCCESS);
@@ -408,16 +391,284 @@
     ASSERT_EQ(ext_count, 0U);
 }
 
+void exercise_EnumerateDeviceExtensionProperties(InstWrapper& inst, VkPhysicalDevice physical_device,
+                                                 std::vector<Extension>& exts_to_expect) {
+    {  // "expected enumeration pattern"
+        uint32_t extension_count = 0;
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count, nullptr));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+
+        std::vector<VkExtensionProperties> enumerated_device_exts{extension_count};
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count,
+                                                                         enumerated_device_exts.data()));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+        for (uint32_t i = 0; i < exts_to_expect.size(); i++) {
+            ASSERT_TRUE(exts_to_expect[i].extensionName == enumerated_device_exts[i].extensionName);
+            ASSERT_EQ(exts_to_expect[i].specVersion, enumerated_device_exts[i].specVersion);
+        }
+    }
+    {  // "Single call pattern"
+        uint32_t extension_count = static_cast<uint32_t>(exts_to_expect.size());
+        std::vector<VkExtensionProperties> enumerated_device_exts{extension_count};
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count,
+                                                                         enumerated_device_exts.data()));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+        enumerated_device_exts.resize(extension_count);
+
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+        for (uint32_t i = 0; i < exts_to_expect.size(); i++) {
+            ASSERT_TRUE(exts_to_expect[i].extensionName == enumerated_device_exts[i].extensionName);
+            ASSERT_EQ(exts_to_expect[i].specVersion, enumerated_device_exts[i].specVersion);
+        }
+    }
+    {  // pPropertiesCount == NULL
+        ASSERT_EQ(VK_INCOMPLETE, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, nullptr, nullptr));
+    }
+    {  // 2nd call pass in way more than in reality
+        uint32_t extension_count = std::numeric_limits<uint32_t>::max();
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count, nullptr));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+
+        // reset size to a not earthshatteringly large number of extensions
+        extension_count = static_cast<uint32_t>(exts_to_expect.size()) * 4;
+        std::vector<VkExtensionProperties> enumerated_device_exts{extension_count};
+
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count,
+                                                                         enumerated_device_exts.data()));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+        for (uint32_t i = 0; i < exts_to_expect.size(); i++) {
+            ASSERT_TRUE(exts_to_expect[i].extensionName == enumerated_device_exts[i].extensionName);
+            ASSERT_EQ(exts_to_expect[i].specVersion, enumerated_device_exts[i].specVersion);
+        }
+    }
+    {  // 2nd call pass in not enough, go through all possible values from 0 to exts_to_expect.size()
+        uint32_t extension_count = std::numeric_limits<uint32_t>::max();
+        ASSERT_EQ(VK_SUCCESS, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count, nullptr));
+        ASSERT_EQ(extension_count, exts_to_expect.size());
+        std::vector<VkExtensionProperties> enumerated_device_exts{extension_count};
+        for (uint32_t i = 0; i < exts_to_expect.size() - 1; i++) {
+            extension_count = i;
+            ASSERT_EQ(VK_INCOMPLETE, inst->vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &extension_count,
+                                                                                enumerated_device_exts.data()));
+            ASSERT_EQ(extension_count, i);
+            for (uint32_t j = 0; j < i; j++) {
+                ASSERT_TRUE(exts_to_expect[j].extensionName == enumerated_device_exts[j].extensionName);
+                ASSERT_EQ(exts_to_expect[j].specVersion, enumerated_device_exts[j].specVersion);
+            }
+        }
+    }
+}
+
+TEST(EnumerateDeviceExtensionProperties, ImplicitLayerPresentNoExtensions) {
+    FrameworkEnvironment env{};
+
+    std::vector<Extension> exts = {Extension{"MyDriverExtension0", 4}, Extension{"MyDriverExtension1", 7},
+                                   Extension{"MyDriverExtension2", 6}, Extension{"MyDriverExtension3", 10}};
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .add_physical_device("physical_device_0")
+        .physical_devices.at(0)
+        .add_extensions(exts);
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    exercise_EnumerateDeviceExtensionProperties(inst, inst.GetPhysDev(), exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, ImplicitLayerPresentWithExtensions) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 6; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension0", 4);
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension1", 7);
+
+    exts.insert(exts.begin(), driver.physical_devices.front().extensions.begin(), driver.physical_devices.front().extensions.end());
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, ImplicitLayerPresentWithLotsOfExtensions) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 26; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension0", 4);
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension1", 7);
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension2", 6);
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension3", 9);
+
+    exts.insert(exts.begin(), driver.physical_devices.front().extensions.begin(), driver.physical_devices.front().extensions.end());
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, NoDriverExtensionsImplicitLayerPresentWithExtensions) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 6; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, NoDriverExtensionsImplicitLayerPresentWithLotsOfExtensions) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 6; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, ImplicitLayerPresentWithDuplicateExtensions) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 26; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension0", 4);
+    driver.physical_devices.front().extensions.emplace_back("MyDriverExtension1", 7);
+
+    driver.physical_devices.front().extensions.insert(driver.physical_devices.front().extensions.end(), exts.begin(), exts.end());
+    exts.emplace_back("MyDriverExtension0", 4);
+    exts.emplace_back("MyDriverExtension1", 7);
+
+    driver.physical_devices.front().extensions = exts;
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
+TEST(EnumerateDeviceExtensionProperties, ImplicitLayerPresentWithOnlyDuplicateExtensions) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    std::vector<Extension> exts;
+    std::vector<ManifestLayer::LayerDescription::Extension> layer_exts;
+    for (uint32_t i = 0; i < 26; i++) {
+        exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+        layer_exts.emplace_back(std::string("LayerExtNumba") + std::to_string(i), i + 10);
+    }
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .add_device_extensions({layer_exts})),
+                           "implicit_test_layer.json");
+    auto& layer = env.get_test_layer();
+    layer.device_extensions = exts;
+
+    driver.physical_devices.front().extensions = exts;
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    VkPhysicalDevice physical_device = inst.GetPhysDev();
+    exercise_EnumerateDeviceExtensionProperties(inst, physical_device, exts);
+}
+
 TEST(EnumeratePhysicalDevices, OneCall) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
-
-    driver.physical_devices.emplace_back("physical_device_0", 1);
-    driver.physical_devices.emplace_back("physical_device_1", 2);
-    driver.physical_devices.emplace_back("physical_device_2", 3);
-    driver.physical_devices.emplace_back("physical_device_3", 4);
+    driver.add_physical_device("physical_device_0");
+    driver.add_physical_device("physical_device_1");
+    driver.add_physical_device("physical_device_2");
+    driver.add_physical_device("physical_device_3");
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -431,14 +682,13 @@
 
 TEST(EnumeratePhysicalDevices, TwoCall) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+                       .set_min_icd_interface_version(5)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     const uint32_t real_device_count = 2;
     for (uint32_t i = 0; i < real_device_count; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), i + 1);
+        driver.add_physical_device(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     }
 
@@ -458,14 +708,13 @@
 
 TEST(EnumeratePhysicalDevices, MatchOneAndTwoCallNumbers) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.set_min_icd_interface_version(5);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+                       .set_min_icd_interface_version(5)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     const uint32_t real_device_count = 3;
     for (uint32_t i = 0; i < real_device_count; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), i + 1);
+        driver.add_physical_device(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     }
 
@@ -495,13 +744,13 @@
 
 TEST(EnumeratePhysicalDevices, TwoCallIncomplete) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+                       .set_min_icd_interface_version(5)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     const uint32_t real_device_count = 2;
     for (uint32_t i = 0; i < real_device_count; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), i + 1);
+        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     }
 
@@ -553,8 +802,7 @@
 
 TEST(EnumeratePhysicalDevices, ZeroPhysicalDevicesAfterCreateInstance) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1)).set_min_icd_interface_version(5);
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
     inst.CheckCreate();
@@ -576,8 +824,7 @@
 
 TEST(EnumeratePhysicalDevices, CallTwiceNormal) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     for (size_t i = 0; i < 4; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
@@ -603,8 +850,7 @@
 
 TEST(EnumeratePhysicalDevices, CallTwiceIncompleteOnceNormal) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     for (size_t i = 0; i < 8; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
@@ -640,8 +886,7 @@
 
 TEST(EnumeratePhysicalDevices, CallThriceSuccessReduce) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     for (size_t i = 0; i < 8; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
@@ -677,8 +922,7 @@
 
 TEST(EnumeratePhysicalDevices, CallThriceAddInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     driver.physical_devices.emplace_back("physical_device_0");
     driver.physical_devices.emplace_back("physical_device_1");
@@ -717,8 +961,7 @@
 
 TEST(EnumeratePhysicalDevices, CallThriceRemoveInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     for (size_t i = 0; i < 4; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
@@ -774,8 +1017,7 @@
 
 TEST(EnumeratePhysicalDevices, MultipleAddRemoves) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).set_min_icd_interface_version(5);
 
     for (size_t i = 0; i < 4; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
@@ -906,30 +1148,15 @@
 
 TEST(CreateDevice, ExtensionNotPresent) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
-
-    VkQueueFamilyProperties families;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, &families);
-    ASSERT_EQ(familyCount, 1U);
-    ASSERT_EQ(families, family_props.properties);
-
     DeviceWrapper dev{inst};
-    dev.create_info.add_extension("NotPresent").add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_extension("NotPresent");
 
     dev.CheckCreate(phys_dev, VK_ERROR_EXTENSION_NOT_PRESENT);
 }
@@ -939,43 +1166,115 @@
 // https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation
 TEST(CreateDevice, LayersNotPresent) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
-    uint32_t familyCount = 0;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, nullptr);
-    ASSERT_EQ(familyCount, 1U);
+    DeviceWrapper dev{inst};
+    dev.create_info.add_layer("NotPresent");
 
-    VkQueueFamilyProperties families;
-    inst->vkGetPhysicalDeviceQueueFamilyProperties(phys_dev, &familyCount, &families);
-    ASSERT_EQ(familyCount, 1U);
-    ASSERT_EQ(families, family_props.properties);
+    dev.CheckCreate(phys_dev);
+}
+
+// Device layers are deprecated.
+// Ensure that no error occur if instance and device are created with the same list of layers.
+// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation
+TEST(CreateDevice, MatchInstanceAndDeviceLayers) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
+
+    const char* layer_name = "TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_layer(layer_name);
+    inst.CheckCreate();
+
+    VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
     DeviceWrapper dev{inst};
-    dev.create_info.add_layer("NotPresent").add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
+    dev.create_info.add_layer(layer_name);
+
+    dev.CheckCreate(phys_dev);
+}
+
+// Device layers are deprecated.
+// Ensure that a message is generated when instance and device are created with different list of layers.
+// At best , the user can list only instance layers in the device layer list
+// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation
+TEST(CreateDevice, UnmatchInstanceAndDeviceLayers) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
+
+    const char* layer_name = "TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer.json");
+
+    DebugUtilsLogger debug_log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT};
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, debug_log);
+    inst.CheckCreate();
+
+    DebugUtilsWrapper log{inst, VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT};
+    CreateDebugUtilsMessenger(log);
+
+    VkPhysicalDevice phys_dev = inst.GetPhysDev();
+
+    DeviceWrapper dev{inst};
+    dev.create_info.add_layer(layer_name);
+
+    dev.CheckCreate(phys_dev);
+
+    ASSERT_TRUE(
+        log.find("loader_create_device_chain: Using deprecated and ignored 'ppEnabledLayerNames' member of 'VkDeviceCreateInfo' "
+                 "when creating a Vulkan device."));
+}
+
+// Device layers are deprecated.
+// Ensure that when VkInstanceCreateInfo is deleted, the check of the instance layer lists is running correctly during VkDevice
+// creation
+// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-layers-devicelayerdeprecation
+TEST(CreateDevice, CheckCopyOfInstanceLayerNames) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
+
+    const char* layer_name = "TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "test_layer.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    {
+        // We intentionally create a local InstanceCreateInfo that goes out of scope at the } so that when dev.CheckCreate is called
+        // the layer name pointers are no longer valid
+        InstanceCreateInfo create_info{};
+        create_info.add_layer(layer_name);
+        inst.CheckCreateWithInfo(create_info);
+    }
+
+    VkPhysicalDevice phys_dev = inst.GetPhysDev();
+
+    DeviceWrapper dev{inst};
+    dev.create_info.add_layer(layer_name);
 
     dev.CheckCreate(phys_dev);
 }
 
 TEST(CreateDevice, ConsecutiveCreate) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
     for (uint32_t i = 0; i < 100; i++) {
         driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices.back().queue_family_properties.push_back(family_props);
     }
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -983,20 +1282,16 @@
     auto phys_devs = inst.GetPhysDevs(100);
     for (uint32_t i = 0; i < 100; i++) {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
         dev.CheckCreate(phys_devs[i]);
     }
 }
 
 TEST(CreateDevice, ConsecutiveCreateWithoutDestruction) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
     for (uint32_t i = 0; i < 100; i++) {
         driver.physical_devices.emplace_back("physical_device_0");
-        driver.physical_devices.back().queue_family_properties.push_back(family_props);
     }
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -1007,7 +1302,6 @@
     for (uint32_t i = 0; i < 100; i++) {
         devices.emplace_back(inst);
         DeviceWrapper& dev = devices.back();
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         dev.CheckCreate(phys_devs[i]);
     }
@@ -1015,9 +1309,8 @@
 
 TEST(TryLoadWrongBinaries, WrongICD) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
     env.add_icd(TestICDDetails(CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE).set_is_fake(true));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1027,7 +1320,7 @@
 #if _WIN32 || _WIN64
     ASSERT_TRUE(log.find("Failed to open dynamic library"));
 #endif
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 #if defined(__x86_64__)
     ASSERT_TRUE(log.find("wrong ELF class: ELFCLASS32"));
 #else
@@ -1042,8 +1335,7 @@
 
 TEST(TryLoadWrongBinaries, WrongExplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name = "DummyLayerExplicit";
     env.add_fake_explicit_layer(
@@ -1051,13 +1343,8 @@
             ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE)),
         "dummy_test_layer.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
-
-    std::array<VkLayerProperties, 2> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_name, layer_props[0].layerName));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1068,7 +1355,7 @@
     inst.CheckCreate(VK_ERROR_LAYER_NOT_PRESENT);
 
     // Should get an error message for the explicit layer
-#ifndef __APPLE__
+#if !defined(__APPLE__)
     ASSERT_TRUE(log.find(std::string("Requested layer \"") + std::string(layer_name) + std::string("\" was wrong bit-type!")));
 #else   // __APPLE__
     // Apple only throws a wrong library type of error
@@ -1078,8 +1365,7 @@
 
 TEST(TryLoadWrongBinaries, WrongImplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name = "DummyLayerImplicit0";
     env.add_fake_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -1088,13 +1374,8 @@
                                                               .set_disable_environment("DISABLE_ENV")),
                                 "dummy_test_layer.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
-
-    std::array<VkLayerProperties, 1> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_name, layer_props[0].layerName));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1104,7 +1385,7 @@
     // application asking for them.
     inst.CheckCreate(VK_SUCCESS);
 
-#ifndef __APPLE__
+#if !defined(__APPLE__)
     // Should get an info message for the bad implicit layer
     ASSERT_TRUE(log.find(std::string("Requested layer \"") + std::string(layer_name) + std::string("\" was wrong bit-type.")));
 #else   // __APPLE__
@@ -1115,8 +1396,7 @@
 
 TEST(TryLoadWrongBinaries, WrongExplicitAndImplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name_0 = "DummyLayerExplicit";
     env.add_fake_explicit_layer(
@@ -1130,13 +1410,8 @@
                                                               .set_disable_environment("DISABLE_ENV")),
                                 "dummy_test_layer_1.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
-
-    std::array<VkLayerProperties, 2> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(check_permutation({layer_name_0, layer_name_1}, layer_props));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1146,7 +1421,7 @@
     // Explicit layer not found should generate a VK_ERROR_LAYER_NOT_PRESENT error message.
     inst.CheckCreate(VK_ERROR_LAYER_NOT_PRESENT);
 
-#ifndef __APPLE__
+#if !defined(__APPLE__)
     // Should get error messages for both (the explicit is second and we don't want the implicit to return before the explicit
     // triggers a failure during vkCreateInstance)
     ASSERT_TRUE(log.find(std::string("Requested layer \"") + std::string(layer_name_0) + std::string("\" was wrong bit-type!")));
@@ -1160,8 +1435,7 @@
 
 TEST(TryLoadWrongBinaries, WrongExplicitAndImplicitErrorOnly) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name_0 = "DummyLayerExplicit";
     env.add_fake_explicit_layer(
@@ -1175,13 +1449,8 @@
                                                               .set_disable_environment("DISABLE_ENV")),
                                 "dummy_test_layer_1.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
-
-    std::array<VkLayerProperties, 2> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(check_permutation({layer_name_0, layer_name_1}, layer_props));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1191,7 +1460,7 @@
     // Explicit layer not found should generate a VK_ERROR_LAYER_NOT_PRESENT error message.
     inst.CheckCreate(VK_ERROR_LAYER_NOT_PRESENT);
 
-#ifndef __APPLE__
+#if !defined(__APPLE__)
     // Should not get an error messages for either
     ASSERT_TRUE(log.find(std::string("Requested layer \"") + std::string(layer_name_0) + std::string("\" was wrong bit-type!")));
     ASSERT_FALSE(log.find(std::string("Requested layer \"") + std::string(layer_name_1) + std::string("\" was wrong bit-type.")));
@@ -1204,8 +1473,7 @@
 
 TEST(TryLoadWrongBinaries, BadExplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name = "DummyLayerExplicit";
     env.add_fake_explicit_layer(
@@ -1213,13 +1481,8 @@
             ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(CURRENT_PLATFORM_DUMMY_BINARY_BAD)),
         "dummy_test_layer.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
-
-    std::array<VkLayerProperties, 2> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_name, layer_props[0].layerName));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1235,8 +1498,7 @@
 
 TEST(TryLoadWrongBinaries, BadImplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name = "DummyLayerImplicit0";
     env.add_fake_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -1245,13 +1507,8 @@
                                                               .set_disable_environment("DISABLE_ENV")),
                                 "dummy_test_layer.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
-
-    std::array<VkLayerProperties, 1> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 1U);
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_name, layer_props[0].layerName));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1267,8 +1524,7 @@
 
 TEST(TryLoadWrongBinaries, BadExplicitAndImplicit) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
 
     const char* layer_name_0 = "DummyLayerExplicit";
     env.add_fake_explicit_layer(
@@ -1282,13 +1538,8 @@
                                                               .set_disable_environment("DISABLE_ENV")),
                                 "dummy_test_layer_1.json");
 
-    uint32_t layer_count = 0;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, nullptr), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
-
-    std::array<VkLayerProperties, 2> layer_props;
-    ASSERT_EQ(env.vulkan_functions.vkEnumerateInstanceLayerProperties(&layer_count, layer_props.data()), VK_SUCCESS);
-    ASSERT_EQ(layer_count, 2U);
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(check_permutation({layer_name_0, layer_name_1}, layer_props));
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1306,9 +1557,8 @@
 TEST(TryLoadWrongBinaries, WrongArchDriver) {
     FrameworkEnvironment env{};
     // Intentionally set the wrong arch
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.icd_manifest.set_library_arch(sizeof(void*) == 4 ? "64" : "32"));
-
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.icd_manifest.set_library_arch(sizeof(void*) == 4 ? "64" : "32"))
+        .add_physical_device("physical_device_0");
 
     DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT};
     InstWrapper inst{env.vulkan_functions};
@@ -1321,8 +1571,7 @@
 
 TEST(TryLoadWrongBinaries, WrongArchLayer) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2});
-    env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}).add_physical_device("physical_device_0");
 
     const char* layer_name = "TestLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -1342,14 +1591,16 @@
 
 TEST(EnumeratePhysicalDeviceGroups, OneCall) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     // ICD contains 3 devices in two groups
     for (size_t i = 0; i < 3; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), rand() % 50 + 3);
+        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
     driver.physical_device_groups.emplace_back(driver.physical_devices[0]);
     driver.physical_device_groups.back().use_physical_device(driver.physical_devices[1]);
@@ -1427,8 +1678,7 @@
         inst.create_info.add_extension(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME);
         inst.CheckCreate();
 
-        auto vkEnumeratePhysicalDeviceGroupsKHR = reinterpret_cast<PFN_vkEnumeratePhysicalDeviceGroupsKHR>(
-            env.vulkan_functions.vkGetInstanceProcAddr(inst.inst, "vkEnumeratePhysicalDeviceGroupsKHR"));
+        PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = inst.load("vkEnumeratePhysicalDeviceGroupsKHR");
 
         auto physical_devices = std::vector<VkPhysicalDevice>(max_physical_device_count);
         uint32_t returned_phys_dev_count = max_physical_device_count;
@@ -1475,14 +1725,16 @@
 
 TEST(EnumeratePhysicalDeviceGroups, TwoCall) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     // ICD contains 3 devices in two groups
     for (size_t i = 0; i < 3; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), rand() % 50 + 3);
+        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
     driver.physical_device_groups.emplace_back(driver.physical_devices[0]);
     driver.physical_device_groups.back().use_physical_device(driver.physical_devices[1]);
@@ -1548,8 +1800,7 @@
         ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDevices(inst, &returned_phys_dev_count, physical_devices.data()));
         handle_assert_has_values(physical_devices);
 
-        auto vkEnumeratePhysicalDeviceGroupsKHR = reinterpret_cast<PFN_vkEnumeratePhysicalDeviceGroupsKHR>(
-            env.vulkan_functions.vkGetInstanceProcAddr(inst.inst, "vkEnumeratePhysicalDeviceGroupsKHR"));
+        PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = inst.load("vkEnumeratePhysicalDeviceGroupsKHR");
 
         uint32_t group_count = static_cast<uint32_t>(driver.physical_device_groups.size());
         uint32_t returned_group_count = 0;
@@ -1591,14 +1842,16 @@
 
 TEST(EnumeratePhysicalDeviceGroups, TwoCallIncomplete) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
 
     // ICD contains 3 devices in two groups
     for (size_t i = 0; i < 3; i++) {
-        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i), rand() % 50 + 3);
+        driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
         driver.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
     driver.physical_device_groups.emplace_back(driver.physical_devices[0]);
     driver.physical_device_groups.back().use_physical_device(driver.physical_devices[1]);
@@ -1658,8 +1911,7 @@
         inst.create_info.add_extension("VK_KHR_device_group_creation");
         inst.CheckCreate();
 
-        auto vkEnumeratePhysicalDeviceGroupsKHR = reinterpret_cast<PFN_vkEnumeratePhysicalDeviceGroupsKHR>(
-            env.vulkan_functions.vkGetInstanceProcAddr(inst.inst, "vkEnumeratePhysicalDeviceGroupsKHR"));
+        PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = inst.load("vkEnumeratePhysicalDeviceGroupsKHR");
 
         uint32_t group_count = static_cast<uint32_t>(driver.physical_device_groups.size());
         uint32_t returned_group_count = 0;
@@ -1708,14 +1960,16 @@
 // vkEnumeratePhysicalDeviceGroupsKHR, and make sure they return the same info.
 TEST(EnumeratePhysicalDeviceGroups, TestCoreVersusExtensionSameReturns) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
-    driver.add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    driver.add_instance_extension({VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1)
+                       .add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME})
+                       .add_instance_extension({VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME});
 
     // Generate the devices
     for (size_t i = 0; i < 6; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -1749,8 +2003,7 @@
     ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDeviceGroups(inst, &returned_group_count, core_group_props.data()));
     ASSERT_EQ(core_group_count, returned_group_count);
 
-    auto vkEnumeratePhysicalDeviceGroupsKHR = reinterpret_cast<PFN_vkEnumeratePhysicalDeviceGroupsKHR>(
-        env.vulkan_functions.vkGetInstanceProcAddr(inst.inst, "vkEnumeratePhysicalDeviceGroupsKHR"));
+    PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = inst.load("vkEnumeratePhysicalDeviceGroupsKHR");
 
     ext_group_count = static_cast<uint32_t>(driver.physical_device_groups.size());
     returned_group_count = 0;
@@ -1797,12 +2050,14 @@
 // querying vkEnumeratePhysicalDeviceGroups before and after the add.
 TEST(EnumeratePhysicalDeviceGroups, CallThriceAddGroupInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1);
 
     // Generate the devices
     for (size_t i = 0; i < 7; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -1860,7 +2115,7 @@
         for (uint32_t group2 = 0; group2 < group_props_after.size(); ++group2) {
             if (group_props_before[group1].physicalDeviceCount == group_props_after[group2].physicalDeviceCount) {
                 uint32_t found_count = 0;
-                bool found;
+                bool found = false;
                 for (uint32_t dev1 = 0; dev1 < group_props_before[group1].physicalDeviceCount; ++dev1) {
                     found = false;
                     for (uint32_t dev2 = 0; dev2 < group_props_after[group2].physicalDeviceCount; ++dev2) {
@@ -1890,12 +2145,14 @@
 // querying vkEnumeratePhysicalDeviceGroups before and after the remove.
 TEST(EnumeratePhysicalDeviceGroups, CallTwiceRemoveGroupInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1);
 
     // Generate the devices
     for (size_t i = 0; i < 7; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -1945,7 +2202,7 @@
         for (uint32_t group2 = 0; group2 < group_props_before.size(); ++group2) {
             if (group_props_after[group1].physicalDeviceCount == group_props_before[group2].physicalDeviceCount) {
                 uint32_t found_count = 0;
-                bool found;
+                bool found = false;
                 for (uint32_t dev1 = 0; dev1 < group_props_after[group1].physicalDeviceCount; ++dev1) {
                     found = false;
                     for (uint32_t dev2 = 0; dev2 < group_props_before[group2].physicalDeviceCount; ++dev2) {
@@ -1975,12 +2232,14 @@
 // querying vkEnumeratePhysicalDeviceGroups before and after the add.
 TEST(EnumeratePhysicalDeviceGroups, CallTwiceAddDeviceInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1);
 
     // Generate the devices
     for (size_t i = 0; i < 7; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -2027,7 +2286,7 @@
     for (uint32_t group1 = 0; group1 < group_props_before.size(); ++group1) {
         for (uint32_t group2 = 0; group2 < group_props_after.size(); ++group2) {
             uint32_t found_count = 0;
-            bool found;
+            bool found = false;
             for (uint32_t dev1 = 0; dev1 < group_props_before[group1].physicalDeviceCount; ++dev1) {
                 found = false;
                 for (uint32_t dev2 = 0; dev2 < group_props_after[group2].physicalDeviceCount; ++dev2) {
@@ -2059,12 +2318,14 @@
 // querying vkEnumeratePhysicalDeviceGroups before and after the remove.
 TEST(EnumeratePhysicalDeviceGroups, CallTwiceRemoveDeviceInBetween) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1);
 
     // Generate the devices
     for (size_t i = 0; i < 6; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -2122,7 +2383,7 @@
     for (uint32_t group1 = 0; group1 < group_props_after.size(); ++group1) {
         for (uint32_t group2 = 0; group2 < group_props_before.size(); ++group2) {
             uint32_t found_count = 0;
-            bool found;
+            bool found = false;
             for (uint32_t dev1 = 0; dev1 < group_props_after[group1].physicalDeviceCount; ++dev1) {
                 found = false;
                 for (uint32_t dev2 = 0; dev2 < group_props_before[group2].physicalDeviceCount; ++dev2) {
@@ -2154,12 +2415,14 @@
 // various devices and groups while querying in between.
 TEST(EnumeratePhysicalDeviceGroups, MultipleAddRemoves) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd().set_min_icd_interface_version(5).set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+                       .set_min_icd_interface_version(5)
+                       .set_icd_api_version(VK_API_VERSION_1_1);
 
     // Generate the devices
     for (size_t i = 0; i < 9; i++) {
         driver.physical_devices.emplace_back(std::string("physical_device_") + std::to_string(i));
+        driver.physical_devices.back().properties.apiVersion = VK_API_VERSION_1_1;
     }
 
     // Generate the starting groups
@@ -2267,8 +2530,8 @@
 }
 
 // Fill in random but valid data into the device properties struct for the current physical device
-static void FillInRandomDeviceProps(VkPhysicalDeviceProperties& props, VkPhysicalDeviceType dev_type, uint32_t api_vers,
-                                    uint32_t vendor, uint32_t device) {
+void FillInRandomDeviceProps(VkPhysicalDeviceProperties& props, VkPhysicalDeviceType dev_type, uint32_t api_vers, uint32_t vendor,
+                             uint32_t device) {
     props.apiVersion = api_vers;
     props.vendorID = vendor;
     props.deviceID = device;
@@ -2294,18 +2557,18 @@
     //   PhysDev 6: pd6, Discrete, Vulkan 1.1, Bus 2
     //   Group 0: PhysDev 5, PhysDev 6
     //   Group 1: PhysDev 4
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_1));
     auto& cur_icd_0 = env.get_test_icd(0);
     cur_icd_0.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_0.physical_devices.push_back({"pd0", 7});
+    cur_icd_0.physical_devices.push_back({"pd0"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA001);
-    cur_icd_0.physical_devices.push_back({"pd1", 3});
+    cur_icd_0.physical_devices.push_back({"pd1"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA002);
-    cur_icd_0.physical_devices.push_back({"pd2", 6});
+    cur_icd_0.physical_devices.push_back({"pd2"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA003);
@@ -2315,18 +2578,18 @@
         .use_physical_device(cur_icd_0.physical_devices[2]);
     cur_icd_0.physical_device_groups.push_back({cur_icd_0.physical_devices[1]});
 
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_1));
     auto& cur_icd_1 = env.get_test_icd(1);
     cur_icd_1.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_1.physical_devices.push_back({"pd4", 1});
+    cur_icd_1.physical_devices.push_back({"pd4"});
     cur_icd_1.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_1.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC001);
-    cur_icd_1.physical_devices.push_back({"pd5", 4});
+    cur_icd_1.physical_devices.push_back({"pd5"});
     cur_icd_1.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_1.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC002);
-    cur_icd_1.physical_devices.push_back({"pd6", 2});
+    cur_icd_1.physical_devices.push_back({"pd6"});
     cur_icd_1.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_1.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC003);
@@ -2340,14 +2603,13 @@
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
     inst.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = inst.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     // NOTE: This is a fake struct to make sure the pNext chain is properly passed down to the ICD
     //       vkEnumeratePhysicalDeviceGroups.
     //       The two versions must match:
-    //           "FakePNext" test in loader_regresion_tests.cpp
+    //           "FakePNext" test in loader_regression_tests.cpp
     //           "test_vkEnumeratePhysicalDeviceGroups" in test_icd.cpp
     struct FakePnextSharedWithICD {
         VkStructureType sType;
@@ -2383,16 +2645,14 @@
                                                      "No-Layer"};
     {  // No support in driver
         FrameworkEnvironment env{};
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-        env.get_test_icd().physical_devices.push_back({});
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
         auto phys_dev = inst.GetPhysDev();
 
-        auto getToolProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceToolPropertiesEXT>(
-            inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceToolPropertiesEXT"));
+        PFN_vkGetPhysicalDeviceToolPropertiesEXT getToolProperties = inst.load("vkGetPhysicalDeviceToolPropertiesEXT");
         handle_assert_has_value(getToolProperties);
 
         uint32_t tool_count = 0;
@@ -2401,19 +2661,17 @@
     }
     {  // extension is supported in driver
         FrameworkEnvironment env{};
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-        env.get_test_icd().physical_devices.push_back({});
-        env.get_test_icd().supports_tooling_info_ext = true;
-        env.get_test_icd().tooling_properties.push_back(icd_tool_props);
-        env.get_test_icd().physical_devices.back().extensions.push_back({VK_EXT_TOOLING_INFO_EXTENSION_NAME, 0});
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA))
+            .set_supports_tooling_info_ext(true)
+            .add_tooling_property(icd_tool_props)
+            .add_physical_device(PhysicalDevice{}.add_extension(VK_EXT_TOOLING_INFO_EXTENSION_NAME).finish());
 
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
         auto phys_dev = inst.GetPhysDev();
 
-        auto getToolProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceToolPropertiesEXT>(
-            inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceToolPropertiesEXT"));
+        PFN_vkGetPhysicalDeviceToolPropertiesEXT getToolProperties = inst.load("vkGetPhysicalDeviceToolPropertiesEXT");
         handle_assert_has_value(getToolProperties);
         uint32_t tool_count = 0;
         ASSERT_EQ(VK_SUCCESS, getToolProperties(phys_dev, &tool_count, nullptr));
@@ -2425,19 +2683,19 @@
     }
     {  // core
         FrameworkEnvironment env{};
-        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-        env.get_test_icd().physical_devices.push_back({});
-        env.get_test_icd().physical_devices.back().properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 3, 0);
-        env.get_test_icd().supports_tooling_info_core = true;
-        env.get_test_icd().tooling_properties.push_back(icd_tool_props);
+        env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_API_VERSION_1_3))
+            .add_physical_device({})
+            .set_supports_tooling_info_core(true)
+            .add_tooling_property(icd_tool_props)
+            .physical_devices.back()
+            .properties.apiVersion = VK_MAKE_API_VERSION(0, 1, 3, 0);
 
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
         auto phys_dev = inst.GetPhysDev();
 
-        auto getToolProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceToolProperties>(
-            inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceToolProperties"));
+        PFN_vkGetPhysicalDeviceToolProperties getToolProperties = inst.load("vkGetPhysicalDeviceToolProperties");
         handle_assert_has_value(getToolProperties);
         uint32_t tool_count = 0;
         ASSERT_EQ(VK_SUCCESS, getToolProperties(phys_dev, &tool_count, nullptr));
@@ -2469,42 +2727,48 @@
     ASSERT_EQ(env.vulkan_functions.vkCreateInstance(&info, VK_NULL_HANDLE, &inst), VK_ERROR_EXTENSION_NOT_PRESENT);
 }
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__GNU__)
 // NOTE: Sort order only affects Linux
 TEST(SortedPhysicalDevices, DevicesSortEnabled10NoAppExt) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+    env.get_test_icd(0).physical_devices.push_back({"pd0"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(7);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA001);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(0).physical_devices.push_back({"pd1", 3});
+    env.get_test_icd(0).physical_devices.push_back({"pd1"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(3);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA002);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(1).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(1).physical_devices.push_back({"pd2", 0});
+    env.get_test_icd(1).physical_devices.push_back({"pd2"});
+    env.get_test_icd(1).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(1).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_0,
                             1, 0xBBBB001);
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(2).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(2).physical_devices.push_back({"pd3", 1});
+    env.get_test_icd(2).physical_devices.push_back({"pd3"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(1);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 75, 0xCCCC001);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(2).physical_devices.push_back({"pd4", 4});
+    env.get_test_icd(2).physical_devices.push_back({"pd4"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(4);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 75, 0xCCCC002);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(3).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(3).physical_devices.push_back({"pd5", 0});
+    env.get_test_icd(3).physical_devices.push_back({"pd5"});
+    env.get_test_icd(3).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(3).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
                             VK_API_VERSION_1_1, 6940, 0xDDDD001);
     env.get_test_icd(3).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2577,36 +2841,42 @@
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+    env.get_test_icd(0).physical_devices.push_back({"pd0"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(7);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA001);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(0).physical_devices.push_back({"pd1", 3});
+    env.get_test_icd(0).physical_devices.push_back({"pd1"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(3);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA002);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(1).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(1).physical_devices.push_back({"pd2", 0});
+    env.get_test_icd(1).physical_devices.push_back({"pd2"});
+    env.get_test_icd(1).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(1).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_0,
                             1, 0xBBBB001);
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(2).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(2).physical_devices.push_back({"pd3", 1});
+    env.get_test_icd(2).physical_devices.push_back({"pd3"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(1);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 75, 0xCCCC001);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(2).physical_devices.push_back({"pd4", 4});
+    env.get_test_icd(2).physical_devices.push_back({"pd4"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(4);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 75, 0xCCCC002);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(3).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(3).physical_devices.push_back({"pd5", 0});
+    env.get_test_icd(3).physical_devices.push_back({"pd5"});
+    env.get_test_icd(3).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(3).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
                             VK_API_VERSION_1_1, 6940, 0xDDDD001);
     env.get_test_icd(3).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2615,8 +2885,7 @@
     instance.create_info.add_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
     instance.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2KHR>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"));
+    PFN_vkGetPhysicalDeviceProperties2KHR GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2KHR");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     const uint32_t max_phys_devs = 6;
@@ -2695,11 +2964,13 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(0).set_icd_api_version(VK_API_VERSION_1_1);
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 7});
+    env.get_test_icd(0).physical_devices.push_back({"pd0"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(7);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 888, 0xAAA001);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(0).physical_devices.push_back({"pd1", 3});
+    env.get_test_icd(0).physical_devices.push_back({"pd1"});
+    env.get_test_icd(0).physical_devices.back().set_pci_bus(3);
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_0, 888, 0xAAA002);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2707,7 +2978,8 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(1).set_icd_api_version(VK_API_VERSION_1_1);
     env.get_test_icd(1).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(1).physical_devices.push_back({"pd2", 0});
+    env.get_test_icd(1).physical_devices.push_back({"pd2"});
+    env.get_test_icd(1).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(1).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_0,
                             1, 0xBBBB001);
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2715,11 +2987,13 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(2).set_icd_api_version(VK_API_VERSION_1_1);
     env.get_test_icd(2).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(2).physical_devices.push_back({"pd3", 1});
+    env.get_test_icd(2).physical_devices.push_back({"pd3"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(1);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 75, 0xCCCC001);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(2).physical_devices.push_back({"pd4", 4});
+    env.get_test_icd(2).physical_devices.push_back({"pd4"});
+    env.get_test_icd(2).physical_devices.back().set_pci_bus(4);
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_1, 75, 0xCCCC002);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2727,7 +3001,8 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.get_test_icd(3).set_icd_api_version(VK_API_VERSION_1_1);
     env.get_test_icd(3).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(3).physical_devices.push_back({"pd5", 0});
+    env.get_test_icd(3).physical_devices.push_back({"pd5"});
+    env.get_test_icd(3).physical_devices.back().set_pci_bus(0);
     FillInRandomDeviceProps(env.get_test_icd(3).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
                             VK_API_VERSION_1_1, 6940, 0xDDDD001);
     env.get_test_icd(3).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2736,8 +3011,7 @@
     instance.create_info.set_api_version(VK_API_VERSION_1_1);
     instance.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        instance.functions->vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = instance.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     const uint32_t max_phys_devs = 6;
@@ -2814,41 +3088,40 @@
 TEST(SortedPhysicalDevices, DevicesSortedDisabled) {
     FrameworkEnvironment env{};
 
-    set_env_var("VK_LOADER_DISABLE_SELECT", "1");
-    EnvVarCleaner disable_select_cleaner("VK_LOADER_DISABLE_SELECT");
+    EnvVarWrapper disable_select_env_var{"VK_LOADER_DISABLE_SELECT", "1"};
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(0).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(0).physical_devices.push_back({"pd0", 4});
+    env.get_test_icd(0).physical_devices.push_back({"pd0"});
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 888, 0xAAA001);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(0).physical_devices.push_back({"pd1", 3});
+    env.get_test_icd(0).physical_devices.push_back({"pd1"});
     FillInRandomDeviceProps(env.get_test_icd(0).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_0, 888, 0xAAA002);
     env.get_test_icd(0).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(1).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(1).physical_devices.push_back({"pd2", 0});
+    env.get_test_icd(1).physical_devices.push_back({"pd2"});
     FillInRandomDeviceProps(env.get_test_icd(1).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_0,
                             1, 0xBBBB001);
     env.get_test_icd(1).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(2).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(2).physical_devices.push_back({"pd3", 7});
+    env.get_test_icd(2).physical_devices.push_back({"pd3"});
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 75, 0xCCCC001);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
-    env.get_test_icd(2).physical_devices.push_back({"pd4", 1});
+    env.get_test_icd(2).physical_devices.push_back({"pd4"});
     FillInRandomDeviceProps(env.get_test_icd(2).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
                             VK_API_VERSION_1_0, 75, 0xCCCC002);
     env.get_test_icd(2).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
 
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_0));
     env.get_test_icd(3).add_instance_extension({VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME});
-    env.get_test_icd(3).physical_devices.push_back({"pd5", 0});
+    env.get_test_icd(3).physical_devices.push_back({"pd5"});
     FillInRandomDeviceProps(env.get_test_icd(3).physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
                             VK_API_VERSION_1_0, 6940, 0xDDDD001);
     env.get_test_icd(3).physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
@@ -2942,15 +3215,18 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_0 = env.get_test_icd(0);
     cur_icd_0.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_0.physical_devices.push_back({"pd0", 7});
+    cur_icd_0.physical_devices.push_back({"pd0"});
+    cur_icd_0.physical_devices.back().set_pci_bus(7);
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA001);
-    cur_icd_0.physical_devices.push_back({"pd1", 3});
+    cur_icd_0.physical_devices.push_back({"pd1"});
+    cur_icd_0.physical_devices.back().set_pci_bus(3);
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA002);
-    cur_icd_0.physical_devices.push_back({"pd2", 6});
+    cur_icd_0.physical_devices.push_back({"pd2"});
+    cur_icd_0.physical_devices.back().set_pci_bus(6);
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA003);
@@ -2963,7 +3239,8 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_1 = env.get_test_icd(1);
     cur_icd_1.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_1.physical_devices.push_back({"pd3", 0});
+    cur_icd_1.physical_devices.push_back({"pd3"});
+    cur_icd_1.physical_devices.back().set_pci_bus(0);
     cur_icd_1.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_1.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_1, 1,
                             0xBBBB001);
@@ -2971,15 +3248,18 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_2 = env.get_test_icd(2);
     cur_icd_2.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_2.physical_devices.push_back({"pd4", 1});
+    cur_icd_2.physical_devices.push_back({"pd4"});
+    cur_icd_2.physical_devices.back().set_pci_bus(1);
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC001);
-    cur_icd_2.physical_devices.push_back({"pd5", 4});
+    cur_icd_2.physical_devices.push_back({"pd5"});
+    cur_icd_2.physical_devices.back().set_pci_bus(4);
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC002);
-    cur_icd_2.physical_devices.push_back({"pd6", 2});
+    cur_icd_2.physical_devices.push_back({"pd6"});
+    cur_icd_2.physical_devices.back().set_pci_bus(2);
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC003);
@@ -2992,7 +3272,8 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_3 = env.get_test_icd(3);
     cur_icd_3.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_3.physical_devices.push_back({"pd7", 0});
+    cur_icd_3.physical_devices.push_back({"pd7"});
+    cur_icd_3.physical_devices.back().set_pci_bus(0);
     cur_icd_3.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_3.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, VK_API_VERSION_1_1,
                             6940, 0xDDDD001);
@@ -3001,8 +3282,7 @@
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
     inst.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = inst.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     const uint32_t max_phys_devs = 8;
@@ -3107,8 +3387,7 @@
 TEST(SortedPhysicalDevices, DeviceGroupsSortedDisabled) {
     FrameworkEnvironment env{};
 
-    set_env_var("VK_LOADER_DISABLE_SELECT", "1");
-    EnvVarCleaner disable_select_cleaner("VK_LOADER_DISABLE_SELECT");
+    EnvVarWrapper disable_select_env_var{"VK_LOADER_DISABLE_SELECT", "1"};
 
     // ICD 0: Vulkan 1.1
     //   PhysDev 0: pd0, Discrete, Vulkan 1.1, Bus 7
@@ -3129,15 +3408,15 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_0 = env.get_test_icd(0);
     cur_icd_0.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_0.physical_devices.push_back({"pd0", 7});
+    cur_icd_0.physical_devices.push_back({"pd0"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA001);
-    cur_icd_0.physical_devices.push_back({"pd1", 3});
+    cur_icd_0.physical_devices.push_back({"pd1"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
                             VK_API_VERSION_1_1, 888, 0xAAA002);
-    cur_icd_0.physical_devices.push_back({"pd2", 6});
+    cur_icd_0.physical_devices.push_back({"pd2"});
     cur_icd_0.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_0.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             888, 0xAAA003);
@@ -3150,7 +3429,7 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_1 = env.get_test_icd(1);
     cur_icd_1.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_1.physical_devices.push_back({"pd3", 0});
+    cur_icd_1.physical_devices.push_back({"pd3"});
     cur_icd_1.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_1.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_CPU, VK_API_VERSION_1_1, 1,
                             0xBBBB001);
@@ -3158,15 +3437,15 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_2 = env.get_test_icd(2);
     cur_icd_2.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_2.physical_devices.push_back({"pd4", 1});
+    cur_icd_2.physical_devices.push_back({"pd4"});
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC001);
-    cur_icd_2.physical_devices.push_back({"pd5", 4});
+    cur_icd_2.physical_devices.push_back({"pd5"});
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC002);
-    cur_icd_2.physical_devices.push_back({"pd6", 2});
+    cur_icd_2.physical_devices.push_back({"pd6"});
     cur_icd_2.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_2.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_API_VERSION_1_1,
                             75, 0xCCCC003);
@@ -3179,7 +3458,7 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     auto& cur_icd_3 = env.get_test_icd(3);
     cur_icd_3.set_icd_api_version(VK_API_VERSION_1_1);
-    cur_icd_3.physical_devices.push_back({"pd7", 0});
+    cur_icd_3.physical_devices.push_back({"pd7"});
     cur_icd_3.physical_devices.back().extensions.push_back({VK_EXT_PCI_BUS_INFO_EXTENSION_NAME, 0});
     FillInRandomDeviceProps(cur_icd_3.physical_devices.back().properties, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, VK_API_VERSION_1_1,
                             6940, 0xDDDD001);
@@ -3188,8 +3467,7 @@
     inst.create_info.set_api_version(VK_API_VERSION_1_1);
     inst.CheckCreate();
 
-    auto GetPhysDevProps2 = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties2>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceProperties2"));
+    PFN_vkGetPhysicalDeviceProperties2 GetPhysDevProps2 = inst.load("vkGetPhysicalDeviceProperties2");
     ASSERT_NE(GetPhysDevProps2, nullptr);
 
     const uint32_t max_phys_devs = 8;
@@ -3279,22 +3557,33 @@
     }
 }
 
-#endif  // __linux__ || __FreeBSD__ || __OpenBSD__
+#endif  // __linux__ || __FreeBSD__ || __OpenBSD__ || __GNU__
 
 const char* portability_driver_warning =
-    "vkCreateInstance: Found drivers that contain devices which support the portability subset, but the "
-    "portability enumeration bit was not set! Applications that wish to enumerate portability drivers must set the "
-    "VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo flags and "
-    "enable the VK_KHR_portability_enumeration instance extension.";
+    "vkCreateInstance: Found drivers that contain devices which support the portability subset, but "
+    "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
+    "drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo "
+    "flags and enable the VK_KHR_portability_enumeration instance extension.";
+
+const char* portability_flag_missing =
+    "vkCreateInstance: Found drivers that contain devices which support the portability subset, but "
+    "the instance does not enumerate portability drivers! Applications that wish to enumerate portability "
+    "drivers must set the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit in the VkInstanceCreateInfo "
+    "flags.";
+
+const char* portability_extension_missing =
+    "VkInstanceCreateInfo: If flags has the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit set, the "
+    "list of enabled extensions in ppEnabledExtensionNames must contain VK_KHR_portability_enumeration "
+    "[VUID-VkInstanceCreateInfo-flags-06559 ]"
+    "Applications that wish to enumerate portability drivers must enable the VK_KHR_portability_enumeration "
+    "instance extension.";
 
 TEST(PortabilityICDConfiguration, PortabilityICDOnly) {
     FrameworkEnvironment env{};
     env.add_icd(
-        TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_is_portability_driver(true)));
-
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.max_icd_interface_version = 1;
+           TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_is_portability_driver(true)))
+        .add_physical_device("physical_device_0")
+        .set_max_icd_interface_version(1);
     {  // enable portability extension and flag
         InstWrapper inst{env.vulkan_functions};
         inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
@@ -3313,6 +3602,8 @@
         DeviceWrapper dev_info{inst};
         dev_info.CheckCreate(phys_dev);
         ASSERT_FALSE(log.find(portability_driver_warning));
+        ASSERT_FALSE(log.find(portability_flag_missing));
+        ASSERT_FALSE(log.find(portability_extension_missing));
     }
     {  // enable portability flag but not extension - shouldn't be able to create an instance when filtering is enabled
         InstWrapper inst{env.vulkan_functions};
@@ -3320,7 +3611,7 @@
         inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER);
-        ASSERT_TRUE(env.debug_log.find(portability_driver_warning));
+        ASSERT_TRUE(env.debug_log.find(portability_extension_missing));
     }
     {  // enable portability extension but not flag - shouldn't be able to create an instance when filtering is enabled
         InstWrapper inst{env.vulkan_functions};
@@ -3328,7 +3619,7 @@
         inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
         FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
         inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER);
-        ASSERT_TRUE(env.debug_log.find(portability_driver_warning));
+        ASSERT_TRUE(env.debug_log.find(portability_flag_missing));
     }
     {  // enable neither the portability extension or the flag - shouldn't be able to create an instance when filtering is enabled
         InstWrapper inst{env.vulkan_functions};
@@ -3453,38 +3744,25 @@
 
 TEST(PortabilityICDConfiguration, PortabilityAndRegularICDPreInstanceFunctions) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)));
-    env.add_icd(
-        TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_is_portability_driver(true)));
-
     Extension first_ext{"VK_EXT_validation_features"};  // known instance extensions
     Extension second_ext{"VK_EXT_headless_surface"};
-    env.get_test_icd().add_instance_extensions({first_ext, second_ext});
-
-    auto& driver0 = env.get_test_icd(0);
-    auto& driver1 = env.get_test_icd(1);
-
-    driver0.physical_devices.emplace_back("physical_device_0");
-    driver0.max_icd_interface_version = 1;
-
-    driver1.physical_devices.emplace_back("portability_physical_device_1");
-    driver1.max_icd_interface_version = 1;
+    env.add_icd(TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)))
+        .add_physical_device("physical_device_0")
+        .set_max_icd_interface_version(1)
+        .add_instance_extensions({first_ext, second_ext});
+    env.add_icd(
+           TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_is_portability_driver(true)))
+        .add_physical_device("portability_physical_device_1")
+        .set_max_icd_interface_version(1);
     {
         // check that enumerating instance extensions work with a portability driver present
-        uint32_t extension_count = 0;
-        std::array<VkExtensionProperties, 5> extensions;
-        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, nullptr));
-        ASSERT_EQ(extension_count, 5U);  // return debug report & debug utils + our two extensions
-
-        ASSERT_EQ(VK_SUCCESS,
-                  env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &extension_count, extensions.data()));
-        ASSERT_EQ(extension_count, 5U);
-        // loader always adds the debug report & debug utils extensions
-        ASSERT_TRUE(first_ext.extensionName == extensions[0].extensionName);
-        ASSERT_TRUE(second_ext.extensionName == extensions[1].extensionName);
-        ASSERT_TRUE(string_eq("VK_EXT_debug_report", extensions[2].extensionName));
-        ASSERT_TRUE(string_eq("VK_EXT_debug_utils", extensions[3].extensionName));
-        ASSERT_TRUE(string_eq("VK_KHR_portability_enumeration", extensions[4].extensionName));
+        auto extensions = env.GetInstanceExtensions(6);
+        EXPECT_TRUE(string_eq(extensions.at(0).extensionName, first_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(1).extensionName, second_ext.extensionName.c_str()));
+        EXPECT_TRUE(string_eq(extensions.at(2).extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(3).extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(4).extensionName, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME));
+        EXPECT_TRUE(string_eq(extensions.at(5).extensionName, VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME));
     }
 
     const char* layer_name = "TestLayer";
@@ -3499,14 +3777,8 @@
 
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
     {  // LayersMatch
-
-        uint32_t layer_count = 0;
-        ASSERT_EQ(env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &layer_count, nullptr), VK_SUCCESS);
-        ASSERT_EQ(layer_count, 1U);
-        VkLayerProperties layer_props;
-        ASSERT_EQ(env.vulkan_functions.vkEnumerateDeviceLayerProperties(phys_dev, &layer_count, &layer_props), VK_SUCCESS);
-        ASSERT_EQ(layer_count, 1U);
-        ASSERT_TRUE(string_eq(layer_props.layerName, layer_name));
+        auto layer_props = inst.GetActiveLayers(phys_dev, 1);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
     }
     {  // Property count less than available
         VkLayerProperties layer_props;
@@ -3516,11 +3788,11 @@
     }
 }
 
-#ifdef _WIN32
+#if defined(_WIN32)
 TEST(AppPackageDriverDiscovery, AppPackageTest) {
     FrameworkEnvironment env;
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.set_discovery_type(ManifestDiscoveryType::windows_app_package));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2}.set_discovery_type(ManifestDiscoveryType::windows_app_package))
+        .add_physical_device({});
 
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
@@ -3555,10 +3827,9 @@
     auto null_path = env.get_folder(ManifestLocation::null).location() / "test_icd_0.json";
     env.platform_shim->add_manifest(ManifestCategory::icd, null_path.str());
 
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA}.set_discovery_type(ManifestDiscoveryType::none));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.adapterLUID = _LUID{10, 1000};
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA}.set_discovery_type(ManifestDiscoveryType::null_dir))
+        .add_physical_device("physical_device_0")
+        .set_adapterLUID(_LUID{10, 1000});
     env.platform_shim->add_d3dkmt_adapter(D3DKMT_Adapter{0, _LUID{10, 1000}}.add_driver_manifest_path(env.get_icd_manifest_path()));
 
     InstWrapper inst{env.vulkan_functions};
@@ -3570,19 +3841,53 @@
 }
 #endif
 
+TEST(LibraryLoading, SystemLocations) {
+    FrameworkEnvironment env{};
+    EnvVarWrapper ld_library_path("LD_LIBRARY_PATH", env.get_folder(ManifestLocation::driver).location().str());
+    ld_library_path.add_to_list(env.get_folder(ManifestLocation::explicit_layer).location().str());
+
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2).set_library_path_type(LibraryPathType::default_search_paths))
+                       .add_physical_device({});
+    const char* fake_ext_name = "VK_FAKE_extension";
+    driver.physical_devices.back().add_extension(fake_ext_name);
+
+    const char* layer_name = "TestLayer";
+    env.add_explicit_layer(
+        TestLayerDetails{ManifestLayer{}.add_layer(
+                             ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                         "test_layer.json"}
+            .set_library_path_type(LibraryPathType::default_search_paths));
+
+    auto props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(props.at(0).layerName, layer_name));
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_layer(layer_name);
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+
+    auto phys_dev = inst.GetPhysDev();
+
+    auto active_props = inst.GetActiveLayers(phys_dev, 1);
+    ASSERT_TRUE(string_eq(active_props.at(0).layerName, layer_name));
+
+    auto device_extensions = inst.EnumerateDeviceExtensions(phys_dev, 1);
+    ASSERT_TRUE(string_eq(device_extensions.at(0).extensionName, fake_ext_name));
+}
+
 #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 // Check that valid symlinks do not cause the loader to crash when directly in an XDG env-var
 TEST(ManifestDiscovery, ValidSymlinkInXDGEnvVar) {
-    FrameworkEnvironment env{true, false};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::none));
-    env.get_test_icd().physical_devices.push_back({});
+    FrameworkEnvironment env{FrameworkSettings{}.set_enable_default_search_paths(false)};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::override_folder))
+        .add_physical_device({});
     auto driver_path = env.get_icd_manifest_path(0);
     std::string symlink_name = "symlink_to_driver.json";
     fs::path symlink_path = env.get_folder(ManifestLocation::driver_env_var).location() / symlink_name;
     env.get_folder(ManifestLocation::driver_env_var).add_existing_file(symlink_name);
     int res = symlink(driver_path.c_str(), symlink_path.c_str());
     ASSERT_EQ(res, 0);
-    set_env_var("XDG_CONFIG_DIRS", symlink_path.str());
+    EnvVarWrapper xdg_config_dirs_env_var{"XDG_CONFIG_DIRS", symlink_path.str()};
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -3591,9 +3896,9 @@
 
 // Check that valid symlinks do not cause the loader to crash
 TEST(ManifestDiscovery, ValidSymlink) {
-    FrameworkEnvironment env{true, false};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::none));
-    env.get_test_icd().physical_devices.push_back({});
+    FrameworkEnvironment env{FrameworkSettings{}.set_enable_default_search_paths(false)};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::override_folder))
+        .add_physical_device({});
 
     auto driver_path = env.get_icd_manifest_path(0);
     std::string symlink_name = "symlink_to_driver.json";
@@ -3602,7 +3907,7 @@
     int res = symlink(driver_path.c_str(), symlink_path.c_str());
     ASSERT_EQ(res, 0);
 
-    env.platform_shim->set_path(ManifestCategory::icd, env.get_folder(ManifestLocation::driver_env_var).location());
+    env.platform_shim->set_fake_path(ManifestCategory::icd, env.get_folder(ManifestLocation::driver_env_var).location());
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -3611,7 +3916,7 @@
 
 // Check that invalid symlinks do not cause the loader to crash when directly in an XDG env-var
 TEST(ManifestDiscovery, InvalidSymlinkXDGEnvVar) {
-    FrameworkEnvironment env{true, false};
+    FrameworkEnvironment env{FrameworkSettings{}.set_enable_default_search_paths(false)};
     std::string symlink_name = "symlink_to_nothing.json";
     fs::path symlink_path = env.get_folder(ManifestLocation::driver_env_var).location() / symlink_name;
     fs::path invalid_driver_path = env.get_folder(ManifestLocation::driver).location() / "nothing_here.json";
@@ -3619,7 +3924,7 @@
     ASSERT_EQ(res, 0);
     env.get_folder(ManifestLocation::driver_env_var).add_existing_file(symlink_name);
 
-    set_env_var("XDG_CONFIG_DIRS", symlink_path.str());
+    EnvVarWrapper xdg_config_dirs_env_var{symlink_path.str()};
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
@@ -3628,7 +3933,7 @@
 
 // Check that invalid symlinks do not cause the loader to crash
 TEST(ManifestDiscovery, InvalidSymlink) {
-    FrameworkEnvironment env{true, false};
+    FrameworkEnvironment env{FrameworkSettings{}.set_enable_default_search_paths(false)};
     std::string symlink_name = "symlink_to_nothing.json";
     fs::path symlink_path = env.get_folder(ManifestLocation::driver).location() / symlink_name;
     fs::path invalid_driver_path = env.get_folder(ManifestLocation::driver_env_var).location() / "nothing_here.json";
@@ -3636,10 +3941,209 @@
     ASSERT_EQ(res, 0);
     env.get_folder(ManifestLocation::driver).add_existing_file(symlink_name);
 
-    env.platform_shim->set_path(ManifestCategory::icd, env.get_folder(ManifestLocation::driver_env_var).location());
+    env.platform_shim->set_fake_path(ManifestCategory::icd, env.get_folder(ManifestLocation::driver_env_var).location());
 
     InstWrapper inst{env.vulkan_functions};
     FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
     inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER);
 }
 #endif
+
+#if defined(__APPLE__)
+// Add two drivers, one to the bundle and one to the system locations
+TEST(ManifestDiscovery, AppleBundles) {
+    FrameworkEnvironment env{};
+    env.setup_macos_bundle();
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::macos_bundle));
+    env.get_test_icd(0).physical_devices.push_back({});
+    env.get_test_icd(0).physical_devices.at(0).properties.deviceID = 1337;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.get_test_icd(1).physical_devices.push_back({});
+    env.get_test_icd(1).physical_devices.at(0).properties.deviceID = 9999;
+
+    InstWrapper inst{env.vulkan_functions};
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
+    auto physical_devices = inst.GetPhysDevs();
+    ASSERT_EQ(1, physical_devices.size());
+
+    // Verify that this is the 'right' GPU, aka the one from the bundle
+    VkPhysicalDeviceProperties props{};
+    inst->vkGetPhysicalDeviceProperties(physical_devices[0], &props);
+    ASSERT_EQ(env.get_test_icd(0).physical_devices.at(0).properties.deviceID, props.deviceID);
+}
+
+// Add two drivers, one to the bundle and one using the driver env-var
+TEST(ManifestDiscovery, AppleBundlesEnvVarActive) {
+    FrameworkEnvironment env{};
+    env.setup_macos_bundle();
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::macos_bundle));
+    env.get_test_icd(0).physical_devices.push_back({});
+    env.get_test_icd(0).physical_devices.at(0).properties.deviceID = 1337;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::env_var));
+    env.get_test_icd(1).physical_devices.push_back({});
+    env.get_test_icd(1).physical_devices.at(0).properties.deviceID = 9999;
+
+    InstWrapper inst{env.vulkan_functions};
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
+    auto physical_devices = inst.GetPhysDevs();
+    ASSERT_EQ(1, physical_devices.size());
+
+    // Verify that this is the 'right' GPU, aka the one from the env-var
+    VkPhysicalDeviceProperties props{};
+    inst->vkGetPhysicalDeviceProperties(physical_devices[0], &props);
+    ASSERT_EQ(env.get_test_icd(1).physical_devices.at(0).properties.deviceID, props.deviceID);
+}
+#endif
+
+TEST(LayerCreatesDevice, Basic) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+    env.get_test_layer().set_call_create_device_while_create_device_is_called(true);
+    env.get_test_layer().set_physical_device_index_to_use_during_create_device(0);
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name2")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer2.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(inst.GetPhysDev());
+}
+
+TEST(LayerCreatesDevice, DifferentPhysicalDevice) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.get_test_icd(0).physical_devices.emplace_back("Device0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.get_test_icd(1).physical_devices.emplace_back("Device1");
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+    env.get_test_layer().set_call_create_device_while_create_device_is_called(true);
+    env.get_test_layer().set_physical_device_index_to_use_during_create_device(1);
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name2")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer2.json");
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    auto phys_devs = inst.GetPhysDevs();
+
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(phys_devs.at(0));
+}
+
+TEST(Layer, pfnNextGetInstanceProcAddr_should_not_return_layers_own_functions) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+    env.get_test_layer(0).set_check_if_EnumDevExtProps_is_same_as_queried_function(true);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+
+    auto phys_devs = inst.GetPhysDevs();
+
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(phys_devs.at(0));
+}
+
+TEST(Layer, LLP_LAYER_21) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+    env.get_test_layer(0).set_clobber_pInstance(true);
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+#if defined(WIN32)
+#if defined(_WIN64)
+    ASSERT_DEATH(
+        inst.CheckCreate(),
+        testing::ContainsRegex(
+            R"(terminator_CreateInstance: Instance pointer \(................\) has invalid MAGIC value 0x00000000. Instance value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_21\))"));
+#else
+    ASSERT_DEATH(
+        inst.CheckCreate(),
+        testing::ContainsRegex(
+            R"(terminator_CreateInstance: Instance pointer \(........\) has invalid MAGIC value 0x00000000. Instance value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_21\))"));
+#endif
+#else
+    ASSERT_DEATH(
+        inst.CheckCreate(),
+        testing::ContainsRegex(
+            R"(terminator_CreateInstance: Instance pointer \(0x[0-9A-Fa-f]+\) has invalid MAGIC value 0x00000000. Instance value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_21\))"));
+#endif
+}
+
+TEST(Layer, LLP_LAYER_22) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name("implicit_layer_name")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")),
+                           "implicit_test_layer.json");
+    env.get_test_layer(0).set_clobber_pDevice(true);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_extension("VK_EXT_debug_utils");
+    inst.CheckCreate();
+
+    DebugUtilsWrapper log{inst};
+    CreateDebugUtilsMessenger(log);
+
+    DeviceWrapper dev{inst};
+#if defined(WIN32)
+#if defined(_WIN64)
+    ASSERT_DEATH(
+        dev.CheckCreate(inst.GetPhysDev()),
+        testing::ContainsRegex(
+            R"(terminator_CreateDevice: Device pointer \(................\) has invalid MAGIC value 0x00000000. The expected value is 0x10ADED040410ADED. Device value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_22\))"));
+#else
+    ASSERT_DEATH(
+        dev.CheckCreate(inst.GetPhysDev()),
+        testing::ContainsRegex(
+            R"(terminator_CreateDevice: Device pointer \(........\) has invalid MAGIC value 0x00000000. The expected value is 0x10ADED040410ADED. Device value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_22\))"));
+#endif
+#else
+    ASSERT_DEATH(
+        dev.CheckCreate(inst.GetPhysDev()),
+        testing::ContainsRegex(
+            R"(terminator_CreateDevice: Device pointer \(0x[0-9A-Fa-f]+\) has invalid MAGIC value 0x00000000. The expected value is 0x10ADED040410ADED. Device value )"
+            R"(possibly corrupted by active layer \(Policy #LLP_LAYER_22\))"));
+#endif
+}
diff --git a/tests/loader_settings_tests.cpp b/tests/loader_settings_tests.cpp
new file mode 100644
index 0000000..595ef0e
--- /dev/null
+++ b/tests/loader_settings_tests.cpp
@@ -0,0 +1,1694 @@
+/*
+ * Copyright (c) 2023 The Khronos Group Inc.
+ * Copyright (c) 2023 Valve Corporation
+ * Copyright (c) 2023 LunarG, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and/or associated documentation files (the "Materials"), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice(s) and this permission notice shall be included in
+ * all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE 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 MATERIALS OR THE
+ * USE OR OTHER DEALINGS IN THE MATERIALS.
+ *
+ * Author: Charles Giessen <charles@lunarg.com>
+ */
+
+#include "test_environment.h"
+
+std::string get_settings_location_log_message([[maybe_unused]] FrameworkEnvironment const& env,
+                                              [[maybe_unused]] bool use_secure = false) {
+    std::string s = "Using layer configurations found in loader settings from ";
+#if defined(WIN32)
+    return s + env.get_folder(ManifestLocation::settings_location).location().str() + "\\vk_loader_settings.json";
+#elif COMMON_UNIX_PLATFORMS
+    if (use_secure)
+        return s + "/etc/vulkan/loader_settings.d/vk_loader_settings.json";
+    else
+        return s + "/home/fake_home/.local/share/vulkan/loader_settings.d/vk_loader_settings.json";
+#endif
+}
+
+// Make sure settings layer is found and that a layer defined in it is loaded
+TEST(SettingsFile, FileExist) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* regular_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(regular_layer_name)
+                .set_path(env.get_shimmed_layer_manifest_path().str())
+                .set_control("on"))));
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, regular_layer_name));
+    }
+}
+
+// Make sure that if the settings file is in a user local path, that it isn't used when running with elevated privileges
+TEST(SettingsFile, SettingsInUnsecuredLocation) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* regular_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(regular_layer_name)
+                .set_path(env.get_layer_manifest_path().str())
+                .set_control("on"))));
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, regular_layer_name));
+    }
+    env.platform_shim->set_elevated_privilege(true);
+    {
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+
+TEST(SettingsFile, SettingsInSecuredLocation) {
+    FrameworkEnvironment env{FrameworkSettings{}.set_secure_loader_settings(true)};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    const char* regular_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(regular_layer_name)
+                .set_path(env.get_layer_manifest_path().str())
+                .set_control("on"))));
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env, true)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, regular_layer_name));
+    }
+    env.platform_shim->set_elevated_privilege(true);
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env, true)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, regular_layer_name));
+    }
+}
+
+// Make sure settings file can have multiple sets of settings
+TEST(SettingsFile, SupportsMultipleSetingsSimultaneously) {
+    FrameworkEnvironment env{};
+    const char* app_specific_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(app_specific_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "VK_LAYER_app_specific.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    const char* global_layer_name = "VK_LAYER_TestLayer_1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(global_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "VK_LAYER_global.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(
+        env.loader_settings
+            // configuration that matches the current executable path - but dont set the app-key just yet
+            .add_app_specific_setting(AppSpecificSettings{}
+                                          .add_stderr_log_filter("all")
+                                          .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                                                       .set_name(app_specific_layer_name)
+                                                                       .set_path(env.get_layer_manifest_path(0).str())
+                                                                       .set_control("on"))
+                                          .add_app_key("key0"))
+            // configuration that should never be used
+            .add_app_specific_setting(
+                AppSpecificSettings{}
+                    .add_stderr_log_filter("all")
+                    .add_layer_configuration(
+                        LoaderSettingsLayerConfiguration{}.set_name("VK_LAYER_haha").set_path("/made/up/path").set_control("auto"))
+                    .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                                 .set_name("VK_LAYER_haha2")
+                                                 .set_path("/made/up/path2")
+                                                 .set_control("auto"))
+                    .add_app_key("key1")
+                    .add_app_key("key2"))
+            // Add a global configuration
+            .add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+                LoaderSettingsLayerConfiguration{}
+                    .set_name(global_layer_name)
+                    .set_path(env.get_layer_manifest_path(1).str())
+                    .set_control("on"))));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, global_layer_name));
+
+        // Check that the global config is used
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, global_layer_name));
+    }
+    env.debug_log.clear();
+    // Set one set to contain the current executable path
+    env.loader_settings.app_specific_settings.at(0).add_app_key(fs::fixup_backslashes_in_path(test_platform_executable_path()));
+    env.update_loader_settings(env.loader_settings);
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, app_specific_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, app_specific_layer_name));
+    }
+}
+
+// Make sure layers found through the settings file are enableable by environment variables
+TEST(SettingsFile, LayerAutoEnabledByEnvVars) {
+    FrameworkEnvironment env{};
+    env.loader_settings.set_file_format_version({1, 0, 0});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* layer_name = "VK_LAYER_automatic";
+    env.add_explicit_layer(
+        TestLayerDetails{ManifestLayer{}.add_layer(
+                             ManifestLayer::LayerDescription{}.set_name(layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                         "layer_name.json"}
+            .set_discovery_type(ManifestDiscoveryType::override_folder));
+
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name)
+                .set_path(env.get_layer_manifest_path(0).str())
+                .set_control("auto"))));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    {
+        EnvVarWrapper instance_layers{"VK_INSTANCE_LAYERS", layer_name};
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+    env.debug_log.clear();
+
+    {
+        EnvVarWrapper loader_layers_enable{"VK_LOADER_LAYERS_ENABLE", layer_name};
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, layer_name));
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, layer_name));
+    }
+}
+
+// Make sure layers are disallowed from loading if the settings file says so
+TEST(SettingsFile, LayerDisablesImplicitLayer) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* implicit_layer_name = "VK_LAYER_Implicit_TestLayer";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("oof")),
+                           "implicit_test_layer.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(implicit_layer_name)
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_control("off")
+                .set_treat_as_implicit_manifest(true))));
+    {
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+
+// Implicit layers should be reordered by the settings file
+TEST(SettingsFile, ImplicitLayersDontInterfere) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* implicit_layer_name1 = "VK_LAYER_Implicit_TestLayer1";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name1)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("oof")),
+                           "implicit_test_layer1.json");
+    const char* implicit_layer_name2 = "VK_LAYER_Implicit_TestLayer2";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name2)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("oof")),
+                           "implicit_test_layer2.json");
+    // validate order when settings file is not present
+    {
+        auto layer_props = env.GetLayerProperties(2);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name2));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, implicit_layer_name2));
+    }
+    // Now setup the settings file to contain a specific order
+    env.update_loader_settings(LoaderSettings{}.add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name1)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("auto")
+                                         .set_treat_as_implicit_manifest(true))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name2)
+                                         .set_path(env.get_shimmed_layer_manifest_path(1).str())
+                                         .set_control("auto")
+                                         .set_treat_as_implicit_manifest(true))));
+    {
+        auto layer_props = env.GetLayerProperties(2);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name2));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, implicit_layer_name2));
+    }
+
+    // Flip the order and store the settings in the env for later use in the test
+    env.loader_settings = LoaderSettings{}.add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name2)
+                                         .set_path(env.get_shimmed_layer_manifest_path(1).str())
+                                         .set_control("auto")
+                                         .set_treat_as_implicit_manifest(true))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name1)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("auto")
+                                         .set_treat_as_implicit_manifest(true)));
+    env.update_loader_settings(env.loader_settings);
+
+    {
+        auto layer_props = env.GetLayerProperties(2);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name1));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, implicit_layer_name1));
+    }
+
+    // Now add an explicit layer into the middle and verify that is in the correct location
+    const char* explicit_layer_name3 = "VK_LAYER_Explicit_TestLayer3";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name3).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer3.json");
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.insert(
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.begin() + 1,
+        LoaderSettingsLayerConfiguration{}
+            .set_name(explicit_layer_name3)
+            .set_path(env.get_shimmed_layer_manifest_path(2).str())
+            .set_control("on"));
+    env.update_loader_settings(env.loader_settings);
+    {
+        auto layer_props = env.GetLayerProperties(3);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, explicit_layer_name3));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, implicit_layer_name1));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 3);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, explicit_layer_name3));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, implicit_layer_name1));
+    }
+}
+
+// Make sure layers that are disabled can't be enabled by the application
+TEST(SettingsFile, ApplicationEnablesIgnored) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* explicit_layer_name = "VK_LAYER_TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(explicit_layer_name)
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_control("off"))));
+    {
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name);
+        ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_LAYER_NOT_PRESENT));
+    }
+}
+
+TEST(SettingsFile, LayerListIsEmpty) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* implicit_layer_name = "VK_LAYER_TestLayer";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("HeeHee")),
+                           "regular_test_layer.json");
+
+    JsonWriter writer{};
+    writer.StartObject();
+    writer.AddKeyedString("file_format_version", "1.0.0");
+    writer.StartKeyedObject("settings");
+    writer.StartKeyedObject("layers");
+    writer.EndObject();
+    writer.EndObject();
+    writer.EndObject();
+    env.write_settings_file(writer.output);
+
+    ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+}
+
+// If a settings file exists but contains no valid settings - don't consider it
+TEST(SettingsFile, InvalidSettingsFile) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* explicit_layer_name = "VK_LAYER_TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json");
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("foobarbaz")),
+                           "implicit_test_layer.json");
+    auto check_integrity = [&env, explicit_layer_name, implicit_layer_name]() {
+        auto layer_props = env.GetLayerProperties(2);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, explicit_layer_name));
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, explicit_layer_name));
+    };
+
+    // No actual settings
+    {
+        JsonWriter writer{};
+        writer.StartObject();
+        writer.AddKeyedString("file_format_version", "0.0.0");
+        writer.EndObject();
+        env.write_settings_file(writer.output);
+
+        check_integrity();
+    }
+
+    {
+        JsonWriter writer{};
+        writer.StartObject();
+        writer.AddKeyedString("file_format_version", "0.0.0");
+        writer.StartKeyedArray("settings_array");
+        writer.EndArray();
+        writer.StartKeyedObject("settings");
+        writer.EndObject();
+        writer.EndObject();
+        env.write_settings_file(writer.output);
+
+        check_integrity();
+    }
+
+    {
+        JsonWriter writer{};
+        writer.StartObject();
+        for (uint32_t i = 0; i < 3; i++) {
+            writer.StartKeyedArray("settings_array");
+            writer.EndArray();
+            writer.StartKeyedObject("boogabooga");
+            writer.EndObject();
+            writer.StartKeyedObject("settings");
+            writer.EndObject();
+        }
+        writer.EndObject();
+        env.write_settings_file(writer.output);
+
+        check_integrity();
+    }
+}
+
+// Unknown layers are put in the correct location
+TEST(SettingsFile, UnknownLayersInRightPlace) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* explicit_layer_name1 = "VK_LAYER_TestLayer1";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer1.json");
+    const char* implicit_layer_name1 = "VK_LAYER_ImplicitTestLayer1";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name1)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("foobarbaz")),
+                           "implicit_test_layer1.json");
+    const char* explicit_layer_name2 = "VK_LAYER_TestLayer2";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer2.json");
+    const char* implicit_layer_name2 = "VK_LAYER_ImplicitTestLayer2";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name2)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("foobarbaz")),
+                           "implicit_test_layer2.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name2)
+                                         .set_path(env.get_shimmed_layer_manifest_path(2).str())
+                                         .set_control("on"))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}.set_control("unordered_layer_location"))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name2)
+                                         .set_path(env.get_shimmed_layer_manifest_path(3).str())
+                                         .set_control("on")
+                                         .set_treat_as_implicit_manifest(true))));
+
+    auto layer_props = env.GetLayerProperties(4);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name2));
+    ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name1));
+    ASSERT_TRUE(string_eq(layer_props.at(2).layerName, explicit_layer_name1));
+    ASSERT_TRUE(string_eq(layer_props.at(3).layerName, implicit_layer_name2));
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.create_info.add_layer(explicit_layer_name1);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 4);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name2));
+    ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name1));
+    ASSERT_TRUE(string_eq(layer_props.at(2).layerName, explicit_layer_name1));
+    ASSERT_TRUE(string_eq(layer_props.at(3).layerName, implicit_layer_name2));
+}
+
+// Settings file allows loading multiple layers with the same name - as long as the path is different
+TEST(SettingsFile, MultipleLayersWithSameName) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name = "VK_LAYER_TestLayer";
+    env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(explicit_layer_name)
+                                                         .set_description("0000")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                           "regular_test_layer1.json");
+
+    env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(explicit_layer_name)
+                                                         .set_description("1111")
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                           "regular_test_layer2.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("on"))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(1).str())
+                                         .set_control("on"))));
+    auto layer_props = env.GetLayerProperties(2);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name));
+    ASSERT_TRUE(string_eq(layer_props.at(0).description, "0000"));
+    ASSERT_TRUE(string_eq(layer_props.at(1).layerName, explicit_layer_name));
+    ASSERT_TRUE(string_eq(layer_props.at(1).description, "1111"));
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name));
+    ASSERT_TRUE(string_eq(layers.at(0).description, "0000"));
+    ASSERT_TRUE(string_eq(layers.at(1).layerName, explicit_layer_name));
+    ASSERT_TRUE(string_eq(layers.at(1).description, "1111"));
+}
+
+// Settings file shouldn't be able to cause the same layer from the same path twice
+TEST(SettingsFile, MultipleLayersWithSamePath) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name = "VK_LAYER_TestLayer";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer1.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("on"))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("on"))));
+
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name));
+}
+
+// Settings contains a layer whose name doesn't match the one found in the layer manifest - make sure the layer from the settings
+// file is removed
+TEST(SettingsFile, MismatchedLayerNameAndManifestPath) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* manifest_explicit_layer_name = "VK_LAYER_MANIFEST_TestLayer";
+    const char* settings_explicit_layer_name = "VK_LAYER_Settings_TestLayer";
+    env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(manifest_explicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                           "regular_test_layer1.json");
+
+    const char* implicit_layer_name = "VK_LAYER_Implicit_TestLayer";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("oof")),
+                           "implicit_test_layer.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(settings_explicit_layer_name)
+                .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                .set_control("on"))));
+
+    ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+}
+
+// Settings file should take precedence over the meta layer, if present
+TEST(SettingsFile, MetaLayerAlsoActivates) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* settings_explicit_layer_name = "VK_LAYER_Regular_TestLayer";
+    env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(settings_explicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                           "explicit_test_layer.json");
+
+    const char* settings_implicit_layer_name = "VK_LAYER_RegularImplicit_TestLayer";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(settings_implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("AndISaidHey")
+                                                         .set_enable_environment("WhatsGoingOn")),
+                           "implicit_layer.json");
+
+    const char* component_explicit_layer_name1 = "VK_LAYER_Component_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(component_explicit_layer_name1)
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "component_test_layer1.json"));
+
+    const char* component_explicit_layer_name2 = "VK_LAYER_Component_TestLayer2";
+    env.add_explicit_layer(TestLayerDetails(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                          .set_name(component_explicit_layer_name2)
+                                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                            "component_test_layer2.json"));
+
+    const char* meta_layer_name1 = "VK_LAYER_meta_layer1";
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(meta_layer_name1)
+                                                                         .add_component_layer(component_explicit_layer_name2)
+                                                                         .add_component_layer(component_explicit_layer_name1)
+                                                                         .set_disable_environment("NotGonnaWork")),
+        "meta_test_layer.json");
+
+    const char* meta_layer_name2 = "VK_LAYER_meta_layer2";
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(ManifestLayer::LayerDescription{}
+                                                                         .set_name(meta_layer_name2)
+                                                                         .add_component_layer(component_explicit_layer_name1)
+                                                                         .set_disable_environment("ILikeTrains")
+                                                                         .set_enable_environment("BakedBeans")),
+        "not_automatic_meta_test_layer.json");
+
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(settings_explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_control("on")
+                                         .set_treat_as_implicit_manifest(false))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}.set_control("unordered_layer_location"))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(settings_implicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path(1).str())
+                                         .set_control("auto")
+                                         .set_treat_as_implicit_manifest(true))));
+    {
+        EnvVarWrapper enable_meta_layer{"WhatsGoingOn", "1"};
+        auto layer_props = env.GetLayerProperties(6);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, settings_explicit_layer_name));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, meta_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, meta_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(3).layerName, component_explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(4).layerName, component_explicit_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(5).layerName, settings_implicit_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 5);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, settings_explicit_layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, component_explicit_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, component_explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(3).layerName, meta_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(4).layerName, settings_implicit_layer_name));
+    }
+    {
+        EnvVarWrapper enable_meta_layer{"BakedBeans", "1"};
+        auto layer_props = env.GetLayerProperties(6);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, settings_explicit_layer_name));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, meta_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, meta_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(3).layerName, component_explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(4).layerName, component_explicit_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(5).layerName, settings_implicit_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 5);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, settings_explicit_layer_name));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, component_explicit_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, component_explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(3).layerName, meta_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(4).layerName, meta_layer_name2));
+    }
+}
+
+// Layers are correctly ordered by settings file.
+TEST(SettingsFile, LayerOrdering) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name1 = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json");
+
+    const char* explicit_layer_name2 = "VK_LAYER_Regular_TestLayer2";
+    env.add_explicit_layer(
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer2.json");
+
+    const char* implicit_layer_name1 = "VK_LAYER_Implicit_TestLayer1";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name1)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("Domierigato")),
+                           "implicit_layer1.json");
+
+    const char* implicit_layer_name2 = "VK_LAYER_Implicit_TestLayer2";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name2)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("Mistehrobato")),
+                           "implicit_layer2.json");
+
+    env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all"));
+
+    std::vector<LoaderSettingsLayerConfiguration> layer_configs{4};
+    layer_configs.at(0)
+        .set_name(explicit_layer_name1)
+        .set_path(env.get_shimmed_layer_manifest_path(0).str())
+        .set_control("on")
+        .set_treat_as_implicit_manifest(false);
+    layer_configs.at(1)
+        .set_name(explicit_layer_name2)
+        .set_path(env.get_shimmed_layer_manifest_path(1).str())
+        .set_control("on")
+        .set_treat_as_implicit_manifest(false);
+    layer_configs.at(2)
+        .set_name(implicit_layer_name1)
+        .set_path(env.get_shimmed_layer_manifest_path(2).str())
+        .set_control("on")
+        .set_treat_as_implicit_manifest(true);
+    layer_configs.at(3)
+        .set_name(implicit_layer_name2)
+        .set_path(env.get_shimmed_layer_manifest_path(3).str())
+        .set_control("on")
+        .set_treat_as_implicit_manifest(true);
+
+    std::sort(layer_configs.begin(), layer_configs.end());
+    uint32_t permutation_count = 0;
+    do {
+        env.loader_settings.app_specific_settings.at(0).layer_configurations.clear();
+        env.loader_settings.app_specific_settings.at(0).add_layer_configurations(layer_configs);
+        env.update_loader_settings(env.loader_settings);
+
+        auto layer_props = env.GetLayerProperties(4);
+        for (uint32_t i = 0; i < 4; i++) {
+            ASSERT_TRUE(layer_configs.at(i).name == layer_props.at(i).layerName);
+        }
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto active_layers = inst.GetActiveLayers(inst.GetPhysDev(), 4);
+        for (uint32_t i = 0; i < 4; i++) {
+            ASSERT_TRUE(layer_configs.at(i).name == active_layers.at(i).layerName);
+        }
+        env.debug_log.clear();
+        permutation_count++;
+    } while (std::next_permutation(layer_configs.begin(), layer_configs.end()));
+    ASSERT_EQ(permutation_count, 24U);  // should be this many orderings
+}
+
+TEST(SettingsFile, EnvVarsWork_VK_LAYER_PATH) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name1 = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"}
+                               .set_discovery_type(ManifestDiscoveryType::env_var));
+
+    const char* implicit_layer_name1 = "VK_LAYER_Implicit_TestLayer1";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name1)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("Domierigato")),
+                           "implicit_layer1.json");
+    const char* non_env_var_layer_name2 = "VK_LAYER_Regular_TestLayer2";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(non_env_var_layer_name2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer2.json"});
+
+    {
+        auto layer_props = env.GetLayerProperties(2);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, explicit_layer_name1));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name1);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, explicit_layer_name1));
+    }
+    env.update_loader_settings(env.loader_settings.add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(non_env_var_layer_name2)
+                                         .set_control("on")
+                                         .set_path(env.get_shimmed_layer_manifest_path(2).str()))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}.set_control("unordered_layer_location"))));
+    {
+        auto layer_props = env.GetLayerProperties(3);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, explicit_layer_name1));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, implicit_layer_name1));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name1);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 3);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, explicit_layer_name1));
+    }
+}
+
+TEST(SettingsFile, EnvVarsWork_VK_ADD_LAYER_PATH) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* implicit_layer_name1 = "VK_LAYER_Implicit_TestLayer1";
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name1)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("Domierigato")),
+                           "implicit_layer1.json");
+    const char* explicit_layer_name1 = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name1).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"}
+                               .set_discovery_type(ManifestDiscoveryType::add_env_var));
+    const char* non_env_var_layer_name2 = "VK_LAYER_Regular_TestLayer2";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(non_env_var_layer_name2).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer2.json"});
+
+    {
+        auto layer_props = env.GetLayerProperties(3);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, non_env_var_layer_name2));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name1);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 2);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, explicit_layer_name1));
+    }
+
+    env.update_loader_settings(env.loader_settings.add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_stderr_log_filter("all")
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name1)
+                                         .set_control("on")
+                                         .set_path(env.get_shimmed_layer_manifest_path(1).str()))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(non_env_var_layer_name2)
+                                         .set_control("on")
+                                         .set_path(env.get_shimmed_layer_manifest_path(2).str()))
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(implicit_layer_name1)
+                                         .set_control("on")
+                                         .set_path(env.get_shimmed_layer_manifest_path(0).str())
+                                         .set_treat_as_implicit_manifest(true))));
+    {
+        auto layer_props = env.GetLayerProperties(3);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layer_props.at(1).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layer_props.at(2).layerName, implicit_layer_name1));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 3);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, implicit_layer_name1));
+    }
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.create_info.add_layer(explicit_layer_name1);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 3);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, explicit_layer_name1));
+        ASSERT_TRUE(string_eq(layers.at(1).layerName, non_env_var_layer_name2));
+        ASSERT_TRUE(string_eq(layers.at(2).layerName, implicit_layer_name1));
+    }
+}
+
+TEST(SettingsFile, EnvVarsWork_VK_INSTANCE_LAYERS) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"});
+
+    {
+        EnvVarWrapper vk_instance_layers{"VK_INSTANCE_LAYERS", explicit_layer_name};
+        auto layer_props = env.GetLayerProperties(1);
+        ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_FALSE(env.debug_log.find(get_settings_location_log_message(env)));
+        auto layer = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layer.at(0).layerName, explicit_layer_name));
+    }
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(explicit_layer_name)
+                .set_control("off")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str()))));
+    {
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+    {
+        EnvVarWrapper vk_instance_layers{"VK_INSTANCE_LAYERS", explicit_layer_name};
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+    }
+}
+// Make sure that layers disabled by settings file aren't enabled by VK_LOADER_LAYERS_ENABLE
+TEST(SettingsFile, EnvVarsWork_VK_LOADER_LAYERS_ENABLE) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"});
+
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(explicit_layer_name)
+                .set_control("off")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str()))));
+
+    EnvVarWrapper vk_instance_layers{"VK_LOADER_LAYERS_ENABLE", explicit_layer_name};
+    ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+}
+// Make sure that layers enabled by settings file aren't disabled by VK_LOADER_LAYERS_ENABLE
+TEST(SettingsFile, EnvVarsWork_VK_LOADER_LAYERS_DISABLE) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+
+    const char* explicit_layer_name = "VK_LAYER_Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"});
+
+    env.update_loader_settings(
+        env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(explicit_layer_name)
+                .set_control("on")
+                .set_path(env.get_shimmed_layer_manifest_path(0).str()))));
+
+    EnvVarWrapper vk_instance_layers{"VK_LOADER_LAYERS_DISABLE", explicit_layer_name};
+    auto layer_props = env.GetLayerProperties(1);
+    ASSERT_TRUE(string_eq(layer_props.at(0).layerName, explicit_layer_name));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+}
+
+#if defined(WIN32)
+TEST(SettingsFile, MultipleKeysInRegistryInUnsecureLocation) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    env.platform_shim->add_unsecured_manifest(ManifestCategory::settings, "jank_path");
+    env.platform_shim->add_unsecured_manifest(ManifestCategory::settings, "jank_path2");
+
+    const char* regular_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(regular_layer_name)
+                .set_path(env.get_layer_manifest_path().str())
+                .set_control("on"))));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+
+    auto layer_props = env.GetLayerProperties(1);
+    EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+
+    ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+    env.debug_log.clear();
+    auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+    ASSERT_TRUE(string_eq(layers.at(0).layerName, regular_layer_name));
+}
+
+TEST(SettingsFile, MultipleKeysInRegistryInSecureLocation) {
+    FrameworkEnvironment env{FrameworkSettings{}.set_secure_loader_settings(true)};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    env.platform_shim->add_manifest(ManifestCategory::settings, "jank_path");
+    env.platform_shim->add_manifest(ManifestCategory::settings, "jank_path2");
+
+    const char* regular_layer_name = "VK_LAYER_TestLayer_0";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(regular_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "regular_test_layer.json"}
+                               .set_discovery_type(ManifestDiscoveryType::override_folder));
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(regular_layer_name)
+                .set_path(env.get_layer_manifest_path().str())
+                .set_control("on"))));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+
+    // Make sure it works if the settings file is in the HKEY_LOCAL_MACHINE
+    env.platform_shim->set_elevated_privilege(true);
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    {
+        auto layer_props = env.GetLayerProperties(1);
+        EXPECT_TRUE(string_eq(layer_props.at(0).layerName, regular_layer_name));
+
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        ASSERT_TRUE(string_eq(layers.at(0).layerName, regular_layer_name));
+    }
+}
+#endif
+
+// Preinstance functions respect the settings file
+TEST(SettingsFile, PreInstanceFunctions) {
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+
+    env.add_implicit_layer(
+        ManifestLayer{}.set_file_format_version({1, 1, 2}).add_layer(
+            ManifestLayer::LayerDescription{}
+                .set_name(implicit_layer_name)
+                .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                .set_disable_environment("DISABLE_ME")
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceLayerProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceLayerProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceExtensionProperties")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceExtensionProperties"))
+                .add_pre_instance_function(ManifestLayer::LayerDescription::FunctionOverride{}
+                                               .set_vk_func("vkEnumerateInstanceVersion")
+                                               .set_override_name("test_preinst_vkEnumerateInstanceVersion"))),
+        "implicit_test_layer.json");
+
+    env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+        LoaderSettingsLayerConfiguration{}
+            .set_name(implicit_layer_name)
+            .set_control("on")
+            .set_path(env.get_shimmed_layer_manifest_path(0).str())
+            .set_treat_as_implicit_manifest(true)));
+    env.update_loader_settings(env.loader_settings);
+    {
+        auto& layer = env.get_test_layer(0);
+        // Check layer props
+        uint32_t layer_props = 43;
+        layer.set_reported_layer_props(layer_props);
+
+        uint32_t count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+        ASSERT_EQ(count, layer_props);
+
+        // check extension props
+        uint32_t ext_props = 52;
+        layer.set_reported_extension_props(ext_props);
+        count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+        ASSERT_EQ(count, ext_props);
+
+        // check version
+        uint32_t layer_version = VK_MAKE_API_VERSION(1, 2, 3, 4);
+        layer.set_reported_instance_version(layer_version);
+
+        uint32_t version = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+        ASSERT_EQ(version, layer_version);
+    }
+    // control is set to off
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+    env.update_loader_settings(env.loader_settings);
+
+    {
+        auto& layer = env.get_test_layer(0);
+        // Check layer props
+        uint32_t layer_props = 43;
+        layer.set_reported_layer_props(layer_props);
+
+        uint32_t count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+        ASSERT_EQ(count, 0U);  // dont use the intercepted count
+
+        // check extension props
+        uint32_t ext_props = 52;
+        layer.set_reported_extension_props(ext_props);
+        count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+        ASSERT_EQ(count, 4U);  // dont use the intercepted count - use default count
+
+        // check version
+        uint32_t layer_version = VK_MAKE_API_VERSION(1, 2, 3, 4);
+        layer.set_reported_instance_version(layer_version);
+
+        uint32_t version = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+        ASSERT_EQ(version, VK_HEADER_VERSION_COMPLETE);
+    }
+
+    // control is set to auto
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+    env.update_loader_settings(env.loader_settings);
+
+    {
+        auto& layer = env.get_test_layer(0);
+        // Check layer props
+        uint32_t layer_props = 43;
+        layer.set_reported_layer_props(layer_props);
+
+        uint32_t count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceLayerProperties(&count, nullptr));
+        ASSERT_EQ(count, layer_props);
+
+        // check extension props
+        uint32_t ext_props = 52;
+        layer.set_reported_extension_props(ext_props);
+        count = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceExtensionProperties(nullptr, &count, nullptr));
+        ASSERT_EQ(count, ext_props);
+
+        // check version
+        uint32_t layer_version = VK_MAKE_API_VERSION(1, 2, 3, 4);
+        layer.set_reported_instance_version(layer_version);
+
+        uint32_t version = 0;
+        ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumerateInstanceVersion(&version));
+        ASSERT_EQ(version, layer_version);
+    }
+}
+
+// If an implicit layer's disable environment variable is set, but the settings file says to turn the layer on, the layer should be
+// activated.
+TEST(SettingsFile, ImplicitLayerDisableEnvironmentVariableOverriden) {
+    auto check_log_for_insert_instance_layer_string = [](FrameworkEnvironment& env, const char* implicit_layer_name,
+                                                         bool check_for_enable) {
+        {
+            InstWrapper inst{env.vulkan_functions};
+            FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+            inst.CheckCreate(VK_SUCCESS);
+            if (check_for_enable) {
+                ASSERT_TRUE(env.debug_log.find(std::string("Insert instance layer \"") + implicit_layer_name));
+                auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+                ASSERT_TRUE(string_eq(layers.at(0).layerName, implicit_layer_name));
+            } else {
+                ASSERT_FALSE(env.debug_log.find(std::string("Insert instance layer \"") + implicit_layer_name));
+                ASSERT_NO_FATAL_FAILURE(inst.GetActiveLayers(inst.GetPhysDev(), 0));
+            }
+        }
+        env.debug_log.clear();
+    };
+
+    FrameworkEnvironment env;
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    const char* implicit_layer_name = "VK_LAYER_ImplicitTestLayer";
+
+    env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                         .set_name(implicit_layer_name)
+                                                         .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                                         .set_disable_environment("DISABLE_ME")
+                                                         .set_enable_environment("ENABLE_ME")),
+                           "implicit_test_layer.json");
+    env.loader_settings.add_app_specific_setting(AppSpecificSettings{}.add_stderr_log_filter("all").add_layer_configuration(
+        LoaderSettingsLayerConfiguration{}
+            .set_name(implicit_layer_name)
+            .set_path(env.get_shimmed_layer_manifest_path(0).str())
+            .set_treat_as_implicit_manifest(true)));
+
+    // control is set to on
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("on");
+    env.update_loader_settings(env.loader_settings);
+    {
+        EnvVarWrapper enable_env_var{"ENABLE_ME"};
+        EnvVarWrapper disable_env_var{"DISABLE_ME"};
+
+        auto layers = env.GetLayerProperties(1);
+        ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
+
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        enable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        enable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        enable_env_var.remove_value();
+
+        disable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        enable_env_var.set_new_value("1");
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+    }
+
+    // control is set to off
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("off");
+    env.update_loader_settings(env.loader_settings);
+    {
+        EnvVarWrapper enable_env_var{"ENABLE_ME"};
+        EnvVarWrapper disable_env_var{"DISABLE_ME"};
+
+        ASSERT_NO_FATAL_FAILURE(env.GetLayerProperties(0));
+
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.remove_value();
+
+        disable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("1");
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+    }
+
+    // control is set to auto
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.at(0).set_control("auto");
+    env.update_loader_settings(env.loader_settings);
+    {
+        EnvVarWrapper enable_env_var{"ENABLE_ME"};
+        EnvVarWrapper disable_env_var{"DISABLE_ME"};
+
+        auto layers = env.GetLayerProperties(1);
+        ASSERT_TRUE(string_eq(layers[0].layerName, implicit_layer_name));
+
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, true);
+
+        enable_env_var.remove_value();
+
+        disable_env_var.set_new_value("0");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+
+        enable_env_var.set_new_value("1");
+        disable_env_var.set_new_value("1");
+        check_log_for_insert_instance_layer_string(env, implicit_layer_name, false);
+    }
+}
+
+// Settings can say which filters to use - make sure those are propagated & treated correctly
+TEST(SettingsFile, StderrLogFilters) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    const char* explicit_layer_name = "Regular_TestLayer1";
+    env.add_explicit_layer(TestLayerDetails{
+        ManifestLayer{}.add_layer(
+            ManifestLayer::LayerDescription{}.set_name(explicit_layer_name).set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+        "explicit_test_layer1.json"});
+    env.update_loader_settings(env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}
+            .add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                         .set_name(explicit_layer_name)
+                                         .set_path(env.get_shimmed_layer_manifest_path().str())
+                                         .set_control("on"))
+            .add_layer_configuration(
+                LoaderSettingsLayerConfiguration{}.set_name("VK_LAYER_missing").set_path("/road/to/nowhere").set_control("on"))));
+
+    std::string expected_output_verbose;
+    expected_output_verbose += "Layer Configurations count = 2\n";
+    expected_output_verbose += "---- Layer Configuration [0] ----\n";
+    expected_output_verbose += std::string("Name: ") + explicit_layer_name + "\n";
+    expected_output_verbose += "Path: " + env.get_shimmed_layer_manifest_path().str() + "\n";
+    expected_output_verbose += "Control: on\n";
+    expected_output_verbose += "---- Layer Configuration [1] ----\n";
+    expected_output_verbose += "Name: VK_LAYER_missing\n";
+    expected_output_verbose += "Path: /road/to/nowhere\n";
+    expected_output_verbose += "Control: on\n";
+    expected_output_verbose += "---------------------------------\n";
+
+    std::string expected_output_info = get_settings_location_log_message(env) + "\n";
+
+    std::string expected_output_warning =
+        "Layer name Regular_TestLayer1 does not conform to naming standard (Policy #LLP_LAYER_3)\n";
+
+    std::string expected_output_error = "loader_get_json: Failed to open JSON file /road/to/nowhere\n";
+
+    env.loader_settings.app_specific_settings.at(0).stderr_log = {"all"};
+    env.update_loader_settings(env.loader_settings);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(expected_output_verbose));
+        ASSERT_TRUE(env.debug_log.find(expected_output_info));
+        ASSERT_TRUE(env.debug_log.find(expected_output_warning));
+        ASSERT_TRUE(env.debug_log.find(expected_output_error));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, explicit_layer_name));
+    }
+    env.debug_log.clear();
+    env.debug_log.create_info.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT;
+    env.loader_settings.app_specific_settings.at(0).stderr_log = {"info"};
+    env.update_loader_settings(env.loader_settings);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(expected_output_verbose));
+        ASSERT_FALSE(env.debug_log.find(expected_output_info));
+        ASSERT_FALSE(env.debug_log.find(expected_output_warning));
+        ASSERT_FALSE(env.debug_log.find(expected_output_error));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, explicit_layer_name));
+    }
+    env.debug_log.clear();
+    env.debug_log.create_info.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT;
+    env.loader_settings.app_specific_settings.at(0).stderr_log = {"debug"};
+    env.update_loader_settings(env.loader_settings);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_FALSE(env.debug_log.find(expected_output_verbose));
+        ASSERT_TRUE(env.debug_log.find(expected_output_info));
+        ASSERT_FALSE(env.debug_log.find(expected_output_warning));
+        ASSERT_FALSE(env.debug_log.find(expected_output_error));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, explicit_layer_name));
+    }
+    env.debug_log.clear();
+    env.debug_log.create_info.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT;
+    env.loader_settings.app_specific_settings.at(0).stderr_log = {"warn"};
+    env.update_loader_settings(env.loader_settings);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_FALSE(env.debug_log.find(expected_output_verbose));
+        ASSERT_FALSE(env.debug_log.find(expected_output_info));
+        ASSERT_TRUE(env.debug_log.find(expected_output_warning));
+        ASSERT_FALSE(env.debug_log.find(expected_output_error));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, explicit_layer_name));
+    }
+    env.debug_log.clear();
+    env.debug_log.create_info.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT;
+    env.loader_settings.app_specific_settings.at(0).stderr_log = {"error"};
+    env.update_loader_settings(env.loader_settings);
+    {
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_FALSE(env.debug_log.find(expected_output_verbose));
+        ASSERT_FALSE(env.debug_log.find(expected_output_info));
+        ASSERT_FALSE(env.debug_log.find(expected_output_warning));
+        ASSERT_TRUE(env.debug_log.find(expected_output_error));
+        auto active_layer_props = inst.GetActiveLayers(inst.GetPhysDev(), 1);
+        EXPECT_TRUE(string_eq(active_layer_props.at(0).layerName, explicit_layer_name));
+    }
+}
+
+// Enough layers exist that arrays need to be resized - make sure that works
+TEST(SettingsFile, TooManyLayers) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device({});
+    env.loader_settings.set_file_format_version({1, 0, 0}).add_app_specific_setting(
+        AppSpecificSettings{}.add_stderr_log_filter("all"));
+    std::string layer_name = "VK_LAYER_regular_layer_name_";
+    uint32_t layer_count = 40;
+    for (uint32_t i = 0; i < layer_count; i++) {
+        env.add_explicit_layer(TestLayerDetails{ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
+                                                                              .set_name(layer_name + std::to_string(i))
+                                                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)),
+                                                layer_name + std::to_string(i) + ".json"}
+                                   .set_discovery_type(ManifestDiscoveryType::override_folder));
+        env.loader_settings.app_specific_settings.at(0).add_layer_configuration(LoaderSettingsLayerConfiguration{}
+                                                                                    .set_name(layer_name + std::to_string(i))
+                                                                                    .set_path(env.get_layer_manifest_path(i).str())
+                                                                                    .set_control("on"));
+    }
+    env.update_loader_settings(env.loader_settings);
+
+    {
+        auto layer_props = env.GetLayerProperties(40);
+        for (uint32_t i = 0; i < layer_count; i++) {
+            std::string expected_layer_name = layer_name + std::to_string(i);
+            EXPECT_TRUE(string_eq(layer_props.at(i).layerName, expected_layer_name.c_str()));
+        }
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 40);
+        for (uint32_t i = 0; i < layer_count; i++) {
+            std::string expected_layer_name = layer_name + std::to_string(i);
+            EXPECT_TRUE(string_eq(layers.at(i).layerName, expected_layer_name.c_str()));
+        }
+    }
+    env.loader_settings.app_specific_settings.at(0).layer_configurations.clear();
+
+    // Now reverse the order to make sure adding the 'last' layer first works
+    for (uint32_t i = 0; i < layer_count; i++) {
+        env.loader_settings.app_specific_settings.at(0).add_layer_configuration(
+            LoaderSettingsLayerConfiguration{}
+                .set_name(layer_name + std::to_string(layer_count - i - 1))
+                .set_path(env.get_layer_manifest_path(layer_count - i - 1).str())
+                .set_control("on"));
+    }
+    env.update_loader_settings(env.loader_settings);
+
+    {
+        auto layer_props = env.GetLayerProperties(40);
+        for (uint32_t i = 0; i < layer_count; i++) {
+            std::string expected_layer_name = layer_name + std::to_string(layer_count - i - 1);
+            EXPECT_TRUE(string_eq(layer_props.at(i).layerName, expected_layer_name.c_str()));
+        }
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+        inst.CheckCreate();
+
+        ASSERT_TRUE(env.debug_log.find(get_settings_location_log_message(env)));
+        env.debug_log.clear();
+        auto layers = inst.GetActiveLayers(inst.GetPhysDev(), 40);
+        for (uint32_t i = 0; i < layer_count; i++) {
+            std::string expected_layer_name = layer_name + std::to_string(layer_count - i - 1);
+            EXPECT_TRUE(string_eq(layers.at(i).layerName, expected_layer_name.c_str()));
+        }
+    }
+}
diff --git a/tests/loader_testing_main.cpp b/tests/loader_testing_main.cpp
index 6fe3f45..75e145d 100644
--- a/tests/loader_testing_main.cpp
+++ b/tests/loader_testing_main.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021 The Khronos Group Inc.
- * Copyright (c) 2021 Valve Corporation
- * Copyright (c) 2021 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -27,6 +27,20 @@
 
 #include "test_environment.h"
 
+// Makes any failed assertion throw, allowing for graceful cleanup of resources instead of hard aborts
+class ThrowListener : public testing::EmptyTestEventListener {
+    void OnTestPartResult(const testing::TestPartResult& result) override {
+        if (result.type() == testing::TestPartResult::kFatalFailure) {
+            // We need to make sure an exception wasn't already thrown so we dont throw another exception at the same time
+            std::exception_ptr ex = std::current_exception();
+            if (ex) {
+                return;
+            }
+            throw testing::AssertionException(result);
+        }
+    }
+};
+
 int main(int argc, char** argv) {
 #if defined(_WIN32)
     // Avoid "Abort, Retry, Ignore" dialog boxes
@@ -44,34 +58,39 @@
     // clean up folders from old test
     fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "null_dir");
     fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "icd_manifests");
-    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "portability_icd_manifests");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "icd_env_vars_manifests");
     fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "explicit_layer_manifests");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "explicit_env_var_layer_folder");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "explicit_add_env_var_layer_folder");
     fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "implicit_layer_manifests");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "override_layer_manifests");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "app_package_manifests");
+    fs::delete_folder(fs::path(FRAMEWORK_BUILD_DIRECTORY) / "macos_bundle");
 
     // make sure the tests don't find these env-vars if they were set on the system
-    remove_env_var("VK_ICD_FILENAMES");
-    remove_env_var("VK_DRIVER_FILES");
-    remove_env_var("VK_ADD_DRIVER_FILES");
-    remove_env_var("VK_LAYER_PATH");
-    remove_env_var("VK_ADD_LAYER_PATH");
-    remove_env_var("VK_INSTANCE_LAYERS");
-    remove_env_var("VK_LOADER_DRIVERS_SELECT");
-    remove_env_var("VK_LOADER_DRIVERS_DISABLE");
-    remove_env_var("VK_LOADER_LAYERS_ENABLE");
-    remove_env_var("VK_LOADER_LAYERS_DISABLE");
-    remove_env_var("VK_LOADER_DEBUG");
-    remove_env_var("VK_LOADER_DISABLE_INST_EXT_FILTER");
+    EnvVarWrapper vk_icd_filenames_env_var{"VK_ICD_FILENAMES"};
+    EnvVarWrapper vk_driver_files_env_var{"VK_DRIVER_FILES"};
+    EnvVarWrapper vk_add_driver_files_env_var{"VK_ADD_DRIVER_FILES"};
+    EnvVarWrapper vk_layer_path_env_var{"VK_LAYER_PATH"};
+    EnvVarWrapper vk_add_layer_path_env_var{"VK_ADD_LAYER_PATH"};
+    EnvVarWrapper vk_instance_layers_env_var{"VK_INSTANCE_LAYERS"};
+    EnvVarWrapper vk_loader_drivers_select_env_var{"VK_LOADER_DRIVERS_SELECT"};
+    EnvVarWrapper vk_loader_drivers_disable_env_var{"VK_LOADER_DRIVERS_DISABLE"};
+    EnvVarWrapper vk_loader_layers_enable_env_var{"VK_LOADER_LAYERS_ENABLE"};
+    EnvVarWrapper vk_loader_layers_disable_env_var{"VK_LOADER_LAYERS_DISABLE"};
+    EnvVarWrapper vk_loader_debug_env_var{"VK_LOADER_DEBUG"};
+    EnvVarWrapper vk_loader_disable_inst_ext_filter_env_var{"VK_LOADER_DISABLE_INST_EXT_FILTER"};
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-    set_env_var("XDG_CONFIG_HOME", "/etc");
-    set_env_var("XDG_CONFIG_DIRS", "/etc");
-    set_env_var("XDG_DATA_HOME", "/etc");
-    set_env_var("XDG_DATA_DIRS", "/etc");
-#endif
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-    set_env_var("HOME", "/home/fake_home");
+#if COMMON_UNIX_PLATFORMS
+    // Set only one of the 4 XDG variables to /etc, let everything else be empty
+    EnvVarWrapper xdg_config_home_env_var{"XDG_CONFIG_HOME", ETC_DIR};
+    EnvVarWrapper xdg_config_dirs_env_var{"XDG_CONFIG_DIRS"};
+    EnvVarWrapper xdg_data_home_env_var{"XDG_DATA_HOME"};
+    EnvVarWrapper xdg_data_dirs_env_var{"XDG_DATA_DIRS"};
+    EnvVarWrapper home_env_var{"HOME", HOME_DIR};
 #endif
     ::testing::InitGoogleTest(&argc, argv);
+    ::testing::UnitTest::GetInstance()->listeners().Append(new ThrowListener);
     int result = RUN_ALL_TESTS();
 
     return result;
diff --git a/tests/loader_threading_tests.cpp b/tests/loader_threading_tests.cpp
index 83b17da..2a2aada 100644
--- a/tests/loader_threading_tests.cpp
+++ b/tests/loader_threading_tests.cpp
@@ -45,7 +45,6 @@
         VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(1.0));
         dev.CheckCreate(phys_dev);
         for (uint32_t j = 0; j < num_loops_try_get_device_proc_addr; j++) {
             PFN_vkCmdBindPipeline p = dev.load("vkCmdBindPipeline");
@@ -58,11 +57,9 @@
                                 uint32_t num_loops_try_get_proc_addr) {
     InstWrapper inst{env->vulkan_functions};
     inst.CheckCreate();
-    VkPhysicalDevice phys_dev = inst.GetPhysDev();
     for (uint32_t i = 0; i < num_loops_create_destroy_device; i++) {
         DeviceWrapper dev{inst};
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(1.0));
-        dev.CheckCreate(phys_dev);
+        dev.CheckCreate(inst.GetPhysDev());
 
         for (uint32_t j = 0; j < num_loops_try_get_proc_addr; j++) {
             PFN_vkCmdBindPipeline p = dev.load("vkCmdBindPipeline");
@@ -78,31 +75,23 @@
         }
     }
 }
-VKAPI_ATTR void VKAPI_CALL test_vkCmdBindPipeline(VkCommandBuffer cmd_buf, VkPipelineBindPoint pipelineBindPoint,
-                                                  VkPipeline pipeline) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdBindDescriptorSets(VkCommandBuffer cmd_buf, VkPipelineBindPoint pipelineBindPoint,
-                                                        VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount,
-                                                        const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount,
-                                                        const uint32_t* pDynamicOffsets) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdBindVertexBuffers(VkCommandBuffer cmd_buf, uint32_t firstBinding, uint32_t bindingCount,
-                                                       const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdBindIndexBuffer(VkCommandBuffer cmd_buf, uint32_t firstBinding, uint32_t bindingCount,
-                                                     const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) {}
-VKAPI_ATTR void VKAPI_CALL test_vkCmdDraw(VkCommandBuffer cmd_buf, uint32_t vertexCount, uint32_t instanceCount,
-                                          uint32_t firstVertex, uint32_t firstInstance) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBindPipeline(VkCommandBuffer, VkPipelineBindPoint, VkPipeline) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBindDescriptorSets(VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t,
+                                                        const VkDescriptorSet*, uint32_t, const uint32_t*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBindVertexBuffers(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer*, const VkDeviceSize*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdBindIndexBuffer(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer*, const VkDeviceSize*) {}
+VKAPI_ATTR void VKAPI_CALL test_vkCmdDraw(VkCommandBuffer, uint32_t, uint32_t, uint32_t, uint32_t) {}
 TEST(Threading, InstanceCreateDestroyLoop) {
     const auto processor_count = std::thread::hardware_concurrency();
 
-    FrameworkEnvironment env{false};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("")};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     uint32_t num_loops_create_destroy_instance = 500;
     uint32_t num_loops_try_get_instance_proc_addr = 5;
     uint32_t num_loops_try_get_device_proc_addr = 100;
-    auto& driver = env.get_test_icd();
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().known_device_functions.push_back(
-        {"vkCmdBindPipeline", to_vkVoidFunction(test_vkCmdBindPipeline)});
+    driver.physical_devices.emplace_back("physical_device_0")
+        .known_device_functions.push_back({"vkCmdBindPipeline", to_vkVoidFunction(test_vkCmdBindPipeline)});
 
     std::vector<std::thread> instance_creation_threads;
     std::vector<std::thread> function_query_threads;
@@ -119,23 +108,18 @@
 TEST(Threading, DeviceCreateDestroyLoop) {
     const auto processor_count = std::thread::hardware_concurrency();
 
-    FrameworkEnvironment env{false};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    FrameworkEnvironment env{FrameworkSettings{}.set_log_filter("")};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
 
     uint32_t num_loops_create_destroy_device = 1000;
     uint32_t num_loops_try_get_device_proc_addr = 5;
-    auto& driver = env.get_test_icd();
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().known_device_functions.push_back(
-        {"vkCmdBindPipeline", to_vkVoidFunction(test_vkCmdBindPipeline)});
-    driver.physical_devices.back().known_device_functions.push_back(
-        {"vkCmdBindDescriptorSets", to_vkVoidFunction(test_vkCmdBindDescriptorSets)});
-    driver.physical_devices.back().known_device_functions.push_back(
-        {"vkCmdBindVertexBuffers", to_vkVoidFunction(test_vkCmdBindVertexBuffers)});
-    driver.physical_devices.back().known_device_functions.push_back(
-        {"vkCmdBindIndexBuffer", to_vkVoidFunction(test_vkCmdBindIndexBuffer)});
-    driver.physical_devices.back().known_device_functions.push_back({"vkCmdDraw", to_vkVoidFunction(test_vkCmdDraw)});
+    driver.physical_devices.emplace_back("physical_device_0").known_device_functions = {
+        {"vkCmdBindPipeline", to_vkVoidFunction(test_vkCmdBindPipeline)},
+        {"vkCmdBindDescriptorSets", to_vkVoidFunction(test_vkCmdBindDescriptorSets)},
+        {"vkCmdBindVertexBuffers", to_vkVoidFunction(test_vkCmdBindVertexBuffers)},
+        {"vkCmdBindIndexBuffer", to_vkVoidFunction(test_vkCmdBindIndexBuffer)},
+        {"vkCmdDraw", to_vkVoidFunction(test_vkCmdDraw)}};
 
     std::vector<std::thread> device_creation_threads;
 
diff --git a/tests/loader_unknown_ext_tests.cpp b/tests/loader_unknown_ext_tests.cpp
index bdce9b6..dd918b8 100644
--- a/tests/loader_unknown_ext_tests.cpp
+++ b/tests/loader_unknown_ext_tests.cpp
@@ -48,14 +48,14 @@
 */
 template <typename DispatchableHandleType>
 struct custom_functions {
-    static VKAPI_ATTR uint32_t VKAPI_CALL func_zero(DispatchableHandleType handle, uint32_t foo) { return foo; };
-    static VKAPI_ATTR uint32_t VKAPI_CALL func_one(DispatchableHandleType handle, uint32_t foo, uint32_t bar) { return foo + bar; };
-    static VKAPI_ATTR float VKAPI_CALL func_two(DispatchableHandleType handle, uint32_t foo, uint32_t bar, float baz) {
+    static VKAPI_ATTR uint32_t VKAPI_CALL func_zero(DispatchableHandleType, uint32_t foo) { return foo; };
+    static VKAPI_ATTR uint32_t VKAPI_CALL func_one(DispatchableHandleType, uint32_t foo, uint32_t bar) { return foo + bar; };
+    static VKAPI_ATTR float VKAPI_CALL func_two(DispatchableHandleType, uint32_t foo, uint32_t bar, float baz) {
         return baz + foo + bar;
     };
-    static VKAPI_ATTR int VKAPI_CALL func_three(DispatchableHandleType handle, int* ptr_a, int* ptr_b) { return *ptr_a + *ptr_b; };
-    static VKAPI_ATTR float VKAPI_CALL func_four(DispatchableHandleType handle, int* ptr_a, int* ptr_b, int foo, int bar, float k,
-                                                 float l, char a, char b, char c) {
+    static VKAPI_ATTR int VKAPI_CALL func_three(DispatchableHandleType, int* ptr_a, int* ptr_b) { return *ptr_a + *ptr_b; };
+    static VKAPI_ATTR float VKAPI_CALL func_four(DispatchableHandleType, int* ptr_a, int* ptr_b, int foo, int bar, float k, float l,
+                                                 char a, char b, char c) {
         return *ptr_a + *ptr_b + foo + bar + k + l + static_cast<int>(a) + static_cast<int>(b) + static_cast<int>(c);
     };
 };
@@ -102,7 +102,7 @@
         return func(handle, layer, name, ptr_a, ptr_b);
     };
     static VKAPI_ATTR float VKAPI_CALL func_four(DispatchableHandleType handle, TestLayer* layer, const char* name, int* ptr_a,
-                                                 int* ptr_b, int foo, int bar, float k, float l, char a, char b, char c) {
+                                                 int* ptr_b, int foo, int bar, float k, float l, char, char, char) {
         auto func = reinterpret_cast<decltype(&func_four)>(find_custom_func(layer, name));
         if (func == nullptr) return -1337.f;
         return func(handle, layer, name, ptr_a, ptr_b, foo + 4, bar + 5, k + 1, l + 2, 'd', 'e', 'f');
@@ -111,23 +111,19 @@
 
 template <typename DispatchableHandleType>
 struct layer_implementation_functions {
-    static VKAPI_ATTR uint32_t VKAPI_CALL func_zero(DispatchableHandleType device, TestLayer* layer, const char* name, uint32_t i) {
-        return i * 3;
-    }
-    static VKAPI_ATTR uint32_t VKAPI_CALL func_one(DispatchableHandleType device, TestLayer* layer, const char* name, uint32_t i,
-                                                   float f) {
+    static VKAPI_ATTR uint32_t VKAPI_CALL func_zero(DispatchableHandleType, TestLayer*, const char*, uint32_t i) { return i * 3; }
+    static VKAPI_ATTR uint32_t VKAPI_CALL func_one(DispatchableHandleType, TestLayer*, const char*, uint32_t i, float f) {
         return static_cast<int>(i * 3 + f * 10.f);
     }
-    static VKAPI_ATTR float VKAPI_CALL func_two(DispatchableHandleType handle, TestLayer* layer, const char* name, uint32_t foo,
-                                                uint32_t bar, float baz) {
+    static VKAPI_ATTR float VKAPI_CALL func_two(DispatchableHandleType, TestLayer*, const char*, uint32_t foo, uint32_t bar,
+                                                float baz) {
         return baz + foo + bar;
     };
-    static VKAPI_ATTR int VKAPI_CALL func_three(DispatchableHandleType handle, TestLayer* layer, const char* name, int* ptr_a,
-                                                int* ptr_b) {
+    static VKAPI_ATTR int VKAPI_CALL func_three(DispatchableHandleType, TestLayer*, const char*, int* ptr_a, int* ptr_b) {
         return *ptr_a + *ptr_b;
     };
-    static VKAPI_ATTR float VKAPI_CALL func_four(DispatchableHandleType handle, TestLayer* layer, const char* name, int* ptr_a,
-                                                 int* ptr_b, int foo, int bar, float k, float l, char a, char b, char c) {
+    static VKAPI_ATTR float VKAPI_CALL func_four(DispatchableHandleType, TestLayer*, const char*, int* ptr_a, int* ptr_b, int foo,
+                                                 int bar, float k, float l, char a, char b, char c) {
         return *ptr_a + *ptr_b + foo + bar + k + l + static_cast<int>(a) + static_cast<int>(b) + static_cast<int>(c);
     };
 };
@@ -186,7 +182,7 @@
 }
 
 template <typename FunctionLoader, typename ParentType, typename DispatchableHandleType, typename FunctionStruct>
-void check_custom_functions(FunctionLoader& loader, ParentType parent, DispatchableHandleType handle, FunctionStruct const& s,
+void check_custom_functions(FunctionLoader& loader, ParentType parent, DispatchableHandleType handle, FunctionStruct const&,
                             std::vector<std::string>& func_names, uint32_t function_count, uint32_t function_start = 0) {
     for (uint32_t i = function_start; i < function_start + function_count;) {
         decltype(FunctionStruct::func_zero)* returned_func_i = loader.load(parent, func_names.at(i++).c_str());
@@ -218,7 +214,7 @@
 
 template <typename FunctionLoader, typename ParentType, typename DispatchableHandleType, typename FunctionStruct>
 void check_layer_custom_functions(FunctionLoader& loader, ParentType parent, DispatchableHandleType handle, TestLayer& layer,
-                                  FunctionStruct const& s, std::vector<std::string>& func_names, uint32_t function_count,
+                                  FunctionStruct const&, std::vector<std::string>& func_names, uint32_t function_count,
                                   uint32_t function_start = 0) {
     for (uint32_t i = function_start; i < function_start + function_count;) {
         decltype(FunctionStruct::func_zero)* returned_func_i = loader.load(parent, func_names.at(i).c_str());
@@ -258,7 +254,7 @@
 
 template <typename FunctionLoader, typename ParentType, typename DispatchableHandleType, typename FunctionStruct>
 void check_layer_custom_functions_no_implementation(FunctionLoader& loader, ParentType parent, DispatchableHandleType handle,
-                                                    TestLayer& layer, FunctionStruct const& s, std::vector<std::string>& func_names,
+                                                    TestLayer& layer, FunctionStruct const&, std::vector<std::string>& func_names,
                                                     uint32_t function_count, uint32_t function_start = 0) {
     for (uint32_t i = function_start; i < function_start + function_count;) {
         decltype(FunctionStruct::func_zero)* returned_func_i = loader.load(parent, func_names.at(i).c_str());
@@ -296,7 +292,7 @@
 
 template <typename FunctionLoader, typename ParentType, typename DispatchableHandleType, typename FunctionStruct>
 void check_layer_custom_functions_no_interception(FunctionLoader& loader, ParentType parent, DispatchableHandleType handle,
-                                                  TestLayer& layer, FunctionStruct const& s, std::vector<std::string>& func_names,
+                                                  TestLayer& layer, FunctionStruct const&, std::vector<std::string>& func_names,
                                                   uint32_t function_count, uint32_t function_start = 0) {
     for (uint32_t i = function_start; i < function_start + function_count;) {
         decltype(FunctionStruct::func_zero)* returned_func_i = loader.load(parent, func_names.at(i).c_str());
@@ -338,17 +334,12 @@
 using layer_implementation_physical_device_functions = layer_implementation_functions<VkPhysicalDevice>;
 
 TEST(UnknownFunction, PhysicalDeviceFunction) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
 
-    driver.physical_devices.emplace_back("physical_device_0");
     fill_implementation_functions(driver.physical_devices.at(0).custom_physical_device_functions, function_names,
                                   custom_physical_device_functions{}, function_count);
     InstWrapper inst{env.vulkan_functions};
@@ -360,26 +351,16 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionMultipleDriverSupport) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver_0 = env.get_test_icd(0);
-    auto& driver_1 = env.get_test_icd(1);
+    auto& driver_0 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    auto& driver_1 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
 
     // used to identify the GPUs
-    VkPhysicalDeviceProperties props{};
-    driver_0.physical_devices.emplace_back("physical_device_0");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
-    driver_0.physical_devices.back().set_properties(props);
-    driver_1.physical_devices.emplace_back("physical_device_1");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
-    driver_1.physical_devices.back().set_properties(props);
+    driver_0.physical_devices.emplace_back("physical_device_0").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
+    driver_1.physical_devices.emplace_back("physical_device_1").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
 
     for (uint32_t i = 0; i < function_count / 10; i++) {
         fill_implementation_functions(driver_0.physical_devices.at(0).custom_physical_device_functions, function_names,
@@ -393,6 +374,7 @@
     auto phys_devs = inst.GetPhysDevs(2);
     VkPhysicalDevice phys_dev_0 = phys_devs[0];
     VkPhysicalDevice phys_dev_1 = phys_devs[1];
+    VkPhysicalDeviceProperties props{};
     env.vulkan_functions.vkGetPhysicalDeviceProperties(phys_devs[0], &props);
     if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
         phys_dev_0 = phys_devs[1];
@@ -408,25 +390,15 @@
 
 // Add unknown functions to driver 0, and try to use them on driver 1.
 TEST(UnknownFunctionDeathTests, PhysicalDeviceFunctionErrorPath) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver_0 = env.get_test_icd(0);
-    auto& driver_1 = env.get_test_icd(1);
+    auto& driver_0 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    auto& driver_1 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     std::vector<std::string> function_names;
     add_function_names(function_names, 1);
 
     // used to identify the GPUs
-    VkPhysicalDeviceProperties props{};
-    driver_0.physical_devices.emplace_back("physical_device_0");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
-    driver_0.physical_devices.back().set_properties(props);
-    driver_1.physical_devices.emplace_back("physical_device_1");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
-    driver_1.physical_devices.back().set_properties(props);
+    driver_0.physical_devices.emplace_back("physical_device_0").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
+    driver_1.physical_devices.emplace_back("physical_device_1").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
     function_names.push_back(std::string("vkNotIntRealFuncTEST_0"));
 
     custom_physical_device_functions funcs{};
@@ -438,6 +410,7 @@
 
     auto phys_devs = inst.GetPhysDevs(2);
     VkPhysicalDevice phys_dev_to_use = phys_devs[1];
+    VkPhysicalDeviceProperties props{};
     env.vulkan_functions.vkGetPhysicalDeviceProperties(phys_devs[1], &props);
     if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU) phys_dev_to_use = phys_devs[0];
     // use the wrong GPU to query the functions, should get 5 errors
@@ -449,18 +422,12 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionWithImplicitLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
-    auto& driver = env.get_test_icd();
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
 
-    driver.physical_devices.emplace_back("physical_device_0");
-
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name("VK_LAYER_implicit_layer_unknown_function_intercept")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
@@ -479,26 +446,16 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionMultipleDriverSupportWithImplicitLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver_0 = env.get_test_icd(0);
-    auto& driver_1 = env.get_test_icd(1);
+    auto& driver_0 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    auto& driver_1 = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
 
     // used to identify the GPUs
-    VkPhysicalDeviceProperties props{};
-    driver_0.physical_devices.emplace_back("physical_device_0");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
-    driver_0.physical_devices.back().set_properties(props);
-    driver_1.physical_devices.emplace_back("physical_device_1");
-    props.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
-    driver_1.physical_devices.back().set_properties(props);
+    driver_0.physical_devices.emplace_back("physical_device_0").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU;
+    driver_1.physical_devices.emplace_back("physical_device_1").properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
     for (uint32_t i = 0; i < function_count / 10; i++) {
         fill_implementation_functions(driver_0.physical_devices.at(0).custom_physical_device_functions, function_names,
                                       custom_physical_device_functions{}, 5, i * 10);
@@ -518,6 +475,7 @@
     auto phys_devs = inst.GetPhysDevs(2);
     VkPhysicalDevice phys_dev_0 = phys_devs[0];
     VkPhysicalDevice phys_dev_1 = phys_devs[1];
+    VkPhysicalDeviceProperties props{};
     env.vulkan_functions.vkGetPhysicalDeviceProperties(phys_devs[0], &props);
     if (props.deviceType != VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) {
         phys_dev_0 = phys_devs[1];
@@ -532,14 +490,9 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionWithImplicitLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
 
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
@@ -561,16 +514,11 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionDriverSupportWithImplicitLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     uint32_t function_count = 100;
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
-    driver.physical_devices.emplace_back("physical_device_0");
     fill_implementation_functions(driver.physical_devices.at(0).custom_physical_device_functions, function_names,
                                   layer_implementation_physical_device_functions{}, function_count);
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -590,12 +538,8 @@
 }
 
 TEST(UnknownFunction, PhysicalDeviceFunctionWithMultipleImplicitLayersInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
     std::vector<std::string> function_names;
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
     add_function_names(function_names, function_count);
@@ -637,11 +581,11 @@
 ParentType get_parent_type(InstWrapper const& inst, DeviceWrapper const& dev);
 
 template <>
-VkInstance get_parent_type<VkInstance>(InstWrapper const& inst, DeviceWrapper const& dev) {
+VkInstance get_parent_type<VkInstance>(InstWrapper const& inst, DeviceWrapper const&) {
     return inst.inst;
 }
 template <>
-VkDevice get_parent_type<VkDevice>(InstWrapper const& inst, DeviceWrapper const& dev) {
+VkDevice get_parent_type<VkDevice>(InstWrapper const&, DeviceWrapper const& dev) {
     return dev.dev;
 }
 
@@ -650,13 +594,13 @@
                                            std::vector<TestConfig> const& flags);
 
 template <>
-VkDevice get_dispatch_handle<VkDevice>(FrameworkEnvironment& env, DeviceWrapper const& dev, std::vector<TestConfig> const& flags) {
+VkDevice get_dispatch_handle<VkDevice>(FrameworkEnvironment&, DeviceWrapper const& dev, std::vector<TestConfig> const&) {
     return dev.dev;
 }
 
 template <>
 VkCommandBuffer get_dispatch_handle<VkCommandBuffer>(FrameworkEnvironment& env, DeviceWrapper const& dev,
-                                                     std::vector<TestConfig> const& flags) {
+                                                     std::vector<TestConfig> const&) {
     VkCommandPool command_pool;
     VkCommandPoolCreateInfo pool_create_info{};
     DeviceFunctions funcs{env.vulkan_functions, dev};
@@ -670,7 +614,7 @@
 }
 
 template <>
-VkQueue get_dispatch_handle<VkQueue>(FrameworkEnvironment& env, DeviceWrapper const& dev, std::vector<TestConfig> const& flags) {
+VkQueue get_dispatch_handle<VkQueue>(FrameworkEnvironment& env, DeviceWrapper const& dev, std::vector<TestConfig> const&) {
     DeviceFunctions funcs{env.vulkan_functions, dev.dev};
     VkQueue queue;
     funcs.vkGetDeviceQueue(dev, 0, 0, &queue);
@@ -684,13 +628,9 @@
     using layer_intercept_functions_type = layer_intercept_functions<DispatchableHandleType>;
 
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     uint32_t function_count = MAX_NUM_UNKNOWN_EXTS;
 
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().add_queue_family_properties({});
-
     std::vector<std::string> function_names;
     add_function_names(function_names, function_count);
 
@@ -763,31 +703,17 @@
     unknown_function_test_impl<VkDevice, VkDevice>({TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
 
-TEST(UnknownFunction, DeviceFromGIPA) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
-    unknown_function_test_impl<VkInstance, VkDevice>({});
-}
+TEST(UnknownFunction, DeviceFromGIPA) { unknown_function_test_impl<VkInstance, VkDevice>({}); }
 
 TEST(UnknownFunction, DeviceFromGIPAWithLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkDevice>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, DeviceFromGIPAWithLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkDevice>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, DeviceFromGIPAWithLayerInterceptionAndLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkDevice>({TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
 
@@ -808,31 +734,17 @@
         {TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
 
-TEST(UnknownFunction, CommandBufferFromGIPA) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
-    unknown_function_test_impl<VkInstance, VkCommandBuffer>({});
-}
+TEST(UnknownFunction, CommandBufferFromGIPA) { unknown_function_test_impl<VkInstance, VkCommandBuffer>({}); }
 
 TEST(UnknownFunction, CommandBufferFromGIPAWithLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkCommandBuffer>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, CommandBufferFromGIPAWithLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkCommandBuffer>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, CommandBufferFromGIPAWithLayerInterceptionAndLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkCommandBuffer>(
         {TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
@@ -853,31 +765,17 @@
     unknown_function_test_impl<VkDevice, VkQueue>({TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
 
-TEST(UnknownFunction, QueueFromGIPA) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
-    unknown_function_test_impl<VkInstance, VkQueue>({});
-}
+TEST(UnknownFunction, QueueFromGIPA) { unknown_function_test_impl<VkInstance, VkQueue>({}); }
 
 TEST(UnknownFunction, QueueFromGIPAWithLayer) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkQueue>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, QueueFromGIPAWithLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkQueue>({TestConfig::add_layer_implementation});
 }
 
 TEST(UnknownFunction, QueueFromGIPAWithLayerInterceptionAndLayerImplementation) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     unknown_function_test_impl<VkInstance, VkQueue>({TestConfig::add_layer_interception, TestConfig::add_layer_implementation});
 }
 
@@ -900,7 +798,7 @@
 
 template <typename DispatchableHandle>
 struct FunctionZero {
-    static VKAPI_ATTR uint32_t VKAPI_CALL implementation(DispatchableHandle handle, uint32_t a, uint32_t b) { return a + b; }
+    static VKAPI_ATTR uint32_t VKAPI_CALL implementation(DispatchableHandle, uint32_t a, uint32_t b) { return a + b; }
 
     template <typename LayerType>
     static VKAPI_ATTR uint32_t VKAPI_CALL intercept(DispatchableHandle handle, uint32_t a, uint32_t b) {
@@ -928,9 +826,7 @@
 
 template <typename DispatchableHandle>
 struct FunctionOne {
-    static VKAPI_ATTR uint32_t VKAPI_CALL implementation(DispatchableHandle handle, uint32_t a, uint32_t b, char c) {
-        return a + b + c;
-    }
+    static VKAPI_ATTR uint32_t VKAPI_CALL implementation(DispatchableHandle, uint32_t a, uint32_t b, char c) { return a + b + c; }
 
     template <typename LayerType>
     static VKAPI_ATTR uint32_t VKAPI_CALL intercept(DispatchableHandle handle, uint32_t a, uint32_t b, char c) {
@@ -959,7 +855,7 @@
 
 template <typename DispatchableHandle>
 struct FunctionTwo {
-    static VKAPI_ATTR float VKAPI_CALL implementation(DispatchableHandle handle, int* ptr_a, int* ptr_b) {
+    static VKAPI_ATTR float VKAPI_CALL implementation(DispatchableHandle, int* ptr_a, int* ptr_b) {
         return 0.123f + *ptr_a + *ptr_b;
     }
 
@@ -994,7 +890,7 @@
 
 template <typename DispatchableHandle>
 struct FunctionThree {
-    static VKAPI_ATTR float VKAPI_CALL implementation(DispatchableHandle handle, int* ptr_a, float* ptr_b, uint32_t c) {
+    static VKAPI_ATTR float VKAPI_CALL implementation(DispatchableHandle, int* ptr_a, float* ptr_b, uint32_t c) {
         return 0.456f + *ptr_a + *ptr_b + c;
     }
 
@@ -1032,7 +928,7 @@
 
 template <typename DispatchableHandle>
 struct FunctionFour {
-    static VKAPI_ATTR VkResult VKAPI_CALL implementation(DispatchableHandle handle, VkPhysicalDeviceLimits* limits, uint32_t* count,
+    static VKAPI_ATTR VkResult VKAPI_CALL implementation(DispatchableHandle, VkPhysicalDeviceLimits* limits, uint32_t* count,
                                                          VkExtensionProperties* props) {
         limits->nonCoherentAtomSize = 0x0000ABCD0000FEDCU;
         if (props == nullptr) {
@@ -1130,7 +1026,7 @@
     }
 
     template <typename LayerStruct>
-    static void add_to_layer(UnknownFunction& func, TestLayer& layer, LayerStruct intercept_struct) {
+    static void add_to_layer(UnknownFunction& func, TestLayer& layer, LayerStruct) {
         LayerInterceptData<LayerStruct>::layer = &layer;
         LayerInterceptData<LayerStruct>::name = func.name.c_str();
         layer.add_custom_device_interception_function(
@@ -1157,7 +1053,7 @@
     }
 
     template <typename LayerStruct>
-    static void add_to_layer(UnknownFunction& func, TestLayer& layer, LayerStruct intercept_struct) {
+    static void add_to_layer(UnknownFunction& func, TestLayer& layer, LayerStruct) {
         LayerInterceptData<LayerStruct>::layer = &layer;
         LayerInterceptData<LayerStruct>::name = func.name.c_str();
         layer.add_custom_physical_device_intercept_function(
@@ -1192,14 +1088,8 @@
 struct D {};
 
 TEST(UnknownFunction, PhysicalDeviceFunctionTwoLayerInterception) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
-
-    driver.physical_devices.emplace_back("physical_device_0");
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
     PhysicalDevice& pd = driver.physical_devices.back();
 
     UnknownFunction f{"vkFunc1"};
@@ -1231,12 +1121,9 @@
 }
 
 TEST(UnknownFunction, ManyCombinations) {
-#if defined(__APPLE__)
-    GTEST_SKIP() << "Skip this test as currently macOS doesn't fully support unknown functions.";
-#endif
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    PhysicalDevice& physical_device = driver.physical_devices.back();
     std::vector<UnknownFunction> unknown_funcs;
 
     unknown_funcs.emplace_back("vkZero_uint32_uint32_0");
@@ -1253,9 +1140,6 @@
     unknown_funcs.emplace_back("vkOne_uint32_uint32_char_11");
     unknown_funcs.emplace_back("vkTwo_ptr_int_ptr_int_12");
 
-    driver.physical_devices.emplace_back("physical_device_0");
-    PhysicalDevice& physical_device = driver.physical_devices.back();
-
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
                                                          .set_name("VK_LAYER_implicit_layer_unknown_function_intercept_0")
                                                          .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
@@ -1379,3 +1263,49 @@
         unknown_funcs.at(5).check<Functions::zero::physical_device>(env.vulkan_functions, inst.inst, phys_dev);
     }
 }
+
+TEST(UnknownFunction, PhysicalDeviceFunctionInLayer) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    env.add_implicit_layer(ManifestLayer{}
+                               .add_layer(ManifestLayer::LayerDescription{}
+                                              .set_name("VK_LAYER_implicit_layer_1")
+                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_0)
+                                              .set_disable_environment("DISABLE_ME"))
+                               .set_file_format_version({1, 0, 0}),
+                           "implicit_layer_1.json");
+
+    UnknownFunction unknown_func{"vkPhysicalDeviceFunctionInLayer"};
+    const char* ext_name = "VK_EXT_not_funny";
+
+    const char* explicit_layer_unknown_function_implement = "VK_LAYER_implement_unknown_function";
+    env.add_explicit_layer(
+        ManifestLayer{}
+            .add_layer(ManifestLayer::LayerDescription{}
+                           .set_name(explicit_layer_unknown_function_implement)
+                           .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                           .add_instance_extension(ManifestLayer::LayerDescription::Extension{ext_name, 0, {unknown_func.name}}))
+            .set_file_format_version({1, 1, 0}),
+        "implement_unknown_function.json");
+    auto& layer0 = env.get_test_layer(1);
+
+    const char* explicit_layer_to_enable_1 = "VK_LAYER_explicit_layer_1";
+    env.add_explicit_layer(ManifestLayer{}
+                               .add_layer(ManifestLayer::LayerDescription{}
+                                              .set_name(explicit_layer_to_enable_1)
+                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2))
+                               .set_file_format_version({1, 2, 0}),
+                           "explicit_layer_2.json");
+
+    Functions::four::physical_device::add_implementation_to_layer(unknown_func, layer0);
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_layer(explicit_layer_to_enable_1);
+    inst.create_info.add_layer(explicit_layer_unknown_function_implement);
+    inst.CheckCreate();
+
+    VkPhysicalDevice phys_dev = inst.GetPhysDev();
+
+    unknown_func.check<Functions::four::physical_device>(env.vulkan_functions, inst.inst, phys_dev);
+}
diff --git a/tests/loader_version_tests.cpp b/tests/loader_version_tests.cpp
index 815c7bb..28191fc 100644
--- a/tests/loader_version_tests.cpp
+++ b/tests/loader_version_tests.cpp
@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2021-2022 The Khronos Group Inc.
- * Copyright (c) 2021-2022 Valve Corporation
- * Copyright (c) 2021-2022 LunarG, Inc.
+ * Copyright (c) 2021-2023 The Khronos Group Inc.
+ * Copyright (c) 2021-2023 Valve Corporation
+ * Copyright (c) 2021-2023 LunarG, Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and/or associated documentation files (the "Materials"), to
@@ -29,13 +29,11 @@
 
 TEST(ICDInterfaceVersion2Plus, vk_icdNegotiateLoaderICDInterfaceVersion) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
 
     for (uint32_t i = 0; i <= 6; i++) {
         for (uint32_t j = i; j <= 6; j++) {
-            driver.min_icd_interface_version = i;
-            driver.max_icd_interface_version = j;
+            driver.set_min_icd_interface_version(i).set_max_icd_interface_version(j);
             InstWrapper inst{env.vulkan_functions};
             inst.CheckCreate();
         }
@@ -44,58 +42,55 @@
 
 TEST(ICDInterfaceVersion2Plus, version_3) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
     {
-        driver.min_icd_interface_version = 2;
-        driver.enable_icd_wsi = true;
+        driver.set_min_icd_interface_version(2).set_enable_icd_wsi(true);
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
-        ASSERT_EQ(driver.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
+        ASSERT_FALSE(driver.is_using_icd_wsi);
     }
     {
-        driver.min_icd_interface_version = 3;
-        driver.enable_icd_wsi = false;
+        driver.set_min_icd_interface_version(3).set_enable_icd_wsi(false);
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
-        ASSERT_EQ(driver.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
+        ASSERT_FALSE(driver.is_using_icd_wsi);
     }
     {
-        driver.min_icd_interface_version = 3;
-        driver.enable_icd_wsi = true;
+        driver.set_min_icd_interface_version(3).set_enable_icd_wsi(true);
         InstWrapper inst{env.vulkan_functions};
         inst.CheckCreate();
 
-        ASSERT_EQ(driver.is_using_icd_wsi, UsingICDProvidedWSI::is_using);
+        ASSERT_TRUE(driver.is_using_icd_wsi);
     }
 }
 
 TEST(ICDInterfaceVersion2Plus, version_4) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    driver.physical_devices.emplace_back("physical_device_0");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2)).add_physical_device("physical_device_0");
     InstWrapper inst{env.vulkan_functions};
     inst.CheckCreate();
 }
 
 TEST(ICDInterfaceVersion2Plus, l4_icd4) {
+    // TODO:
     // ICD must fail with VK_ERROR_INCOMPATIBLE_DRIVER for all vkCreateInstance calls with apiVersion set to > Vulkan 1.0
     // because both the loader and ICD support interface version <= 4. Otherwise, the ICD should behave as normal.
 }
 TEST(ICDInterfaceVersion2Plus, l4_icd5) {
+    // TODO:
     // ICD must fail with VK_ERROR_INCOMPATIBLE_DRIVER for all vkCreateInstance calls with apiVersion set to > Vulkan 1.0
     // because the loader is still at interface version <= 4. Otherwise, the ICD should behave as normal.
 }
 TEST(ICDInterfaceVersion2Plus, l5_icd4) {
+    // TODO:
     // Loader will fail with VK_ERROR_INCOMPATIBLE_DRIVER if it can't handle the apiVersion. ICD may pass for all apiVersions,
     // but since its interface is <= 4, it is best if it assumes it needs to do the work of rejecting anything > Vulkan 1.0 and
     // fail with VK_ERROR_INCOMPATIBLE_DRIVER. Otherwise, the ICD should behave as normal.
 }
 TEST(ICDInterfaceVersion2Plus, l5_icd5) {
+    // TODO:
     // Loader will fail with VK_ERROR_INCOMPATIBLE_DRIVER if it can't handle the apiVersion, and ICDs should fail with
     // VK_ERROR_INCOMPATIBLE_DRIVER only if they can not support the specified apiVersion. Otherwise, the ICD should behave as
     // normal.
@@ -105,8 +100,7 @@
 // This test makes sure that EnumerateAdapterPhysicalDevices on drivers found in the Khronos/Vulkan/Drivers registry
 TEST(ICDInterfaceVersion2PlusEnumerateAdapterPhysicalDevices, version_6_in_drivers_registry) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES));
-    auto& driver = env.get_test_icd();
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES));
     driver.physical_devices.emplace_back("physical_device_1");
     driver.physical_devices.emplace_back("physical_device_0");
     uint32_t physical_count = static_cast<uint32_t>(driver.physical_devices.size());
@@ -133,7 +127,7 @@
 // Make the version_6 driver found through the D3DKMT driver discovery mechanism of the loader
 TEST(ICDInterfaceVersion2PlusEnumerateAdapterPhysicalDevices, version_6) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_6, VK_API_VERSION_1_3}.set_discovery_type(ManifestDiscoveryType::none));
+    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_6, VK_API_VERSION_1_3}.set_discovery_type(ManifestDiscoveryType::null_dir));
     // Version 6 provides a mechanism to allow the loader to sort physical devices.
     // The loader will only attempt to sort physical devices on an ICD if version 6 of the interface is supported.
     // This version provides the vk_icdEnumerateAdapterPhysicalDevices function.
@@ -186,9 +180,9 @@
 // EnumerateAdapterPhysicalDevices
 TEST(ICDInterfaceVersion2, EnumAdapters2) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA}.set_discovery_type(ManifestDiscoveryType::none));
+    auto& driver =
+        env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA}.set_discovery_type(ManifestDiscoveryType::null_dir));
     InstWrapper inst{env.vulkan_functions};
-    auto& driver = env.get_test_icd();
     driver.physical_devices.emplace_back("physical_device_1");
     driver.physical_devices.emplace_back("physical_device_0");
     uint32_t physical_count = static_cast<uint32_t>(driver.physical_devices.size());
@@ -211,11 +205,11 @@
 // Verify that the handles are correct by calling vkGetPhysicalDeviceProperties with them
 TEST(ICDInterfaceVersion2PlusEnumerateAdapterPhysicalDevices, VerifyPhysDevResults) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES}.set_discovery_type(
-        ManifestDiscoveryType::none));
-    auto& driver = env.get_test_icd();
-    driver.min_icd_interface_version = 6;
-    driver.set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver =
+        env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES, VK_API_VERSION_1_1}
+                        .set_discovery_type(ManifestDiscoveryType::null_dir))
+            .set_min_icd_interface_version(6)
+            .set_icd_api_version(VK_API_VERSION_1_1);
     const std::vector<std::string> physical_device_names = {"physical_device_4", "physical_device_3", "physical_device_2",
                                                             "physical_device_1", "physical_device_0"};
     for (const auto& dev_name : physical_device_names) driver.physical_devices.push_back(dev_name);
@@ -225,7 +219,7 @@
     desc1.VendorId = known_driver.vendor_id;
     desc1.AdapterLuid = _LUID{10, 1000};
     env.platform_shim->add_dxgi_adapter(GpuType::discrete, desc1);
-    env.get_test_icd().set_adapterLUID(desc1.AdapterLuid);
+    driver.set_adapterLUID(desc1.AdapterLuid);
 
     env.platform_shim->add_d3dkmt_adapter(D3DKMT_Adapter{0, _LUID{10, 1000}}.add_driver_manifest_path(env.get_icd_manifest_path()));
 
@@ -255,27 +249,27 @@
 // Make sure physical device groups enumerated through EnumerateAdapterPhysicalDevices are properly found
 TEST(ICDInterfaceVersion2PlusEnumerateAdapterPhysicalDevices, VerifyGroupResults) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES}.set_discovery_type(
-        ManifestDiscoveryType::none));
-    auto& driver = env.get_test_icd();
-    driver.min_icd_interface_version = 6;
-    driver.set_icd_api_version(VK_API_VERSION_1_1);
+    auto& driver =
+        env.add_icd(TestICDDetails{TEST_ICD_PATH_VERSION_2_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES, VK_API_VERSION_1_1}
+                        .set_discovery_type(ManifestDiscoveryType::null_dir))
+            .set_min_icd_interface_version(6)
+            .set_icd_api_version(VK_API_VERSION_1_1);
     const std::vector<std::string> physical_device_names = {"physical_device_4", "physical_device_3", "physical_device_2",
                                                             "physical_device_1", "physical_device_0"};
-    for (const auto& dev_name : physical_device_names) driver.physical_devices.push_back(dev_name);
+    for (const auto& dev_name : physical_device_names) {
+        driver.physical_devices.push_back(dev_name);
+    }
 
-    driver.physical_device_groups.emplace_back(driver.physical_devices[0]);
-    driver.physical_device_groups.back().use_physical_device(driver.physical_devices[1]);
+    driver.physical_device_groups.emplace_back(driver.physical_devices[0]).use_physical_device(driver.physical_devices[1]);
     driver.physical_device_groups.emplace_back(driver.physical_devices[2]);
-    driver.physical_device_groups.emplace_back(driver.physical_devices[3]);
-    driver.physical_device_groups.back().use_physical_device(driver.physical_devices[4]);
+    driver.physical_device_groups.emplace_back(driver.physical_devices[3]).use_physical_device(driver.physical_devices[4]);
 
     auto& known_driver = known_driver_list.at(2);  // which driver this test pretends to be
     DXGI_ADAPTER_DESC1 desc1{};
     desc1.VendorId = known_driver.vendor_id;
     desc1.AdapterLuid = _LUID{10, 1000};
     env.platform_shim->add_dxgi_adapter(GpuType::discrete, desc1);
-    env.get_test_icd().set_adapterLUID(desc1.AdapterLuid);
+    driver.set_adapterLUID(desc1.AdapterLuid);
 
     env.platform_shim->add_d3dkmt_adapter(D3DKMT_Adapter{0, _LUID{10, 1000}}.add_driver_manifest_path(env.get_icd_manifest_path()));
 
@@ -310,6 +304,25 @@
 }
 
 #endif  // defined(WIN32)
+TEST(ICDInterfaceVersion7, SingleDriver) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7_WITH_ADDITIONAL_EXPORTS)).add_physical_device({});
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(inst.GetPhysDev());
+    ASSERT_EQ(driver.interface_version_check, InterfaceVersionCheck::version_is_supported);
+}
+
+TEST(ICDInterfaceVersion7, SingleDriverWithoutExportedFunctions) {
+    FrameworkEnvironment env{};
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7)).add_physical_device({});
+    InstWrapper inst{env.vulkan_functions};
+    inst.CheckCreate();
+    DeviceWrapper dev{inst};
+    dev.CheckCreate(inst.GetPhysDev());
+    ASSERT_EQ(driver.interface_version_check, InterfaceVersionCheck::version_is_supported);
+}
 
 TEST(MultipleICDConfig, Basic) {
     FrameworkEnvironment env{};
@@ -402,7 +415,7 @@
 TEST(MultipleDriverConfig, DifferentICDsWithDevicesAndGroups) {
     FrameworkEnvironment env{};
     env.add_icd(TestICDDetails(TEST_ICD_PATH_EXPORT_ICD_GIPA));
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1));
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
 
     // The loader has to be able to handle drivers that support device groups in combination
@@ -420,8 +433,8 @@
 
     // ICD 1 :  1.1 support (with 1 group with 2 devices)
     TestICD& icd1 = env.get_test_icd(1);
-    icd1.physical_devices.emplace_back("physical_device_1");
-    icd1.physical_devices.emplace_back("physical_device_2");
+    icd1.physical_devices.emplace_back("physical_device_1").set_api_version(VK_API_VERSION_1_1);
+    icd1.physical_devices.emplace_back("physical_device_2").set_api_version(VK_API_VERSION_1_1);
     icd1.physical_device_groups.emplace_back(icd1.physical_devices[0]);
     icd1.physical_device_groups.back().use_physical_device(icd1.physical_devices[1]);
     icd1.min_icd_interface_version = 5;
@@ -475,7 +488,7 @@
         auto& driver_5 = env.get_test_icd(i * 2 + 1);
         driver_5.set_max_icd_interface_version(5);
         driver_5.set_min_icd_interface_version(5);
-        setup_WSI_in_ICD(driver_5);
+        driver_5.setup_WSI();
         driver_5.physical_devices.push_back({});
         driver_5.physical_devices.back().queue_family_properties.push_back(family_props);
         driver_5.physical_devices.push_back({});
@@ -485,7 +498,7 @@
         physical_count += static_cast<uint32_t>(driver_5.physical_devices.size());
 
         auto& driver_6 = env.get_test_icd(i * 2);
-        setup_WSI_in_ICD(driver_6);
+        driver_6.setup_WSI();
         driver_6.physical_devices.emplace_back("physical_device_0");
         driver_6.physical_devices.back().queue_family_properties.push_back(family_props);
         driver_6.physical_devices.emplace_back("physical_device_1");
@@ -502,11 +515,10 @@
         desc1.AdapterLuid = LUID{100 + i, static_cast<LONG>(100 + i)};
         driver_6.set_adapterLUID(desc1.AdapterLuid);
         env.platform_shim->add_dxgi_adapter(GpuType::discrete, desc1);
-        env.get_test_icd().set_adapterLUID(desc1.AdapterLuid);
     }
     uint32_t returned_physical_count = 0;
     InstWrapper inst{env.vulkan_functions};
-    setup_WSI_in_create_instance(inst);
+    inst.create_info.setup_WSI();
     inst.CheckCreate();
 
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkEnumeratePhysicalDevices(inst.inst, &returned_physical_count, nullptr));
@@ -517,7 +529,7 @@
     ASSERT_EQ(physical_count, returned_physical_count);
 
     VkSurfaceKHR surface{};
-    create_surface(inst, surface);
+    ASSERT_EQ(VK_SUCCESS, create_surface(inst, surface));
     for (const auto& handle : physical_device_handles) {
         handle_assert_has_value(handle);
 
@@ -533,116 +545,98 @@
 
 // shim function pointers for 1.3
 // Should use autogen for this - it generates 'shim' functions for validation layers, maybe that could be used here.
-void test_vkCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin,
-                              VkSubpassContents contents) {}
-void test_vkCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount,
-                                  const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes,
-                                  const VkDeviceSize* pStrides) {}
-void test_vkCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) {}
-void test_vkCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) {}
-void test_vkCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) {}
-void test_vkCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) {}
-void test_vkCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) {}
-void test_vkCmdEndRendering(VkCommandBuffer commandBuffer) {}
-void test_vkCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) {}
-void test_vkCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) {}
-void test_vkCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) {}
-void test_vkCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) {}
-void test_vkCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) {}
-void test_vkCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) {}
-void test_vkCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) {}
-void test_vkCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) {}
-void test_vkCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) {}
-void test_vkCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) {}
-void test_vkCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) {}
-void test_vkCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) {}
-void test_vkCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) {}
-void test_vkCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) {}
-void test_vkCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) {}
-void test_vkCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp,
-                            VkStencilOp depthFailOp, VkCompareOp compareOp) {}
-void test_vkCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) {}
-void test_vkCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) {}
-void test_vkCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents,
-                           const VkDependencyInfo* pDependencyInfos) {}
-void test_vkCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query) {}
-VkResult test_vkCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo,
-                                      const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) {
+void test_vkCmdBeginRendering(VkCommandBuffer, const VkRenderPassBeginInfo*, VkSubpassContents) {}
+void test_vkCmdBindVertexBuffers2(VkCommandBuffer, uint32_t, uint32_t, const VkBuffer*, const VkDeviceSize*, const VkDeviceSize*,
+                                  const VkDeviceSize*) {}
+void test_vkCmdBlitImage2(VkCommandBuffer, const VkBlitImageInfo2*) {}
+void test_vkCmdCopyBuffer2(VkCommandBuffer, const VkCopyBufferInfo2*) {}
+void test_vkCmdCopyBufferToImage2(VkCommandBuffer, const VkCopyBufferToImageInfo2*) {}
+void test_vkCmdCopyImage2(VkCommandBuffer, const VkCopyImageInfo2*) {}
+void test_vkCmdCopyImageToBuffer2(VkCommandBuffer, const VkCopyImageToBufferInfo2*) {}
+void test_vkCmdEndRendering(VkCommandBuffer) {}
+void test_vkCmdPipelineBarrier2(VkCommandBuffer, const VkDependencyInfo*) {}
+void test_vkCmdResetEvent2(VkCommandBuffer, VkEvent, VkPipelineStageFlags2) {}
+void test_vkCmdResolveImage2(VkCommandBuffer, const VkResolveImageInfo2*) {}
+void test_vkCmdSetCullMode(VkCommandBuffer, VkCullModeFlags) {}
+void test_vkCmdSetDepthBiasEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetDepthBoundsTestEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetDepthCompareOp(VkCommandBuffer, VkCompareOp) {}
+void test_vkCmdSetDepthTestEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetDepthWriteEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetEvent2(VkCommandBuffer, VkEvent, const VkDependencyInfo*) {}
+void test_vkCmdSetFrontFace(VkCommandBuffer, VkFrontFace) {}
+void test_vkCmdSetPrimitiveRestartEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetPrimitiveTopology(VkCommandBuffer, VkPrimitiveTopology) {}
+void test_vkCmdSetRasterizerDiscardEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetScissorWithCount(VkCommandBuffer, uint32_t, const VkRect2D*) {}
+void test_vkCmdSetStencilOp(VkCommandBuffer, VkStencilFaceFlags, VkStencilOp, VkStencilOp, VkStencilOp, VkCompareOp) {}
+void test_vkCmdSetStencilTestEnable(VkCommandBuffer, VkBool32) {}
+void test_vkCmdSetViewportWithCount(VkCommandBuffer, uint32_t, const VkViewport*) {}
+void test_vkCmdWaitEvents2(VkCommandBuffer, uint32_t, const VkEvent*, const VkDependencyInfo*) {}
+void test_vkCmdWriteTimestamp2(VkCommandBuffer, VkPipelineStageFlags2, VkQueryPool, uint32_t) {}
+VkResult test_vkCreatePrivateDataSlot(VkDevice, const VkPrivateDataSlotCreateInfo*, const VkAllocationCallbacks*,
+                                      VkPrivateDataSlot*) {
     return VK_SUCCESS;
 }
-void test_vkDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) {}
-void test_vkGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo,
-                                              VkMemoryRequirements2* pMemoryRequirements) {}
-void test_vkGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo,
-                                             VkMemoryRequirements2* pMemoryRequirements) {}
-void test_vkGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo,
-                                                   uint32_t* pSparseMemoryRequirementCount,
-                                                   VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) {}
-void test_vkGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot,
-                           uint64_t* pData) {}
-VkResult test_vkQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) {
-    return VK_SUCCESS;
-}
-VkResult test_vkSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot,
-                               uint64_t data) {
-    return VK_SUCCESS;
-}
+void test_vkDestroyPrivateDataSlot(VkDevice, VkPrivateDataSlot, const VkAllocationCallbacks*) {}
+void test_vkGetDeviceBufferMemoryRequirements(VkDevice, const VkDeviceBufferMemoryRequirements*, VkMemoryRequirements2*) {}
+void test_vkGetDeviceImageMemoryRequirements(VkDevice, const VkDeviceImageMemoryRequirements*, VkMemoryRequirements2*) {}
+void test_vkGetDeviceImageSparseMemoryRequirements(VkDevice, const VkDeviceImageMemoryRequirements*, uint32_t*,
+                                                   VkSparseImageMemoryRequirements2*) {}
+void test_vkGetPrivateData(VkDevice, VkObjectType, uint64_t, VkPrivateDataSlot, uint64_t*) {}
+VkResult test_vkQueueSubmit2(VkQueue, uint32_t, const VkSubmitInfo2*, VkFence) { return VK_SUCCESS; }
+VkResult test_vkSetPrivateData(VkDevice, VkObjectType, uint64_t, VkPrivateDataSlot, uint64_t) { return VK_SUCCESS; }
 
 TEST(MinorVersionUpdate, Version1_3) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
-    auto& icd_phys_dev = env.get_test_icd().physical_devices.back();
-    icd_phys_dev.known_device_functions.insert(
-        icd_phys_dev.known_device_functions.end(),
-        {
-            VulkanFunction{"vkCmdBeginRendering", to_vkVoidFunction(test_vkCmdBeginRendering)},
-            VulkanFunction{"vkCmdBindVertexBuffers2", to_vkVoidFunction(test_vkCmdBindVertexBuffers2)},
-            VulkanFunction{"vkCmdBlitImage2", to_vkVoidFunction(test_vkCmdBlitImage2)},
-            VulkanFunction{"vkCmdCopyBuffer2", to_vkVoidFunction(test_vkCmdCopyBuffer2)},
-            VulkanFunction{"vkCmdCopyBufferToImage2", to_vkVoidFunction(test_vkCmdCopyBufferToImage2)},
-            VulkanFunction{"vkCmdCopyImage2", to_vkVoidFunction(test_vkCmdCopyImage2)},
-            VulkanFunction{"vkCmdCopyImageToBuffer2", to_vkVoidFunction(test_vkCmdCopyImageToBuffer2)},
-            VulkanFunction{"vkCmdEndRendering", to_vkVoidFunction(test_vkCmdEndRendering)},
-            VulkanFunction{"vkCmdPipelineBarrier2", to_vkVoidFunction(test_vkCmdPipelineBarrier2)},
-            VulkanFunction{"vkCmdResetEvent2", to_vkVoidFunction(test_vkCmdResetEvent2)},
-            VulkanFunction{"vkCmdResolveImage2", to_vkVoidFunction(test_vkCmdResolveImage2)},
-            VulkanFunction{"vkCmdSetCullMode", to_vkVoidFunction(test_vkCmdSetCullMode)},
-            VulkanFunction{"vkCmdSetDepthBiasEnable", to_vkVoidFunction(test_vkCmdSetDepthBiasEnable)},
-            VulkanFunction{"vkCmdSetDepthBoundsTestEnable", to_vkVoidFunction(test_vkCmdSetDepthBoundsTestEnable)},
-            VulkanFunction{"vkCmdSetDepthCompareOp", to_vkVoidFunction(test_vkCmdSetDepthCompareOp)},
-            VulkanFunction{"vkCmdSetDepthTestEnable", to_vkVoidFunction(test_vkCmdSetDepthTestEnable)},
-            VulkanFunction{"vkCmdSetDepthWriteEnable", to_vkVoidFunction(test_vkCmdSetDepthWriteEnable)},
-            VulkanFunction{"vkCmdSetEvent2", to_vkVoidFunction(test_vkCmdSetEvent2)},
-            VulkanFunction{"vkCmdSetFrontFace", to_vkVoidFunction(test_vkCmdSetFrontFace)},
-            VulkanFunction{"vkCmdSetPrimitiveRestartEnable", to_vkVoidFunction(test_vkCmdSetPrimitiveRestartEnable)},
-            VulkanFunction{"vkCmdSetPrimitiveTopology", to_vkVoidFunction(test_vkCmdSetPrimitiveTopology)},
-            VulkanFunction{"vkCmdSetRasterizerDiscardEnable", to_vkVoidFunction(test_vkCmdSetRasterizerDiscardEnable)},
-            VulkanFunction{"vkCmdSetScissorWithCount", to_vkVoidFunction(test_vkCmdSetScissorWithCount)},
-            VulkanFunction{"vkCmdSetStencilOp", to_vkVoidFunction(test_vkCmdSetStencilOp)},
-            VulkanFunction{"vkCmdSetStencilTestEnable", to_vkVoidFunction(test_vkCmdSetStencilTestEnable)},
-            VulkanFunction{"vkCmdSetViewportWithCount", to_vkVoidFunction(test_vkCmdSetViewportWithCount)},
-            VulkanFunction{"vkCmdWaitEvents2", to_vkVoidFunction(test_vkCmdWaitEvents2)},
-            VulkanFunction{"vkCmdWriteTimestamp2", to_vkVoidFunction(test_vkCmdWriteTimestamp2)},
-            VulkanFunction{"vkCreatePrivateDataSlot", to_vkVoidFunction(test_vkCreatePrivateDataSlot)},
-            VulkanFunction{"vkDestroyPrivateDataSlot", to_vkVoidFunction(test_vkDestroyPrivateDataSlot)},
-            VulkanFunction{"vkGetDeviceBufferMemoryRequirements", to_vkVoidFunction(test_vkGetDeviceBufferMemoryRequirements)},
-            VulkanFunction{"vkGetDeviceImageMemoryRequirements", to_vkVoidFunction(test_vkGetDeviceImageMemoryRequirements)},
-            VulkanFunction{"vkGetDeviceImageSparseMemoryRequirements",
-                           to_vkVoidFunction(test_vkGetDeviceImageSparseMemoryRequirements)},
-            VulkanFunction{"vkGetPrivateData", to_vkVoidFunction(test_vkGetPrivateData)},
-            VulkanFunction{"vkQueueSubmit2", to_vkVoidFunction(test_vkQueueSubmit2)},
-            VulkanFunction{"vkSetPrivateData", to_vkVoidFunction(test_vkSetPrivateData)},
-        });
-    icd_phys_dev.extensions.push_back({"VK_SOME_EXT_haha"});
+    auto& driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+    driver.physical_devices.back().known_device_functions = {
+        VulkanFunction{"vkCmdBeginRendering", to_vkVoidFunction(test_vkCmdBeginRendering)},
+        VulkanFunction{"vkCmdBindVertexBuffers2", to_vkVoidFunction(test_vkCmdBindVertexBuffers2)},
+        VulkanFunction{"vkCmdBlitImage2", to_vkVoidFunction(test_vkCmdBlitImage2)},
+        VulkanFunction{"vkCmdCopyBuffer2", to_vkVoidFunction(test_vkCmdCopyBuffer2)},
+        VulkanFunction{"vkCmdCopyBufferToImage2", to_vkVoidFunction(test_vkCmdCopyBufferToImage2)},
+        VulkanFunction{"vkCmdCopyImage2", to_vkVoidFunction(test_vkCmdCopyImage2)},
+        VulkanFunction{"vkCmdCopyImageToBuffer2", to_vkVoidFunction(test_vkCmdCopyImageToBuffer2)},
+        VulkanFunction{"vkCmdEndRendering", to_vkVoidFunction(test_vkCmdEndRendering)},
+        VulkanFunction{"vkCmdPipelineBarrier2", to_vkVoidFunction(test_vkCmdPipelineBarrier2)},
+        VulkanFunction{"vkCmdResetEvent2", to_vkVoidFunction(test_vkCmdResetEvent2)},
+        VulkanFunction{"vkCmdResolveImage2", to_vkVoidFunction(test_vkCmdResolveImage2)},
+        VulkanFunction{"vkCmdSetCullMode", to_vkVoidFunction(test_vkCmdSetCullMode)},
+        VulkanFunction{"vkCmdSetDepthBiasEnable", to_vkVoidFunction(test_vkCmdSetDepthBiasEnable)},
+        VulkanFunction{"vkCmdSetDepthBoundsTestEnable", to_vkVoidFunction(test_vkCmdSetDepthBoundsTestEnable)},
+        VulkanFunction{"vkCmdSetDepthCompareOp", to_vkVoidFunction(test_vkCmdSetDepthCompareOp)},
+        VulkanFunction{"vkCmdSetDepthTestEnable", to_vkVoidFunction(test_vkCmdSetDepthTestEnable)},
+        VulkanFunction{"vkCmdSetDepthWriteEnable", to_vkVoidFunction(test_vkCmdSetDepthWriteEnable)},
+        VulkanFunction{"vkCmdSetEvent2", to_vkVoidFunction(test_vkCmdSetEvent2)},
+        VulkanFunction{"vkCmdSetFrontFace", to_vkVoidFunction(test_vkCmdSetFrontFace)},
+        VulkanFunction{"vkCmdSetPrimitiveRestartEnable", to_vkVoidFunction(test_vkCmdSetPrimitiveRestartEnable)},
+        VulkanFunction{"vkCmdSetPrimitiveTopology", to_vkVoidFunction(test_vkCmdSetPrimitiveTopology)},
+        VulkanFunction{"vkCmdSetRasterizerDiscardEnable", to_vkVoidFunction(test_vkCmdSetRasterizerDiscardEnable)},
+        VulkanFunction{"vkCmdSetScissorWithCount", to_vkVoidFunction(test_vkCmdSetScissorWithCount)},
+        VulkanFunction{"vkCmdSetStencilOp", to_vkVoidFunction(test_vkCmdSetStencilOp)},
+        VulkanFunction{"vkCmdSetStencilTestEnable", to_vkVoidFunction(test_vkCmdSetStencilTestEnable)},
+        VulkanFunction{"vkCmdSetViewportWithCount", to_vkVoidFunction(test_vkCmdSetViewportWithCount)},
+        VulkanFunction{"vkCmdWaitEvents2", to_vkVoidFunction(test_vkCmdWaitEvents2)},
+        VulkanFunction{"vkCmdWriteTimestamp2", to_vkVoidFunction(test_vkCmdWriteTimestamp2)},
+        VulkanFunction{"vkCreatePrivateDataSlot", to_vkVoidFunction(test_vkCreatePrivateDataSlot)},
+        VulkanFunction{"vkDestroyPrivateDataSlot", to_vkVoidFunction(test_vkDestroyPrivateDataSlot)},
+        VulkanFunction{"vkGetDeviceBufferMemoryRequirements", to_vkVoidFunction(test_vkGetDeviceBufferMemoryRequirements)},
+        VulkanFunction{"vkGetDeviceImageMemoryRequirements", to_vkVoidFunction(test_vkGetDeviceImageMemoryRequirements)},
+        VulkanFunction{"vkGetDeviceImageSparseMemoryRequirements",
+                       to_vkVoidFunction(test_vkGetDeviceImageSparseMemoryRequirements)},
+        VulkanFunction{"vkGetPrivateData", to_vkVoidFunction(test_vkGetPrivateData)},
+        VulkanFunction{"vkQueueSubmit2", to_vkVoidFunction(test_vkQueueSubmit2)},
+        VulkanFunction{"vkSetPrivateData", to_vkVoidFunction(test_vkSetPrivateData)},
+    };
+    driver.physical_devices.back().add_extension({"VK_SOME_EXT_haha"});
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.set_api_version(1, 3, 0);
     inst.CheckCreate();
 
     auto phys_dev = inst.GetPhysDev();
 
-    auto GetPhysicalDeviceToolProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceToolProperties>(
-        inst.functions->vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceToolProperties"));
+    PFN_vkGetPhysicalDeviceToolProperties GetPhysicalDeviceToolProperties = inst.load("vkGetPhysicalDeviceToolProperties");
     uint32_t tool_count = 0;
     ASSERT_EQ(VK_SUCCESS, GetPhysicalDeviceToolProperties(phys_dev, &tool_count, nullptr));
     ASSERT_EQ(tool_count, 0U);
@@ -652,12 +646,9 @@
     DeviceWrapper device{inst};
     device.CheckCreate(phys_dev);
 
-    auto CreateCommandPool =
-        reinterpret_cast<PFN_vkCreateCommandPool>(inst.functions->vkGetDeviceProcAddr(device, "vkCreateCommandPool"));
-    auto AllocateCommandBuffers =
-        reinterpret_cast<PFN_vkAllocateCommandBuffers>(inst.functions->vkGetDeviceProcAddr(device, "vkAllocateCommandBuffers"));
-    auto DestroyCommandPool =
-        reinterpret_cast<PFN_vkDestroyCommandPool>(inst.functions->vkGetDeviceProcAddr(device, "vkDestroyCommandPool"));
+    PFN_vkCreateCommandPool CreateCommandPool = device.load("vkCreateCommandPool");
+    PFN_vkAllocateCommandBuffers AllocateCommandBuffers = device.load("vkAllocateCommandBuffers");
+    PFN_vkDestroyCommandPool DestroyCommandPool = device.load("vkDestroyCommandPool");
     VkCommandPool command_pool{};
     VkCommandPoolCreateInfo pool_create_info{};
     pool_create_info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
@@ -670,147 +661,121 @@
     ASSERT_EQ(VK_SUCCESS, AllocateCommandBuffers(device, &buffer_allocate_info, &command_buffer));
     DestroyCommandPool(device, command_pool, nullptr);
 
-    auto CmdBeginRendering =
-        reinterpret_cast<PFN_vkCmdBeginRendering>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdBeginRendering"));
+    PFN_vkCmdBeginRendering CmdBeginRendering = device.load("vkCmdBeginRendering");
     VkRenderingInfoKHR rendering_info{};
     CmdBeginRendering(command_buffer, &rendering_info);
 
-    auto CmdBindVertexBuffers2 =
-        reinterpret_cast<PFN_vkCmdBindVertexBuffers2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdBindVertexBuffers2"));
+    PFN_vkCmdBindVertexBuffers2 CmdBindVertexBuffers2 = device.load("vkCmdBindVertexBuffers2");
     CmdBindVertexBuffers2(command_buffer, 0, 0, nullptr, nullptr, nullptr, nullptr);
 
-    auto CmdBlitImage2 = reinterpret_cast<PFN_vkCmdBlitImage2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdBlitImage2"));
+    PFN_vkCmdBlitImage2 CmdBlitImage2 = device.load("vkCmdBlitImage2");
     VkBlitImageInfo2 image_info{};
     CmdBlitImage2(command_buffer, &image_info);
 
-    auto CmdCopyBuffer2 = reinterpret_cast<PFN_vkCmdCopyBuffer2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdCopyBuffer2"));
+    PFN_vkCmdCopyBuffer2 CmdCopyBuffer2 = device.load("vkCmdCopyBuffer2");
     VkCopyBufferInfo2 copy_info{};
     CmdCopyBuffer2(command_buffer, &copy_info);
 
-    auto CmdCopyBufferToImage2 =
-        reinterpret_cast<PFN_vkCmdCopyBufferToImage2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdCopyBufferToImage2"));
+    PFN_vkCmdCopyBufferToImage2 CmdCopyBufferToImage2 = device.load("vkCmdCopyBufferToImage2");
     VkCopyBufferToImageInfo2 copy_buf_image{};
     CmdCopyBufferToImage2(command_buffer, &copy_buf_image);
 
-    auto CmdCopyImage2 = reinterpret_cast<PFN_vkCmdCopyImage2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdCopyImage2"));
+    PFN_vkCmdCopyImage2 CmdCopyImage2 = device.load("vkCmdCopyImage2");
     VkCopyImageInfo2 copy_image_info{};
     CmdCopyImage2(command_buffer, &copy_image_info);
 
-    auto CmdCopyImageToBuffer2 =
-        reinterpret_cast<PFN_vkCmdCopyImageToBuffer2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdCopyImageToBuffer2"));
+    PFN_vkCmdCopyImageToBuffer2 CmdCopyImageToBuffer2 = device.load("vkCmdCopyImageToBuffer2");
     VkCopyImageToBufferInfo2 copy_image_buf;
     CmdCopyImageToBuffer2(command_buffer, &copy_image_buf);
 
-    auto CmdEndRendering =
-        reinterpret_cast<PFN_vkCmdEndRendering>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdEndRendering"));
+    PFN_vkCmdEndRendering CmdEndRendering = device.load("vkCmdEndRendering");
     CmdEndRendering(command_buffer);
 
-    auto CmdPipelineBarrier2 =
-        reinterpret_cast<PFN_vkCmdPipelineBarrier2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdPipelineBarrier2"));
+    PFN_vkCmdPipelineBarrier2 CmdPipelineBarrier2 = device.load("vkCmdPipelineBarrier2");
     VkDependencyInfo deps_info;
     CmdPipelineBarrier2(command_buffer, &deps_info);
 
-    auto CmdResetEvent2 = reinterpret_cast<PFN_vkCmdResetEvent2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdResetEvent2"));
+    PFN_vkCmdResetEvent2 CmdResetEvent2 = device.load("vkCmdResetEvent2");
     CmdResetEvent2(command_buffer, {}, VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT);
 
-    auto CmdResolveImage2 =
-        reinterpret_cast<PFN_vkCmdResolveImage2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdResolveImage2"));
+    PFN_vkCmdResolveImage2 CmdResolveImage2 = device.load("vkCmdResolveImage2");
     VkResolveImageInfo2 resolve_image{};
     CmdResolveImage2(command_buffer, &resolve_image);
 
-    auto CmdSetCullMode = reinterpret_cast<PFN_vkCmdSetCullMode>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetCullMode"));
+    PFN_vkCmdSetCullMode CmdSetCullMode = device.load("vkCmdSetCullMode");
     CmdSetCullMode(command_buffer, VK_CULL_MODE_BACK_BIT);
 
-    auto CmdSetDepthBiasEnable =
-        reinterpret_cast<PFN_vkCmdSetDepthBiasEnable>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetDepthBiasEnable"));
+    PFN_vkCmdSetDepthBiasEnable CmdSetDepthBiasEnable = device.load("vkCmdSetDepthBiasEnable");
     CmdSetDepthBiasEnable(command_buffer, true);
 
-    auto CmdSetDepthBoundsTestEnable = reinterpret_cast<PFN_vkCmdSetDepthBoundsTestEnable>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetDepthBoundsTestEnable"));
+    PFN_vkCmdSetDepthBoundsTestEnable CmdSetDepthBoundsTestEnable = device.load("vkCmdSetDepthBoundsTestEnable");
     CmdSetDepthBoundsTestEnable(command_buffer, true);
 
-    auto CmdSetDepthCompareOp =
-        reinterpret_cast<PFN_vkCmdSetDepthCompareOp>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetDepthCompareOp"));
+    PFN_vkCmdSetDepthCompareOp CmdSetDepthCompareOp = device.load("vkCmdSetDepthCompareOp");
     CmdSetDepthCompareOp(command_buffer, VK_COMPARE_OP_ALWAYS);
 
-    auto CmdSetDepthTestEnable =
-        reinterpret_cast<PFN_vkCmdSetDepthTestEnable>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetDepthTestEnable"));
+    PFN_vkCmdSetDepthTestEnable CmdSetDepthTestEnable = device.load("vkCmdSetDepthTestEnable");
     CmdSetDepthTestEnable(command_buffer, true);
 
-    auto CmdSetDepthWriteEnable =
-        reinterpret_cast<PFN_vkCmdSetDepthWriteEnable>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetDepthWriteEnable"));
+    PFN_vkCmdSetDepthWriteEnable CmdSetDepthWriteEnable = device.load("vkCmdSetDepthWriteEnable");
     CmdSetDepthWriteEnable(command_buffer, true);
 
-    auto CmdSetEvent2 = reinterpret_cast<PFN_vkCmdSetEvent2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetEvent2"));
+    PFN_vkCmdSetEvent2 CmdSetEvent2 = device.load("vkCmdSetEvent2");
     CmdSetEvent2(command_buffer, {}, &deps_info);
 
-    auto CmdSetFrontFace =
-        reinterpret_cast<PFN_vkCmdSetFrontFace>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetFrontFace"));
+    PFN_vkCmdSetFrontFace CmdSetFrontFace = device.load("vkCmdSetFrontFace");
     CmdSetFrontFace(command_buffer, VK_FRONT_FACE_CLOCKWISE);
 
-    auto CmdSetPrimitiveRestartEnable = reinterpret_cast<PFN_vkCmdSetPrimitiveRestartEnable>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetPrimitiveRestartEnable"));
+    PFN_vkCmdSetPrimitiveRestartEnable CmdSetPrimitiveRestartEnable = device.load("vkCmdSetPrimitiveRestartEnable");
     CmdSetPrimitiveRestartEnable(command_buffer, true);
 
-    auto CmdSetPrimitiveTopology =
-        reinterpret_cast<PFN_vkCmdSetPrimitiveTopology>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetPrimitiveTopology"));
+    PFN_vkCmdSetPrimitiveTopology CmdSetPrimitiveTopology = device.load("vkCmdSetPrimitiveTopology");
     CmdSetPrimitiveTopology(command_buffer, VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
 
-    auto CmdSetRasterizerDiscardEnable = reinterpret_cast<PFN_vkCmdSetRasterizerDiscardEnable>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetRasterizerDiscardEnable"));
+    PFN_vkCmdSetRasterizerDiscardEnable CmdSetRasterizerDiscardEnable = device.load("vkCmdSetRasterizerDiscardEnable");
     CmdSetRasterizerDiscardEnable(command_buffer, true);
 
-    auto CmdSetScissorWithCount =
-        reinterpret_cast<PFN_vkCmdSetScissorWithCount>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetScissorWithCount"));
+    PFN_vkCmdSetScissorWithCount CmdSetScissorWithCount = device.load("vkCmdSetScissorWithCount");
     CmdSetScissorWithCount(command_buffer, 0, nullptr);
 
-    auto CmdSetStencilOp =
-        reinterpret_cast<PFN_vkCmdSetStencilOp>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetStencilOp"));
+    PFN_vkCmdSetStencilOp CmdSetStencilOp = device.load("vkCmdSetStencilOp");
     CmdSetStencilOp(command_buffer, VK_STENCIL_FACE_BACK_BIT, VK_STENCIL_OP_DECREMENT_AND_WRAP, VK_STENCIL_OP_DECREMENT_AND_CLAMP,
                     VK_STENCIL_OP_DECREMENT_AND_WRAP, VK_COMPARE_OP_ALWAYS);
 
-    auto CmdSetStencilTestEnable =
-        reinterpret_cast<PFN_vkCmdSetStencilTestEnable>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetStencilTestEnable"));
+    PFN_vkCmdSetStencilTestEnable CmdSetStencilTestEnable = device.load("vkCmdSetStencilTestEnable");
     CmdSetStencilTestEnable(command_buffer, true);
 
-    auto CmdSetViewportWithCount =
-        reinterpret_cast<PFN_vkCmdSetViewportWithCount>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdSetViewportWithCount"));
+    PFN_vkCmdSetViewportWithCount CmdSetViewportWithCount = device.load("vkCmdSetViewportWithCount");
     CmdSetViewportWithCount(command_buffer, 0, nullptr);
 
-    auto CmdWaitEvents2 = reinterpret_cast<PFN_vkCmdWaitEvents2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdWaitEvents2"));
+    PFN_vkCmdWaitEvents2 CmdWaitEvents2 = device.load("vkCmdWaitEvents2");
     CmdWaitEvents2(command_buffer, 0, nullptr, &deps_info);
 
-    auto CmdWriteTimestamp2 =
-        reinterpret_cast<PFN_vkCmdWriteTimestamp2>(inst.functions->vkGetDeviceProcAddr(device, "vkCmdWriteTimestamp2"));
+    PFN_vkCmdWriteTimestamp2 CmdWriteTimestamp2 = device.load("vkCmdWriteTimestamp2");
     CmdWriteTimestamp2(command_buffer, VK_PIPELINE_STAGE_2_BLIT_BIT, {}, 0);
 
-    auto CreatePrivateDataSlot =
-        reinterpret_cast<PFN_vkCreatePrivateDataSlot>(inst.functions->vkGetDeviceProcAddr(device, "vkCreatePrivateDataSlot"));
+    PFN_vkCreatePrivateDataSlot CreatePrivateDataSlot = device.load("vkCreatePrivateDataSlot");
     CreatePrivateDataSlot(device, nullptr, nullptr, nullptr);
-    auto DestroyPrivateDataSlot =
-        reinterpret_cast<PFN_vkDestroyPrivateDataSlot>(inst.functions->vkGetDeviceProcAddr(device, "vkDestroyPrivateDataSlot"));
+    PFN_vkDestroyPrivateDataSlot DestroyPrivateDataSlot = device.load("vkDestroyPrivateDataSlot");
     DestroyPrivateDataSlot(device, VK_NULL_HANDLE, nullptr);
-    auto GetDeviceBufferMemoryRequirements = reinterpret_cast<PFN_vkGetDeviceBufferMemoryRequirements>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkGetDeviceBufferMemoryRequirements"));
+    PFN_vkGetDeviceBufferMemoryRequirements GetDeviceBufferMemoryRequirements = device.load("vkGetDeviceBufferMemoryRequirements");
     GetDeviceBufferMemoryRequirements(device, nullptr, nullptr);
-    auto GetDeviceImageMemoryRequirements = reinterpret_cast<PFN_vkGetDeviceImageMemoryRequirements>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkGetDeviceImageMemoryRequirements"));
+    PFN_vkGetDeviceImageMemoryRequirements GetDeviceImageMemoryRequirements = device.load("vkGetDeviceImageMemoryRequirements");
     GetDeviceImageMemoryRequirements(device, nullptr, nullptr);
-    auto GetDeviceImageSparseMemoryRequirements = reinterpret_cast<PFN_vkGetDeviceImageSparseMemoryRequirements>(
-        inst.functions->vkGetDeviceProcAddr(device, "vkGetDeviceImageSparseMemoryRequirements"));
+    PFN_vkGetDeviceImageSparseMemoryRequirements GetDeviceImageSparseMemoryRequirements =
+        device.load("vkGetDeviceImageSparseMemoryRequirements");
     GetDeviceImageSparseMemoryRequirements(device, nullptr, nullptr, nullptr);
-    auto GetPrivateData = reinterpret_cast<PFN_vkGetPrivateData>(inst.functions->vkGetDeviceProcAddr(device, "vkGetPrivateData"));
+    PFN_vkGetPrivateData GetPrivateData = device.load("vkGetPrivateData");
     GetPrivateData(device, VK_OBJECT_TYPE_UNKNOWN, 0, {}, nullptr);
-    auto QueueSubmit2 = reinterpret_cast<PFN_vkQueueSubmit2>(inst.functions->vkGetDeviceProcAddr(device, "vkQueueSubmit2"));
+    PFN_vkQueueSubmit2 QueueSubmit2 = device.load("vkQueueSubmit2");
     QueueSubmit2(nullptr, 0, nullptr, VK_NULL_HANDLE);
-    auto SetPrivateData = reinterpret_cast<PFN_vkSetPrivateData>(inst.functions->vkGetDeviceProcAddr(device, "vkSetPrivateData"));
+    PFN_vkSetPrivateData SetPrivateData = device.load("vkSetPrivateData");
     SetPrivateData(device, VK_OBJECT_TYPE_UNKNOWN, 0, {}, 0);
 }
 
 TEST(ApplicationInfoVersion, NonVulkanVariant) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     DebugUtilsLogger log;
     InstWrapper inst{env.vulkan_functions};
@@ -824,8 +789,7 @@
 
 TEST(DriverManifest, NonVulkanVariant) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(1, 1, 0, 0)));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(1, 1, 0, 0))).add_physical_device({});
 
     DebugUtilsLogger log;
     InstWrapper inst{env.vulkan_functions};
@@ -839,8 +803,7 @@
 
 TEST(LayerManifest, ImplicitNonVulkanVariant) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 0, 0)));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 0, 0))).add_physical_device({});
 
     const char* implicit_layer_name = "ImplicitTestLayer";
     env.add_implicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -861,8 +824,7 @@
 
 TEST(LayerManifest, ExplicitNonVulkanVariant) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 0, 0)));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA, VK_MAKE_API_VERSION(0, 1, 0, 0))).add_physical_device({});
 
     const char* explicit_layer_name = "ExplicitTestLayer";
     env.add_explicit_layer(ManifestLayer{}.add_layer(ManifestLayer::LayerDescription{}
@@ -883,8 +845,8 @@
 TEST(DriverManifest, UnknownManifestVersion) {
     FrameworkEnvironment env{};
     env.add_icd(
-        TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_file_format_version({3, 2, 1})));
-    env.get_test_icd().physical_devices.push_back({});
+           TestICDDetails(ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_file_format_version({3, 2, 1})))
+        .add_physical_device({});
 
     DebugUtilsLogger log;
     InstWrapper inst{env.vulkan_functions};
@@ -896,16 +858,31 @@
     ASSERT_TRUE(log.find("has unknown icd manifest file version 3.2.1. May cause errors."));
 }
 
+TEST(DriverManifest, LargeUnknownManifestVersion) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(
+                    ManifestICD{}.set_lib_path(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_file_format_version({100, 222, 111})))
+        .add_physical_device({});
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    inst.CheckCreate();
+    ASSERT_TRUE(log.find("loader_parse_icd_manifest: "));
+    // log prints the path to the file, don't look for it since it is hard to determine inside the test what the path should be.
+    ASSERT_TRUE(log.find("has unknown icd manifest file version 100.222.111. May cause errors."));
+}
+
 TEST(LayerManifest, UnknownManifestVersion) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA));
-    env.get_test_icd().physical_devices.push_back({});
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
 
     const char* implicit_layer_name = "ImplicitTestLayer";
     env.add_implicit_layer(ManifestLayer{}
                                .add_layer(ManifestLayer::LayerDescription{}
                                               .set_name(implicit_layer_name)
-                                              .set_api_version(VK_MAKE_API_VERSION(1, 1, 0, 0))
+                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))
                                               .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
                                               .set_disable_environment("DISABLE_ME"))
                                .set_file_format_version({3, 2, 1}),
@@ -920,3 +897,507 @@
     // log prints the path to the file, don't look for it since it is hard to determine inside the test what the path should be.
     ASSERT_TRUE(log.find("has unknown layer manifest file version 3.2.1.  May cause errors."));
 }
+
+TEST(LayerManifest, LargeUnknownManifestVersion) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA)).add_physical_device({});
+
+    const char* implicit_layer_name = "ImplicitTestLayer";
+    env.add_implicit_layer(ManifestLayer{}
+                               .add_layer(ManifestLayer::LayerDescription{}
+                                              .set_name(implicit_layer_name)
+                                              .set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0))
+                                              .set_lib_path(TEST_LAYER_PATH_EXPORT_VERSION_2)
+                                              .set_disable_environment("DISABLE_ME"))
+                               .set_file_format_version({100, 222, 111}),
+                           "implicit_test_layer.json");
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    inst.CheckCreate();
+    ASSERT_TRUE(log.find("loader_add_layer_properties: "));
+    // log prints the path to the file, don't look for it since it is hard to determine inside the test what the path should be.
+    ASSERT_TRUE(log.find("has unknown layer manifest file version 100.222.111.  May cause errors."));
+}
+
+struct DriverInfo {
+    DriverInfo(TestICDDetails icd_details, uint32_t driver_version, bool expect_to_find) noexcept
+        : icd_details(icd_details), driver_version(driver_version), expect_to_find(expect_to_find) {}
+    TestICDDetails icd_details;
+    uint32_t driver_version = 0;
+    bool expect_to_find = false;
+};
+
+void CheckDirectDriverLoading(FrameworkEnvironment& env, std::vector<DriverInfo> const& normal_drivers,
+                              std::vector<DriverInfo> const& direct_drivers, bool exclusive) {
+    std::vector<VkDirectDriverLoadingInfoLUNARG> ddl_infos;
+    uint32_t expected_driver_count = 0;
+
+    for (auto const& driver : direct_drivers) {
+        auto& direct_driver_icd = env.add_icd(driver.icd_details);
+        direct_driver_icd.physical_devices.push_back({});
+        direct_driver_icd.physical_devices.at(0).properties.driverVersion = driver.driver_version;
+        VkDirectDriverLoadingInfoLUNARG ddl_info{};
+        ddl_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+        ddl_info.pfnGetInstanceProcAddr = env.icds.back().icd_library.get_symbol("vk_icdGetInstanceProcAddr");
+        ddl_infos.push_back(ddl_info);
+        if (driver.expect_to_find) {
+            expected_driver_count++;
+        }
+    }
+
+    for (auto const& driver : normal_drivers) {
+        auto& direct_driver_icd = env.add_icd(driver.icd_details);
+        direct_driver_icd.physical_devices.push_back({});
+        direct_driver_icd.physical_devices.at(0).properties.driverVersion = driver.driver_version;
+        if (!exclusive && driver.expect_to_find) {
+            expected_driver_count++;
+        }
+    }
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = exclusive ? VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG : VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = static_cast<uint32_t>(ddl_infos.size());
+    ddl_list.pDrivers = ddl_infos.data();
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+    inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
+
+    if (exclusive) {
+        ASSERT_TRUE(
+            log.find("loader_scan_for_direct_drivers: The VK_LUNARG_direct_driver_loading extension is active and specified "
+                     "VK_DIRECT_DRIVER_LOADING_MODE_EXCLUSIVE_LUNARG, skipping system and environment "
+                     "variable driver search mechanisms."));
+    }
+
+    // Make sure all drivers we expect to load were found - including checking that the pfn matches exactly.
+    for (uint32_t i = 0; i < direct_drivers.size(); i++) {
+        if (direct_drivers.at(i).expect_to_find) {
+            std::stringstream ss;
+            ss << "loader_add_direct_driver: Adding driver found in index " << i
+               << " of VkDirectDriverLoadingListLUNARG::pDrivers structure. pfnGetInstanceProcAddr was set to "
+               << reinterpret_cast<const void*>(ddl_infos.at(i).pfnGetInstanceProcAddr);
+            std::string log_message = ss.str();
+            ASSERT_TRUE(log.find(log_message));
+        }
+    }
+
+    auto phys_devs = inst.GetPhysDevs();
+    ASSERT_EQ(phys_devs.size(), expected_driver_count);
+
+    // We have to iterate through the driver lists backwards because the loader *prepends* icd's, so the last found ICD is found
+    // first in the driver list
+    uint32_t driver_index = 0;
+    for (size_t i = normal_drivers.size() - 1; i == 0; i--) {
+        if (normal_drivers.at(i).expect_to_find) {
+            VkPhysicalDeviceProperties props{};
+            inst.functions->vkGetPhysicalDeviceProperties(phys_devs.at(driver_index), &props);
+            ASSERT_EQ(props.driverVersion, normal_drivers.at(i).driver_version);
+            driver_index++;
+        }
+    }
+    for (size_t i = direct_drivers.size() - 1; i == 0; i--) {
+        if (direct_drivers.at(i).expect_to_find) {
+            VkPhysicalDeviceProperties props{};
+            inst.functions->vkGetPhysicalDeviceProperties(phys_devs.at(driver_index), &props);
+            ASSERT_EQ(props.driverVersion, direct_drivers.at(i).driver_version);
+            driver_index++;
+        }
+    }
+}
+
+// Only 1 direct driver
+TEST(DirectDriverLoading, Individual) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 10, true);
+
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, false));
+}
+
+// 2 direct drivers
+TEST(DirectDriverLoading, MultipleDirectDrivers) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 13, true);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 7, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, false));
+}
+
+// Multiple direct drivers with a normal driver in the middle
+TEST(DirectDriverLoading, MultipleDirectDriversAndNormalDrivers) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    normal_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA), 90, true);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 80, true);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 70, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, false));
+}
+
+// Normal driver and direct driver with direct driver exclusivity
+TEST(DirectDriverLoading, ExclusiveWithNormalDriver) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 33, true);
+    normal_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_2), 44, false);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+TEST(DirectDriverLoading, ExclusiveWithMultipleNormalDriver) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    normal_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_2), 55, true);
+    normal_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_2), 66, true);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 77, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+TEST(DirectDriverLoading, ExclusiveWithDriverEnvVar) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::env_var), 4, false);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 5, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+TEST(DirectDriverLoading, ExclusiveWithAddDriverEnvVar) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_discovery_type(ManifestDiscoveryType::add_env_var), 6, false);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 7, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+TEST(DirectDriverLoading, InclusiveWithFilterSelect) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+
+    EnvVarWrapper driver_filter_select_env_var{"VK_LOADER_DRIVERS_SELECT", "normal_driver.json"};
+
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_disable_icd_inc(true).set_json_name("normal_driver"), 8, true);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 9, true);
+
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, false));
+}
+
+TEST(DirectDriverLoading, ExclusiveWithFilterSelect) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+
+    EnvVarWrapper driver_filter_select_env_var{"VK_LOADER_DRIVERS_SELECT", "normal_driver.json"};
+
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_disable_icd_inc(true).set_json_name("normal_driver"), 10,
+        false);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 11, true);
+
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+TEST(DirectDriverLoading, InclusiveWithFilterDisable) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+
+    EnvVarWrapper driver_filter_disable_env_var{"VK_LOADER_DRIVERS_DISABLE", "normal_driver.json"};
+
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_disable_icd_inc(true).set_json_name("normal_driver"), 12,
+        false);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 13, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, false));
+}
+
+TEST(DirectDriverLoading, ExclusiveWithFilterDisable) {
+    FrameworkEnvironment env{};
+    std::vector<DriverInfo> normal_drivers;
+    std::vector<DriverInfo> direct_drivers;
+
+    EnvVarWrapper driver_filter_disable_env_var{"VK_LOADER_DRIVERS_DISABLE", "normal_driver.json"};
+
+    normal_drivers.emplace_back(
+        TestICDDetails(TEST_ICD_PATH_VERSION_2_EXPORT_ICD_GPDPA).set_disable_icd_inc(true).set_json_name("normal_driver"), 14,
+        false);
+    direct_drivers.emplace_back(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none), 15, true);
+    ASSERT_NO_FATAL_FAILURE(CheckDirectDriverLoading(env, normal_drivers, direct_drivers, true));
+}
+
+// The VK_LUNARG_direct_driver_loading extension is not enabled
+TEST(DirectDriverLoading, ExtensionNotEnabled) {
+    FrameworkEnvironment env{};
+
+    auto& direct_driver_icd = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none));
+    direct_driver_icd.physical_devices.push_back({});
+
+    VkDirectDriverLoadingInfoLUNARG ddl_info{};
+    ddl_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_info.pfnGetInstanceProcAddr = env.icds.back().icd_library.get_symbol("vk_icdGetInstanceProcAddr");
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = 1U;
+    ddl_list.pDrivers = &ddl_info;
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+    ASSERT_TRUE(
+        log.find("loader_scan_for_direct_drivers: The pNext chain of VkInstanceCreateInfo contained the "
+                 "VkDirectDriverLoadingListLUNARG structure, but the VK_LUNARG_direct_driver_loading extension was "
+                 "not enabled."));
+}
+
+// VkDirectDriverLoadingListLUNARG is not in the pNext chain of VkInstanceCreateInfo
+TEST(DirectDriverLoading, DriverListNotInPnextChain) {
+    FrameworkEnvironment env{};
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none)).add_physical_device({});
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+    ASSERT_TRUE(
+        log.find("loader_scan_for_direct_drivers: The VK_LUNARG_direct_driver_loading extension was enabled but the pNext chain of "
+                 "VkInstanceCreateInfo did not contain the "
+                 "VkDirectDriverLoadingListLUNARG structure."));
+}
+
+// User sets the pDrivers pointer in VkDirectDriverLoadingListLUNARG to nullptr
+TEST(DirectDriverLoading, DriverListHasNullDriverPointer) {
+    FrameworkEnvironment env{};
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none)).add_physical_device({});
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = 1U;
+    ddl_list.pDrivers = nullptr;  // user forgot to set the pDrivers
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+    inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+    ASSERT_TRUE(
+        log.find("loader_scan_for_direct_drivers: The VkDirectDriverLoadingListLUNARG structure in the pNext chain of "
+                 "VkInstanceCreateInfo has a NULL pDrivers member."));
+}
+
+// User sets the driverCount in VkDirectDriverLoadingListLUNARG to zero
+TEST(DirectDriverLoading, DriverListHasZeroInfoCount) {
+    FrameworkEnvironment env{};
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none)).add_physical_device({});
+
+    VkDirectDriverLoadingInfoLUNARG ddl_info{};
+    ddl_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_info.pfnGetInstanceProcAddr = env.icds.back().icd_library.get_symbol("vk_icdGetInstanceProcAddr");
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = 0;  // user set 0 for the info list
+    ddl_list.pDrivers = &ddl_info;
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+    inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+    ASSERT_TRUE(
+        log.find("loader_scan_for_direct_drivers: The VkDirectDriverLoadingListLUNARG structure in the pNext chain of "
+                 "VkInstanceCreateInfo has a non-null pDrivers member but a driverCount member with a value "
+                 "of zero."));
+}
+
+// pfnGetInstanceProcAddr in VkDirectDriverLoadingInfoLUNARG is nullptr
+TEST(DirectDriverLoading, DriverInfoMissingGetInstanceProcAddr) {
+    FrameworkEnvironment env{};
+
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none)).add_physical_device({});
+
+    std::array<VkDirectDriverLoadingInfoLUNARG, 2> ddl_infos{};
+    ddl_infos[0].sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_infos[0].pfnGetInstanceProcAddr = nullptr;  // user didn't set the pfnGetInstanceProcAddr to the driver's handle
+
+    ddl_infos[1].sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_infos[1].pfnGetInstanceProcAddr = nullptr;  // user didn't set the pfnGetInstanceProcAddr to the driver's handle
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = static_cast<uint32_t>(ddl_infos.size());
+    ddl_list.pDrivers = ddl_infos.data();
+
+    DebugUtilsLogger log;
+    InstWrapper inst{env.vulkan_functions};
+    FillDebugUtilsCreateDetails(inst.create_info, log);
+    log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+    inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+    inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+    ASSERT_TRUE(
+        log.find("loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index 0 contains a NULL pointer for the "
+                 "pfnGetInstanceProcAddr member, skipping."));
+    ASSERT_TRUE(
+        log.find("loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index 1 contains a NULL pointer for the "
+                 "pfnGetInstanceProcAddr member, skipping."));
+}
+
+// test the various error paths in loader_add_direct_driver
+TEST(DirectDriverLoading, DriverDoesNotExportNegotiateFunction) {
+    FrameworkEnvironment env{};
+
+    auto& direct_driver = env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_7).set_discovery_type(ManifestDiscoveryType::none))
+                              .add_physical_device({})
+                              .set_exposes_vk_icdNegotiateLoaderICDInterfaceVersion(false)
+                              .set_exposes_vkCreateInstance(false)
+                              .set_exposes_vkEnumerateInstanceExtensionProperties(false);
+
+    VkDirectDriverLoadingInfoLUNARG ddl_info{};
+    ddl_info.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG;
+    ddl_info.pfnGetInstanceProcAddr = env.icds.back().icd_library.get_symbol("vk_icdGetInstanceProcAddr");
+
+    VkDirectDriverLoadingListLUNARG ddl_list{};
+    ddl_list.sType = VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG;
+    ddl_list.mode = VK_DIRECT_DRIVER_LOADING_MODE_INCLUSIVE_LUNARG;
+    ddl_list.driverCount = 1;
+    ddl_list.pDrivers = &ddl_info;
+
+    {
+        DebugUtilsLogger log;
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, log);
+        log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+        inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+        inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+        ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+        ASSERT_TRUE(
+            log.find("loader_add_direct_driver: Could not get 'vk_icdNegotiateLoaderICDInterfaceVersion' from "
+                     "VkDirectDriverLoadingInfoLUNARG structure at "
+                     "index 0, skipping."));
+    }
+
+    // Allow the negotiate function to be found, now it should fail to find instance creation function
+    direct_driver.set_exposes_vk_icdNegotiateLoaderICDInterfaceVersion(true);
+    direct_driver.set_max_icd_interface_version(4);
+
+    {
+        DebugUtilsLogger log;
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, log);
+        log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+        inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+        inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+        ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+        ASSERT_TRUE(log.find(
+            "loader_add_direct_driver: VkDirectDriverLoadingInfoLUNARG structure at index 0 supports interface version 4, "
+            "which is incompatible with the Loader Driver Interface version that supports the VK_LUNARG_direct_driver_loading "
+            "extension, skipping."));
+    }
+    direct_driver.set_max_icd_interface_version(7);
+
+    {
+        DebugUtilsLogger log;
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, log);
+        log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+        inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+        inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+        ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+        ASSERT_TRUE(
+            log.find("loader_add_direct_driver: Could not get 'vkEnumerateInstanceExtensionProperties' from "
+                     "VkDirectDriverLoadingInfoLUNARG structure at index 0, skipping."));
+    }
+
+    // Allow the instance creation function to be found, now it should fail to find EnumInstExtProps
+    direct_driver.set_exposes_vkCreateInstance(true);
+
+    {
+        DebugUtilsLogger log;
+        InstWrapper inst{env.vulkan_functions};
+        FillDebugUtilsCreateDetails(inst.create_info, log);
+        log.get()->pNext = reinterpret_cast<const void*>(&ddl_list);
+        inst.create_info.add_extension(VK_LUNARG_DIRECT_DRIVER_LOADING_EXTENSION_NAME);
+        inst.create_info.set_api_version(VK_MAKE_API_VERSION(0, 1, 0, 0));
+        ASSERT_NO_FATAL_FAILURE(inst.CheckCreate(VK_ERROR_INCOMPATIBLE_DRIVER));
+
+        ASSERT_TRUE(
+            log.find("loader_add_direct_driver: Could not get 'vkEnumerateInstanceExtensionProperties' from "
+                     "VkDirectDriverLoadingInfoLUNARG structure at index 0, skipping."));
+    }
+}
+
+TEST(DriverManifest, VersionMismatchWithEnumerateInstanceVersion) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+        .set_icd_api_version(VK_API_VERSION_1_0)
+        .add_physical_device({});
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+
+    ASSERT_TRUE(env.debug_log.find(std::string("terminator_CreateInstance: Manifest ICD for \"") + env.get_test_icd_path().str() +
+                                   "\" contained a 1.1 or greater API version, but "
+                                   "vkEnumerateInstanceVersion returned 1.0, treating as a 1.0 ICD"));
+}
+
+TEST(DriverManifest, EnumerateInstanceVersionNotSupported) {
+    FrameworkEnvironment env{};
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2, VK_API_VERSION_1_1))
+        .set_icd_api_version(VK_API_VERSION_1_0)
+        .set_can_query_vkEnumerateInstanceVersion(false)
+        .add_physical_device({});
+
+    InstWrapper inst{env.vulkan_functions};
+    inst.create_info.add_extension(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
+    FillDebugUtilsCreateDetails(inst.create_info, env.debug_log);
+    inst.CheckCreate();
+
+    ASSERT_TRUE(env.debug_log.find(std::string("terminator_CreateInstance: Manifest ICD for \"") + env.get_test_icd_path().str() +
+                                   "\" contained a 1.1 or greater API version, but does "
+                                   "not support vkEnumerateInstanceVersion, treating as a 1.0 ICD"));
+}
diff --git a/tests/loader_wsi_tests.cpp b/tests/loader_wsi_tests.cpp
index 095aac9..99e8bcb 100644
--- a/tests/loader_wsi_tests.cpp
+++ b/tests/loader_wsi_tests.cpp
@@ -37,7 +37,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_extensions({VK_KHR_WIN32_SURFACE_EXTENSION_NAME});
@@ -55,7 +54,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WIN32_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = false;
@@ -68,7 +66,6 @@
     VkWin32SurfaceCreateInfoKHR surf_create_info{VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateWin32SurfaceKHR(inst, &surf_create_info, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(cur_icd.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     env.vulkan_functions.vkDestroySurfaceKHR(inst, surface, nullptr);
 }
@@ -79,7 +76,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WIN32_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = true;
@@ -92,7 +88,6 @@
     VkWin32SurfaceCreateInfoKHR surf_create_info{VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateWin32SurfaceKHR(inst, &surf_create_info, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(cur_icd.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     env.vulkan_functions.vkDestroySurfaceKHR(inst, surface, nullptr);
 }
@@ -121,7 +116,6 @@
     VkWin32SurfaceCreateInfoKHR surf_create_info{VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateWin32SurfaceKHR(instance.inst, &surf_create_info, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(cur_icd.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     env.vulkan_functions.vkDestroySurfaceKHR(instance.inst, surface, nullptr);
 }
@@ -131,7 +125,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WIN32_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -159,7 +152,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WIN32_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -202,7 +194,6 @@
     VkWin32SurfaceCreateInfoKHR surf_create_info{VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateWin32SurfaceKHR(instance.inst, &surf_create_info, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(driver.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     uint32_t device_count = max_device_count;
     std::array<VkPhysicalDevice, max_device_count> phys_devs;
@@ -225,7 +216,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.enable_icd_wsi = false;
 
     InstWrapper inst{env.vulkan_functions};
@@ -244,7 +234,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XCB_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = false;
@@ -268,7 +257,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XCB_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = true;
@@ -320,7 +308,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XCB_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -348,7 +335,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XCB_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -391,7 +377,6 @@
     VkXcbSurfaceCreateInfoKHR xcb_createInfo{VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateXcbSurfaceKHR(instance.inst, &xcb_createInfo, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(cur_icd.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     uint32_t device_count = max_device_count;
     std::array<VkPhysicalDevice, max_device_count> phys_devs;
@@ -414,7 +399,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.enable_icd_wsi = false;
 
     InstWrapper inst{env.vulkan_functions};
@@ -433,7 +417,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XLIB_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = false;
@@ -457,7 +440,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XLIB_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = true;
@@ -509,7 +491,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XLIB_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -537,7 +518,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_XLIB_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -580,7 +560,6 @@
     VkXlibSurfaceCreateInfoKHR createInfo{VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateXlibSurfaceKHR(instance.inst, &createInfo, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(driver.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     uint32_t device_count = max_device_count;
     std::array<VkPhysicalDevice, max_device_count> phys_devs;
@@ -603,7 +582,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.enable_icd_wsi = false;
 
     InstWrapper inst{env.vulkan_functions};
@@ -622,7 +600,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = false;
@@ -646,7 +623,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME});
     cur_icd.enable_icd_wsi = true;
@@ -698,7 +674,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -726,7 +701,6 @@
     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
     auto& cur_icd = env.get_test_icd(0);
     cur_icd.set_min_icd_interface_version(5);
-    cur_icd.set_icd_api_version(VK_API_VERSION_1_0);
     cur_icd.add_instance_extension({VK_KHR_SURFACE_EXTENSION_NAME});
     cur_icd.add_instance_extension({VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME});
     cur_icd.physical_devices.emplace_back("physical_device_0");
@@ -769,7 +743,6 @@
     VkWaylandSurfaceCreateInfoKHR createInfo{VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR};
     ASSERT_EQ(VK_SUCCESS, env.vulkan_functions.vkCreateWaylandSurfaceKHR(instance.inst, &createInfo, nullptr, &surface));
     ASSERT_TRUE(surface != VK_NULL_HANDLE);
-    //    ASSERT_EQ(cur_icd.is_using_icd_wsi, UsingICDProvidedWSI::not_using);
 
     uint32_t device_count = max_device_count;
     std::array<VkPhysicalDevice, max_device_count> phys_devs;
@@ -787,45 +760,34 @@
 
 TEST(WsiTests, ForgetEnableSurfaceExtensions) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-    driver.physical_devices.back().add_extension("VK_KHR_swapchain");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .setup_WSI()
+        .add_physical_device(PhysicalDevice{}.add_extension("VK_KHR_swapchain").finish());
 
     InstWrapper inst{env.vulkan_functions};
     inst.create_info.add_extension("VK_KHR_surface");
     ASSERT_NO_FATAL_FAILURE(inst.CheckCreate());
 
     VkSurfaceKHR surface{};
-    ASSERT_FALSE(create_surface(inst, surface));
+    ASSERT_EQ(VK_ERROR_EXTENSION_NOT_PRESENT, create_surface(inst, surface));
 }
 
 TEST(WsiTests, SwapchainFunctional) {
     FrameworkEnvironment env{};
-    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
-    auto& driver = env.get_test_icd();
-    setup_WSI_in_ICD(driver);
-    MockQueueFamilyProperties family_props{{VK_QUEUE_GRAPHICS_BIT, 1, 0, {1, 1, 1}}, true};
-
-    driver.physical_devices.emplace_back("physical_device_0");
-    driver.physical_devices.back().queue_family_properties.push_back(family_props);
-    driver.physical_devices.back().add_extension("VK_KHR_swapchain");
+    env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2))
+        .setup_WSI()
+        .add_physical_device(PhysicalDevice{}.add_extension("VK_KHR_swapchain").finish());
 
     InstWrapper inst{env.vulkan_functions};
-    setup_WSI_in_create_instance(inst);
+    inst.create_info.setup_WSI();
     inst.CheckCreate();
     VkSurfaceKHR surface{};
-    create_surface(inst, surface);
+    ASSERT_EQ(VK_SUCCESS, create_surface(inst, surface));
     VkPhysicalDevice phys_dev = inst.GetPhysDev();
 
     {  // Use GDPA to get functions
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
 
@@ -844,7 +806,6 @@
     {  // Use GIPA gotten functions
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         ASSERT_NO_FATAL_FAILURE(dev.CheckCreate(phys_dev));
 
@@ -879,7 +840,6 @@
     {  // forget to set the surface
         DeviceWrapper dev{inst};
         dev.create_info.add_extension("VK_KHR_swapchain");
-        dev.create_info.add_device_queue(DeviceQueueCreateInfo{}.add_priority(0.0f));
 
         dev.CheckCreate(phys_dev);