git: 3bb7181ff8ad - main - graphics/vulkan-validation-layers: update to 1.2.203

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 25 Dec 2021 14:02:34 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3bb7181ff8ad19b68fb0f32284c46275c7126f75

commit 3bb7181ff8ad19b68fb0f32284c46275c7126f75
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-12-21 17:05:00 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-12-25 14:02:26 +0000

    graphics/vulkan-validation-layers: update to 1.2.203
    
    Changes:        https://github.com/KhronosGroup/Vulkan-ValidationLayers/compare/v1.2.201...v1.2.203
    Reported by:    Repology
---
 graphics/vulkan-validation-layers/Makefile         |   2 +-
 graphics/vulkan-validation-layers/distinfo         |   6 +-
 .../files/patch-headers-1.2.203                    |  44 ---
 .../vulkan-validation-layers/files/patch-revert    | 312 +++++++++++++++++++++
 4 files changed, 316 insertions(+), 48 deletions(-)

diff --git a/graphics/vulkan-validation-layers/Makefile b/graphics/vulkan-validation-layers/Makefile
index 85fc87740491..be0ffe7fd195 100644
--- a/graphics/vulkan-validation-layers/Makefile
+++ b/graphics/vulkan-validation-layers/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	vulkan-validation-layers
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.2.201
+DISTVERSION=	1.2.203
 CATEGORIES=	graphics
 
 MAINTAINER=	jbeich@FreeBSD.org
diff --git a/graphics/vulkan-validation-layers/distinfo b/graphics/vulkan-validation-layers/distinfo
index e0cb36ffeb74..c2c473f30683 100644
--- a/graphics/vulkan-validation-layers/distinfo
+++ b/graphics/vulkan-validation-layers/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1638477486
-SHA256 (KhronosGroup-Vulkan-ValidationLayers-v1.2.201_GH0.tar.gz) = c7c143381c064c51507a789c8434055160ab1646816f25ba1dcaa694359df4c4
-SIZE (KhronosGroup-Vulkan-ValidationLayers-v1.2.201_GH0.tar.gz) = 3572707
+TIMESTAMP = 1640106300
+SHA256 (KhronosGroup-Vulkan-ValidationLayers-v1.2.203_GH0.tar.gz) = 55aa46a001993fe1ab4177d5a03c5e90091dc674d716a560dc0e6c8a1e0158f9
+SIZE (KhronosGroup-Vulkan-ValidationLayers-v1.2.203_GH0.tar.gz) = 3588824
 SHA256 (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-123-g814e728_GH0.tar.gz) = e4880dccda018f63cdc684afd5e51972d8ad2e3f21e9bab346a865370ea2929e
 SIZE (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-123-g814e728_GH0.tar.gz) = 416402
 SHA256 (martinus-robin-hood-hashing-3.11.3_GH0.tar.gz) = dcf2b7fa9ef9dd0c67102d94c28e8df3effbe1845e0ed1f31f4772ca5e857fc4
