diff options
author | Nick Sarnie <sarnex@gentoo.org> | 2018-05-26 18:41:38 -0400 |
---|---|---|
committer | Nick Sarnie <sarnex@gentoo.org> | 2018-05-26 18:58:29 -0400 |
commit | bdc8be970a889558893c0ffaf5044bd947a99c52 (patch) | |
tree | 53819ff30d3a812b880256ae244d0b7bb77c9803 /media-libs/vulkan-layers/files | |
parent | dev-util/vulkan-headers: Initial version (diff) | |
download | gentoo-bdc8be970a889558893c0ffaf5044bd947a99c52.tar.gz gentoo-bdc8be970a889558893c0ffaf5044bd947a99c52.tar.bz2 gentoo-bdc8be970a889558893c0ffaf5044bd947a99c52.zip |
media-libs/vulkan-layers: Initial version
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'media-libs/vulkan-layers/files')
-rw-r--r-- | media-libs/vulkan-layers/files/vulkan-layers-Use-a-file-to-get-the-spirv-tools-commit-ID.patch | 40 | ||||
-rw-r--r-- | media-libs/vulkan-layers/files/vulkan-layers-Use-usr-for-vulkan-headers.patch | 57 |
2 files changed, 97 insertions, 0 deletions
diff --git a/media-libs/vulkan-layers/files/vulkan-layers-Use-a-file-to-get-the-spirv-tools-commit-ID.patch b/media-libs/vulkan-layers/files/vulkan-layers-Use-a-file-to-get-the-spirv-tools-commit-ID.patch new file mode 100644 index 000000000000..7688eb8d5cf6 --- /dev/null +++ b/media-libs/vulkan-layers/files/vulkan-layers-Use-a-file-to-get-the-spirv-tools-commit-ID.patch @@ -0,0 +1,40 @@ +From 2bcf0e5097070532ebfb0bf0ee0b28e1065be1e8 Mon Sep 17 00:00:00 2001 +From: Nick Sarnie <sarnex@gentoo.org> +Date: Tue, 22 May 2018 20:11:17 -0400 +Subject: [PATCH] Use a file to get the spirv-tools commit ID + +Signed-off-by: Nick Sarnie <sarnex@gentoo.org> +--- + layers/CMakeLists.txt | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt +index 5b3758d1..2a9c2f32 100644 +--- a/layers/CMakeLists.txt ++++ b/layers/CMakeLists.txt +@@ -51,6 +51,13 @@ macro(run_external_revision_generate symbol_name output) + ) + endmacro() + ++macro(run_external_revision_generate_spirv_tools source_dir symbol_name output) ++ add_custom_command(OUTPUT ${output} ++ COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --rev_file ${source_dir}/spirv-tools-commit.h -s ${symbol_name} -o ${output} ++ DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${source_dir}/spirv-tools-commit.h ++ ) ++endmacro() ++ + # Custom targets for generated validation layer helper file dependencies + add_custom_target(spirv_tools_revision_file DEPENDS + spirv_tools_commit_id.h +@@ -78,7 +85,7 @@ run_vk_xml_generate(helper_file_generator.py vk_object_types.h) + run_vk_xml_generate(helper_file_generator.py vk_extension_helper.h) + run_vk_xml_generate(helper_file_generator.py vk_typemap_helper.h) + if(BUILD_LAYERS) +- run_external_revision_generate(SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h) ++ run_external_revision_generate_spirv_tools(/usr/include/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h) + endif() + + # Layer Utils Library +-- +2.17.0 + diff --git a/media-libs/vulkan-layers/files/vulkan-layers-Use-usr-for-vulkan-headers.patch b/media-libs/vulkan-layers/files/vulkan-layers-Use-usr-for-vulkan-headers.patch new file mode 100644 index 000000000000..a4829d9997a7 --- /dev/null +++ b/media-libs/vulkan-layers/files/vulkan-layers-Use-usr-for-vulkan-headers.patch @@ -0,0 +1,57 @@ +From 42fb7b4c73b0cae196a2eb6d97bfa6cc635f23fb Mon Sep 17 00:00:00 2001 +From: Nick Sarnie <sarnex@gentoo.org> +Date: Sat, 26 May 2018 17:39:08 -0400 +Subject: [PATCH] Use usr for vulkan headers + +Signed-off-by: Nick Sarnie <sarnex@gentoo.org> +--- + CMakeLists.txt | 2 +- + layers/CMakeLists.txt | 5 +++-- + scripts/lvl_genvk.py | 2 +- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 178debdd..dc742304 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + find_package(PythonInterp 3 REQUIRED) + + # TODO: Add option to override this with env var, or even to use SDK +-set(VULKAN_HEADERS_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers") ++set(VULKAN_HEADERS_LOCATION "/usr") + + # Output warning if vulkan headers submodule contents are not present + if (NOT EXISTS "${VULKAN_HEADERS_LOCATION}/include/vulkan/vulkan_core.h") +diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt +index 962c4be6..26e5abaf 100644 +--- a/layers/CMakeLists.txt ++++ b/layers/CMakeLists.txt +@@ -38,8 +38,9 @@ set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/scripts") + # Define macro used for building vkxml generated files + macro(run_vk_xml_generate dependency output) + add_custom_command(OUTPUT ${output} +- COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/lvl_genvk.py -registry ${VULKAN_HEADERS_LOCATION}/registry/vk.xml ${output} +- DEPENDS ${VULKAN_HEADERS_LOCATION}/registry/vk.xml ${VULKAN_HEADERS_LOCATION}/registry/generator.py ${SCRIPTS_DIR}/${dependency} ${SCRIPTS_DIR}/lvl_genvk.py ${VULKAN_HEADERS_LOCATION}/registry/reg.py ++ COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/lvl_genvk.py -registry ${VULKAN_HEADERS_LOCATION}/include/vulkan/registry/vk.xml ${output} ++ DEPENDS ${VULKAN_HEADERS_LOCATION}/include/vulkan/registry/vk.xml ${VULKAN_HEADERS_LOCATION}/include/vulkan/registry/generator.py ${SCRIPTS_DIR}/${dependency} ${SCRIPTS_DIR}/lvl_genvk.py ++${VULKAN_HEADERS_LOCATION}/include/vulkan/registry/reg.py + ) + endmacro() + +diff --git a/scripts/lvl_genvk.py b/scripts/lvl_genvk.py +index 4dac9ca2..6ea83ddb 100644 +--- a/scripts/lvl_genvk.py ++++ b/scripts/lvl_genvk.py +@@ -16,7 +16,7 @@ + + import argparse, cProfile, pdb, string, sys, time, os + scripts_directory_path = os.path.dirname(os.path.abspath(__file__)) +-registry_headers_path = os.path.join(scripts_directory_path, '../Vulkan-Headers/registry') ++registry_headers_path = os.path.join(scripts_directory_path, '/usr/include/vulkan/registry') + sys.path.insert(0, registry_headers_path) + + from reg import * +-- +2.17.0 + |