From e31c4c2e41544d63d90be28c46e4a4793a624240 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 22 Jun 2023 18:41:17 -0400 Subject: [PATCH 01/19] Update all DEPS except re2 SPIRV-Tools, SPIRV-Headers support SPV_KHR_cooperative_matrix --- DEPS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index c8e0966e6..b82978471 100644 --- a/DEPS +++ b/DEPS @@ -5,13 +5,13 @@ vars = { 'google_git': 'https://github.com/google', 'khronos_git': 'https://github.com/KhronosGroup', - 'abseil_revision': '79ca5d7aad63973c83a4962a66ab07cd623131ea', - 'effcee_revision' : '66edefd2bb641de8a2f46b476de21f227fc03a28', - 'glslang_revision': '9fbc561947f6b5275289a1985676fb7267273e09', - 'googletest_revision': 'd9c309fdab807b716c2cf4d4a42989b8c34f712a', + 'abseil_revision': '34eb767645347f100bdd66fc1e35eee96e357961', + 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', + 'glslang_revision': '9575e33186c74a68831c469f7271edf386ea43a5', + 'googletest_revision': 'ec4fed93217bc2830959bb8e86798c1d86956949', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'bdbfd019be6952fd8fa9bd5606a8798a7530c853', - 'spirv_tools_revision': 'e7c6084fd1d6d6f5ac393e842728d8be309688ca', + 'spirv_headers_revision': '3469b164e25cee24435029a569933cb42578db5d', + 'spirv_tools_revision': '04cdb2d344706052c7a2d359294e830ebac63e74', } deps = { From 0dbf443070aa5f2f9e34c55258908a539d2564f5 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 10 Jul 2023 07:29:23 -0700 Subject: [PATCH 02/19] Use android ndk r25 (#1341) We currently use R21 of the Android NDK for our tests. There have been to LTS release since that one, and we do not expect people to use it anymore. Also, it contains Python 2.7, not Python3. The python scripts in SPIR-V Tools expect Python 3, so we have to update. We chose the latest LTS release. --- kokoro/android-release/build-docker.sh | 2 +- kokoro/ndk-build/build-docker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kokoro/android-release/build-docker.sh b/kokoro/android-release/build-docker.sh index b05e6e740..f5dbf1025 100755 --- a/kokoro/android-release/build-docker.sh +++ b/kokoro/android-release/build-docker.sh @@ -27,7 +27,7 @@ set -x using cmake-3.17.2 using ninja-1.10.0 -using ndk-r21d # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir +using ndk-r25c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir cd $ROOT_DIR ./utils/git-sync-deps diff --git a/kokoro/ndk-build/build-docker.sh b/kokoro/ndk-build/build-docker.sh index e86cc37a3..12d178be1 100755 --- a/kokoro/ndk-build/build-docker.sh +++ b/kokoro/ndk-build/build-docker.sh @@ -40,7 +40,7 @@ function clean_dir() { # Get source for dependencies, as specified in the DEPS file /usr/bin/python3 utils/git-sync-deps --treeless -using ndk-r21d +using ndk-r25c clean_dir "$ROOT_DIR/build" cd "$ROOT_DIR/build" From 531f2ece9c644b65c482431d693fb12fd1a32884 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Mon, 17 Jul 2023 14:11:27 -0700 Subject: [PATCH 03/19] Update Android NDK version in the README. (#1342) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6031327e..5bd89c1f0 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Shaderc has been shipping in the [Android NDK](https://developer.android.com/ndk/index.html) since version r12b. (The NDK build uses sources from https://android.googlesource.com/platform/external/shaderc/. Those repos are downstream from GitHub.) -We currently require r21d. +We currently require r25c. For licensing terms, please see the [`LICENSE`](LICENSE) file. If interested in contributing to this project, please see [`CONTRIBUTING.md`](CONTRIBUTING.md). From 3d8559976aa08549d34a649a8621b167e5609b21 Mon Sep 17 00:00:00 2001 From: Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:35:09 -0600 Subject: [PATCH 04/19] Fix MSVC runtime library linking in CMake (#1339) 3.15 no longer appends /MD to the C_FLAGS and CXX_FLAGS by default when using the policy CMP0091 with the new behavior. This breaks any existing CMake code which searched for "/MD" to replace it with "/MT", as the flags no longer contain /MD. The fix is to use the new property MSVC_RUNTIME_LIBRARY so that all targets are configured correctly. Co-authored-by: David Neto --- CMakeLists.txt | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 633c2448d..075641e4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,6 @@ cmake_minimum_required(VERSION 3.17.2) -if (POLICY CMP00091) - # Enable MSVC Runtime Library Property - cmake_policy(SET CMP0091 NEW) -endif() - project(shaderc) enable_testing() @@ -114,17 +109,12 @@ add_custom_target(add-copyright if(MSVC) option(SHADERC_ENABLE_SHARED_CRT "Use the shared CRT instead of the static CRT" - ${SHADERC_ENABLE_SHARED_CRT}) - if (NOT SHADERC_ENABLE_SHARED_CRT) - # Link executables statically by replacing /MD with /MT everywhere. - foreach(flag_var - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if(${flag_var} MATCHES "/MD") - string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - endif(${flag_var} MATCHES "/MD") - endforeach(flag_var) - endif(NOT SHADERC_ENABLE_SHARED_CRT) + OFF) + if (SHADERC_ENABLE_SHARED_CRT) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + else() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + endif() endif(MSVC) From fe8d18eba1d073d85ed80b81beabe45138053c89 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Jul 2023 14:42:22 -0400 Subject: [PATCH 05/19] MSVC 2017 debug build requires /bigobj for SPIRV-Tools test_opt (#1346) Fixes: #1345 --- third_party/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 700f472db..a01f31eaf 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -65,6 +65,16 @@ if (NOT TARGET SPIRV-Tools) add_subdirectory(${SHADERC_EFFCEE_DIR} effcee) endif() add_subdirectory(${SHADERC_SPIRV_TOOLS_DIR} spirv-tools) + if (NOT "${SPIRV_SKIP_TESTS}") + if (MSVC) + if (${MSVC_VERSION} LESS 1920) + # VS 2017 requires /bigobj on test_opt + # https://github.com/google/shaderc/issues/1345 + # https://github.com/KhronosGroup/SPIRV-Tools/issues/5335 + target_compile_options(test_opt PRIVATE /bigobj) + endif() + endif() + endif() endif() if (NOT TARGET SPIRV-Tools) message(FATAL_ERROR "SPIRV-Tools was not found - required for compilation") From e70e88caf7f9eb77c63f14266f862b1e4ef141d3 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Jul 2023 15:27:12 -0400 Subject: [PATCH 06/19] Update DEPS (#1344) SPIRV-Tools v2023.4.rc1 plus two commits PR #5334 #5326 GitHub main on 2023-07-18 for: Glslang SPIRV-Headers googletest abseil --- DEPS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index b82978471..a72e83643 100644 --- a/DEPS +++ b/DEPS @@ -5,13 +5,13 @@ vars = { 'google_git': 'https://github.com/google', 'khronos_git': 'https://github.com/KhronosGroup', - 'abseil_revision': '34eb767645347f100bdd66fc1e35eee96e357961', + 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '9575e33186c74a68831c469f7271edf386ea43a5', - 'googletest_revision': 'ec4fed93217bc2830959bb8e86798c1d86956949', + 'glslang_revision': 'd5f3ad6c9a996fcf944a7eac29a818f4583c55b0', + 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '3469b164e25cee24435029a569933cb42578db5d', - 'spirv_tools_revision': '04cdb2d344706052c7a2d359294e830ebac63e74', + 'spirv_headers_revision': 'f1ba373ef03752ee9f6f2b898bea1213f93e1ef2', + 'spirv_tools_revision': '6bd5a665ba0529747af3a0bc808732b7e78f48', } deps = { From 41e7ee7212e6eaa650cd7391c596e9fa4f1653b4 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Jul 2023 17:16:34 -0400 Subject: [PATCH 07/19] Make release candidate v2023.5-rc1 (#1347) * Update DEPS: include SPIRV-Toole PR 5334 Fixes VS2017 debug build with std::min * Make release candidate v2023.5-rc1 Also teach the build version extractor to understand [\.-]rc\d+ suffices. --- CHANGES | 6 +++++- DEPS | 2 +- utils/update_build_version.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 43bedcfd4..d72242528 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,11 @@ Revision history for Shaderc -v2023.5-dev 2022-05-24 +v2023.5-rc1 2022-07-18 + - Update dependencies + - Update to Android NDK r25c + - Update Android API level for test project (#1333) - For testing, add a dependency on Abseil's C++ library + - Fix MSVC runtime library linking in CMake (#1339) v2023.4 2022-05-24 - Refresh Glslang, SPIRV-Tools, SPIRV-Headers diff --git a/DEPS b/DEPS index a72e83643..0571e8059 100644 --- a/DEPS +++ b/DEPS @@ -11,7 +11,7 @@ vars = { 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', 'spirv_headers_revision': 'f1ba373ef03752ee9f6f2b898bea1213f93e1ef2', - 'spirv_tools_revision': '6bd5a665ba0529747af3a0bc808732b7e78f48', + 'spirv_tools_revision': '6c7e1acc5f9921b9a609dce62f30620bd6855764', } deps = { diff --git a/utils/update_build_version.py b/utils/update_build_version.py index 578539079..11ee53e02 100755 --- a/utils/update_build_version.py +++ b/utils/update_build_version.py @@ -75,7 +75,7 @@ def deduce_software_version(directory): # Allow trailing whitespace in the checked-out source code has # unexpected carriage returns on a linefeed-only system such as # Linux. - pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$') + pattern = re.compile(r'^(v\d+\.\d+(-dev|[\.-]rc\d+)?) \d\d\d\d-\d\d-\d\d\s*$') changes_file = os.path.join(directory, 'CHANGES') with open(changes_file, errors='replace') as f: for line in f.readlines(): From aad90eb36db6942c6825afbbf48e06c39f1f6d23 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Jul 2023 18:49:57 -0400 Subject: [PATCH 08/19] Update Glslang in DEPS (#1348) Up to https://github.com/KhronosGroup/glslang/pull/3264 - Fix Android build for r25 NDK --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0571e8059..1a54d50a3 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': 'd5f3ad6c9a996fcf944a7eac29a818f4583c55b0', + 'glslang_revision': 'a9a262541601fd08cc30a9a449dc7fba82303980', 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', 'spirv_headers_revision': 'f1ba373ef03752ee9f6f2b898bea1213f93e1ef2', From 5b892551dd02bbf8704adbc3fcde2fd645f333b2 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 19 Jul 2023 16:45:14 -0400 Subject: [PATCH 09/19] Finalize Shaderc v2023.5 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d72242528..2177bb15a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Revision history for Shaderc -v2023.5-rc1 2022-07-18 +v2023.5 2022-07-19 - Update dependencies - Update to Android NDK r25c - Update Android API level for test project (#1333) From 7203cf25bf3475a885e851683145d396baec113a Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 19 Jul 2023 16:46:05 -0400 Subject: [PATCH 10/19] Start Shaderc v2023.6 development --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 2177bb15a..43b6e821d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2023.6-dev 2022-07-19 + - Start Shaderc v2023.6 + v2023.5 2022-07-19 - Update dependencies - Update to Android NDK r25c From 1696324e8e08779743b76bac45679d07a2ff4156 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 19 Jul 2023 18:34:54 -0400 Subject: [PATCH 11/19] Update DEPS: SPIRV-Tools, Glslang, SPIRV-Headers Notably, this will build standalone 'glslang' and where possible, 'glslangValidator' is a symlink to 'glslang' --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 1a54d50a3..10fcabad3 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': 'a9a262541601fd08cc30a9a449dc7fba82303980', + 'glslang_revision': '9b1a0f4d3e054d9b21ae584a20c06c98628c3015', 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'f1ba373ef03752ee9f6f2b898bea1213f93e1ef2', - 'spirv_tools_revision': '6c7e1acc5f9921b9a609dce62f30620bd6855764', + 'spirv_headers_revision': '14914db17a1fc16e06c4e49e5353bb80b3267e9c', + 'spirv_tools_revision': '883417544b594850d59c11caf18cd7286c968b9b', } deps = { From 7754fcd8ba5c0d0f5ecccab8429493ccdc8b8d95 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 19 Jul 2023 18:47:17 -0400 Subject: [PATCH 12/19] Build target was renamed from glslangValidator to glslang-standalone --- kokoro/android-release/build-docker.sh | 2 +- kokoro/linux/build-docker.sh | 2 +- kokoro/macos/build.sh | 2 +- kokoro/windows/build.bat | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kokoro/android-release/build-docker.sh b/kokoro/android-release/build-docker.sh index f5dbf1025..8bd5215f5 100755 --- a/kokoro/android-release/build-docker.sh +++ b/kokoro/android-release/build-docker.sh @@ -49,7 +49,7 @@ cmake \ -DANDROID_NDK=$ANDROID_NDK_HOME .. echo $(date): Build glslang... -ninja glslangValidator +ninja glslang-standalone echo $(date): Build everything... ninja diff --git a/kokoro/linux/build-docker.sh b/kokoro/linux/build-docker.sh index d91af15de..003c86e52 100755 --- a/kokoro/linux/build-docker.sh +++ b/kokoro/linux/build-docker.sh @@ -69,7 +69,7 @@ echo $(date): Starting build... cmake -GNinja -DCMAKE_INSTALL_PREFIX=$KOKORO_ARTIFACTS_DIR/install -DRE2_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=$BUILD_TYPE $ADDITIONAL_CMAKE_FLAGS .. echo $(date): Build glslang... -ninja glslangValidator +ninja glslang-standalone echo $(date): Build everything... ninja diff --git a/kokoro/macos/build.sh b/kokoro/macos/build.sh index 6383e8c1a..c39c9b45d 100644 --- a/kokoro/macos/build.sh +++ b/kokoro/macos/build.sh @@ -43,7 +43,7 @@ echo $(date): Starting build... cmake -GNinja -DCMAKE_INSTALL_PREFIX=$KOKORO_ARTIFACTS_DIR/install -DRE2_BUILD_TESTING=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. echo $(date): Build glslang... -ninja glslangValidator +ninja glslang-standalone echo $(date): Build everything... ninja diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index 7483af381..a87cfea65 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -59,7 +59,7 @@ cmake %CMAKE_FLAGS% .. if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% echo "Build glslang... %DATE% %TIME%" -ninja glslangValidator +ninja glslang-standalone if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% echo "Build everything... %DATE% %TIME%" From 4d98dac61ee4857ea0691a2b9a48aee44eb409db Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 19 Jul 2023 18:56:11 -0400 Subject: [PATCH 13/19] Add kokoro/linux/presubmit_mingw_release.cfg This was mistakenly absent. --- kokoro/linux/presubmit_mingw_release.cfg | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 kokoro/linux/presubmit_mingw_release.cfg diff --git a/kokoro/linux/presubmit_mingw_release.cfg b/kokoro/linux/presubmit_mingw_release.cfg new file mode 100644 index 000000000..bfc53adc0 --- /dev/null +++ b/kokoro/linux/presubmit_mingw_release.cfg @@ -0,0 +1,16 @@ +# Copyright (C) 2017 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Presubmit build configuration. +build_file: "shaderc/kokoro/linux/build_mingw_release.sh" From 39aa522785f130130927cd4766a37e8813af6d66 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 8 Aug 2023 11:59:07 -0400 Subject: [PATCH 14/19] Finalize v2023.6 --- CHANGES | 14 +++++++------- DEPS | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 43b6e821d..a6ffc479d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,16 +1,16 @@ Revision history for Shaderc -v2023.6-dev 2022-07-19 - - Start Shaderc v2023.6 +v2023.6 2023-08-09 + - Update dependencies, including SPIRV-Tools v2023.4.rc2 -v2023.5 2022-07-19 +v2023.5 2023-07-19 - Update dependencies - Update to Android NDK r25c - Update Android API level for test project (#1333) - For testing, add a dependency on Abseil's C++ library - Fix MSVC runtime library linking in CMake (#1339) -v2023.4 2022-05-24 +v2023.4 2023-05-24 - Refresh Glslang, SPIRV-Tools, SPIRV-Headers - Android.mk: - Require NDK 21d or later @@ -19,16 +19,16 @@ v2023.4 2022-05-24 - glslc and APIs: - Add options to control mesh shading limits -v2023.3 2022-03-17 +v2023.3 2023-03-17 - Shaderc now requires C++17 - Drop support for VS 2015 - Add glslc option -fpreserve-bindings - Refresh Glslang, SPIRV-Tools -v2023.2 2022-01-18 +v2023.2 2023-01-18 - Update DEPS to pull in SPIRV-Tools bugfix #5049 -v2023.1 2022-01-13 +v2023.1 2023-01-13 - General/Build - Removed support for GCC-based code coverage builds - Update minimum CMake to 3.17.2 diff --git a/DEPS b/DEPS index 10fcabad3..fba14db21 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '9b1a0f4d3e054d9b21ae584a20c06c98628c3015', + 'glslang_revision': '76b52ebf77833908dc4c0dd6c70a9c357ac720bd', 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '14914db17a1fc16e06c4e49e5353bb80b3267e9c', - 'spirv_tools_revision': '883417544b594850d59c11caf18cd7286c968b9b', + 'spirv_headers_revision': '124a9665e464ef98b8b718d572d5f329311061eb', + 'spirv_tools_revision': 'e553b884c7c9febaa4e52334f683641fb5f196a0', } deps = { From 113b9e3fc949b72609d4368b817e10534a087188 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 9 Aug 2023 11:26:26 -0400 Subject: [PATCH 15/19] Start v2026.7-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index a6ffc479d..2cd55c574 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2023.7-dev 2023-08-09 + - Start v2023.7 development + v2023.6 2023-08-09 - Update dependencies, including SPIRV-Tools v2023.4.rc2 From 6e2416a6a0f4693ef12298058c3ad8062a0d8d79 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 9 Aug 2023 12:21:03 -0400 Subject: [PATCH 16/19] Update README.md: Need a C++17 compiler --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5bd89c1f0..b2907f0e1 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ API in your project. For building, testing, and profiling Shaderc, the following tools should be installed regardless of your OS: +- A C++17 compiler. Recent versions of Clang, GCC, and MSVC work. - [CMake](http://www.cmake.org/) 3.14 or later: for generating compilation targets. - Shaderc is tested with cmake 3.17.2 - [Python 3](http://www.python.org/): for utility scripts and running the test suite. @@ -174,6 +175,7 @@ installed regardless of your OS: On Linux, if cross compiling to Windows: - [`mingw`](http://www.mingw.org): A GCC-based cross compiler targeting Windows so that generated executables use the Microsoft C runtime libraries. + The MinGW compiler must support C++17. On Windows, the following tools should be installed and available on your path: From 59c19bda9151bd082105f0e9119c279370b415d6 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 9 Aug 2023 12:23:52 -0400 Subject: [PATCH 17/19] Remove redundant gtest compile flags for MinGW When compiling with MinGW, we no longer need to use -Dgtest_disable_pthreads=ON. See https://github.com/google/googletest/pull/856 and https://github.com/google/googletest/pull/721 --- README.md | 5 +---- kokoro/linux/build-docker.sh | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b2907f0e1..3f54dedd0 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,11 @@ ctest -C {Release|Debug|MinSizeRel|RelWithDebInfo} ``` 4c) Or build with MinGW on Linux for Windows: -(Skip building threaded unit tests due to -[Googletest bug 606](https://github.com/google/googletest/issues/606)) ```sh cd $BUILD_DIR cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} $SOURCE_DIR \ - -DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/linux-mingw-toolchain.cmake \ - -Dgtest_disable_pthreads=ON + -DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/linux-mingw-toolchain.cmake ninja ``` diff --git a/kokoro/linux/build-docker.sh b/kokoro/linux/build-docker.sh index 003c86e52..7d71b6123 100755 --- a/kokoro/linux/build-docker.sh +++ b/kokoro/linux/build-docker.sh @@ -53,7 +53,7 @@ then ADDITIONAL_CMAKE_FLAGS="-DDISABLE_EXCEPTIONS=ON -DDISABLE_RTTI=ON" elif [ $CONFIG = "RELEASE_MINGW" ] then - ADDITIONAL_CMAKE_FLAGS="-Dgtest_disable_pthreads=ON -DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake" + ADDITIONAL_CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake" SKIP_TESTS="True" fi From 171b8d0a6eac01abf597d00fc4a012a5003b9f4a Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 9 Aug 2023 17:24:02 -0400 Subject: [PATCH 18/19] Adapt test to different error message from SPIRV-Tools Update SPIRV-Tools The SPIRV-Tools message has changed, for the case when a capability was used that is not appropriate to the current target environment. --- DEPS | 2 +- libshaderc/src/shaderc_cpp_test.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fba14db21..0684ff24b 100644 --- a/DEPS +++ b/DEPS @@ -11,7 +11,7 @@ vars = { 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', 'spirv_headers_revision': '124a9665e464ef98b8b718d572d5f329311061eb', - 'spirv_tools_revision': 'e553b884c7c9febaa4e52334f683641fb5f196a0', + 'spirv_tools_revision': '8e3da01b45806fbacbb9e6fce9c5f9ae49f60e42', } deps = { diff --git a/libshaderc/src/shaderc_cpp_test.cc b/libshaderc/src/shaderc_cpp_test.cc index 31667044c..9cb5e3cbe 100644 --- a/libshaderc/src/shaderc_cpp_test.cc +++ b/libshaderc/src/shaderc_cpp_test.cc @@ -545,7 +545,8 @@ TEST_F(CppInterface, CompileAndOptimizeForVulkan10Failure) { // TODO(antiagainst): the error message can be improved to be more // explicit regarding Vulkan 1.1 HasSubstr("compilation succeeded but failed to optimize: " - "Invalid capability operand")); + "Capability GroupNonUniform is not allowed by Vulkan " + "1.0 specification (or requires extension)")); } TEST_F(CppInterface, CompileAndOptimizeForVulkan11Success) { From e166325b24d79d64bfa47065328890ce116ea642 Mon Sep 17 00:00:00 2001 From: Natalie Chouinard <1953083+sudonatalie@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:25:29 -0400 Subject: [PATCH 19/19] Add a workflow to automatically roll DEPS (#1358) * Add a workflow to automatically roll DEPS Create a GitHub action that syncs all git dependencies, rolls all entries in DEPS to tip-of-tree and commits, then uploads a new GitHub pull request with a trigger to automatically run kokoro tests. The roll-deps script has been updated to not return an error when there are no new commits for a repository. Both the autoroll.yml script and changes to utils/roll-deps are modeled after the scripts in KhronosGroup/SPIRV-Tools. * Update .github/workflows/autoroll.yml Co-authored-by: Steven Perron --------- Co-authored-by: Steven Perron --- .github/workflows/autoroll.yml | 66 ++++++++++++++++++++++++++++++++++ utils/roll-deps | 44 ++++++++++++----------- 2 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/autoroll.yml diff --git a/.github/workflows/autoroll.yml b/.github/workflows/autoroll.yml new file mode 100644 index 000000000..e55cecb70 --- /dev/null +++ b/.github/workflows/autoroll.yml @@ -0,0 +1,66 @@ +# Copyright 2023 The Shaderc Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,s either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Update dependencies +permissions: + contents: read + +on: + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + +jobs: + update-dependencies: + permissions: + contents: write + pull-requests: write + name: Update dependencies + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + # Checkout the depot tools they are needed by roll_deps.sh + - name: Checkout depot tools + run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + + - name: Update PATH + run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH + + - name: Download dependencies + run: python3 utils/git-sync-deps + + - name: Setup git user information + run: | + git config user.name "GitHub Actions[bot]" + git config user.email "<>" + git checkout -b roll_deps + + - name: Update dependencies + run: | + utils/roll-deps + if [[ `git diff HEAD..origin/main --name-only | wc -l` == 0 ]]; then + echo "changed=false" >> $GITHUB_OUTPUT + else + echo "changed=true" >> $GITHUB_OUTPUT + fi + id: update_dependencies + - name: Push changes and create PR + if: steps.update_dependencies.outputs.changed == 'true' + run: | + git push --force --set-upstream origin roll_deps + gh pr create --label 'kokoro:run' --base main -f || true + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/utils/roll-deps b/utils/roll-deps index f579efc6a..8f145c9a9 100755 --- a/utils/roll-deps +++ b/utils/roll-deps @@ -18,18 +18,23 @@ # # Depends on roll-dep from depot_path being in PATH. -effcee_dir="third_party/effcee/" -effcee_trunk="origin/main" -glslang_dir="third_party/glslang/" -glslang_trunk="origin/main" -googletest_dir="third_party/googletest/" -googletest_trunk="origin/master" -re2_dir="third_party/re2/" -re2_trunk="origin/main" -spirv_headers_dir="third_party/spirv-headers/" -spirv_headers_trunk="origin/main" -spirv_tools_dir="third_party/spirv-tools/" -spirv_tools_trunk="origin/main" +set -eo pipefail + +function ExitIfIsInterestingError() { + local return_code=$1 + if [[ ${return_code} -ne 0 && ${return_code} -ne 2 ]]; then + exit ${return_code} + fi + return 0 +} + +dependencies=("third_party/effcee/" + "third_party/glslang/" + "third_party/googletest/" + "third_party/re2/" + "third_party/spirv-headers/" + "third_party/spirv-tools/") +branch="origin/main" # This script assumes it's parent directory is the repo root. repo_path=$(dirname "$0")/.. @@ -41,13 +46,12 @@ if [[ $(git diff --stat) != '' ]]; then exit 1 fi -old_head=$(git rev-parse HEAD) +echo "*** Ignore messages about running 'git cl upload' ***" -roll-dep --ignore-dirty-tree --roll-to="${effcee_trunk}" "${effcee_dir}" -roll-dep --ignore-dirty-tree --roll-to="${glslang_trunk}" "${glslang_dir}" -roll-dep --ignore-dirty-tree --roll-to="${googletest_trunk}" "${googletest_dir}" -roll-dep --ignore-dirty-tree --roll-to="${re2_trunk}" "${re2_dir}" -roll-dep --ignore-dirty-tree --roll-to="${spirv_headers_trunk}" "${spirv_headers_dir}" -roll-dep --ignore-dirty-tree --roll-to="${spirv_tools_trunk}" "${spirv_tools_dir}" +set +e -git rebase --interactive "${old_head}" +for dep in ${dependencies[@]}; do + echo "Rolling $dep" + roll-dep --ignore-dirty-tree --roll-to="${branch}" "${dep}" + ExitIfIsInterestingError $? +done