diff --git a/graphics/vulkan-validation-layers/files/patch-headers-1.2.203 b/graphics/vulkan-validation-layers/files/patch-headers-1.2.203
deleted file mode 100644
index 917a7bc084bf..000000000000
--- a/graphics/vulkan-validation-layers/files/patch-headers-1.2.203
+++ /dev/null
@@ -1,44 +0,0 @@
-In file included from layers/vk_format_utils.cpp:30:
-In file included from layers/vk_layer_utils.h:33:
-In file included from layers/vk_layer_logging.h:49:
-layers/generated/vk_enum_string_helper.h:7164:14: error: use of undeclared identifier 'VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT'; did you mean 'VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT'?
-        case VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT:
-             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-             VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT
-/usr/local/include/vulkan/vulkan_beta.h:461:5: note: 'VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT' declared here
-    VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 0x00000010,
-    ^
-
---- layers/generated/parameter_validation.cpp.orig	2021-12-02 20:38:06 UTC
-+++ layers/generated/parameter_validation.cpp
-@@ -114,7 +114,7 @@ const VkPipelineStageFlags2KHR AllVkPipelineStageFlagB
- const VkSubmitFlagsKHR AllVkSubmitFlagBitsKHR = VK_SUBMIT_PROTECTED_BIT_KHR;
- const VkDebugReportFlagsEXT AllVkDebugReportFlagBitsEXT = VK_DEBUG_REPORT_INFORMATION_BIT_EXT|VK_DEBUG_REPORT_WARNING_BIT_EXT|VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT|VK_DEBUG_REPORT_ERROR_BIT_EXT|VK_DEBUG_REPORT_DEBUG_BIT_EXT;
- #ifdef VK_ENABLE_BETA_EXTENSIONS
--const VkVideoEncodeH264CapabilityFlagsEXT AllVkVideoEncodeH264CapabilityFlagBitsEXT = VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT;
-+const VkVideoEncodeH264CapabilityFlagsEXT AllVkVideoEncodeH264CapabilityFlagBitsEXT = VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT|VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT;
- #endif
- #ifdef VK_ENABLE_BETA_EXTENSIONS
- const VkVideoEncodeH264CreateFlagsEXT AllVkVideoEncodeH264CreateFlagBitsEXT = VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT|VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT;
-In file included from layers/vk_format_utils.cpp:30:
-In file included from layers/vk_layer_utils.h:33:
-In file included from layers/vk_layer_logging.h:49:
-layers/generated/vk_enum_string_helper.h:7164:14: error: use of undeclared identifier 'VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT'; did you mean 'VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT'?
-        case VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT:
-             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-             VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT
-/usr/local/include/vulkan/vulkan_beta.h:461:5: note: 'VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT' declared here
-    VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 0x00000010,
-    ^
-
---- layers/generated/vk_enum_string_helper.h.orig	2021-12-02 20:38:06 UTC
-+++ layers/generated/vk_enum_string_helper.h
-@@ -7161,8 +7161,6 @@ static inline const char* string_VkVideoEncodeH264Capa
-             return "VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT";
-         case VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT:
-             return "VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT";
--        case VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT:
--            return "VK_VIDEO_ENCODE_H264_CAPABILITY_OPTIONAL_RC_EXTENSION_STRUCT_BIT_EXT";
-         case VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT:
-             return "VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT";
-         case VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT:
diff --git a/graphics/vulkan-validation-layers/files/patch-revert b/graphics/vulkan-validation-layers/files/patch-revert
new file mode 100644
index 000000000000..17c3058659c5
--- /dev/null
+++ b/graphics/vulkan-validation-layers/files/patch-revert
@@ -0,0 +1,312 @@
+Revert https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/2c2b81c05189
+as it breaks overriding via *_INSTALL_DIR e.g.,
+
+CMake Error at CMakeLists.txt:254 (find_package):
+  Could not find a package configuration file provided by "robin_hood" with
+  any of the following names:
+
+    robin_hoodConfig.cmake
+    robin_hood-config.cmake
+
+  Add the installation prefix of "robin_hood" to CMAKE_PREFIX_PATH or set
+  "robin_hood_DIR" to a directory containing one of the above files.  If
+  "robin_hood" provides a separate development package or SDK, be sure it has
+  been installed.
+
+--- CMakeLists.txt.orig	2021-12-21 17:05:00 UTC
++++ CMakeLists.txt
+@@ -102,21 +102,7 @@ else()
+     message("********************************************************************************")
+     find_package(PythonInterp 3 QUIET)
+ endif()
+-#backwards compatability settings for other parts of the build system that don't use find_package() variables yet
+-if (ROBIN_HOOD_HASHING_INSTALL_DIR)
+-    list(APPEND CMAKE_PREFIX_PATH ${ROBIN_HOOD_HASHING_INSTALL_DIR})
+-endif()
+-if (SPIRV_HEADERS_INSTALL_DIR)
+-    list(APPEND CMAKE_PREFIX_PATH ${SPIRV_HEADERS_INSTALL_DIR})
+-endif()
+-if (SPIRV_TOOLS_INSTALL_DIR)
+-    list(APPEND CMAKE_PREFIX_PATH ${SPIRV_TOOLS_INSTALL_DIR})
+-endif()
+-if (GOOGLETEST_INSTALL_DIR)
+-    list(APPEND CMAKE_PREFIX_PATH ${GOOGLETEST_INSTALL_DIR})
+-endif()
+ 
+-
+ if (TARGET Vulkan::Headers)
+     message(STATUS "Using Vulkan headers from Vulkan::Headers target")
+     get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES)
+@@ -251,13 +237,12 @@ option(BUILD_LAYERS "Build layers" ON)
+ option(BUILD_LAYER_SUPPORT_FILES "Generate layer files" OFF) # For generating files when not building layers
+ option(USE_ROBIN_HOOD_HASHING "Use robin-hood-hashing" ON)
+ if (USE_ROBIN_HOOD_HASHING)
+-    find_package(robin_hood REQUIRED CONFIG)
++    if(NOT ROBIN_HOOD_HASHING_INSTALL_DIR)
++	set(ROBIN_HOOD_HASHING_INSTALL_DIR $ENV{ROBIN_HOOD_HASHING_INSTALL_DIR} PATH "Path to robin-hood-hashing repository")
++    endif()
++    set(ROBIN_HOOD_HASHING_INCLUDE_DIR "${ROBIN_HOOD_HASHING_INSTALL_DIR}/src/include" PATH "Path to robin-hood-hashing/src/include")
+ endif()
+ 
+-if(BUILD_LAYERS OR BUILD_TESTS)
+-    find_package(SPIRV-Headers REQUIRED CONFIG)
+-endif()
+-
+ if(BUILD_TESTS)
+     set(GLSLANG_INSTALL_DIR "GLSLANG-NOTFOUND" CACHE PATH "Absolute path to a glslang install directory")
+     if(NOT GLSLANG_INSTALL_DIR AND NOT DEFINED ENV{GLSLANG_INSTALL_DIR} AND NOT TARGET glslang)
+@@ -269,7 +254,20 @@ if(BUILD_TESTS)
+         set(GLSLANG_INSTALL_DIR $ENV{GLSLANG_INSTALL_DIR})
+     endif()
+ 
++    # CMake command line option overrides environment variable
++    if(NOT SPIRV_HEADERS_INSTALL_DIR)
++        set(SPIRV_HEADERS_INSTALL_DIR $ENV{SPIRV_HEADERS_INSTALL_DIR})
++    endif()
++
++    if(NOT SPIRV_TOOLS_INSTALL_DIR)
++        set(SPIRV_TOOLS_INSTALL_DIR $ENV{SPIRV_TOOLS_INSTALL_DIR})
++    endif()
++
+     if (NOT TARGET glslang)
++        if(NOT SPIRV_HEADERS_INSTALL_DIR)
++            message(FATAL_ERROR "Must define location of SPIRV-Headers -- see BUILD.md")
++        endif()
++
+         message(STATUS "Using glslang install located at ${GLSLANG_INSTALL_DIR}")
+         set(GLSLANG_SEARCH_PATH "${GLSLANG_INSTALL_DIR}/lib")
+         set(GLSLANG_DEBUG_SEARCH_PATH "${GLSLANG_INSTALL_DIR}/lib")
+@@ -304,6 +302,34 @@ if(BUILD_TESTS)
+     endif()
+ endif()
+ 
++if(BUILD_TESTS OR BUILD_LAYERS)
++    # spirv-tools
++    if (NOT TARGET SPIRV-Tools)
++        if(NOT SPIRV_TOOLS_INSTALL_DIR)
++            set(SPIRV_TOOLS_INSTALL_DIR "${GLSLANG_INSTALL_DIR}")
++        endif()
++
++        set(SPIRV_HEADERS_INCLUDE_DIR "${SPIRV_HEADERS_INSTALL_DIR}/include" CACHE PATH "Path to spirv-headers")
++        set(SPIRV_TOOLS_BINARY_ROOT "${SPIRV_TOOLS_INSTALL_DIR}/lib"
++            CACHE PATH "User defined path to the SPIRV-Tools binaries for this project")
++        set(SPIRV_TOOLS_OPT_BINARY_ROOT "${SPIRV_TOOLS_INSTALL_DIR}/lib"
++            CACHE PATH "User defined path to the SPIRV-Tools-opt binaries for this project")
++        set(SPIRV_TOOLS_INCLUDE_DIR "${SPIRV_TOOLS_INSTALL_DIR}/include" CACHE PATH "Path to spirv tools headers")
++        set(SPIRV_TOOLS_SEARCH_PATH "${SPIRV_TOOLS_INSTALL_DIR}/lib")
++        set(SPIRV_TOOLS_DEBUG_SEARCH_PATH "${SPIRV_TOOLS_INSTALL_DIR}/lib")
++        set(SPIRV_TOOLS_OPT_SEARCH_PATH "${SPIRV_TOOLS_INSTALL_DIR}/lib")
++        set(SPIRV_TOOLS_OPT_DEBUG_SEARCH_PATH "${SPIRV_TOOLS_INSTALL_DIR}/lib")
++
++        find_library(SPIRV_TOOLS_LIB NAMES SPIRV-Tools HINTS ${SPIRV_TOOLS_SEARCH_PATH})
++        find_library(SPIRV_TOOLS_OPT_LIB NAMES SPIRV-Tools-opt HINTS ${SPIRV_TOOLS_OPT_SEARCH_PATH})
++
++        set(SPIRV_TOOLS_LIBRARIES ${SPIRV_TOOLS_OPT_LIB} ${SPIRV_TOOLS_LIB})
++    else()
++        set(SPIRV_TOOLS_LIBRARIES SPIRV-Tools SPIRV-Tools-opt)
++        set(SPIRV_TOOLS_INCLUDE_DIR "${spirv-tools_SOURCE_DIR}/include" CACHE PATH "Path to spirv tools headers")
++    endif()
++endif()
++
+ # Generate dependent helper files ------------------------------------------------------------------------------------------------
+ 
+ set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/scripts")
+@@ -346,7 +372,7 @@ target_include_directories(VkLayer_utils
+                                   ${VulkanHeaders_INCLUDE_DIR})
+ 
+ if (USE_ROBIN_HOOD_HASHING)
+-    target_link_libraries(VkLayer_utils PUBLIC robin_hood::robin_hood)
++    target_include_directories(VkLayer_utils PUBLIC ${ROBIN_HOOD_HASHING_INCLUDE_DIR})
+     target_compile_definitions(VkLayer_utils PUBLIC USE_ROBIN_HOOD_HASHING)
+ endif()
+ 
+@@ -387,8 +413,37 @@ endif()
+ 
+ if(BUILD_TESTS)
+     # Attempt to enable googletest if available.
+-    find_package(GTest REQUIRED CONFIG)
+-    add_subdirectory(tests ${CMAKE_BINARY_DIR}/tests)
++
++    if(TARGET gtest_main)
++        # Already enabled as a target (perhaps by a project enclosing this one)
++        message(STATUS "Vulkan-ValidationLayers/external: " "googletest already configured - using it")
++    elseif(IS_DIRECTORY "${GOOGLETEST_INSTALL_DIR}")
++        # The googletest directory exists, so enable it as a target.
++        message(STATUS "Vulkan-ValidationLayers/external: " "googletest found - configuring it for tests")
++        set(BUILD_GTEST ON CACHE BOOL "Builds the googletest subproject")
++        set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
++        set(gtest_force_shared_crt ON CACHE BOOL "Link gtest runtimes dynamically")
++        set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
++        # EXCLUDE_FROM_ALL keeps the install target from installing GTEST files.
++        add_subdirectory("${GOOGLETEST_INSTALL_DIR}" ${CMAKE_BINARY_DIR}/googletest)
++    else()
++        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()
++
++    if (WIN32)
++        set_target_properties(gtest PROPERTIES FOLDER ${LAYERS_HELPER_FOLDER})
++        set_target_properties(gtest_main PROPERTIES FOLDER ${LAYERS_HELPER_FOLDER})
++    endif()
++
++    if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
++        set_target_properties(gtest PROPERTIES COMPILE_OPTIONS "-w")
++        set_target_properties(gtest_main PROPERTIES COMPILE_OPTIONS "-w")
++    endif()
++
++    if (BUILD_TESTS)
++        add_subdirectory(tests ${CMAKE_BINARY_DIR}/tests)
++    endif()
+ endif()
+ 
+ if(BUILD_LAYERS OR BUILD_LAYER_SUPPORT_FILES)
+--- layers/CMakeLists.txt.orig	2021-12-21 17:05:00 UTC
++++ layers/CMakeLists.txt
+@@ -269,8 +269,6 @@ if(INSTRUMENT_OPTICK)
+ endif()
+ 
+ if(BUILD_LAYERS)
+-    find_package(SPIRV-Tools REQUIRED CONFIG)
+-    find_package(SPIRV-Tools-opt REQUIRED CONFIG)
+     AddVkLayer(khronos_validation "${KHRONOS_LAYER_COMPILE_DEFINITIONS}"
+         ${CHASSIS_LIBRARY_FILES}
+         ${CORE_VALIDATION_LIBRARY_FILES}
+@@ -298,14 +296,15 @@ if(BUILD_LAYERS)
+ 
+     # Khronos validation additional dependencies
+     target_include_directories(VkLayer_khronos_validation PRIVATE ${GLSLANG_INCLUDE_DIR})
++    target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR})
++    target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
+     if(INSTRUMENT_OPTICK)
+         target_include_directories(VkLayer_khronos_validation PRIVATE ${OPTICK_SOURCE_DIR})
+     endif()
+     if (USE_ROBIN_HOOD_HASHING)
+         target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR})
+     endif()
+-    target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Headers::SPIRV-Headers SPIRV-Tools-static SPIRV-Tools-opt)
+-
++    target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES})
+ 
+     # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled
+     # because the json format uses backslash escapes
+--- scripts/common_ci.py.orig	2021-12-21 17:05:00 UTC
++++ scripts/common_ci.py
+@@ -76,6 +76,16 @@ def BuildVVL(args, build_tests=False):
+     cmake_ver_cmd = 'cmake --version'
+     RunShellCmd(cmake_ver_cmd)
+ 
++    GTEST_DIR = RepoRelative("external/googletest")
++    if not os.path.exists(GTEST_DIR):
++        print("Clone Testing Framework Source Code")
++        clone_gtest_cmd = f'git clone https://github.com/google/googletest.git {GTEST_DIR}'
++        RunShellCmd(clone_gtest_cmd)
++
++        print("Get Specified Testing Source")
++        gtest_checkout_cmd = 'git checkout tags/release-1.8.1'
++        RunShellCmd(gtest_checkout_cmd, GTEST_DIR)
++
+     utils.make_dirs(VVL_BUILD_DIR)
+     print("Run CMake for Validation Layers")
+     cmake_cmd = f'cmake -DUPDATE_DEPS=ON -DCMAKE_BUILD_TYPE={args.configuration.capitalize()} {args.cmake} ..'
+--- scripts/known_good.json.orig	2021-12-21 17:05:00 UTC
++++ scripts/known_good.json
+@@ -43,24 +43,18 @@
+       "name": "robin-hood-hashing",
+       "url": "https://github.com/martinus/robin-hood-hashing.git",
+       "sub_dir": "robin-hood-hashing",
+-      "build_dir": "robin-hood-hashing/build",
+-      "install_dir": "robin-hood-hashing/build/install",
+-      "cmake_options": [
+-        "-DRH_STANDALONE_PROJECT=OFF"
+-      ],
++      "build_dir": "robin-hood-hashing",
++      "install_dir": "robin-hood-hashing",
++      "build_step": "skip",
+       "commit": "3.11.3"
+     },
+     {
+         "name": "googletest",
+         "url": "https://github.com/google/googletest.git",
+         "sub_dir": "googletest",
+-        "build_dir": "googletest/build",
+-        "install_dir": "googletest/build/install",
+-         "cmake_options": [
+-              "-DBUILD_GMOCK=OFF",
+-              "-Dgtest_force_shared_crt=ON",
+-              "-DBUILD_SHARED_LIBS=OFF"
+-        ],
++        "build_dir": "googletest",
++        "install_dir": "googletest",
++        "build_step": "skip",
+         "commit": "release-1.8.1",
+         "optional": ["tests"]
+     }
+--- tests/CMakeLists.txt.orig	2021-12-21 17:05:00 UTC
++++ tests/CMakeLists.txt
+@@ -66,9 +66,6 @@ else()
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
+ 
+-find_package(SPIRV-Tools REQUIRED CONFIG)
+-find_package(SPIRV-Tools-opt REQUIRED CONFIG)
+-
+ set(LIBGLM_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/libs)
+ 
+ set(COMMON_CPP
+@@ -120,16 +117,25 @@ add_executable(vk_layer_validation_tests
+                ${COMMON_CPP})
+ add_test(NAME vk_layer_validation_tests COMMAND vk_layer_validation_tests)
+ add_dependencies(vk_layer_validation_tests VkLayer_khronos_validation VkLayer_khronos_validation-json)
++if(NOT GTEST_IS_STATIC_LIB)
++    set_target_properties(vk_layer_validation_tests PROPERTIES COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
++endif()
++# Note that there is no need to add GTEST directories here due to googletest exporting them via the gtest target.
+ target_include_directories(vk_layer_validation_tests
+                            PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+                                   ${PROJECT_SOURCE_DIR}/layers
+                                   ${PROJECT_SOURCE_DIR}/layers/generated
+                                   ${GLSLANG_INCLUDE_DIR}
++                                  ${SPIRV_TOOLS_INCLUDE_DIR}
++                                  ${SPIRV_HEADERS_INCLUDE_DIR}
+                                   ${CMAKE_CURRENT_BINARY_DIR}
+                                   ${CMAKE_BINARY_DIR}
+                                   ${PROJECT_BINARY_DIR}
+                                   ${VulkanHeaders_INCLUDE_DIR}
+                                   ${PROJECT_BINARY_DIR}/layers)
++if (USE_ROBIN_HOOD_HASHING)
++    target_include_directories(vk_layer_validation_tests PUBLIC ${ROBIN_HOOD_HASHING_INCLUDE_DIR})
++endif()
+ add_dependencies(vk_layer_validation_tests
+                  VkLayer_utils)
+ 
+@@ -151,10 +157,10 @@ endif()
+ # Specify target_link_libraries
+ target_link_libraries(vk_layer_validation_tests
+                       PRIVATE VkLayer_utils
++                              gtest
++                              gtest_main
+                               ${GLSLANG_LIBRARIES}
+-			      SPIRV-Headers::SPIRV-Headers
+-			      SPIRV-Tools-static SPIRV-Tools-opt
+-			      GTest::gtest GTest::gtest_main)
++                              ${SPIRV_TOOLS_LIBRARIES})
+ 
+ if(NOT WIN32)
+     target_link_libraries(vk_layer_validation_tests PRIVATE dl)
+@@ -162,6 +168,16 @@ if(NOT WIN32)
+         target_link_libraries(vk_layer_validation_tests
+                               PRIVATE ${XCB_LIBRARIES}
+                                       ${X11_LIBRARIES})
++    endif()
++endif()
++
++if(WIN32)
++    # For Windows, copy necessary gtest DLLs to the right spot for the vk_layer_tests...
++    if(NOT GTEST_IS_STATIC_LIB)
++        file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/googletest/googletest/$<CONFIG>/*.dll SRC_GTEST_DLLS)
++        file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG> DST_GTEST_DLLS)
++        add_custom_command(TARGET vk_layer_validation_tests POST_BUILD
++                           COMMAND xcopy /Y /I ${SRC_GTEST_DLLS} ${DST_GTEST_DLLS})
+     endif()
+ endif()
+