From 88c31ae4ba67db109a243fff545a8117514a4b5a Mon Sep 17 00:00:00 2001 From: Cort Stratton Date: Thu, 1 Feb 2018 23:25:21 -0800 Subject: scripts: Fix error if spirv-tools dir had no .git (#2346) external_revision_generator.py generates a UUID for VkValidationCacheEXT objects created by the layers, based on the commit ID of the HEAD revision in the spirv-tools repo used to build those layers. This implicitly required that the spirv-tools source is hosted in a Git repository, which is not the case in all validation layers build environments. The script has been modified to accept *either* a path to a Git working directory to query *or* a path to a file whose contents are SHA1-hashed (if necessary) and treated as the "commit ID" for the project. Call sites for the script in the CMake and Android build paths have been updated to use the --git_dir approach by default, which matches the pre-existing behavior. --- build-android/android-generate.bat | 2 +- build-android/android-generate.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'build-android') diff --git a/build-android/android-generate.bat b/build-android/android-generate.bat index b3982f29..128543a4 100644 --- a/build-android/android-generate.bat +++ b/build-android/android-generate.bat @@ -34,6 +34,6 @@ py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_layer_d py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_extension_helper.h py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml object_tracker.cpp py -3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_typemap_helper.h -py -3 ../../../scripts/external_revision_generator.py ../../third_party/shaderc/third_party/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h +py -3 ../../../scripts/external_revision_generator.py --git_dir ../../third_party/shaderc/third_party/spirv-tools -s SPIRV_TOOLS_COMMIT_ID -o spirv_tools_commit_id.h cd ../.. diff --git a/build-android/android-generate.sh b/build-android/android-generate.sh index 6058f00e..6f97a6ca 100755 --- a/build-android/android-generate.sh +++ b/build-android/android-generate.sh @@ -37,6 +37,6 @@ mkdir -p generated/include generated/common ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_extension_helper.h ) ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml object_tracker.cpp ) ( cd generated/include; python3 ../../../scripts/lvl_genvk.py -registry ../../../scripts/vk.xml vk_typemap_helper.h ) -( cd generated/include; python3 ../../../scripts/external_revision_generator.py ../../third_party/shaderc/third_party/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h ) +( cd generated/include; python3 ../../../scripts/external_revision_generator.py --git_dir ../../third_party/shaderc/third_party/spirv-tools -s SPIRV_TOOLS_COMMIT_ID -o spirv_tools_commit_id.h ) exit 0 -- cgit v1.2.3