diff options
author | K900 <me@0upti.me> | 2023-06-23 11:27:41 +0300 |
---|---|---|
committer | K900 <me@0upti.me> | 2023-06-23 12:59:36 +0300 |
commit | 0eb5d95df1e892a0d304c9344488ff5fca1d6e52 (patch) | |
tree | 6d78ef8dbf36f9f592b05e07aeeca15d654c5452 | |
parent | b727077eaaa09e8b3d83556664bc0f164e67b156 (diff) |
vulkan-tools-lunarg: 1.3.249 -> 1.3.250
Diff: https://github.com/LunarG/VulkanTools/compare/v1.3.249...v1.3.250
Apply small hacks to make it build with latest SDK/VVL.
3 files changed, 52 insertions, 3 deletions
diff --git a/pkgs/tools/graphics/vulkan-tools-lunarg/add-missing-macro-definition.patch b/pkgs/tools/graphics/vulkan-tools-lunarg/add-missing-macro-definition.patch new file mode 100644 index 000000000000..4d5717363303 --- /dev/null +++ b/pkgs/tools/graphics/vulkan-tools-lunarg/add-missing-macro-definition.patch @@ -0,0 +1,26 @@ +diff --git a/layersvt/api_dump.h b/layersvt/api_dump.h +index 6e13b6de3..33bee96e7 100644 +--- a/layersvt/api_dump.h ++++ b/layersvt/api_dump.h +@@ -60,6 +60,8 @@ + #include <unordered_set> + #include <utility> + ++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ++ + #ifdef ANDROID + + #include <android/log.h> +diff --git a/layersvt/screenshot.cpp b/layersvt/screenshot.cpp +index b9743371c..6ee65c576 100755 +--- a/layersvt/screenshot.cpp ++++ b/layersvt/screenshot.cpp +@@ -44,6 +44,8 @@ using namespace std; + + #include "screenshot_parsing.h" + ++#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) ++ + #ifdef ANDROID + + #include <android/log.h> diff --git a/pkgs/tools/graphics/vulkan-tools-lunarg/default.nix b/pkgs/tools/graphics/vulkan-tools-lunarg/default.nix index 88058d2caa3b..8dec2e5130e7 100644 --- a/pkgs/tools/graphics/vulkan-tools-lunarg/default.nix +++ b/pkgs/tools/graphics/vulkan-tools-lunarg/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation rec { pname = "vulkan-tools-lunarg"; - version = "1.3.249"; + version = "1.3.250"; src = fetchFromGitHub { owner = "LunarG"; repo = "VulkanTools"; rev = "v${version}"; - hash = "sha256-yQE6tjUxIZEMspxDaO9AoSjoEHQl2eDAc0E/aVQZnxQ="; + hash = "sha256-oI2ITvciuE/f8ojFpIwcH+HnYCasz43nKkER3wJxX+c="; fetchSubmodules = true; }; @@ -81,7 +81,17 @@ stdenv.mkDerivation rec { done ''; - patches = [ ./gtest.patch ]; + patches = [ + # Redefine an internal macro removed in vulkan-validation-layers + # FIXME: remove when fixed upstream + ./add-missing-macro-definition.patch + + # Skip QNX-specific extension causing build failures + # FIXME: remove when fixed upstream + ./skip-qnx-extension.patch + + ./gtest.patch + ]; # Same as vulkan-validation-layers dontPatchELF = true; diff --git a/pkgs/tools/graphics/vulkan-tools-lunarg/skip-qnx-extension.patch b/pkgs/tools/graphics/vulkan-tools-lunarg/skip-qnx-extension.patch new file mode 100644 index 000000000000..777b32f43af4 --- /dev/null +++ b/pkgs/tools/graphics/vulkan-tools-lunarg/skip-qnx-extension.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 209f3ec39..c711af38b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,7 @@ endif() + # Define macro used for building vk.xml generated files + function(run_vulkantools_vk_xml_generate dependency output) + add_custom_command(OUTPUT ${output} +- COMMAND ${PYTHON_CMD} -B ${VULKANTOOLS_SCRIPTS_DIR}/vt_genvk.py -registry ${VULKAN_HEADERS_REGISTRY_DIRECTORY}/vk.xml -scripts ${VULKAN_HEADERS_REGISTRY_DIRECTORY} ${output} ++ COMMAND ${PYTHON_CMD} -B ${VULKANTOOLS_SCRIPTS_DIR}/vt_genvk.py -registry ${VULKAN_HEADERS_REGISTRY_DIRECTORY}/vk.xml -scripts ${VULKAN_HEADERS_REGISTRY_DIRECTORY} ${output} -removeExtensions VK_QNX_external_memory_screen_buffer + DEPENDS ${VULKAN_HEADERS_REGISTRY_DIRECTORY}/vk.xml ${VULKAN_HEADERS_REGISTRY_DIRECTORY}/generator.py ${VULKANTOOLS_SCRIPTS_DIR}/${dependency} ${VULKANTOOLS_SCRIPTS_DIR}/vt_genvk.py ${VULKAN_HEADERS_REGISTRY_DIRECTORY}/reg.py + ) + endfunction() |