diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2022-02-19 16:58:18 -0500 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2022-02-19 21:09:04 -0500 |
commit | a09c70e699b3a2abdf6b222d79f7db916690d96e (patch) | |
tree | affcfd47a735d3c3473cfd0a9bc0c51786cd5c70 /media-libs/vulkan-layers/files | |
parent | media-libs/vulkan-loader: Version bump (diff) | |
download | gentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.tar.gz gentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.tar.bz2 gentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.zip |
media-libs/vulkan-layers: Version bump
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'media-libs/vulkan-layers/files')
-rw-r--r-- | media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch | 27 | ||||
-rw-r--r-- | media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch | 90 |
2 files changed, 117 insertions, 0 deletions
diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch new file mode 100644 index 000000000000..791ac6764bce --- /dev/null +++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch @@ -0,0 +1,27 @@ +From 68f030f9e776d1f2549e471f40c9794f6056bb05 Mon Sep 17 00:00:00 2001 +From: Nick Sarnie <sarnex@gentoo.org> +Date: Sat, 19 Feb 2022 20:41:44 -0500 +Subject: [PATCH] Dont use static spirv-tools + +Signed-off-by: Nick Sarnie <sarnex@gentoo.org> +--- + layers/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt +index 59e294a07..5d30a9834 100644 +--- a/layers/CMakeLists.txt ++++ b/layers/CMakeLists.txt +@@ -310,7 +310,7 @@ if(BUILD_LAYERS) + target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) + endif() + target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR}) +- target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools-static SPIRV-Tools-opt) ++ target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools SPIRV-Tools-opt) + + + # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled + +-- +2.35.1 + diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch new file mode 100644 index 000000000000..25f3b4bafd27 --- /dev/null +++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch @@ -0,0 +1,90 @@ +From 534810e26e0be782b2c702a97bf726af250b8cd6 Mon Sep 17 00:00:00 2001 +From: Jeremy Gebben <jeremyg@lunarg.com> +Date: Thu, 17 Feb 2022 15:26:25 -0700 +Subject: [PATCH] build: Handle many permutations of SPIRV-Headers locations + +If the SPIRV-Headers package is not found, fall back to looking for +headers in SPIRV_HEADERS_INSTALL_DIR or SPIRV_HEADERS_INCLUDE_DIR. + +Fixes #3765 +--- + CMakeLists.txt | 19 ++++++++++++++++--- + layers/CMakeLists.txt | 7 +------ + tests/CMakeLists.txt | 6 +++--- + 3 files changed, 20 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d4ca786ca07..58a966f03d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -256,10 +256,23 @@ if (USE_ROBIN_HOOD_HASHING) + 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) ++ find_package(SPIRV-Headers CONFIG QUIET) ++ if(SPIRV-Headers_FOUND) ++ # pefer the package if found. Note that if SPIRV_HEADERS_INSTALL_DIR points at an 'installed' ++ # version of SPIRV-Headers, the package will be found. ++ get_target_property(SPIRV_HEADERS_INCLUDE_DIR SPIRV-Headers::SPIRV-Headers INTERFACE_INCLUDE_DIRECTORIES) ++ elseif(SPIRV_HEADERS_INCLUDE_DIR) ++ # This is set by SPIRV-Tools (in parent scope!) and also some packages that include VVL with add_subdirectory ++ if (NOT EXISTS "${SPIRV_HEADERS_INCLUDE_DIR}/spirv/unified1/spirv.h") ++ message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INCLUDE_DIR: ${SPIRV_HEADERS_INCLUDE_DIR}") ++ endif() ++ elseif(SPIRV_HEADERS_INSTALL_DIR) ++ # This is our official variable for setting SPIRV-Headers location, but pointing at the raw source of SPIRV-Headers ++ if (NOT EXISTS "${SPIRV_HEADERS_INSTALL_DIR}/include/spirv/unified1/spirv.h") ++ message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INSTALL_DIR: ${SPIRV_HEADERS_INSTALL_DIR}") ++ endif() ++ set(SPIRV_HEADERS_INCLUDE_DIR "${SPIRV_HEADERS_INSTALL_DIR}/include") + endif() + endif() + +diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt +index 6edcf6eb5ab..59e294a0793 100644 +--- a/layers/CMakeLists.txt ++++ b/layers/CMakeLists.txt +@@ -309,12 +309,7 @@ if(BUILD_LAYERS) + 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_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR}) + target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools-static SPIRV-Tools-opt) + + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 2b98d109b7f..780c0538486 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,6 +1,6 @@ + # ~~~ +-# Copyright (c) 2014-2021 Valve Corporation +-# Copyright (c) 2014-2021 LunarG, Inc. ++# Copyright (c) 2014-2022 Valve Corporation ++# Copyright (c) 2014-2022 LunarG, Inc. + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. +@@ -149,11 +149,11 @@ if (NOT MSVC) + target_compile_options(vk_layer_validation_tests PRIVATE "-Wno-sign-compare") + endif() + ++target_include_directories(vk_layer_validation_tests PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR}) + # Specify target_link_libraries + target_link_libraries(vk_layer_validation_tests + PRIVATE VkLayer_utils + ${GLSLANG_LIBRARIES} +- SPIRV-Headers::SPIRV-Headers + SPIRV-Tools-static SPIRV-Tools-opt + GTest::gtest GTest::gtest_main) + |