git: 3277bda3c8c3 - main - graphics/vulkan-validation-layers: update to 1.3.208
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Mar 2022 19:53:29 UTC
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=3277bda3c8c35bb905a4985919ec017714197ec6 commit 3277bda3c8c35bb905a4985919ec017714197ec6 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2022-03-16 04:06:06 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-03-16 19:52:29 +0000 graphics/vulkan-validation-layers: update to 1.3.208 Changes: https://github.com/KhronosGroup/Vulkan-ValidationLayers/compare/v1.3.206...v1.3.208 Reported by: Repology --- graphics/vulkan-validation-layers/Makefile | 2 +- graphics/vulkan-validation-layers/distinfo | 6 +- .../files/patch-CMakeLists.txt | 23 ++ .../vulkan-validation-layers/files/patch-revert | 325 --------------------- 4 files changed, 27 insertions(+), 329 deletions(-) diff --git a/graphics/vulkan-validation-layers/Makefile b/graphics/vulkan-validation-layers/Makefile index e924b5db4105..b7f6635bda7f 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.3.206 +DISTVERSION= 1.3.208 CATEGORIES= graphics MAINTAINER= jbeich@FreeBSD.org diff --git a/graphics/vulkan-validation-layers/distinfo b/graphics/vulkan-validation-layers/distinfo index ef91fb785f46..a807a0b204bf 100644 --- a/graphics/vulkan-validation-layers/distinfo +++ b/graphics/vulkan-validation-layers/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1645221217 -SHA256 (KhronosGroup-Vulkan-ValidationLayers-v1.3.206_GH0.tar.gz) = fb189c0d68c86af3b31c0f6c48b54480e7150329ffc1e2f37832ea95ecdbc8d1 -SIZE (KhronosGroup-Vulkan-ValidationLayers-v1.3.206_GH0.tar.gz) = 3686452 +TIMESTAMP = 1647403566 +SHA256 (KhronosGroup-Vulkan-ValidationLayers-v1.3.208_GH0.tar.gz) = 63f89902ab524c3e93a1e1ad194aefc210e4f12159a24e10a7d8ab599b9bd4ec +SIZE (KhronosGroup-Vulkan-ValidationLayers-v1.3.208_GH0.tar.gz) = 3904815 SHA256 (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-137-gb42ba6d_GH0.tar.gz) = 44985641ced3c7973adc829714ab650e3ae49a741aad1b287a1c1904841d8a67 SIZE (KhronosGroup-SPIRV-Headers-1.5.4.raytracing.fixed-137-gb42ba6d_GH0.tar.gz) = 417861 SHA256 (martinus-robin-hood-hashing-3.11.3_GH0.tar.gz) = dcf2b7fa9ef9dd0c67102d94c28e8df3effbe1845e0ed1f31f4772ca5e857fc4 diff --git a/graphics/vulkan-validation-layers/files/patch-CMakeLists.txt b/graphics/vulkan-validation-layers/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..3ff257ff0ce6 --- /dev/null +++ b/graphics/vulkan-validation-layers/files/patch-CMakeLists.txt @@ -0,0 +1,23 @@ +CMake Error at CMakeLists.txt:255 (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 2022-03-16 04:06:06 UTC ++++ CMakeLists.txt +@@ -105,6 +105,8 @@ if (ROBIN_HOOD_HASHING_INSTALL_DIR) + #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}) ++ add_library(robin_hood::robin_hood INTERFACE IMPORTED) ++ target_include_directories(robin_hood::robin_hood INTERFACE ${ROBIN_HOOD_HASHING_INSTALL_DIR}/src/include) + endif() + if (SPIRV_HEADERS_INSTALL_DIR) + list(APPEND CMAKE_PREFIX_PATH ${SPIRV_HEADERS_INSTALL_DIR}) diff --git a/graphics/vulkan-validation-layers/files/patch-revert b/graphics/vulkan-validation-layers/files/patch-revert deleted file mode 100644 index 9f7ee4c9bb64..000000000000 --- a/graphics/vulkan-validation-layers/files/patch-revert +++ /dev/null @@ -1,325 +0,0 @@ -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 2022-01-28 00:29:34 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) -@@ -252,17 +238,13 @@ option(BUILD_LAYER_SUPPORT_FILES "Generate layer files - option(USE_ROBIN_HOOD_HASHING "Use robin-hood-hashing" ON) - if (USE_ROBIN_HOOD_HASHING) - if (NOT TARGET robin_hood::robin_hood) -- 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() - endif() - --set(SPIRV_HEADERS_INCLUDE_DIR "" CACHE STRING "") --if(BUILD_LAYERS OR BUILD_TESTS) -- if (SPIRV_HEADERS_INCLUDE_DIR STREQUAL "") -- find_package(SPIRV-Headers REQUIRED CONFIG) -- endif() --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) -@@ -274,7 +256,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") -@@ -309,6 +304,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") -@@ -351,7 +374,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() - -@@ -392,8 +415,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 2022-01-28 00:29:34 UTC -+++ layers/CMakeLists.txt -@@ -270,12 +270,6 @@ if(INSTRUMENT_OPTICK) - endif() - - if(BUILD_LAYERS) -- if (NOT TARGET SPIRV-Tools) -- find_package(SPIRV-Tools REQUIRED CONFIG) -- endif() -- if (NOT TARGET SPIRV-Tools-opt) -- find_package(SPIRV-Tools-opt REQUIRED CONFIG) -- endif() - AddVkLayer(khronos_validation "${KHRONOS_LAYER_COMPILE_DEFINITIONS}" - ${CHASSIS_LIBRARY_FILES} - ${CORE_VALIDATION_LIBRARY_FILES} -@@ -303,19 +297,16 @@ 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() -- if (SPIRV_HEADERS_INCLUDE_DIR STREQUAL "") -- target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Headers::SPIRV-Headers) -- else() -- target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR}) -- endif() - -- target_link_libraries(VkLayer_khronos_validation PRIVATE 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 ---- 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() -