From 03732bf41de4ef41aae38c988d3b3bd78cdb1fd4 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 25 Jul 2023 11:58:49 -0400 Subject: [PATCH 001/117] cmake: Remove redundant -std=c++11 flag This is already covered by the CMAKE_CXX_STANDARD directive --- cmake/utils.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index d64757dd6..e9475b9cf 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -59,7 +59,6 @@ endfunction(shaderc_default_c_compile_options) function(shaderc_default_compile_options TARGET) shaderc_default_c_compile_options(${TARGET}) if (NOT "${MSVC}") - target_compile_options(${TARGET} PRIVATE -std=c++11) if (NOT SHADERC_ENABLE_SHARED_CRT) if (WIN32) # For MinGW cross compile, statically link to the C++ runtime. From 2f512f4727189f96d56df7b9111e3962dfe9bfb6 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 27 Sep 2023 12:27:09 -0400 Subject: [PATCH 002/117] ndk-build: Require C++17 (#1373) --- libshaderc/Android.mk | 4 ++-- libshaderc_util/Android.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libshaderc/Android.mk b/libshaderc/Android.mk index 294af69f8..a4827305a 100644 --- a/libshaderc/Android.mk +++ b/libshaderc/Android.mk @@ -23,7 +23,7 @@ LOCAL_SRC_FILES:=src/shaderc.cc # or delegates that responsibility to SPIRV-Tools' Android.mk. LOCAL_C_INCLUDES:=$(LOCAL_PATH)/include $(SPVHEADERS_LOCAL_PATH)/include LOCAL_STATIC_LIBRARIES:=shaderc_util SPIRV-Tools-opt -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -DENABLE_HLSL=1 -LOCAL_EXPORT_CPPFLAGS:=-std=c++11 +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -DENABLE_HLSL=1 +LOCAL_EXPORT_CPPFLAGS:=-std=c++17 LOCAL_EXPORT_LDFLAGS:=-latomic include $(BUILD_STATIC_LIBRARY) diff --git a/libshaderc_util/Android.mk b/libshaderc_util/Android.mk index ade568ca3..9642e254d 100644 --- a/libshaderc_util/Android.mk +++ b/libshaderc_util/Android.mk @@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:=shaderc_util -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -DENABLE_HLSL=1 +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -DENABLE_HLSL=1 LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH)/include LOCAL_SRC_FILES:=src/args.cc \ src/compiler.cc \ From 00defdd7b98737565fe690d24981a47eeb40ff1c Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 27 Sep 2023 13:14:08 -0400 Subject: [PATCH 003/117] Roll deps & fix tests (#1372) * Roll deps Roll third_party/glslang/ 76b52ebf7..2bfacdac9 (28 commits) https://github.com/KhronosGroup/glslang/compare/76b52ebf7783...2bfacdac91d5 $ git log 76b52ebf7..2bfacdac9 --date=short --no-merges --format='%ad %ae %s' 2023-09-22 chirsz Improve preprocessor ouput format 2023-08-17 nathaniel Add --no-link option 2023-09-18 49699333+dependabot[bot] Bump github/codeql-action from 2.21.5 to 2.21.7 2023-09-15 nathaniel Fix segfault with atomic arg check 2023-09-10 rex.xu Use std::variant to represent TSpirvTypeParameter 2023-09-11 90873047+sajjadmirzanv Emit correct nonsemantic debug info for explicitly sized types 2023-09-11 49699333+dependabot[bot] Bump actions/upload-artifact from 3.1.2 to 3.1.3 2023-09-11 49699333+dependabot[bot] Bump actions/checkout from 3.6.0 to 4.0.0 2023-09-11 joycebrum Add license to dependabot.yml 2023-09-11 nathaniel Add a generic texel fetch test 2023-09-08 nathaniel Fix textureOffset overload 2023-08-21 arcady kokoro: explicitly set ENABLE_OPT=0 in cmake builds 2023-08-09 arcady cmake: add more verbose messages if SPIRV-Tools is not found 2023-08-23 nathaniel Use temporary parser for mangled names 2023-08-11 nathaniel Add GL_EXT_texture_shadow_lod support 2023-08-23 ralf.habacker Revert "CMake: Make glslang-default-resource-limits STATIC" 2023-08-29 joycebrum Squashed changes about hash pin and dependabot 2023-08-22 nathaniel Fix ByteAddressBuffer as function parameter 2023-08-21 silverclaw Fix ODR violations 2023-08-23 jeremy Update CHANGES for release 13.0.0 2023-08-21 quic_wooykim extension: GL_QCOM_image_processing support 2023-08-18 joycebrum Add badge to README.md 2023-08-18 joycebrum Create scorecard.yml 2023-08-18 nathaniel Fix CI build badge 2023-08-17 sven.vanhaastregt cmake: Don't link SPVRemapper into glslang executable 2023-08-18 silverclaw [cmake] Use CMake property for symbol visibility 2023-03-03 kasper93 Look for external SPIR-V Tools build, if not building in-tree 2023-07-05 rex.xu Spirv_intrinsics: Remove early return in layoutTypeCheck Created with: roll-dep third_party/glslang Roll third_party/googletest/ c541e7c11..e47544ad3 (46 commits) https://github.com/google/googletest/compare/c541e7c11044...e47544ad31cb $ git log c541e7c11..e47544ad3 --date=short --no-merges --format='%ad %ae %s' 2023-09-25 absl-team Resolve `-Wundef` triggering on `GTEST_CREATE_SHARED_LIBRARY` and `GTEST_LINKED_AS_SHARED_LIBRARY` with shared libraries in GoogleTest 2023-09-22 absl-team Update C++ feature detection in `gtest-port.h` to rely on feature test macros where possible. 2023-09-21 absl-team Use `absl::HasAbslStringify`, instead of the internal version. 2023-09-21 dinor googletest: Update absl to version with HasAbslStringify 2023-09-21 mitja Fix compile warnings in gmock-function-mocker.h 2023-09-18 absl-team Update code with IWYU annotations. 2023-09-18 absl-team Use the `empty()` method to check for emptiness instead of `length()` 2023-09-14 hirshleifer GoogleTest FAQ: minor punctuation fixes 2023-09-14 hirshleifer Remove Googletest FAQ entry for obsolete `ProtocolMessageEquals` and `ProtocolMessageEquiv` 2023-09-03 tanzinul.islam Count threads after thread-creation while still holding mutex lock 2023-08-26 tanzinul.islam Reuse TempDir() function 2023-08-25 dinor googletest: Add universal printer for `std::span` 2023-08-22 sch changed http to https 2023-08-22 dinor googletest: Replace http with https in links to docs 2023-08-21 dmauro CI: Update the Linux hybrid-latest docker container used for testing 2023-08-21 absl-team Clean up typos: Exhaused => Exhausted 2023-08-20 elior.s Update advanced.md 2023-08-18 tanzinul.islam Prefer $TMPDIR to /data/local/tmp on Android 2023-08-17 absl-team Improve error message for invalid parameterized test names. 2023-07-26 patryk googletest: ansi color fix 2023-08-15 dinor gtest_help_test: Make method names `snake_case`, conforming with [the style guide](https://google.github.io/styleguide/pyguide#316-naming) 2023-08-15 dinor gtest_help_test: Inline test helper functions 2023-08-15 dinor gtest_help_test: Delete obsolete helper `TestUnknownFlagWithAbseil` 2023-08-11 sch Changed 2 public links from http to https 2023-08-11 sch Changed 3 public links from http to https 2023-08-11 sch Changed 2 public links from http to https 2023-08-11 sch Changed 3 public links from http to https 2023-08-10 absl-team Specify SetUpTestSuite is required to be public. 2023-08-07 yaneurabeya Fix RETest/1.ImplicitConstructorWorks on non-ABSL platforms 2023-08-07 yaneurabeya Fix GTestHelpTest.TestHelpFlag on FreeBSD 2023-08-07 dinor Make references to `#include`s consistent across docs 2023-08-03 elliotgoodrich Remove public includes of `` 2023-08-02 robert.shade Avoid unreachable code warning 2023-08-02 dmauro Update documentation to refer to v1.14 2023-08-02 dmauro Bump version to v1.14 in preparation for release 2023-08-02 dmauro Remove the GTEST_HAS_DOWNCAST_ customization point. 2023-08-02 dmauro Add googletest-message-test to the Bazel tests It appears to have been unintentionally left out 2023-08-01 phoebeliang Make testing::Message support streamed AbslStringify values 2023-08-01 dmauro Update GoogleTest dependencies 2023-07-27 julien.combattelli Use #if and not #ifdef to check filesystem support 2023-07-28 absl-team Adjust includes to use <> instead of "", consistent with quickstart pages. 2023-07-27 patryk gtest: Supress warning about set unused variable 2023-07-21 absl-team Make `AbslStringify` usage public in GoogleTest 2023-07-19 dmauro Remove unused cast implementation 2023-07-19 antsosnin Fix typo in gmock_cook_book.md 2023-07-11 kim.valen Fixed variables that could be declared 'const' Created with: roll-dep third_party/googletest Roll third_party/spirv-headers/ 124a9665e..79743b899 (9 commits) https://github.com/KhronosGroup/SPIRV-Headers/compare/124a9665e464...79743b899fde $ git log 124a9665e..79743b899 --date=short --no-merges --format='%ad %ae %s' 2023-09-20 fwahlster Add LiteralFloat to operand_kinds (#380) 2023-09-20 40001162+alelenv Add headers for SPV_NV_displacement_micromap. (#374) 2023-09-20 fwahlster remove additional version "1.0" from SecondaryViewportRelativeNV (#379) 2023-09-13 gleese Remove Kernel from ConstantSampler enum values (#378) 2023-09-13 andrzej.ratajewski Add SPV_INTEL_cache_controls extension support (#376) 2023-08-23 dneto Validate enums have sensible versions and are visible (#369) 2023-08-16 viktoria.maksimova Headers support for two Intel extensions (#356) 2023-08-10 dneto Revert "Merge pull request #367 from dneto0/coop-matrix-enums-deps" 2023-07-29 konstantin.seurer Add SPV_AMDX_shader_enqueue Created with: roll-dep third_party/spirv-headers Roll third_party/spirv-tools/ 8e3da01b4..27673a054 (37 commits) https://github.com/KhronosGroup/SPIRV-Tools/compare/8e3da01b4580...27673a054447 $ git log 8e3da01b4..27673a054 --date=short --no-merges --format='%ad %ae %s' 2023-09-26 stevenperron Remove reviewer from autoroller (#5414) 2023-09-20 jeremyg instrument: Use Import linkage for instrumentation functions (#5355) 2023-09-20 stevenperron roll deps (#5408) 2023-09-13 dneto Update SPIRV-Headers, add cache control operand kinds (#5406) 2023-09-11 stevenperron Change autoroll pr review id (#5404) 2023-09-11 andre Check for git repository before git commands (#5403) 2023-09-11 cbeckley Make sure that fragment shader interlock instructions are not removed by DCE (#5400) 2023-09-11 41898282+github-actions[bot] Roll external/re2/ e0077036c..a807e8a3a (6 commits) (#5401) 2023-09-07 brioche val: re-add ImageMSArray validation (#5394) 2023-09-06 stevenperron Add SPV_KHR_physical_storage_buffer to allowlists (#5402) 2023-09-05 stevenperron Fix `AddMemberDecoration` variable names. (#5399) 2023-09-05 brioche opt: add ImageMSArray capability to trim pass. (#5395) 2023-09-05 cbeckley Add SPV_EXT_fragment_shader_interlock to allow lists (#5393) 2023-09-05 brioche opt: add raytracing/rayquery to trim pass (#5397) 2023-09-05 41898282+github-actions[bot] Roll external/re2/ 523f9b097..e0077036c (2 commits) (#5391) 2023-09-05 brioche opt: add Int64 capability to trim pass (#5398) 2023-09-04 brioche NFC: rename tests using capability as prefix (#5396) 2023-09-04 cbeckley opt: add FragmentShader*InterlockEXT to capability trim pass (#5390) 2023-08-30 74101708+mgorchak-blackberry QNX has support for ANSI ESC codes, default terminal is QANSI. (#5387) 2023-08-30 joycebrum Enable OpenSSF Scorecard and Badge (#5377) 2023-08-30 41898282+github-actions[bot] Roll external/re2/ 73031bbc0..523f9b097 (1 commit) (#5389) 2023-08-29 41898282+github-actions[bot] Roll external/googletest/ 460ae9826..8a6feabf0 (1 commit) (#5388) 2023-08-24 41898282+github-actions[bot] roll deps (#5386) 2023-08-23 41898282+github-actions[bot] roll deps (#5384) 2023-08-22 41898282+github-actions[bot] Roll external/googletest/ 9fce54804..61332bd7e (2 commits) (#5383) 2023-08-21 jeremyg opt: Add SwitchDescriptorSetPass (#5375) 2023-08-21 jeremyg linker: Add --use-highest-version option (#5376) 2023-08-19 41898282+github-actions[bot] roll deps (#5382) 2023-08-16 41898282+github-actions[bot] Roll external/googletest/ 7e33b6a1c..987e22561 (5 commits) (#5381) 2023-08-15 quic_wooykim SPV_QCOM_image_processing support (#5223) 2023-08-15 stevenperron Fix failing action when PR is already open. (#5380) 2023-08-15 brioche opt: add bitmask support for capability trimming (#5372) 2023-08-14 41898282+github-actions[bot] Roll external/re2/ 9dc7ae7b5..6148386f0 (3 commits) (#5379) 2023-08-11 viktoria.maksimova Support 2 Intel extensions (#5357) 2023-08-11 41898282+github-actions[bot] roll deps (#5374) 2023-08-10 rharrison Fix -Wunreachable-code-loop-increment warning (#5373) 2023-08-10 brioche enable StorageUniform16 (#5371) Created with: roll-dep third_party/spirv-tools * Fix expected preprocessing output It seems like glslang changed the output from the preprocess to output an extra space that needs to be accounted for. --- DEPS | 8 +++--- glslc/test/line.py | 22 ++++++++-------- glslc/test/option_dash_D.py | 34 ++++++++++++------------- glslc/test/option_dash_E.py | 40 +++++++++++++++--------------- glslc/test/option_dash_M.py | 4 +-- libshaderc/src/shaderc_cpp_test.cc | 4 +-- libshaderc/src/shaderc_test.cc | 4 +-- 7 files changed, 58 insertions(+), 58 deletions(-) diff --git a/DEPS b/DEPS index 0684ff24b..98fc7ed34 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '76b52ebf77833908dc4c0dd6c70a9c357ac720bd', - 'googletest_revision': 'c541e7c11044b1e0303103ef8a47d7a9632c479b', + 'glslang_revision': '2bfacdac91d5d9ba6bab7b4da52eb79c2300cd45', + 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '124a9665e464ef98b8b718d572d5f329311061eb', - 'spirv_tools_revision': '8e3da01b45806fbacbb9e6fce9c5f9ae49f60e42', + 'spirv_headers_revision': '79743b899fde5c954897b2694291002626358fac', + 'spirv_tools_revision': '27673a054447e37810a38e7ce8d35a0a88af4a75', } deps = { diff --git a/glslc/test/line.py b/glslc/test/line.py index 0b4cd2cc0..790a5e8a3 100644 --- a/glslc/test/line.py +++ b/glslc/test/line.py @@ -36,7 +36,7 @@ class TestPoundVersion310InIncludingFile( #line 1 "a.vert" #line 1 "b.glsl" -void main(){ } +void main() { } #line 3 "a.vert" """ @@ -61,7 +61,7 @@ class TestPoundVersion150InIncludingFile( #line 0 "a.vert" #line 0 "b.glsl" -void main(){ } +void main() { } #line 2 "a.vert" """ @@ -138,7 +138,7 @@ class TestSpaceAroundPoundVersion310InIncludingFile( #line 1 "a.vert" #line 1 "b.glsl" -void main(){ } +void main() { } #line 3 "a.vert" """ @@ -161,7 +161,7 @@ class TestSpaceAroundPoundVersion150InIncludingFile( #line 0 "a.vert" #line 0 "b.glsl" -void main(){ } +void main() { } #line 2 "a.vert" """ @@ -183,7 +183,7 @@ class TestPoundLineWithForcedVersion310( """#extension GL_GOOGLE_include_directive : enable #line 1 "a.vert" #line 1 "b.glsl" -void main(){ } +void main() { } #line 2 "a.vert" """ @@ -205,7 +205,7 @@ class TestPoundLineWithForcedVersion150( """#extension GL_GOOGLE_include_directive : enable #line 0 "a.vert" #line 0 "b.glsl" -void main(){ } +void main() { } #line 1 "a.vert" """ @@ -230,7 +230,7 @@ class TestPoundLineWithForcedDifferentVersion( #line 1 "a.vert" #line 1 "b.glsl" -void main(){ } +void main() { } #line 3 "a.vert" """ @@ -288,14 +288,14 @@ class TestExplicitPoundLineWithPoundInclude( #line 1 "a.vert" #line 10000 "injected.glsl" -int plus1(int a){ return a + 1;} +int plus1(int a) { return a + 1; } #line 1 "inc.glsl" - int inc(int a){ return a + 1;} + int inc(int a) { return a + 1; } #line 10002 "injected.glsl" - int plus2(int a){ return a + 2;} + int plus2(int a) { return a + 2; } #line 55555 #line 1 "main.glsl" - void main(){ + void main() { gl_Position = vec4(1.); } #line 55556 "injected.glsl" diff --git a/glslc/test/option_dash_D.py b/glslc/test/option_dash_D.py index ca71d6e18..fcd16f114 100644 --- a/glslc/test/option_dash_D.py +++ b/glslc/test/option_dash_D.py @@ -224,7 +224,7 @@ class TestDashCapDWithDashE(expect.ReturnCodeIsZero, expected_stdout = [ """ - void main(){ return 3;} + void main() { return 3; } """] @inside_glslc_testsuite('OptionCapD') @@ -239,18 +239,18 @@ class TestDashCapDWithDashEIfDef(expect.ReturnCodeIsZero, #else void f() { int x; } #endif - void main(){ return 3;} + void main(){ return 3; } """, '.vert') glslc_args = ['-DX', '-E', '-std=450core', shader] expected_stdout = [ """ - void f(){ } + void f() { } - void main(){ return 3;} + void main() { return 3; } """] @inside_glslc_testsuite('OptionCapD') @@ -265,7 +265,7 @@ class TestDashCapDWithDashEIfNDef(expect.ReturnCodeIsZero, #else void f() { int x; } #endif - void main(){ return 3;} + void main(){ return 3; } """, '.vert') glslc_args = ['-DX', '-E', '-std=450core', shader] @@ -274,9 +274,9 @@ class TestDashCapDWithDashEIfNDef(expect.ReturnCodeIsZero, - void f(){ int x;} + void f() { int x; } - void main(){ return 3;} + void main() { return 3; } """] @@ -292,18 +292,18 @@ class TestDashCapDWithDashEEqIfDef(expect.ReturnCodeIsZero, #else void f() { int x; } #endif - void main(){ return 3;} + void main() { return 3; } """, '.vert') glslc_args = ['-DX=', '-E', '-std=450core', shader] expected_stdout = [ """ - void f(){ } + void f() { } - void main(){ return 3;} + void main() { return 3; } """] @inside_glslc_testsuite('OptionCapD') @@ -318,7 +318,7 @@ class TestDashCapDWithDashEEqIfNDef(expect.ReturnCodeIsZero, #else void f() { int x; } #endif - void main(){ return 3;} + void main(){ return 3; } """, '.vert') glslc_args = ['-DX=', '-E', '-std=450core', shader] @@ -327,9 +327,9 @@ class TestDashCapDWithDashEEqIfNDef(expect.ReturnCodeIsZero, - void f(){ int x;} + void f() { int x; } - void main(){ return 3;} + void main() { return 3; } """] @inside_glslc_testsuite('OptionCapD') @@ -339,13 +339,13 @@ class TestDashCapDWithDashEFunctionMacro(expect.ReturnCodeIsZero, shader = FileShader( """ - void main(){ return FOO(3);} + void main(){ return FOO(3); } """, '.vert') glslc_args = ['-DFOO(x)=(2*x+1)*x*x', '-E', '-std=450core', shader] expected_stdout = [ """ - void main(){ return(2 * 3 + 1)* 3 * 3;} + void main() { return(2 * 3 + 1) * 3 * 3; } """] @inside_glslc_testsuite('OptionCapD') @@ -355,11 +355,11 @@ class TestDashCapDWithDashENestedMacro(expect.ReturnCodeIsZero, shader = FileShader( """ - void main(){ return X;} + void main() { return X; } """, '.vert') glslc_args = ['-DY=4', '-DX=Y', '-E', '-std=450core', shader] expected_stdout = [ """ - void main(){ return 4;} + void main() { return 4; } """] diff --git a/glslc/test/option_dash_E.py b/glslc/test/option_dash_E.py index b1b644379..69b2e0a85 100644 --- a/glslc/test/option_dash_E.py +++ b/glslc/test/option_dash_E.py @@ -22,7 +22,7 @@ class TestDashCapENoDefs(expect.StdoutMatch): """Tests -E without any defines.""" shader = FileShader('#version 140\nvoid main(){}', '.vert') - expected_stdout = '#version 140\nvoid main(){ }\n' + expected_stdout = '#version 140\nvoid main() { }\n' glslc_args = ['-E', shader] @@ -31,7 +31,7 @@ class TestDashCapEGlslFileAccepted(expect.StdoutMatch): """Tests -E if we provide a .glsl file without an explicit stage.""" shader = FileShader('#version 140\nvoid main(){}', '.glsl') - expected_stdout = '#version 140\nvoid main(){ }\n' + expected_stdout = '#version 140\nvoid main() { }\n' glslc_args = ['-E', shader] @@ -40,7 +40,7 @@ class TestDashCapESingleDefine(expect.StdoutMatch): """Tests -E with command-line define.""" shader = FileShader('#version 140\nvoid main(){ int a = X; }', '.vert') - expected_stdout = '#version 140\nvoid main(){ int a = 4;}\n' + expected_stdout = '#version 140\nvoid main() { int a = 4; }\n' glslc_args = ['-DX=4', '-E', shader] @@ -57,7 +57,7 @@ class TestDashCapEExpansion(expect.StdoutMatch): expected_stdout = '''#version 140 -void main(){ +void main() { int a = 4; } ''' @@ -77,7 +77,7 @@ class TestDashCapEFunctionMacro(expect.StdoutMatch): expected_stdout = '''#version 140 -void main(){ +void main() { int a = 4 + 1; } ''' @@ -96,7 +96,7 @@ class TestDashCapEPragma(expect.StdoutMatch): expected_stdout = '''#version 140 #pragma optimize(off) -void main(){ +void main() { } ''' glslc_args = ['-E', shader] @@ -114,7 +114,7 @@ class TestDashCapEExtension(expect.StdoutMatch): expected_stdout = '''#version 140 #extension foo : require -void main(){ +void main() { } ''' glslc_args = ['-E', shader] @@ -140,7 +140,7 @@ class TestDashCapELine(expect.StdoutMatch): #line 2 3 -void main(){ +void main() { } ''' glslc_args = ['-E', shader] @@ -176,7 +176,7 @@ class TestDashCapEStdin(expect.StdoutMatch): ''') expected_stdout = '''#version 140 -void main(){ +void main() { } ''' glslc_args = ['-E', '-fshader-stage=vertex', shader] @@ -193,7 +193,7 @@ class TestDashCapEStdinDoesNotRequireShaderStage(expect.StdoutMatch): ''') expected_stdout = '''#version 140 -void main(){ +void main() { } ''' glslc_args = ['-E', shader] @@ -212,10 +212,10 @@ class TestDashCapEMultipleFiles(expect.StdoutMatch): } ''', '.vert') expected_stdout = '''#version 140 -void main(){ +void main() { } #version 140 -void function(){ +void function() { } ''' glslc_args = ['-E', '-fshader-stage=vertex', shader, shader2] @@ -235,10 +235,10 @@ class TestDashCapEMultipleFilesWithoutStage(expect.StdoutMatch): } ''', '.glsl') expected_stdout = '''#version 140 -void main(){ +void main() { } #version 140 -void function(){ +void function() { } ''' glslc_args = ['-E', shader, shader2] @@ -253,7 +253,7 @@ class TestDashCapEOutputFile(expect.SuccessfulReturn, expect.ValidFileContents): } ''', '.vert') expected_file_contents = '''#version 140 -void function(){ +void function() { } ''' target_filename = 'foo' @@ -265,7 +265,7 @@ class TestDashCapEWithS(expect.StdoutMatch): """Tests -E in the presence of -S.""" shader = FileShader('#version 140\nvoid main(){}', '.vert') - expected_stdout = '#version 140\nvoid main(){ }\n' + expected_stdout = '#version 140\nvoid main() { }\n' glslc_args = ['-E', '-S', shader] @@ -274,7 +274,7 @@ class TestMultipileDashCapE(expect.StdoutMatch): """Tests that using -E multiple times works.""" shader = FileShader('#version 140\nvoid main(){}', '.vert') - expected_stdout = '#version 140\nvoid main(){ }\n' + expected_stdout = '#version 140\nvoid main() { }\n' glslc_args = ['-E', '-E', shader, '-E'] @@ -283,7 +283,7 @@ class TestDashCapEAfterFile(expect.StdoutMatch): """Tests that using -E after the filename also works.""" shader = FileShader('#version 140\nvoid main(){}', '.vert') - expected_stdout = '#version 140\nvoid main(){ }\n' + expected_stdout = '#version 140\nvoid main() { }\n' glslc_args = [shader, '-E'] @@ -300,10 +300,10 @@ class TestDashCapEWithDashC(expect.StdoutMatch): } ''', '.vert') expected_stdout = '''#version 140 -void main(){ +void main() { } #version 140 -void function(){ +void function() { } ''' glslc_args = ['-E', '-c', shader, shader2] diff --git a/glslc/test/option_dash_M.py b/glslc/test/option_dash_M.py index 9fadb01a9..e32ff0720 100644 --- a/glslc/test/option_dash_M.py +++ b/glslc/test/option_dash_M.py @@ -552,8 +552,8 @@ class TestDashCapMDMultipleFilePreprocessingOnlyMode(expect.StdoutMatch, dependency_info_files_expected_contents.append([{'target': 'b.vert.spv', 'dependency': {'b.vert'}} ]) - expected_stdout = ("#version 140\nvoid main(){ }\n" - "#version 140\nvoid main(){ }\n") + expected_stdout = ("#version 140\nvoid main() { }\n" + "#version 140\nvoid main() { }\n") @inside_glslc_testsuite('OptionsCapM') diff --git a/libshaderc/src/shaderc_cpp_test.cc b/libshaderc/src/shaderc_cpp_test.cc index 9cb5e3cbe..0f1f37f05 100644 --- a/libshaderc/src/shaderc_cpp_test.cc +++ b/libshaderc/src/shaderc_cpp_test.cc @@ -665,7 +665,7 @@ TEST_F(CppInterface, PreprocessingOnlyOption) { const PreprocessedSourceCompilationResult result = compiler_.PreprocessGlsl( kMinimalShaderWithMacro, shaderc_glsl_vertex_shader, "shader", options_); EXPECT_TRUE(CompilationResultIsSuccess(result)); - EXPECT_THAT(CompilerOutputAsString(result), HasSubstr("void main(){ }")); + EXPECT_THAT(CompilerOutputAsString(result), HasSubstr("void main() { }")); const std::string kMinimalShaderCloneOption = "#version 140\n" @@ -678,7 +678,7 @@ TEST_F(CppInterface, PreprocessingOnlyOption) { cloned_options); EXPECT_TRUE(CompilationResultIsSuccess(result_from_cloned_options)); EXPECT_THAT(CompilerOutputAsString(result_from_cloned_options), - HasSubstr("void main(){ }")); + HasSubstr("void main() { }")); } // A shader kind test case needs: 1) A shader text with or without #pragma diff --git a/libshaderc/src/shaderc_test.cc b/libshaderc/src/shaderc_test.cc index aba95d17f..5610b0b67 100644 --- a/libshaderc/src/shaderc_test.cc +++ b/libshaderc/src/shaderc_test.cc @@ -774,7 +774,7 @@ TEST_F(CompileStringWithOptionsTest, PreprocessingOnlyOption) { const std::string preprocessed_text = CompilationOutput(kMinimalShaderWithMacro, shaderc_glsl_vertex_shader, options_.get(), OutputType::PreprocessedText); - EXPECT_THAT(preprocessed_text, HasSubstr("void main(){ }")); + EXPECT_THAT(preprocessed_text, HasSubstr("void main() { }")); const std::string kMinimalShaderWithMacroCloneOption = "#version 150\n" @@ -785,7 +785,7 @@ TEST_F(CompileStringWithOptionsTest, PreprocessingOnlyOption) { const std::string preprocessed_text_cloned_options = CompilationOutput( kMinimalShaderWithMacroCloneOption, shaderc_glsl_vertex_shader, options_.get(), OutputType::PreprocessedText); - EXPECT_THAT(preprocessed_text_cloned_options, HasSubstr("void main(){ }")); + EXPECT_THAT(preprocessed_text_cloned_options, HasSubstr("void main() { }")); } // A shader kind test cases needs: 1) A shader text with or without #pragma From e52be1581267b259c64ae41319c48912c07a3e35 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Oct 2023 21:12:49 -0400 Subject: [PATCH 004/117] Update DEPS Glslang GitHub top of tree 2023-10-12 SPIRV-Tools v2023.5.rc1 SPIRV-Headers GitHub top of tree 2023-10-12 --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 98fc7ed34..a7dc1d30c 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '2bfacdac91d5d9ba6bab7b4da52eb79c2300cd45', + 'glslang_revision': '48f9ed8b08be974f4e463ef38136c8f23513b2cf', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '79743b899fde5c954897b2694291002626358fac', - 'spirv_tools_revision': '27673a054447e37810a38e7ce8d35a0a88af4a75', + 'spirv_headers_revision': '4183b260f4cccae52a89efdfcdd43c4897989f42', + 'spirv_tools_revision': '360d469b9eac54d6c6e20f609f9ec35e3a5380ad', } deps = { From b9b557af095f66ffc98c57f1c1eb808dfc4810ca Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Oct 2023 21:17:43 -0400 Subject: [PATCH 005/117] Make Shaderc v2023.7-rc1 release candidate --- CHANGES | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 2cd55c574..e9a317b91 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,9 @@ Revision history for Shaderc -v2023.7-dev 2023-08-09 - - Start v2023.7 development +v2023.7-rc1 2023-10-12 + - Update dependencies + - Finish converting build instructions and flags to always use C++17 + - Add GitHub CI to test more flows v2023.6 2023-08-09 - Update dependencies, including SPIRV-Tools v2023.4.rc2 From 3882b16417077aa8eaa7b5775920e7ba4b8a224d Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Oct 2023 21:22:29 -0400 Subject: [PATCH 006/117] Shaderc v2303.7 release --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index e9a317b91..7de30b54b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Revision history for Shaderc -v2023.7-rc1 2023-10-12 +v2023.7 2023-10-12 - Update dependencies - Finish converting build instructions and flags to always use C++17 - Add GitHub CI to test more flows From 0d6f72f3ec57fe68377363d9e810385e6b6e37e1 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Oct 2023 21:22:53 -0400 Subject: [PATCH 007/117] Start Shaderc v2023.8-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 7de30b54b..ddd5ca96f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2023.8-dev 2023-10-12 + - Start development + v2023.7 2023-10-12 - Update dependencies - Finish converting build instructions and flags to always use C++17 From 9b5ad16550785af3f91753009f3a229cf20cad07 Mon Sep 17 00:00:00 2001 From: Tyler Kropp Date: Wed, 6 Sep 2023 22:04:09 -0400 Subject: [PATCH 008/117] Use TARGET_OBJECTS to replace archive acrobatics --- cmake/utils.cmake | 48 ++++----------------------------------- libshaderc/CMakeLists.txt | 15 +----------- 2 files changed, 5 insertions(+), 58 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index e9475b9cf..b2489d9ae 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -173,50 +173,10 @@ endmacro() # Combines the static library "target" with all of its transitive static # library dependencies into a single static library "new_target". function(shaderc_combine_static_lib new_target target) - set(all_libs "") shaderc_get_transitive_libs(${target} all_libs) - - set(libname - ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${new_target}${CMAKE_STATIC_LIBRARY_SUFFIX}) - - if (MSVC) - string(REPLACE ";" ">;$") - - add_custom_command(OUTPUT ${libname} - DEPENDS ${all_libs} - COMMAND lib.exe ${lib_target_list} /OUT:${libname} /NOLOGO) - elseif(APPLE) - string(REPLACE ";" ">;$") - - add_custom_command(OUTPUT ${libname} - DEPENDS ${all_libs} - COMMAND libtool -static -o ${libname} ${lib_target_list}) - else() - string(REPLACE ";" "> \naddlib $") - set(build_script_file "${start_of_file}\nsave\nend\n") - - file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${new_target}.ar" - CONTENT ${build_script_file} - CONDITION 1) - - add_custom_command(OUTPUT ${libname} - DEPENDS ${all_libs} - COMMAND ${CMAKE_AR} -M < ${new_target}.ar) - endif() - - add_custom_target(${new_target}_genfile ALL - DEPENDS ${libname}) - - # CMake needs to be able to see this as another normal library, - # so import the newly created library as an imported library, - # and set up the dependencies on the custom target. - add_library(${new_target} STATIC IMPORTED) - set_target_properties(${new_target} - PROPERTIES IMPORTED_LOCATION ${libname}) - add_dependencies(${new_target} ${new_target}_genfile) + add_library(${new_target} STATIC) + foreach(lib IN LISTS all_libs) + target_sources(${new_target} PRIVATE $) + endforeach() endfunction() diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt index 2cced9edf..fc92f35bc 100644 --- a/libshaderc/CMakeLists.txt +++ b/libshaderc/CMakeLists.txt @@ -97,20 +97,7 @@ shaderc_add_tests( shaderc_combine_static_lib(shaderc_combined shaderc) if(SHADERC_ENABLE_INSTALL) - # Since shaderc_combined is defined as an imported library, we cannot use the - # install() directive to install it. Install it like a normal file. - get_target_property(generated_location shaderc_combined LOCATION) - string(REGEX MATCH "Visual Studio .*" vs_generator "${CMAKE_GENERATOR}") - if (NOT "${vs_generator}" STREQUAL "") - # With Visual Studio generators, the LOCATION property is not properly - # expanded according to the current build configuration. We need to work - # around this problem by manually substitution. - string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" - install_location "${generated_location}") - install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - else() - install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() + install(TARGETS shaderc_combined DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif(SHADERC_ENABLE_INSTALL) shaderc_add_tests( From 2d4950d40c5b75c237d555226208e051d057693c Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 21 Nov 2023 22:37:33 -0800 Subject: [PATCH 009/117] Expose setting relaxed Vulkan rules from glslang --- .gitignore | 1 + libshaderc/include/shaderc/shaderc.h | 6 +++++ libshaderc/include/shaderc/shaderc.hpp | 7 ++++++ libshaderc/src/shaderc.cc | 5 ++++ .../include/libshaderc_util/compiler.h | 9 +++++++ libshaderc_util/src/compiler.cc | 20 ++++++++++++++++ libshaderc_util/src/compiler_test.cc | 24 +++++++++++++++++++ 7 files changed, 72 insertions(+) diff --git a/.gitignore b/.gitignore index 06673ec03..1cd253f53 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ third_party/tint android_test/libs android_test/include .DS_Store +.vscode/ diff --git a/libshaderc/include/shaderc/shaderc.h b/libshaderc/include/shaderc/shaderc.h index 235f6074d..3a3e97d6b 100644 --- a/libshaderc/include/shaderc/shaderc.h +++ b/libshaderc/include/shaderc/shaderc.h @@ -489,6 +489,12 @@ SHADERC_EXPORT void shaderc_compile_options_set_hlsl_functionality1( SHADERC_EXPORT void shaderc_compile_options_set_hlsl_16bit_types( shaderc_compile_options_t options, bool enable); +// Enables or disables relaxed Vulkan rules. +// +// This allows most OpenGL shaders to compile under Vulkan semantics. +SHADERC_EXPORT void shaderc_compile_options_set_vulkan_rules_relaxed( + shaderc_compile_options_t options, bool enable); + // Sets whether the compiler should invert position.Y output in vertex shader. SHADERC_EXPORT void shaderc_compile_options_set_invert_y( shaderc_compile_options_t options, bool enable); diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp index bc057c13d..3817af806 100644 --- a/libshaderc/include/shaderc/shaderc.hpp +++ b/libshaderc/include/shaderc/shaderc.hpp @@ -353,6 +353,13 @@ class CompileOptions { shaderc_compile_options_set_hlsl_16bit_types(options_, enable); } + // Enables or disables relaxed Vulkan rules. + // + // This allows most OpenGL shaders to compile under Vulkan semantics. + void SetVulkanRulesRelaxed(bool enable) { + shaderc_compile_options_set_vulkan_rules_relaxed(options_, enable); + } + // Sets whether the compiler should invert position.Y output in vertex shader. void SetInvertY(bool enable) { shaderc_compile_options_set_invert_y(options_, enable); diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc index 322382092..63f1bbc6c 100644 --- a/libshaderc/src/shaderc.cc +++ b/libshaderc/src/shaderc.cc @@ -564,6 +564,11 @@ void shaderc_compile_options_set_hlsl_16bit_types( options->compiler.EnableHlsl16BitTypes(enable); } +void shaderc_compile_options_set_vulkan_rules_relaxed( + shaderc_compile_options_t options, bool enable) { + options->compiler.SetVulkanRulesRelaxed(enable); +} + void shaderc_compile_options_set_invert_y( shaderc_compile_options_t options, bool enable) { options->compiler.EnableInvertY(enable); diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h index ffd7c248a..d9d02b951 100644 --- a/libshaderc_util/include/libshaderc_util/compiler.h +++ b/libshaderc_util/include/libshaderc_util/compiler.h @@ -233,6 +233,11 @@ class Compiler { // Enables or disables HLSL 16-bit types. void EnableHlsl16BitTypes(bool enable); + // Enables or disables relaxed Vulkan rules. + // + // This allows most OpenGL shaders to compile under Vulkan semantics. + void SetVulkanRulesRelaxed(bool enable); + // Enables or disables invert position.Y output in vertex shader. void EnableInvertY(bool enable); @@ -545,6 +550,10 @@ class Compiler { // True if the compiler should support 16-bit HLSL types. bool hlsl_16bit_types_enabled_; + // True if the compiler should relax Vulkan rules to allow OGL shaders to + // compile. + bool vulkan_rules_relaxed_ = false; + // True if the compiler should invert position.Y output in vertex shader. bool invert_y_enabled_; diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc index 525cbc573..8ed088359 100644 --- a/libshaderc_util/src/compiler.cc +++ b/libshaderc_util/src/compiler.cc @@ -294,6 +294,22 @@ std::tuple, size_t> Compiler::Compile( if (hlsl_functionality1_enabled_) { shader.setEnvTargetHlslFunctionality1(); } + if (vulkan_rules_relaxed_) { + glslang::EShSource language; + switch(source_language_) { + case SourceLanguage::GLSL: + language = glslang::EShSourceGlsl; + break; + case SourceLanguage::HLSL: + language = glslang::EShSourceHlsl; + break; + } + // This option will only be used if the Vulkan client is used. + // If new versions of GL_KHR_vulkan_glsl come out, it would make sense to + // let callers specify which version to use. For now, just use 100. + shader.setEnvInput(language, used_shader_stage, glslang::EShClientVulkan, 100); + shader.setEnvInputVulkanRulesRelaxed(); + } shader.setInvertY(invert_y_enabled_); shader.setNanMinMaxClamp(nan_clamp_); @@ -452,6 +468,10 @@ void Compiler::EnableHlslFunctionality1(bool enable) { hlsl_functionality1_enabled_ = enable; } +void Compiler::SetVulkanRulesRelaxed(bool enable) { + vulkan_rules_relaxed_ = enable; +} + void Compiler::EnableHlsl16BitTypes(bool enable) { hlsl_16bit_types_enabled_ = enable; } diff --git a/libshaderc_util/src/compiler_test.cc b/libshaderc_util/src/compiler_test.cc index a0a964d3f..4ebb91324 100644 --- a/libshaderc_util/src/compiler_test.cc +++ b/libshaderc_util/src/compiler_test.cc @@ -106,6 +106,18 @@ const char kGlslVertShaderExplicitLocation[] = gl_Position = my_mat * my_vec; })"; +// A GLSL fragment shader with the location defined for its non-opaque uniform +// variable. +const char kGlslFragShaderOpaqueUniforms[] = + R"(#version 320 es + precision lowp float; + + layout(location = 0) out vec4 oColor; + layout(location = 0) uniform float a; + void main(void) { + oColor = vec4(1.0, 0.0, 0.0, a); + })"; + // A GLSL vertex shader without the location defined for its non-opaque uniform // variable. const char kGlslVertShaderNoExplicitLocation[] = @@ -813,6 +825,18 @@ TEST_F(CompilerTest, HlslFunctionality1Enabled) { << disassembly; } +TEST_F(CompilerTest, RelaxedVulkanRulesEnabled) { + compiler_.SetSourceLanguage(Compiler::SourceLanguage::GLSL); + compiler_.SetAutoBindUniforms(true); // Uniform variable needs a binding + compiler_.SetVulkanRulesRelaxed(true); + const auto words = + SimpleCompilationBinary(kGlslFragShaderOpaqueUniforms, EShLangFragment); + const auto disassembly = Disassemble(words); + EXPECT_THAT(disassembly, + HasSubstr("OpMemberName %gl_DefaultUniformBlock 0 \"a\"")) + << disassembly; +} + TEST_F(CompilerTest, ClampMapsToFClampByDefault) { const auto words = SimpleCompilationBinary(kGlslShaderWithClamp, EShLangFragment); From 37e25539ce199ecaf19fb7f7d27818716d36686d Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 22 Nov 2023 10:46:33 -0800 Subject: [PATCH 010/117] initialize no matter what --- libshaderc_util/src/compiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc index 8ed088359..e5f5d1055 100644 --- a/libshaderc_util/src/compiler.cc +++ b/libshaderc_util/src/compiler.cc @@ -295,7 +295,7 @@ std::tuple, size_t> Compiler::Compile( shader.setEnvTargetHlslFunctionality1(); } if (vulkan_rules_relaxed_) { - glslang::EShSource language; + glslang::EShSource language = glslang::EShSourceNone; switch(source_language_) { case SourceLanguage::GLSL: language = glslang::EShSourceGlsl; From 40bced4e1e205ecf44630d2dfa357655b6dabd04 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 30 Nov 2023 17:02:24 -0500 Subject: [PATCH 011/117] update Glslang and remove references to libs it has removed (#1384) * OGLCompiler and HLSL have been removed from glslang This fixes SPIRV-Tools CI-shaderc-smoketest build failure. * Update Glslang in DEPS Glslang doesn't support building standalone glslang on Android or iOS. So build the glslang lib target first, instead of glslang-standalone --------- Co-authored-by: Juan Ramos --- Android.mk | 2 -- DEPS | 2 +- glslc/CMakeLists.txt | 2 +- kokoro/android-release/build-docker.sh | 4 ++-- libshaderc/CMakeLists.txt | 2 +- libshaderc/README.md | 7 ++----- libshaderc_util/CMakeLists.txt | 2 +- 7 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Android.mk b/Android.mk index ed4a7828c..f8bb96b6e 100644 --- a/Android.mk +++ b/Android.mk @@ -19,12 +19,10 @@ include $(ROOT_SHADERC_PATH)/libshaderc_util/Android.mk include $(ROOT_SHADERC_PATH)/libshaderc/Android.mk ALL_LIBS:=libglslang.a \ - libOGLCompiler.a \ libOSDependent.a \ libshaderc.a \ libshaderc_util.a \ libSPIRV.a \ - libHLSL.a \ libSPIRV-Tools.a \ libSPIRV-Tools-opt.a diff --git a/DEPS b/DEPS index a7dc1d30c..76d158031 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '48f9ed8b08be974f4e463ef38136c8f23513b2cf', + 'glslang_revision': '6be56e45e574b375d759b89dad35f780bbd4792f', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', 'spirv_headers_revision': '4183b260f4cccae52a89efdfcdd43c4897989f42', diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index c8fa6d510..1277d87e7 100644 --- a/glslc/CMakeLists.txt +++ b/glslc/CMakeLists.txt @@ -43,7 +43,7 @@ if (SHADERC_ENABLE_WGSL_OUTPUT) endif(SHADERC_ENABLE_WGSL_OUTPUT) target_link_libraries(glslc PRIVATE - glslang OSDependent OGLCompiler HLSL glslang SPIRV # Glslang libraries + glslang SPIRV # Glslang libraries $<$:libtint> # Tint libraries, optional shaderc_util shaderc # internal Shaderc libraries ${CMAKE_THREAD_LIBS_INIT}) diff --git a/kokoro/android-release/build-docker.sh b/kokoro/android-release/build-docker.sh index 8bd5215f5..a81832513 100755 --- a/kokoro/android-release/build-docker.sh +++ b/kokoro/android-release/build-docker.sh @@ -48,8 +48,8 @@ cmake \ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ -DANDROID_NDK=$ANDROID_NDK_HOME .. -echo $(date): Build glslang... -ninja glslang-standalone +echo $(date): Build glslang library... +ninja glslang echo $(date): Build everything... ninja diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt index fc92f35bc..df9a88d07 100644 --- a/libshaderc/CMakeLists.txt +++ b/libshaderc/CMakeLists.txt @@ -63,7 +63,7 @@ endif(SHADERC_ENABLE_INSTALL) find_package(Threads) set(SHADERC_LIBS - glslang OSDependent OGLCompiler glslang ${CMAKE_THREAD_LIBS_INIT} + glslang ${CMAKE_THREAD_LIBS_INIT} shaderc_util SPIRV # from glslang SPIRV-Tools diff --git a/libshaderc/README.md b/libshaderc/README.md index bf9d317f3..45636e83c 100644 --- a/libshaderc/README.md +++ b/libshaderc/README.md @@ -7,8 +7,8 @@ A library for compiling shader strings into SPIR-V. There are two main shaderc libraries that are created during a CMake compilation. The first is `libshaderc`, which is a static library containing just the functionality exposed by libshaderc. It depends -on other compilation targets `glslang`, `OSDependent`, `OGLCompiler`, -`shaderc_util`, `SPIRV`, `HLSL`, `SPIRV-Tools`, and `SPIRV-Tools-opt`. +on other compilation targets `glslang`, `shaderc_util`, `SPIRV`, +`SPIRV-Tools`, and `SPIRV-Tools-opt`. The other is `libshaderc_combined`, which is a static library containing libshaderc and all of its dependencies. @@ -38,12 +38,9 @@ platforms `-lpthread` should also be specified. counterparts should be linked in the order specified. * `build/libshaderc/libshaderc.a` * `build/third_party/glslang/glslang/glslang.a` - * `build/third_party/glslang/glslang/OSDependent/{Platform}/libOSDependent.a` - * `build/third_party/glslang/OGLCompilersDLL/libOGLCompiler.a` * `build/third_party/glslang/libglslang.a` * `build/shaderc_util/libshaderc_util.a` * `build/third_party/glslang/SPIRV/libSPIRV.a` - * `build/third_party/glslang/hlsl/libHLSL.a` * `build/third_party/spirv-tools/libSPIRV-Tools-opt.a` * `build/third_party/spirv-tools/libSPIRV-Tools.a` diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt index 99ce3c44e..69ba519a9 100644 --- a/libshaderc_util/CMakeLists.txt +++ b/libshaderc_util/CMakeLists.txt @@ -46,7 +46,7 @@ add_definitions(-DENABLE_HLSL) find_package(Threads) target_link_libraries(shaderc_util PRIVATE - glslang OSDependent OGLCompiler HLSL glslang SPIRV + glslang SPIRV SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT}) shaderc_add_tests( From aaa44b544909600381e1a180074ed7f544e48410 Mon Sep 17 00:00:00 2001 From: Stuart Millman Date: Fri, 1 Dec 2023 15:20:59 +0000 Subject: [PATCH 012/117] Fix for cmake policy CMP0148 (#1382) * Fix cmake policy CMP0148 * Fix cmake policy CMP0148 on CMakeLists.txt --- CMakeLists.txt | 6 +++++- cmake/setup_build.cmake | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 075641e4f..7bc8f5d9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,11 @@ if (COMPILER_SUPPORTS_EXTRA_SEMI_WARNING) add_compile_options("-Wextra-semi") endif() -find_host_package(PythonInterp 3 REQUIRED) +if(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12") + find_package(PythonInterp 3 REQUIRED) +else () + find_package(Python COMPONENTS Interpreter REQUIRED) +endif () if (SHADERC_ENABLE_COPYRIGHT_CHECK) add_custom_target(check-copyright ALL diff --git a/cmake/setup_build.cmake b/cmake/setup_build.cmake index 994de9f11..c5d2a55b4 100644 --- a/cmake/setup_build.cmake +++ b/cmake/setup_build.cmake @@ -49,7 +49,11 @@ if (ANDROID) find_host_package(PythonInterp 3 REQUIRED) find_host_package(BISON) else() -find_package(PythonInterp 3 REQUIRED) + if(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12") + find_package(PythonInterp 3 REQUIRED) + else () + find_package(Python COMPONENTS Interpreter REQUIRED) + endif () endif() option(DISABLE_RTTI "Disable RTTI in builds") From 09cfabc2f5c2d94a69cf600ebfe06c1be68ced22 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 3 Jan 2024 12:39:33 -0500 Subject: [PATCH 013/117] Update deps Glslang: 14.0.0 SPIRV-Headers to 2024-01-01 SPIRV-Tools v2023.6.rc1 --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 76d158031..f219633c3 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '6be56e45e574b375d759b89dad35f780bbd4792f', + 'glslang_revision': 'a91631b260cba3f22858d6c6827511e636c2458a', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '4183b260f4cccae52a89efdfcdd43c4897989f42', - 'spirv_tools_revision': '360d469b9eac54d6c6e20f609f9ec35e3a5380ad', + 'spirv_headers_revision': '1c6bb2743599e6eb6f37b2969acc0aef812e32e3', + 'spirv_tools_revision': 'f0cc85efdbbe3a46eae90e0f915dc1509836d0fc', } deps = { From e6edd6d48fa5bdd9d176794c6810fae7f8e938e1 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 3 Jan 2024 12:45:00 -0500 Subject: [PATCH 014/117] Finalize Shaderc v2023.8 --- CHANGES | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ddd5ca96f..78c7fb770 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,11 @@ Revision history for Shaderc -v2023.8-dev 2023-10-12 - - Start development +v2023.8 2024-01-03 + - API: Expose rlaxed Vulkan rules from glslang + - Update to Glslang 14.0.0 + - CMake: + - Comply with CMP0148: Use PythonInterp + - Use TARGET_OBJECTS to simplify creating the shaderc_shared library. v2023.7 2023-10-12 - Update dependencies From ae122875f9e6b78f2289fd4812a11cceedebe2a0 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 3 Jan 2024 12:45:44 -0500 Subject: [PATCH 015/117] Start Shaderc v2024.0-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 78c7fb770..9a0c38a48 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.0-dev 2024-01-03 + - Start development + v2023.8 2024-01-03 - API: Expose rlaxed Vulkan rules from glslang - Update to Glslang 14.0.0 From 587ad80256ba51eba7f22718f0b3a04d6940e66e Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 23 Jan 2024 10:57:48 -0500 Subject: [PATCH 016/117] Utility scripts use python3 explicitly (#1389) --- utils/add_copyright.py | 2 +- utils/remove-file-by-suffix.py | 2 +- utils/update_build_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/add_copyright.py b/utils/add_copyright.py index ab3c5f196..7ea08979e 100755 --- a/utils/add_copyright.py +++ b/utils/add_copyright.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2015 The Shaderc Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/utils/remove-file-by-suffix.py b/utils/remove-file-by-suffix.py index 39af161c6..ce7c65867 100755 --- a/utils/remove-file-by-suffix.py +++ b/utils/remove-file-by-suffix.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2015 The Shaderc Authors. All rights reserved. # diff --git a/utils/update_build_version.py b/utils/update_build_version.py index 11ee53e02..b7ce5b84e 100755 --- a/utils/update_build_version.py +++ b/utils/update_build_version.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2016 The Shaderc Authors. All rights reserved. # From 9bd299b0f28ba53308567cc17d00fb1bfe93e2c3 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 23 Jan 2024 15:12:25 -0500 Subject: [PATCH 017/117] Update DEPS (#1390) Glslang GitHub top of tree today. SPIRV-Tools GitHub top of tree today. SPIRV-Headers GitHub top of tree today. --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index f219633c3..acfa42d91 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': 'a91631b260cba3f22858d6c6827511e636c2458a', + 'glslang_revision': '57d86ab763da7b2cd1e00ecec8aa697403a8fd20', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '1c6bb2743599e6eb6f37b2969acc0aef812e32e3', - 'spirv_tools_revision': 'f0cc85efdbbe3a46eae90e0f915dc1509836d0fc', + 'spirv_headers_revision': '7b0309708da5126b89e4ce6f19835f36dc912f2f', + 'spirv_tools_revision': '359012927808c5aeb447b52d46cc0971b3b7e107', } deps = { From 65fa097f2f0aae1a9c233bcf7d03ca3dcd296c6e Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 12 Feb 2024 15:43:25 -0500 Subject: [PATCH 018/117] Update DEPS (#1395) Update to latest Glslang, SPIRV-Tools Update to SPIRV-Headers pull#414 Adjust to changes Glslang output when not optimizing. --- DEPS | 6 +- glslc/test/option_dash_cap_O.py | 163 ++++++++++++++++++-------------- 2 files changed, 97 insertions(+), 72 deletions(-) diff --git a/DEPS b/DEPS index acfa42d91..64f532a99 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '57d86ab763da7b2cd1e00ecec8aa697403a8fd20', + 'glslang_revision': '30661abd9c3e97144f79cb30f2fb5a0da2c7b93c', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '7b0309708da5126b89e4ce6f19835f36dc912f2f', - 'spirv_tools_revision': '359012927808c5aeb447b52d46cc0971b3b7e107', + 'spirv_headers_revision': 'e77d03080b90c5d361663a67834c57bb1fddaec2', + 'spirv_tools_revision': '784b064f90a597d2478064161438f4986485b5', } deps = { diff --git a/glslc/test/option_dash_cap_O.py b/glslc/test/option_dash_cap_O.py index fa474f9a4..cf301c523 100644 --- a/glslc/test/option_dash_cap_O.py +++ b/glslc/test/option_dash_cap_O.py @@ -21,71 +21,94 @@ EMPTY_SHADER_IN_CWD = Directory('.', [File('shader.vert', MINIMAL_SHADER)]) ASSEMBLY_WITH_DEBUG_SOURCE = [ - '; SPIR-V\n', - '; Version: 1.0\n', - '; Generator: Google Shaderc over Glslang; 11\n', - '; Bound: 7\n', - '; Schema: 0\n', - ' OpCapability Shader\n', - ' %2 = OpExtInstImport "GLSL.std.450"\n', - ' OpMemoryModel Logical GLSL450\n', - ' OpEntryPoint Vertex %main "main"\n', - ' %1 = OpString "shader.vert"\n', - ' OpSource ESSL 310 %1 "// OpModuleProcessed entry-point main\n', - '// OpModuleProcessed client vulkan100\n', - '// OpModuleProcessed target-env vulkan1.0\n', - '// OpModuleProcessed entry-point main\n', - '#line 1\n', - '#version 310 es\n', - 'void main() {}"\n', - ' OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"\n', - ' OpSourceExtension "GL_GOOGLE_include_directive"\n', - ' OpName %main "main"\n', - ' %void = OpTypeVoid\n', - ' %4 = OpTypeFunction %void\n', - ' OpLine %1 2 11\n', - ' %main = OpFunction %void None %4\n', - ' %6 = OpLabel\n', - ' OpReturn\n', - ' OpFunctionEnd\n'] - -ASSEMBLY_WITH_DEBUG = [ - '; SPIR-V\n', - '; Version: 1.0\n', - '; Generator: Google Shaderc over Glslang; 11\n', - '; Bound: 6\n', - '; Schema: 0\n', - ' OpCapability Shader\n', - ' %1 = OpExtInstImport "GLSL.std.450"\n', - ' OpMemoryModel Logical GLSL450\n', - ' OpEntryPoint Vertex %main "main"\n', - ' OpSource ESSL 310\n', - ' OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"\n', - ' OpSourceExtension "GL_GOOGLE_include_directive"\n', - ' OpName %main "main"\n', - ' %void = OpTypeVoid\n', - ' %3 = OpTypeFunction %void\n', - ' %main = OpFunction %void None %3\n', - ' %5 = OpLabel\n', - ' OpReturn\n', - ' OpFunctionEnd\n'] - -ASSEMBLY_WITHOUT_DEBUG = [ - '; SPIR-V\n', - '; Version: 1.0\n', - '; Generator: Google Shaderc over Glslang; 11\n', - '; Bound: 6\n', - '; Schema: 0\n', - ' OpCapability Shader\n', - ' %1 = OpExtInstImport "GLSL.std.450"\n', - ' OpMemoryModel Logical GLSL450\n', - ' OpEntryPoint Vertex %4 "main"\n', - ' %void = OpTypeVoid\n', - ' %3 = OpTypeFunction %void\n', - ' %4 = OpFunction %void None %3\n', # %4 vs. %main - ' %5 = OpLabel\n', - ' OpReturn\n', - ' OpFunctionEnd\n'] + """; SPIR-V +; Version: 1.0 +; Generator: Google Shaderc over Glslang; 11 +; Bound: 7 +; Schema: 0 + OpCapability Shader + %2 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" + %1 = OpString "shader.vert" + OpSource ESSL 310 %1 "// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed entry-point main +#line 1 +#version 310 es +void main() {}" + OpSourceExtension "GL_GOOGLE_cpp_style_line_directive" + OpSourceExtension "GL_GOOGLE_include_directive" + OpName %main "main" + %void = OpTypeVoid + %4 = OpTypeFunction %void + OpLine %1 2 11 + %main = OpFunction %void None %4 + %6 = OpLabel + OpLine %1 2 0 + OpReturn + OpFunctionEnd +""" +] + +ASSEMBLY_O0 = [ + """; SPIR-V +; Version: 1.0 +; Generator: Google Shaderc over Glslang; 11 +; Bound: 6 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" + OpSource ESSL 310 + OpSourceExtension "GL_GOOGLE_cpp_style_line_directive" + OpSourceExtension "GL_GOOGLE_include_directive" + OpName %main "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %main = OpFunction %void None %3 + %5 = OpLabel + OpReturn + OpFunctionEnd +"""] + +ASSEMBLY_O = [ + """; SPIR-V +; Version: 1.0 +; Generator: Google Shaderc over Glslang; 11 +; Bound: 6 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %4 "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %4 = OpFunction %void None %3 + %5 = OpLabel + OpReturn + OpFunctionEnd +"""] + +ASSEMBLY_Os = [ + """; SPIR-V +; Version: 1.0 +; Generator: Google Shaderc over Glslang; 11 +; Bound: 6 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %4 "main" + %void = OpTypeVoid + %3 = OpTypeFunction %void + %4 = OpFunction %void None %3 + %5 = OpLabel + OpReturn + OpFunctionEnd +"""] @inside_glslc_testsuite('OptionDashCapO') @@ -95,7 +118,8 @@ class TestDashCapO0(expect.ValidFileContents): environment = EMPTY_SHADER_IN_CWD glslc_args = ['-S', '-O0', 'shader.vert'] target_filename = 'shader.vert.spvasm' - expected_file_contents = ASSEMBLY_WITH_DEBUG + expected_file_contents = ASSEMBLY_O0 + @inside_glslc_testsuite('OptionDashCapO') class TestDashCapOPerformance(expect.ValidFileContents): @@ -104,7 +128,8 @@ class TestDashCapOPerformance(expect.ValidFileContents): environment = EMPTY_SHADER_IN_CWD glslc_args = ['-S', '-O', 'shader.vert'] target_filename = 'shader.vert.spvasm' - expected_file_contents = ASSEMBLY_WITHOUT_DEBUG + expected_file_contents = ASSEMBLY_O + @inside_glslc_testsuite('OptionDashCapO') class TestDashCapOs(expect.ValidFileContents): @@ -113,7 +138,7 @@ class TestDashCapOs(expect.ValidFileContents): environment = EMPTY_SHADER_IN_CWD glslc_args = ['-S', '-Os', 'shader.vert'] target_filename = 'shader.vert.spvasm' - expected_file_contents = ASSEMBLY_WITHOUT_DEBUG + expected_file_contents = ASSEMBLY_Os @inside_glslc_testsuite('OptionDashCapO') @@ -123,7 +148,7 @@ class TestDashCapOOverriding(expect.ValidFileContents): environment = EMPTY_SHADER_IN_CWD glslc_args = ['-S', '-Os', '-O0', '-Os', '-O0', 'shader.vert'] target_filename = 'shader.vert.spvasm' - expected_file_contents = ASSEMBLY_WITH_DEBUG + expected_file_contents = ASSEMBLY_O0 @inside_glslc_testsuite('OptionDashCapO') From f50d67413d416d747ac3c6f655fb9e03602323c4 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 5 Mar 2024 09:55:20 -0500 Subject: [PATCH 019/117] Update DEPS (#1402) Latest Glslang Latest SPIRV-Tools Latest SPIRV-Headers (except NV raw access chains) --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 64f532a99..2a6effa64 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '30661abd9c3e97144f79cb30f2fb5a0da2c7b93c', + 'glslang_revision': 'ad7e719c3bd7fab92be1f934d20564bdf473b8cb', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'e77d03080b90c5d361663a67834c57bb1fddaec2', - 'spirv_tools_revision': '784b064f90a597d2478064161438f4986485b5', + 'spirv_headers_revision': 'b73e168ca5e123dcf3dea8a34b19a5130f421ae1', + 'spirv_tools_revision': '5bc7c2876359787f120ceb9f9bedbbc4907438c4', } deps = { From 4f3787240cf029178b1cbc69f94f713fad88816b Mon Sep 17 00:00:00 2001 From: moritz-h <7849248+moritz-h@users.noreply.github.com> Date: Fri, 8 Mar 2024 19:52:27 +0100 Subject: [PATCH 020/117] Fix Python (#1401) --- CMakeLists.txt | 12 ++++-------- cmake/setup_build.cmake | 6 +----- glslc/test/CMakeLists.txt | 6 +++--- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bc8f5d9e..ffcb54b98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,22 +91,18 @@ if (COMPILER_SUPPORTS_EXTRA_SEMI_WARNING) add_compile_options("-Wextra-semi") endif() -if(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12") - find_package(PythonInterp 3 REQUIRED) -else () - find_package(Python COMPONENTS Interpreter REQUIRED) -endif () +find_package(Python COMPONENTS Interpreter REQUIRED) if (SHADERC_ENABLE_COPYRIGHT_CHECK) add_custom_target(check-copyright ALL - ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/add_copyright.py + ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/add_copyright.py --check WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Check copyright") endif() add_custom_target(add-copyright - ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/add_copyright.py + ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/add_copyright.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Add copyright") @@ -134,7 +130,7 @@ if(${SHADERC_ENABLE_EXAMPLES}) endif() add_custom_target(build-version - ${PYTHON_EXECUTABLE} + ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") diff --git a/cmake/setup_build.cmake b/cmake/setup_build.cmake index c5d2a55b4..936796d28 100644 --- a/cmake/setup_build.cmake +++ b/cmake/setup_build.cmake @@ -49,11 +49,7 @@ if (ANDROID) find_host_package(PythonInterp 3 REQUIRED) find_host_package(BISON) else() - if(${CMAKE_VERSION} VERSION_LESS_EQUAL "3.12") - find_package(PythonInterp 3 REQUIRED) - else () - find_package(Python COMPONENTS Interpreter REQUIRED) - endif () + find_package(Python COMPONENTS Interpreter REQUIRED) endif() option(DISABLE_RTTI "Disable RTTI in builds") diff --git a/glslc/test/CMakeLists.txt b/glslc/test/CMakeLists.txt index ac001bd33..372f21afc 100644 --- a/glslc/test/CMakeLists.txt +++ b/glslc/test/CMakeLists.txt @@ -13,15 +13,15 @@ # limitations under the License. add_test(NAME shaderc_expect_unittests - COMMAND ${PYTHON_EXECUTABLE} -m unittest expect_unittest.py + COMMAND ${Python_EXECUTABLE} -m unittest expect_unittest.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) add_test(NAME shaderc_glslc_test_framework_unittests - COMMAND ${PYTHON_EXECUTABLE} -m unittest glslc_test_framework_unittest.py + COMMAND ${Python_EXECUTABLE} -m unittest glslc_test_framework_unittest.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) if(${SHADERC_ENABLE_TESTS}) add_test(NAME glslc_tests - COMMAND ${PYTHON_EXECUTABLE} + COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glslc_test_framework.py $ $ --test-dir ${CMAKE_CURRENT_SOURCE_DIR}) From 87223cc74bff22aa606fb4da57341b14213485f2 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 8 Mar 2024 13:10:48 -0500 Subject: [PATCH 021/117] Update DEPS Glslang GitHub top of tree SPIRV-Headers GitHub top of tree SPIRV-Tools v2024.1.rc1 --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 2a6effa64..3d613500d 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': 'ad7e719c3bd7fab92be1f934d20564bdf473b8cb', + 'glslang_revision': 'd73712b8f6c9047b09e99614e20d456d5ada2390', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'b73e168ca5e123dcf3dea8a34b19a5130f421ae1', - 'spirv_tools_revision': '5bc7c2876359787f120ceb9f9bedbbc4907438c4', + 'spirv_headers_revision': '8b246ff75c6615ba4532fe4fde20f1be090c3764', + 'spirv_tools_revision': '04896c462d9f3f504c99a4698605b6524af813c1', } deps = { From d792558a8902cb39b1c237243cc4edab226513a5 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 8 Mar 2024 13:20:21 -0500 Subject: [PATCH 022/117] Finalize Shaderc v2024.0 --- CHANGES | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9a0c38a48..ef1725c22 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,9 @@ Revision history for Shaderc -v2024.0-dev 2024-01-03 - - Start development +v2024.0 + - Update dependencies + - Utilities: + - Use Python3 explicitly in utility scripts v2023.8 2024-01-03 - API: Expose rlaxed Vulkan rules from glslang From 9a658e242ad4d1a4b3491383c1c58c780e3c01ff Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 8 Mar 2024 13:22:16 -0500 Subject: [PATCH 023/117] Start Shaderc v2024.1 --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index ef1725c22..a4cabf06b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.1-dev + - Start development + v2024.0 - Update dependencies - Utilities: From e6187c722e96ca87240b515071ea9cb8d180f45d Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 15 Apr 2024 16:32:59 -0400 Subject: [PATCH 024/117] Update DEPS (#1409) Top of tree for: Glslang, SPIRV-Tools, SPIRV-Headers --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 3d613500d..8e9b3b69d 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': 'd73712b8f6c9047b09e99614e20d456d5ada2390', + 'glslang_revision': '1e4f53ab2de355296de690583bd26818264b25ff', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '8b246ff75c6615ba4532fe4fde20f1be090c3764', - 'spirv_tools_revision': '04896c462d9f3f504c99a4698605b6524af813c1', + 'spirv_headers_revision': '4f7b471f1a66b6d06462cd4ba57628cc0cd087d7', + 'spirv_tools_revision': '2904985aee4de2fd67d697242a267f5ec31814ce', } deps = { From c78975365d9360951925288b24e6b0ac02a5d603 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 16 Apr 2024 11:23:17 -0400 Subject: [PATCH 025/117] Propagate test/install options to Glslang. Update Glslang (#1397) A Glslang test needed an update to work around assumptions of the sign of a NaN. Fixes: #1396 --- DEPS | 2 +- third_party/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 8e9b3b69d..f25a3c00d 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '1e4f53ab2de355296de690583bd26818264b25ff', + 'glslang_revision': '05ba15169ea4b1471e18305786f12526600a7810', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', 'spirv_headers_revision': '4f7b471f1a66b6d06462cd4ba57628cc0cd087d7', diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index a01f31eaf..d44f62a1e 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -83,6 +83,11 @@ endif() if (NOT TARGET glslang) if (IS_DIRECTORY ${SHADERC_GLSLANG_DIR}) + if (SHADERC_ENABLE_TESTS) + # Glslang tests are off by default. Turn them on if testing Shaderc. + set(GLSLANG_TESTS ON) + endif() + set(GLSLANG_ENABLE_INSTALL $) add_subdirectory(${SHADERC_GLSLANG_DIR} glslang) endif() if (NOT TARGET glslang) From 4994385baa88f5de3682077743c16227e5e8e0a2 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 30 Apr 2024 13:33:14 -0400 Subject: [PATCH 026/117] Update DEPS SPIRV-Headers GitHub Main on 2024-04-30 SPIRV-Tools v2024.2.rc1 Glslang GitHub Main on 2024-04-30 Effcee GitHub Main on 2024-04-30 --- DEPS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPS b/DEPS index f25a3c00d..572b48f7e 100644 --- a/DEPS +++ b/DEPS @@ -6,12 +6,12 @@ vars = { 'khronos_git': 'https://github.com/KhronosGroup', 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', - 'effcee_revision' : '19b4aa87af25cb4ee779a071409732f34bfc305c', - 'glslang_revision': '05ba15169ea4b1471e18305786f12526600a7810', + 'effcee_revision' : 'aea1f4d62ca9ee2f44b5393e98e175e200a22e8e', + 'glslang_revision': '142052fa30f9eca191aa9dcf65359fcaed09eeec', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '4f7b471f1a66b6d06462cd4ba57628cc0cd087d7', - 'spirv_tools_revision': '2904985aee4de2fd67d697242a267f5ec31814ce', + 'spirv_headers_revision': '5e3ad389ee56fca27c9705d093ae5387ce404df4', + 'spirv_tools_revision': 'dd4b663e13c07fea4fbb3f70c1c91c86731099f7', } deps = { From 47a9387ef5b3600d30d84c71ec77a59dc7db46fa Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 30 Apr 2024 13:37:28 -0400 Subject: [PATCH 027/117] Finalize Shaderc v2024.1 --- CHANGES | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index a4cabf06b..5d3dd16be 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,8 @@ Revision history for Shaderc -v2024.1-dev - - Start development +v2024.1 + - Update dependencies + - Propagate test/install options to Glslang v2024.0 - Update dependencies From f59f0d11b80fd622383199c867137ededf89d43b Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 30 Apr 2024 13:38:00 -0400 Subject: [PATCH 028/117] Start Shaderc v2024.2-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 5d3dd16be..35069fe1c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.2-dev + - Start development + v2024.1 - Update dependencies - Propagate test/install options to Glslang From 85e51d8db384b9035e5646be4d16b34041f6f0fb Mon Sep 17 00:00:00 2001 From: Trice Helix <81759026+TriceHelix@users.noreply.github.com> Date: Mon, 20 May 2024 14:56:30 +0200 Subject: [PATCH 029/117] Fix comment typo in shaderc.hpp "Sets whether the compiler should generates code for max an min" -> "Sets whether the compiler should generate code for max and min" --- libshaderc/include/shaderc/shaderc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp index 3817af806..a4e93ff84 100644 --- a/libshaderc/include/shaderc/shaderc.hpp +++ b/libshaderc/include/shaderc/shaderc.hpp @@ -365,7 +365,7 @@ class CompileOptions { shaderc_compile_options_set_invert_y(options_, enable); } - // Sets whether the compiler should generates code for max an min which, + // Sets whether the compiler should generate code for max and min which, // if given a NaN operand, will return the other operand. Similarly, the // clamp builtin will favour the non-NaN operands, as if clamp were // implemented as a composition of max and min. From db94deb06894ddc30acc9c1e9988b2afd8c08315 Mon Sep 17 00:00:00 2001 From: alan-baker Date: Mon, 3 Jun 2024 11:43:05 -0400 Subject: [PATCH 030/117] Update DEPS (#1417) * Roll spirv-tools, spirv-headers, and glslang deps * Modify glslc tests where that depended on SampleCmp HLSL calls since glslang generates invalid SPIR-V --- DEPS | 6 +++--- glslc/test/option_fauto_bind_uniforms.py | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 572b48f7e..18d88e714 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : 'aea1f4d62ca9ee2f44b5393e98e175e200a22e8e', - 'glslang_revision': '142052fa30f9eca191aa9dcf65359fcaed09eeec', + 'glslang_revision': '2b19bf7e1bc0b60cf2fe9d33e5ba6b37dfc1cc83', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': '5e3ad389ee56fca27c9705d093ae5387ce404df4', - 'spirv_tools_revision': 'dd4b663e13c07fea4fbb3f70c1c91c86731099f7', + 'spirv_headers_revision': 'ff2afc3afc48dff4eec2a10f0212402a80708e38', + 'spirv_tools_revision': '70ad4dae7dc2c2d035c288b4e9ada0d7bcc26e9b', } deps = { diff --git a/glslc/test/option_fauto_bind_uniforms.py b/glslc/test/option_fauto_bind_uniforms.py index 3f90a126b..d6f86d028 100644 --- a/glslc/test/option_fauto_bind_uniforms.py +++ b/glslc/test/option_fauto_bind_uniforms.py @@ -80,8 +80,10 @@ u6[2]; u7; u8; - return float4(u8.Consume() + t2.SampleCmp(s2, 1.0, 2.0)) + t1.Sample(s1, 1.0) - + t6.Load(1); + // SampleCmp disabled due to https://github.com/KhronosGroup/glslang/issues/2444. + //return float4(u8.Consume() + t2.SampleCmp(s2, 1.0, 2.0)) + t1.Sample(s1, 1.0) + // + t6.Load(1); + return float4(u8.Consume()) + t1.Sample(s1, 1.0) + t6.Load(1); } """ @@ -340,7 +342,7 @@ class HlslFSamplerBindingBaseOptionRespected(expect.ValidAssemblyFileWithSubstr) shader = FileShader(HLSL_SHADER_WITHOUT_BINDINGS, '.frag') glslc_args = ['-S', '-x', 'hlsl', '-fhlsl-iomap', shader, '-fauto-bind-uniforms', '-fsampler-binding-base', '100'] - expected_assembly_substr = "OpDecorate %s2 Binding 102" + expected_assembly_substr = "OpDecorate %s1 Binding 101" @inside_glslc_testsuite('OptionFAutoBindUniforms') @@ -351,7 +353,7 @@ class HlslFSamplerBindingBaseForFragOptionRespected(expect.ValidAssemblyFileWith shader = FileShader(HLSL_SHADER_WITHOUT_BINDINGS, '.frag') glslc_args = ['-S', '-x', 'hlsl', '-fhlsl-iomap', shader, '-fauto-bind-uniforms', '-fsampler-binding-base', 'frag', '100'] - expected_assembly_substr = "OpDecorate %s2 Binding 102" + expected_assembly_substr = "OpDecorate %s1 Binding 101" @inside_glslc_testsuite('OptionFAutoBindUniforms') @@ -362,7 +364,7 @@ class HlslFSamplerBindingBaseForComputeOptionIgnoredWhenCompilingAsFrag(expect.V shader = FileShader(HLSL_SHADER_WITHOUT_BINDINGS, '.frag') glslc_args = ['-S', '-x', 'hlsl', '-fhlsl-iomap', shader, '-fauto-bind-uniforms', '-fsampler-binding-base', 'compute', '100'] - expected_assembly_substr = "OpDecorate %s2 Binding 2" + expected_assembly_substr = "OpDecorate %s1 Binding 1" @inside_glslc_testsuite('OptionFAutoBindUniforms') From d93a300d80e88ffeb07048ba4cc1f368be7b14e7 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 6 Jun 2024 10:02:32 -0400 Subject: [PATCH 031/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 18d88e714..0abda59cd 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', 'effcee_revision' : 'aea1f4d62ca9ee2f44b5393e98e175e200a22e8e', - 'glslang_revision': '2b19bf7e1bc0b60cf2fe9d33e5ba6b37dfc1cc83', + 'glslang_revision': '4da479aa6afa43e5a2ce4c4148c572a03123faf3', 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'ff2afc3afc48dff4eec2a10f0212402a80708e38', - 'spirv_tools_revision': '70ad4dae7dc2c2d035c288b4e9ada0d7bcc26e9b', + 'spirv_headers_revision': 'eb49bb7b1136298b77945c52b4bbbc433f7885de', + 'spirv_tools_revision': 'ce46482db7ab3ea9c52fce832d27ca40b14f8e87', } deps = { From e3b6ed37df30c6a3e16b2a9693eb38fda14a1acb Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 17 Jun 2024 11:57:20 -0400 Subject: [PATCH 032/117] Update dependencies, except Glslang --- DEPS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index 0abda59cd..bc76a38c8 100644 --- a/DEPS +++ b/DEPS @@ -5,13 +5,13 @@ vars = { 'google_git': 'https://github.com/google', 'khronos_git': 'https://github.com/KhronosGroup', - 'abseil_revision': '5be22f98733c674d532598454ae729253bc53e82', - 'effcee_revision' : 'aea1f4d62ca9ee2f44b5393e98e175e200a22e8e', + 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', + 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', 'glslang_revision': '4da479aa6afa43e5a2ce4c4148c572a03123faf3', - 'googletest_revision': 'e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b', - 're2_revision': 'c9cba76063cf4235c1a15dd14a24a4ef8d623761', - 'spirv_headers_revision': 'eb49bb7b1136298b77945c52b4bbbc433f7885de', - 'spirv_tools_revision': 'ce46482db7ab3ea9c52fce832d27ca40b14f8e87', + 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', + 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', + 'spirv_headers_revision': '2acb319af38d43be3ea76bfabf3998e5281d8d12', + 'spirv_tools_revision': '7bf2d0275e480852abfccc5ff9a4cabd388286b2', } deps = { From 70552f5862770e305be4b3af619f955340e31e50 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 17 Jun 2024 12:41:27 -0400 Subject: [PATCH 033/117] Remove VS2017 from README and download links --- README.md | 4 ++-- downloads.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3f54dedd0..0ebacfaaa 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ to provide: Linux[![Linux Build Status](https://storage.googleapis.com/shaderc/badges/build_status_linux_clang_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html) MacOS[![MacOS Build Status](https://storage.googleapis.com/shaderc/badges/build_status_macos_clang_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_release.html) -Windows[![Windows Build Status](https://storage.googleapis.com/shaderc/badges/build_status_windows_vs2017_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2017_release.html) +Windows[![Windows Build Status](https://storage.googleapis.com/shaderc/badges/build_status_windows_vs2019_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_release.html) [More downloads](downloads.md) @@ -176,7 +176,7 @@ On Linux, if cross compiling to Windows: On Windows, the following tools should be installed and available on your path: -- Visual Studio 2017 or later. Previous versions of Visual Studio may work but +- Visual Studio 2019 or later. Previous versions of Visual Studio may work but are untested and unsupported. - Git - including the associated tools, Bash, `diff`. diff --git a/downloads.md b/downloads.md index b61042290..c69ed959e 100644 --- a/downloads.md +++ b/downloads.md @@ -8,10 +8,10 @@ Download the latest builds. | Windows | Linux | MacOS | | --- | --- | --- | | [MSVC 2019](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_release.html) | -| [MSVC 2017](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2017_release.html) | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_release.html) | | +| | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_release.html) | | ## Debug | Windows | Linux | MacOS | | --- | --- | --- | | [MSVC 2019](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_debug.html) | -| [MSVC 2017](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2017_debug.html) | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_debug.html) | | +| | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_debug.html) | | From b1001b54bc8bdba8a7dc92092976e58672b72e72 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 17 Jun 2024 12:50:51 -0400 Subject: [PATCH 034/117] Remove kokoro scripts for VS2017 Fixes: #1421 --- kokoro/windows/build.bat | 3 --- kokoro/windows/build_debug_2017.bat | 23 --------------------- kokoro/windows/build_release_2017.bat | 24 ---------------------- kokoro/windows/continuous_debug_2017.cfg | 22 -------------------- kokoro/windows/continuous_release_2017.cfg | 22 -------------------- kokoro/windows/presubmit_debug_2017.cfg | 16 --------------- kokoro/windows/presubmit_release_2017.cfg | 16 --------------- 7 files changed, 126 deletions(-) delete mode 100644 kokoro/windows/build_debug_2017.bat delete mode 100644 kokoro/windows/build_release_2017.bat delete mode 100644 kokoro/windows/continuous_debug_2017.cfg delete mode 100644 kokoro/windows/continuous_release_2017.cfg delete mode 100644 kokoro/windows/presubmit_debug_2017.cfg delete mode 100644 kokoro/windows/presubmit_release_2017.cfg diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index a87cfea65..27da106dc 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -38,9 +38,6 @@ cd %SRC%\build if %VS_VERSION% == 2019 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 echo "Using VS 2019..." -) else if %VS_VERSION% == 2017 ( - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 - echo "Using VS 2017..." ) :: ######################################### diff --git a/kokoro/windows/build_debug_2017.bat b/kokoro/windows/build_debug_2017.bat deleted file mode 100644 index c1ecf87b6..000000000 --- a/kokoro/windows/build_debug_2017.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat Debug 2017 diff --git a/kokoro/windows/build_release_2017.bat b/kokoro/windows/build_release_2017.bat deleted file mode 100644 index 4102eaa45..000000000 --- a/kokoro/windows/build_release_2017.bat +++ /dev/null @@ -1,24 +0,0 @@ -:: 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat RelWithDebInfo 2017 - diff --git a/kokoro/windows/continuous_debug_2017.cfg b/kokoro/windows/continuous_debug_2017.cfg deleted file mode 100644 index 34c3b0671..000000000 --- a/kokoro/windows/continuous_debug_2017.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_debug_2017.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/continuous_release_2017.cfg b/kokoro/windows/continuous_release_2017.cfg deleted file mode 100644 index b3249d445..000000000 --- a/kokoro/windows/continuous_release_2017.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_release_2017.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/presubmit_debug_2017.cfg b/kokoro/windows/presubmit_debug_2017.cfg deleted file mode 100644 index 57168d397..000000000 --- a/kokoro/windows/presubmit_debug_2017.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/windows/build_debug_2017.bat" diff --git a/kokoro/windows/presubmit_release_2017.cfg b/kokoro/windows/presubmit_release_2017.cfg deleted file mode 100644 index 16499fc21..000000000 --- a/kokoro/windows/presubmit_release_2017.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/windows/build_release_2017.bat" From 2fc4823e5727d32506ffea869e890b2b574a8980 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 21 Jun 2024 15:27:38 -0400 Subject: [PATCH 035/117] Finalize Shaderc v2024.2, update dependencies --- CHANGES | 7 ++++++- DEPS | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 35069fe1c..b62d6d17f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,12 @@ Revision history for Shaderc v2024.2-dev - - Start development + - Update dependencies: + Glslang: top of tree 2024-06-21 + SPIRV-Header: top of tree 2024-06-21 + SPIRV-Tools: v2024.3.rc1 + - Build: + - Remove support for VS2017 v2024.1 - Update dependencies diff --git a/DEPS b/DEPS index bc76a38c8..ab848fbe0 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '4da479aa6afa43e5a2ce4c4148c572a03123faf3', + 'glslang_revision': '2d8b71fc63578a93726c05e0565c3ef064bdc1ba', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '2acb319af38d43be3ea76bfabf3998e5281d8d12', - 'spirv_tools_revision': '7bf2d0275e480852abfccc5ff9a4cabd388286b2', + 'spirv_tools_revision': '0cfe9e7219148716dfd30b37f4d21753f098707a', } deps = { From 3ac03b8ad85a8e328a6182cddee8d05810bd5a2c Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 21 Jun 2024 15:54:37 -0400 Subject: [PATCH 036/117] Finalize Shaderc v2024.2 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b62d6d17f..d953eecc7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Revision history for Shaderc -v2024.2-dev +v2024.2 - Update dependencies: Glslang: top of tree 2024-06-21 SPIRV-Header: top of tree 2024-06-21 From d875f303474e0051b286a11dd772817ab190e02e Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 21 Jun 2024 15:55:07 -0400 Subject: [PATCH 037/117] Start Shaderc v2024.3-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index d953eecc7..1c79ad67b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.3-dev + - Start development + v2024.2 - Update dependencies: Glslang: top of tree 2024-06-21 From 0f62fb2e24d9d4728e4593704dea2459d6bdb5f7 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 4 Jul 2024 10:29:01 -0400 Subject: [PATCH 038/117] Fix expectations: Glslang orders decorations on an object by enum React to https://github.com/KhronosGroup/glslang/pull/3635 which deduplicates decorations on an object. It has the side effect of ordering decorations on an object by the decoration enum. --- DEPS | 2 +- glslc/test/option_fresource_set_binding.py | 32 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/DEPS b/DEPS index ab848fbe0..9aaf2c7f5 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '2d8b71fc63578a93726c05e0565c3ef064bdc1ba', + 'glslang_revision': '5939e32b87487fa9c72ab336ebfcc5ae26d9ab6d', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '2acb319af38d43be3ea76bfabf3998e5281d8d12', diff --git a/glslc/test/option_fresource_set_binding.py b/glslc/test/option_fresource_set_binding.py index 254004e77..03edda70e 100644 --- a/glslc/test/option_fresource_set_binding.py +++ b/glslc/test/option_fresource_set_binding.py @@ -38,10 +38,10 @@ class FRegisterSetBindingForFragRespected(expect.ValidAssemblyFileWithSubstr): '-fresource-set-binding', 'frag', 't4', '9', '16', 't5', '17', '18'] - expected_assembly_substr = """OpDecorate %t4 DescriptorSet 9 - OpDecorate %t4 Binding 16 - OpDecorate %t5 DescriptorSet 17 - OpDecorate %t5 Binding 18""" + expected_assembly_substr = """OpDecorate %t4 Binding 16 + OpDecorate %t4 DescriptorSet 9 + OpDecorate %t5 Binding 18 + OpDecorate %t5 DescriptorSet 17""" @inside_glslc_testsuite('OptionFRegisterSetBinding') @@ -52,10 +52,10 @@ class FRegisterSetBindingForFragRespectedJustOneTriple(expect.ValidAssemblyFileW glslc_args = ['-S', '-x', 'hlsl', shader, '-fresource-set-binding', 'frag', 't4', '9', '16'] - expected_assembly_substr = """OpDecorate %t4 DescriptorSet 9 - OpDecorate %t4 Binding 16 - OpDecorate %t5 DescriptorSet 0 - OpDecorate %t5 Binding 5""" + expected_assembly_substr = """OpDecorate %t4 Binding 16 + OpDecorate %t4 DescriptorSet 9 + OpDecorate %t5 Binding 5 + OpDecorate %t5 DescriptorSet 0""" @inside_glslc_testsuite('OptionFRegisterSetBinding') @@ -67,10 +67,10 @@ class FRegisterSetBindingForWrongStageIgnored(expect.ValidAssemblyFileWithSubstr '-fresource-set-binding', 'vert', 't4', '9', '16', 't5', '17', '18'] - expected_assembly_substr = """OpDecorate %t4 DescriptorSet 0 - OpDecorate %t4 Binding 4 - OpDecorate %t5 DescriptorSet 0 - OpDecorate %t5 Binding 5""" + expected_assembly_substr = """OpDecorate %t4 Binding 4 + OpDecorate %t4 DescriptorSet 0 + OpDecorate %t5 Binding 5 + OpDecorate %t5 DescriptorSet 0""" @inside_glslc_testsuite('OptionFRegisterSetBinding') @@ -82,10 +82,10 @@ class FRegisterSetBindingForAllRespected(expect.ValidAssemblyFileWithSubstr): '-fresource-set-binding', 't4', '9', '16', 't5', '17', '18'] - expected_assembly_substr = """OpDecorate %t4 DescriptorSet 9 - OpDecorate %t4 Binding 16 - OpDecorate %t5 DescriptorSet 17 - OpDecorate %t5 Binding 18""" + expected_assembly_substr = """OpDecorate %t4 Binding 16 + OpDecorate %t4 DescriptorSet 9 + OpDecorate %t5 Binding 18 + OpDecorate %t5 DescriptorSet 17""" @inside_glslc_testsuite('OptionFRegisterSetBinding') From 237ac6ff3045c378152354767597c3d73ddb1958 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 4 Jul 2024 10:15:29 -0400 Subject: [PATCH 039/117] Fix Python string escapes --- glslc/test/option_mfmt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslc/test/option_mfmt.py b/glslc/test/option_mfmt.py index bd5847863..f87102f4e 100644 --- a/glslc/test/option_mfmt.py +++ b/glslc/test/option_mfmt.py @@ -22,7 +22,7 @@ # match exactly, and there should not be a trailing comma at the end of the # list. When -mfmt=c is specified, curly brackets should be presented. MINIMAL_SHADER_NUM_FORMAT_PATTERN = "^0x07230203.*[0-9a-f]$" -MINIMAL_SHADER_C_FORMAT_PATTERN = "^\{0x07230203.*[0-9a-f]\}" +MINIMAL_SHADER_C_FORMAT_PATTERN = "^\\{0x07230203.*[0-9a-f]\\}" ERROR_SHADER = '#version 140\n#error\nvoid main() {}' From 5d0f6ed6e46d3c0ccd23151c6a1486c2ec90c037 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 5 Jul 2024 16:48:58 -0400 Subject: [PATCH 040/117] kokoro: use Python 3.12 on Linux Bug: crbug.com/350048185 --- kokoro/linux/build-docker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kokoro/linux/build-docker.sh b/kokoro/linux/build-docker.sh index 7d71b6123..bdc45731d 100755 --- a/kokoro/linux/build-docker.sh +++ b/kokoro/linux/build-docker.sh @@ -27,6 +27,7 @@ BUILD_TYPE="Debug" using cmake-3.17.2 using ninja-1.10.0 +using python-3.12 if [ ! -z "$COMPILER" ]; then using "$COMPILER" From 6d2848321250a19641800f8afb07738f3b0b7f18 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 8 Aug 2024 20:13:16 -0400 Subject: [PATCH 041/117] update DEPS: glslang, spirv-tools, spirv-headers (#1440) --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 9aaf2c7f5..ba52f9e53 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '5939e32b87487fa9c72ab336ebfcc5ae26d9ab6d', + 'glslang_revision': '5398d55e33dff7d26fecdd2c35808add986c558c', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '2acb319af38d43be3ea76bfabf3998e5281d8d12', - 'spirv_tools_revision': '0cfe9e7219148716dfd30b37f4d21753f098707a', + 'spirv_headers_revision': 'f013f08e4455bcc1f0eed8e3dd5e2009682656d9', + 'spirv_tools_revision': 'b64a423b44f448df5464978173e28be12069b73c', } deps = { From 7bab426236b2ed926ce74c93824cd57aea2c35bd Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 11 Sep 2024 19:20:19 -0400 Subject: [PATCH 042/117] Update deps, adapt ndk-build glsang dpeendencies ndk-build: - libshaderc_util depends on glslang (or link will fail) - remove Glslang's OSDependent lib (it's now empty) --- Android.mk | 1 - DEPS | 6 +++--- libshaderc_util/Android.mk | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Android.mk b/Android.mk index f8bb96b6e..b2a949e19 100644 --- a/Android.mk +++ b/Android.mk @@ -19,7 +19,6 @@ include $(ROOT_SHADERC_PATH)/libshaderc_util/Android.mk include $(ROOT_SHADERC_PATH)/libshaderc/Android.mk ALL_LIBS:=libglslang.a \ - libOSDependent.a \ libshaderc.a \ libshaderc_util.a \ libSPIRV.a \ diff --git a/DEPS b/DEPS index ba52f9e53..ff329d0ce 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '5398d55e33dff7d26fecdd2c35808add986c558c', + 'glslang_revision': '12a17b7ce41436427e358608183100b1103274da', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'f013f08e4455bcc1f0eed8e3dd5e2009682656d9', - 'spirv_tools_revision': 'b64a423b44f448df5464978173e28be12069b73c', + 'spirv_headers_revision': '2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801', + 'spirv_tools_revision': 'd160e170d74ff45cb2a88dfb365bdfd896016f7c', } deps = { diff --git a/libshaderc_util/Android.mk b/libshaderc_util/Android.mk index 9642e254d..78a2efefd 100644 --- a/libshaderc_util/Android.mk +++ b/libshaderc_util/Android.mk @@ -27,6 +27,6 @@ LOCAL_SRC_FILES:=src/args.cc \ src/shader_stage.cc \ src/spirv_tools_wrapper.cc \ src/version_profile.cc -LOCAL_STATIC_LIBRARIES:=SPIRV SPIRV-Tools-opt +LOCAL_STATIC_LIBRARIES:=SPIRV SPIRV-Tools-opt glslang LOCAL_C_INCLUDES:=$(LOCAL_PATH)/include include $(BUILD_STATIC_LIBRARY) From 3871c0aa9169b1bbe52facf999770645f52b354c Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 16 Sep 2024 08:56:49 -0400 Subject: [PATCH 043/117] Don't use friendly names for SPIR-V validation errors (#1442) Setting up friendly names requires parsing the entire module which costs a lot of time due to (1) scanning the whole module, and (2) creating string names for many IDs. This is a followup to https://github.com/KhronosGroup/SPIRV-Tools/issues/5802 There, Blender was suffering long shader suite build times due to serialization on locale. But secondarily we noticed there was a lot of string manipulation when setting up the validator, all because the friendly name mapper is on by default for the optimizer. Turn off friendly names in the optimizer's use of the validator. The validation errors are only emitted when there is a compiler bug, so they should be rare. Don't make every compilation pay the cost. --- libshaderc_util/src/spirv_tools_wrapper.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libshaderc_util/src/spirv_tools_wrapper.cc b/libshaderc_util/src/spirv_tools_wrapper.cc index b4f57f895..fbc61cc8a 100644 --- a/libshaderc_util/src/spirv_tools_wrapper.cc +++ b/libshaderc_util/src/spirv_tools_wrapper.cc @@ -126,6 +126,11 @@ bool SpirvToolsOptimize(Compiler::TargetEnv env, val_opts.SetRelaxLogicalPointer(true); // This uses relaxed rules for pre-legalized HLSL. val_opts.SetBeforeHlslLegalization(true); + // Don't use friendly names when printing validation errors. + // It incurs a high startup cost whether or not there is an + // error. Validation failures are compiler bugs, and so they + // should be rare anyway. + val_opts.SetFriendlyNames(false); // Set additional optimizer options. optimizer_options.set_validator_options(val_opts); From 9530b884b3fd60c04b0f36b4c8547e030306ba6c Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 20 Sep 2024 16:01:38 -0400 Subject: [PATCH 044/117] Update deps: glslang, spirv-tools --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ff329d0ce..ee130bc47 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '12a17b7ce41436427e358608183100b1103274da', + 'glslang_revision': 'c5b76b78c9dec95251e9c1840a671e19bf61abe3', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801', - 'spirv_tools_revision': 'd160e170d74ff45cb2a88dfb365bdfd896016f7c', + 'spirv_tools_revision': '01c8438ee4ac52c248119b7e03e0b021f853b51a', } deps = { From eb479631f136947366c992674b1a4dd638c7ae28 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 23 Sep 2024 17:30:17 -0400 Subject: [PATCH 045/117] Update DEPS: Glslang --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ee130bc47..e404ddb99 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': 'c5b76b78c9dec95251e9c1840a671e19bf61abe3', + 'glslang_revision': '467ce01c71e38cf01814c48987a5c0dadd914df4', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801', From ff84893dd52d28f0b1737d2635733d952013bd9c Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 23 Sep 2024 17:30:59 -0400 Subject: [PATCH 046/117] Finalize Shaderc v2024.3 --- CHANGES | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 1c79ad67b..8fd7cff29 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,19 @@ Revision history for Shaderc -v2024.3-dev - - Start development +v2024.3 + - Update dependencies: Glslang, SPRIV-Tools, SPIRV-Headers + - SPIRV-Tools is at v2024.4.rc1 + - This incorporates a SPIRV-Tools fix which was limiting parallelism. + Validator friendly name generation was serializing on a mutex + protecting the locale object. + - During HLSL compilation or any optimizing compile, don't tell the + validator to use "friendly names". This should save time spent in the + initial validation step of the optimization recipe. + - Adapt test golden results to Glslang changes which reorder + decorations by object enum value. + - Fix ndk-build library dependencies: libshaderc_util depends on glslang + - Use Python 3.12 on Linux CI bots + - Fix Python 3.12 warnings for string escapes v2024.2 - Update dependencies: From d2564ba5989c9de1a76714b3e59ec60595e9be50 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 23 Sep 2024 17:31:29 -0400 Subject: [PATCH 047/117] Start Shader v2024.4 --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 8fd7cff29..071ac7690 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.4-dev + - Start development + v2024.3 - Update dependencies: Glslang, SPRIV-Tools, SPIRV-Headers - SPIRV-Tools is at v2024.4.rc1 From f77c871b1da90ea33eca415e79e57f0a9aaf059f Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 8 Oct 2024 14:31:05 -0400 Subject: [PATCH 048/117] Update dependencies to top of tree --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index e404ddb99..916f9079d 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '467ce01c71e38cf01814c48987a5c0dadd914df4', + 'glslang_revision': '9d00d6d6cad638bebc7cd852b1e6e1244de42679', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801', - 'spirv_tools_revision': '01c8438ee4ac52c248119b7e03e0b021f853b51a', + 'spirv_headers_revision': 'a62b032007b2e7a69f24a195cbfbd0cf22d31bb0', + 'spirv_tools_revision': '4310fd4edae21d711ab31f5183704ad320329419', } deps = { From 740fd36a94f18358fae387588b405ae27058627a Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 9 Oct 2024 17:55:59 -0400 Subject: [PATCH 049/117] Update SPIRV-Tools, SPIRV-Headers These now use the 'alias' mechanism in the SPIR-V json grammar. See https://github.com/KhronosGroup/SPIRV-Headers/pull/447 and https://github.com/KhronosGroup/SPIRV-Tools/pull/5799 --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 916f9079d..ed80e582c 100644 --- a/DEPS +++ b/DEPS @@ -10,8 +10,8 @@ vars = { 'glslang_revision': '9d00d6d6cad638bebc7cd852b1e6e1244de42679', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'a62b032007b2e7a69f24a195cbfbd0cf22d31bb0', - 'spirv_tools_revision': '4310fd4edae21d711ab31f5183704ad320329419', + 'spirv_headers_revision': '07ddb1c0f1ffa929262d4568481a692bb0fb1535', + 'spirv_tools_revision': 'fcf994a619608c2bdb505189f6e325b1a6b4f294', } deps = { From ddac450a36a3be28a2c2173f26703249dd83cfdf Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 24 Oct 2024 14:10:49 -0400 Subject: [PATCH 050/117] Update dependencies: SPV_NV_cooperative_matrix2, SPV_NV_tensor_addressing --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index ed80e582c..e805828ec 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '9d00d6d6cad638bebc7cd852b1e6e1244de42679', + 'glslang_revision': '2fed4fc07c9190df5369db787a679096c55474e5', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '07ddb1c0f1ffa929262d4568481a692bb0fb1535', - 'spirv_tools_revision': 'fcf994a619608c2bdb505189f6e325b1a6b4f294', + 'spirv_headers_revision': '22c4d1b1e9d1c7d9aa5086c93e6491f21080019b', + 'spirv_tools_revision': 'ce92630396c2fd2d6d04819369116af4fb141a28', } deps = { From 8c4d729001709e907fba57041749d9ed8985891c Mon Sep 17 00:00:00 2001 From: Jeff Bolz Date: Wed, 6 Nov 2024 11:07:20 -0600 Subject: [PATCH 051/117] Update glslang dep to include GLSL_NV_cooperative_matrix2 (#1451) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e805828ec..239bf7c33 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '2fed4fc07c9190df5369db787a679096c55474e5', + 'glslang_revision': 'd0e67c58134377f065a509845ca6b7d463f5b487', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '22c4d1b1e9d1c7d9aa5086c93e6491f21080019b', From ffd3be52bbcbd428e9de40da996ad09645fc0dc8 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 25 Nov 2024 13:01:10 -0500 Subject: [PATCH 052/117] update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 239bf7c33..87c885603 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': 'd0e67c58134377f065a509845ca6b7d463f5b487', + 'glslang_revision': 'd19905df53ce4b995d270c9c5f0cc53ee779729e', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '22c4d1b1e9d1c7d9aa5086c93e6491f21080019b', - 'spirv_tools_revision': 'ce92630396c2fd2d6d04819369116af4fb141a28', + 'spirv_headers_revision': '36d5e2ddaa54c70d2f29081510c66f4fc98e5e53', + 'spirv_tools_revision': 'ea1d8cd9814852428d25d3ea113683a6c9686afb', } deps = { From 082a73bfa9088bd3da35734023a9167ba92aae6c Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 27 Nov 2024 14:33:31 -0500 Subject: [PATCH 053/117] Update glslang, spirv-tools dependencies --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 87c885603..1b2bbb3e4 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': 'd19905df53ce4b995d270c9c5f0cc53ee779729e', + 'glslang_revision': '0099ed6ad09a78b083c93be9369791dd72cf8a33', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '36d5e2ddaa54c70d2f29081510c66f4fc98e5e53', - 'spirv_tools_revision': 'ea1d8cd9814852428d25d3ea113683a6c9686afb', + 'spirv_tools_revision': '7c58952fa8ab2fff009cb6710fad34bd1ce7dff3', } deps = { From 8d9eb88789a15fa4ac75e6b22ce504a499014578 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 2 Dec 2024 18:16:53 -0500 Subject: [PATCH 054/117] Add Vulkan 1.4 support Update Glslang, SPIRV-Tools, SPIRV-Headers dependencies --- DEPS | 4 +- glslc/README.asciidoc | 2 + glslc/src/main.cc | 21 ++- glslc/test/option_target_env.py | 15 +- glslc/test/parameter_tests.py | 6 +- libshaderc/include/shaderc/env.h | 1 + libshaderc/src/shaderc.cc | 27 ++-- libshaderc/src/shaderc_cpp_test.cc | 147 ++++++++++++------ libshaderc/src/shaderc_test.cc | 132 +++++++++++----- .../include/libshaderc_util/compiler.h | 26 ++-- libshaderc_util/src/compiler.cc | 22 ++- libshaderc_util/src/compiler_test.cc | 40 +++-- libshaderc_util/src/spirv_tools_wrapper.cc | 2 + 13 files changed, 299 insertions(+), 146 deletions(-) diff --git a/DEPS b/DEPS index 1b2bbb3e4..fd08b5c68 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': '0099ed6ad09a78b083c93be9369791dd72cf8a33', + 'glslang_revision': 'a0995c49ebcaca2c6d3b03efbabf74f3843decdb', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '36d5e2ddaa54c70d2f29081510c66f4fc98e5e53', - 'spirv_tools_revision': '7c58952fa8ab2fff009cb6710fad34bd1ce7dff3', + 'spirv_tools_revision': '3fb52548bc8a68d349d31e21bd4e80e3d953e87c', } deps = { diff --git a/glslc/README.asciidoc b/glslc/README.asciidoc index c9ffbdcb7..c1854333a 100644 --- a/glslc/README.asciidoc +++ b/glslc/README.asciidoc @@ -234,6 +234,8 @@ the following: * `vulkan1.0`: create SPIR-V under Vulkan 1.0 semantics. * `vulkan1.1`: create SPIR-V under Vulkan 1.1 semantics. * `vulkan1.2`: create SPIR-V under Vulkan 1.2 semantics. +* `vulkan1.3`: create SPIR-V under Vulkan 1.3 semantics. +* `vulkan1.4`: create SPIR-V under Vulkan 1.4 semantics. * `opengl`: create SPIR-V under OpenGL 4.5 semantics. * `opengl4.5`: create SPIR-V under OpenGL 4.5 semantics. diff --git a/glslc/src/main.cc b/glslc/src/main.cc index 5cc3f4385..5e7c68d4b 100644 --- a/glslc/src/main.cc +++ b/glslc/src/main.cc @@ -165,6 +165,7 @@ An input file of - represents standard input. vulkan1.1 vulkan1.2 vulkan1.3 + vulkan1.4 vulkan # Same as vulkan1.0 opengl4.5 opengl # Same as opengl4.5 @@ -174,8 +175,9 @@ An input file of - represents standard input. required to be supported for the target environment. For example, default for vulkan1.0 is spv1.0, and the default for vulkan1.1 is spv1.3, - the default for vulkan1.2 is spv1.5. - the default for vulkan1.3 is spv1.6. + the default for vulkan1.2 is spv1.5, + the default for vulkan1.3 is spv1.6, + the default for vulkan1.4 is spv1.6. Values are: spv1.0, spv1.1, spv1.2, spv1.3, spv1.4, spv1.5, spv1.6 --version Display compiler version information. @@ -265,8 +267,9 @@ int main(int argc, char** argv) { // Sets binding base for the given uniform kind. If stage is // shader_glsl_infer_from_source then set it for all shader stages. - auto set_binding_base = [&compiler]( - shaderc_shader_kind stage, shaderc_uniform_kind kind, uint32_t base) { + auto set_binding_base = [&compiler](shaderc_shader_kind stage, + shaderc_uniform_kind kind, + uint32_t base) { if (stage == shaderc_glsl_infer_from_source) compiler.options().SetBindingBase(kind, base); else @@ -452,6 +455,9 @@ int main(int argc, char** argv) { } else if (target_env_str == "vulkan1.3") { target_env = shaderc_target_env_vulkan; version = shaderc_env_version_vulkan_1_3; + } else if (target_env_str == "vulkan1.4") { + target_env = shaderc_target_env_vulkan; + version = shaderc_env_version_vulkan_1_4; } else if (target_env_str == "opengl") { target_env = shaderc_target_env_opengl; } else if (target_env_str == "opengl4.5") { @@ -675,9 +681,10 @@ int main(int argc, char** argv) { // from the file name. If current_fshader_stage is specifed to one of // the forced shader kinds, use that for the following compilation. input_files.emplace_back(glslc::InputFileSpec{ - arg.str(), (current_fshader_stage == shaderc_glsl_infer_from_source - ? glslc::DeduceDefaultShaderKindFromFileName(arg) - : current_fshader_stage), + arg.str(), + (current_fshader_stage == shaderc_glsl_infer_from_source + ? glslc::DeduceDefaultShaderKindFromFileName(arg) + : current_fshader_stage), language, current_entry_point_name}); } } diff --git a/glslc/test/option_target_env.py b/glslc/test/option_target_env.py index 91e6022e1..9555a77de 100644 --- a/glslc/test/option_target_env.py +++ b/glslc/test/option_target_env.py @@ -131,15 +131,26 @@ class TestTargetEnvEqVulkan1_2WithVulkan1_1ShaderSucceeds(expect.ValidObjectFile glslc_args = ['--target-env=vulkan1.2', '-c', shader] @inside_glslc_testsuite('OptionTargetEnv') -class TestTargetEnvEqVulkan1_2WithVulkan1_0ShaderSucceeds(expect.ValidObjectFile1_6): +class TestTargetEnvEqVulkan1_3WithVulkan1_0ShaderSucceeds(expect.ValidObjectFile1_6): shader = FileShader(vulkan_vertex_shader(), '.vert') glslc_args = ['--target-env=vulkan1.3', '-c', shader] @inside_glslc_testsuite('OptionTargetEnv') -class TestTargetEnvEqVulkan1_2WithVulkan1_1ShaderSucceeds(expect.ValidObjectFile1_6): +class TestTargetEnvEqVulkan1_3WithVulkan1_1ShaderSucceeds(expect.ValidObjectFile1_6): shader = FileShader(vulkan_compute_subgroup_shader(), '.comp') glslc_args = ['--target-env=vulkan1.3', '-c', shader] +@inside_glslc_testsuite('OptionTargetEnv') +class TestTargetEnvEqVulkan1_4WithVulkan1_0ShaderSucceeds(expect.ValidObjectFile1_6): + shader = FileShader(vulkan_vertex_shader(), '.vert') + glslc_args = ['--target-env=vulkan1.4', '-c', shader] + +@inside_glslc_testsuite('OptionTargetEnv') +class TestTargetEnvEqVulkan1_4WithVulkan1_1ShaderSucceeds(expect.ValidObjectFile1_6): + shader = FileShader(vulkan_compute_subgroup_shader(), '.comp') + glslc_args = ['--target-env=vulkan1.4', '-c', shader] + + @inside_glslc_testsuite('OptionTargetEnv') class TestTargetEnvEqOpenGL4_5WithOpenGLShaderSucceeds(expect.ValidObjectFile): shader = FileShader(opengl_vertex_shader(), '.vert') diff --git a/glslc/test/parameter_tests.py b/glslc/test/parameter_tests.py index 6e3e1cdce..d49621060 100644 --- a/glslc/test/parameter_tests.py +++ b/glslc/test/parameter_tests.py @@ -169,6 +169,7 @@ class HelpParameters( vulkan1.1 vulkan1.2 vulkan1.3 + vulkan1.4 vulkan # Same as vulkan1.0 opengl4.5 opengl # Same as opengl4.5 @@ -178,8 +179,9 @@ class HelpParameters( required to be supported for the target environment. For example, default for vulkan1.0 is spv1.0, and the default for vulkan1.1 is spv1.3, - the default for vulkan1.2 is spv1.5. - the default for vulkan1.3 is spv1.6. + the default for vulkan1.2 is spv1.5, + the default for vulkan1.3 is spv1.6, + the default for vulkan1.4 is spv1.6. Values are: spv1.0, spv1.1, spv1.2, spv1.3, spv1.4, spv1.5, spv1.6 --version Display compiler version information. diff --git a/libshaderc/include/shaderc/env.h b/libshaderc/include/shaderc/env.h index 14b418dcd..3d32b2a9a 100644 --- a/libshaderc/include/shaderc/env.h +++ b/libshaderc/include/shaderc/env.h @@ -41,6 +41,7 @@ typedef enum { shaderc_env_version_vulkan_1_1 = ((1u << 22) | (1 << 12)), shaderc_env_version_vulkan_1_2 = ((1u << 22) | (2 << 12)), shaderc_env_version_vulkan_1_3 = ((1u << 22) | (3 << 12)), + shaderc_env_version_vulkan_1_4 = ((1u << 22) | (4 << 12)), // For OpenGL, use the number from #version in shaders. // TODO(dneto): Currently no difference between OpenGL 4.5 and 4.6. // See glslang/Standalone/Standalone.cpp diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc index 63f1bbc6c..821f31fb9 100644 --- a/libshaderc/src/shaderc.cc +++ b/libshaderc/src/shaderc.cc @@ -110,7 +110,7 @@ class StageDeducer { public: explicit StageDeducer( shaderc_shader_kind kind = shaderc_glsl_infer_from_source) - : kind_(kind), error_(false){} + : kind_(kind), error_(false) {} // The method that underlying glslang will call to determine the shader stage // to be used in current compilation. It is called only when there is neither // forced shader kind (or say stage, in the view of glslang), nor #pragma @@ -203,9 +203,9 @@ class InternalFileIncluder : public shaderc_util::CountingIncluder { void* user_data) : resolver_(resolver), result_releaser_(result_releaser), - user_data_(user_data){} + user_data_(user_data) {} InternalFileIncluder() - : resolver_(nullptr), result_releaser_(nullptr), user_data_(nullptr){} + : resolver_(nullptr), result_releaser_(nullptr), user_data_(nullptr) {} private: // Check the validity of the callbacks. @@ -311,6 +311,10 @@ shaderc_util::Compiler::TargetEnvVersion GetCompilerTargetEnvVersion( version_number) { return Compiler::TargetEnvVersion::Vulkan_1_3; } + if (static_cast(Compiler::TargetEnvVersion::Vulkan_1_4) == + version_number) { + return Compiler::TargetEnvVersion::Vulkan_1_4; + } if (static_cast(Compiler::TargetEnvVersion::OpenGL_4_5) == version_number) { return Compiler::TargetEnvVersion::OpenGL_4_5; @@ -569,8 +573,8 @@ void shaderc_compile_options_set_vulkan_rules_relaxed( options->compiler.SetVulkanRulesRelaxed(enable); } -void shaderc_compile_options_set_invert_y( - shaderc_compile_options_t options, bool enable) { +void shaderc_compile_options_set_invert_y(shaderc_compile_options_t options, + bool enable) { options->compiler.EnableInvertY(enable); } @@ -587,9 +591,7 @@ shaderc_compiler_t shaderc_compiler_initialize() { return compiler; } -void shaderc_compiler_release(shaderc_compiler_t compiler) { - delete compiler; -} +void shaderc_compiler_release(shaderc_compiler_t compiler) { delete compiler; } namespace { shaderc_compilation_result_t CompileToSpecifiedOutputType( @@ -629,7 +631,8 @@ shaderc_compilation_result_t CompileToSpecifiedOutputType( std::tie(compilation_succeeded, compilation_output_data, compilation_output_data_size_in_bytes) = additional_options->compiler.Compile( - source_string, forced_stage, input_file_name_str, entry_point_name, + source_string, forced_stage, input_file_name_str, + entry_point_name, // stage_deducer has a flag: error_, which we need to check later. // We need to make this a reference wrapper, so that std::function // won't make a copy for this callable object. @@ -641,9 +644,9 @@ shaderc_compilation_result_t CompileToSpecifiedOutputType( std::tie(compilation_succeeded, compilation_output_data, compilation_output_data_size_in_bytes) = shaderc_util::Compiler().Compile( - source_string, forced_stage, input_file_name_str, entry_point_name, - std::ref(stage_deducer), includer, output_type, &errors, - &total_warnings, &total_errors); + source_string, forced_stage, input_file_name_str, + entry_point_name, std::ref(stage_deducer), includer, output_type, + &errors, &total_warnings, &total_errors); } result->messages = errors.str(); diff --git a/libshaderc/src/shaderc_cpp_test.cc b/libshaderc/src/shaderc_cpp_test.cc index 0f1f37f05..401d5b984 100644 --- a/libshaderc/src/shaderc_cpp_test.cc +++ b/libshaderc/src/shaderc_cpp_test.cc @@ -103,12 +103,12 @@ class CppInterface : public testing::Test { // Compiles a shader, asserts compilation success, and returns the warning // messages. // The input file name is set to "shader" by default. - std::string CompilationWarnings( - const std::string& shader, shaderc_shader_kind kind, - // This could default to options_, but that can - // be easily confused with a no-options-provided - // case: - const CompileOptions& options) { + std::string CompilationWarnings(const std::string& shader, + shaderc_shader_kind kind, + // This could default to options_, but that + // can be easily confused with a + // no-options-provided case: + const CompileOptions& options) { const auto compilation_result = compiler_.CompileGlslToSpv(shader, kind, "shader", options); EXPECT_TRUE(CompilationResultIsSuccess(compilation_result)) << kind << '\n' @@ -458,9 +458,8 @@ TEST_F(CppInterface, ForcedVersionProfileRedundantProfileStd) { TEST_F(CppInterface, GenerateDebugInfoBinary) { options_.SetGenerateDebugInfo(); - const std::string binary_output = - CompilationOutput(kMinimalDebugInfoShader, - shaderc_glsl_vertex_shader, options_); + const std::string binary_output = CompilationOutput( + kMinimalDebugInfoShader, shaderc_glsl_vertex_shader, options_); // The binary output should contain the name of the vector (debug_info_sample) // null-terminated, as well as the whole original source. std::string vector_name("debug_info_sample"); @@ -472,9 +471,8 @@ TEST_F(CppInterface, GenerateDebugInfoBinary) { TEST_F(CppInterface, GenerateDebugInfoBinaryClonedOptions) { options_.SetGenerateDebugInfo(); CompileOptions cloned_options(options_); - const std::string binary_output = - CompilationOutput(kMinimalDebugInfoShader, - shaderc_glsl_vertex_shader, cloned_options); + const std::string binary_output = CompilationOutput( + kMinimalDebugInfoShader, shaderc_glsl_vertex_shader, cloned_options); // The binary output should contain the name of the vector (debug_info_sample) // null-terminated, as well as the whole original source. std::string vector_name("debug_info_sample"); @@ -846,39 +844,39 @@ TEST_P(IncluderTests, SetIncluderClonedOptions) { } INSTANTIATE_TEST_SUITE_P(CppInterface, IncluderTests, - testing::ValuesIn(std::vector{ - IncluderTestCase( - // Fake file system. - { - {"root", - "#version 150\n" - "void foo() {}\n" - "#include \"path/to/file_1\"\n"}, - {"path/to/file_1", "content of file_1\n"}, - }, - // Expected output. - "#line 0 \"path/to/file_1\"\n" - " content of file_1\n" - "#line 3"), - IncluderTestCase( - // Fake file system. - {{"root", - "#version 150\n" - "void foo() {}\n" - "#include \"path/to/file_1\"\n"}, - {"path/to/file_1", - "#include \"path/to/file_2\"\n" - "content of file_1\n"}, - {"path/to/file_2", "content of file_2\n"}}, - // Expected output. - "#line 0 \"path/to/file_1\"\n" - "#line 0 \"path/to/file_2\"\n" - " content of file_2\n" - "#line 1 \"path/to/file_1\"\n" - " content of file_1\n" - "#line 3"), - - })); + testing::ValuesIn(std::vector{ + IncluderTestCase( + // Fake file system. + { + {"root", + "#version 150\n" + "void foo() {}\n" + "#include \"path/to/file_1\"\n"}, + {"path/to/file_1", "content of file_1\n"}, + }, + // Expected output. + "#line 0 \"path/to/file_1\"\n" + " content of file_1\n" + "#line 3"), + IncluderTestCase( + // Fake file system. + {{"root", + "#version 150\n" + "void foo() {}\n" + "#include \"path/to/file_1\"\n"}, + {"path/to/file_1", + "#include \"path/to/file_2\"\n" + "content of file_1\n"}, + {"path/to/file_2", "content of file_2\n"}}, + // Expected output. + "#line 0 \"path/to/file_1\"\n" + "#line 0 \"path/to/file_2\"\n" + " content of file_2\n" + "#line 1 \"path/to/file_1\"\n" + " content of file_1\n" + "#line 3"), + + })); TEST_F(CppInterface, WarningsOnLine) { // By default the compiler will emit a warning on line 2 complaining @@ -1077,6 +1075,7 @@ TEST_F(CppInterface, TargetEnvCompileOptionsVulkan1_0EnvVulkan1_1ShaderFails) { shaderc_glsl_compute_shader, options_)); } +// Simple Vulkan 1.1 tests TEST_F(CppInterface, TargetEnvCompileOptionsVulkan1_1EnvVulkan1_0ShaderSucceeds) { options_.SetTargetEnvironment(shaderc_target_env_vulkan, @@ -1093,6 +1092,59 @@ TEST_F(CppInterface, shaderc_glsl_compute_shader, options_)); } +// Simple Vulkan 1.2 tests +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_2EnvVulkan1_0ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_2); + EXPECT_TRUE(CompilationSuccess(BarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_2EnvVulkan1_1ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_2); + EXPECT_TRUE(CompilationSuccess(SubgroupBarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +// Simple Vulkan 1.3 tests +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_3EnvVulkan1_0ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_3); + EXPECT_TRUE(CompilationSuccess(BarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_3EnvVulkan1_1ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_3); + EXPECT_TRUE(CompilationSuccess(SubgroupBarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +// Simple Vulkan 1.4 tests +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_4EnvVulkan1_0ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_4); + EXPECT_TRUE(CompilationSuccess(BarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +TEST_F(CppInterface, + TargetEnvCompileOptionsVulkan1_4EnvVulkan1_1ShaderSucceeds) { + options_.SetTargetEnvironment(shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_4); + EXPECT_TRUE(CompilationSuccess(SubgroupBarrierComputeShader(), + shaderc_glsl_compute_shader, options_)); +} + +// Other tests + TEST_F(CppInterface, BeginAndEndOnSpvCompilationResult) { const SpvCompilationResult compilation_result = compiler_.CompileGlslToSpv( kMinimalShader, shaderc_glsl_vertex_shader, "shader"); @@ -1432,8 +1484,9 @@ TEST_F(CppInterface, HlslFunctionality1SurvivesCloning) { // source. https://github.com/KhronosGroup/glslang/issues/1616 options.SetAutoBindUniforms(true); CompileOptions cloned_options(options); - const std::string disassembly_text = AssemblyOutput( - kHlslShaderWithCounterBuffer, shaderc_glsl_fragment_shader, cloned_options); + const std::string disassembly_text = + AssemblyOutput(kHlslShaderWithCounterBuffer, shaderc_glsl_fragment_shader, + cloned_options); EXPECT_THAT(disassembly_text, HasSubstr("OpDecorateString")); } diff --git a/libshaderc/src/shaderc_test.cc b/libshaderc/src/shaderc_test.cc index 5610b0b67..43cc3720c 100644 --- a/libshaderc/src/shaderc_test.cc +++ b/libshaderc/src/shaderc_test.cc @@ -609,9 +609,8 @@ TEST_F(CompileStringWithOptionsTest, ForcedVersionProfileRedundantProfileStd) { TEST_F(CompileStringWithOptionsTest, GenerateDebugInfoBinary) { shaderc_compile_options_set_generate_debug_info(options_.get()); ASSERT_NE(nullptr, compiler_.get_compiler_handle()); - const std::string binary_output = - CompilationOutput(kMinimalDebugInfoShader, - shaderc_glsl_vertex_shader, options_.get()); + const std::string binary_output = CompilationOutput( + kMinimalDebugInfoShader, shaderc_glsl_vertex_shader, options_.get()); // The binary output should contain the name of the vector (debug_info_sample) // null-terminated, as well as the whole original source. std::string vector_name("debug_info_sample"); @@ -626,8 +625,8 @@ TEST_F(CompileStringWithOptionsTest, GenerateDebugInfoBinaryClonedOptions) { shaderc_compile_options_clone(options_.get())); ASSERT_NE(nullptr, compiler_.get_compiler_handle()); const std::string binary_output = - CompilationOutput(kMinimalDebugInfoShader, - shaderc_glsl_vertex_shader, cloned_options.get()); + CompilationOutput(kMinimalDebugInfoShader, shaderc_glsl_vertex_shader, + cloned_options.get()); // The binary output should contain the name of the vector (debug_info_sample) // null-terminated, as well as the whole original source. std::string vector_name("debug_info_sample"); @@ -984,39 +983,39 @@ TEST_P(IncluderTests, SetIncluderCallbacksClonedOptions) { } INSTANTIATE_TEST_SUITE_P(CompileStringTest, IncluderTests, - testing::ValuesIn(std::vector{ - IncluderTestCase( - // Fake file system. - { - {"root", - "#version 150\n" - "void foo() {}\n" - "#include \"path/to/file_1\"\n"}, - {"path/to/file_1", "content of file_1\n"}, - }, - // Expected output. - "#line 0 \"path/to/file_1\"\n" - " content of file_1\n" - "#line 3"), - IncluderTestCase( - // Fake file system. - {{"root", - "#version 150\n" - "void foo() {}\n" - "#include \"path/to/file_1\"\n"}, - {"path/to/file_1", - "#include \"path/to/file_2\"\n" - "content of file_1\n"}, - {"path/to/file_2", "content of file_2\n"}}, - // Expected output. - "#line 0 \"path/to/file_1\"\n" - "#line 0 \"path/to/file_2\"\n" - " content of file_2\n" - "#line 1 \"path/to/file_1\"\n" - " content of file_1\n" - "#line 3"), - - })); + testing::ValuesIn(std::vector{ + IncluderTestCase( + // Fake file system. + { + {"root", + "#version 150\n" + "void foo() {}\n" + "#include \"path/to/file_1\"\n"}, + {"path/to/file_1", "content of file_1\n"}, + }, + // Expected output. + "#line 0 \"path/to/file_1\"\n" + " content of file_1\n" + "#line 3"), + IncluderTestCase( + // Fake file system. + {{"root", + "#version 150\n" + "void foo() {}\n" + "#include \"path/to/file_1\"\n"}, + {"path/to/file_1", + "#include \"path/to/file_2\"\n" + "content of file_1\n"}, + {"path/to/file_2", "content of file_2\n"}}, + // Expected output. + "#line 0 \"path/to/file_1\"\n" + "#line 0 \"path/to/file_2\"\n" + " content of file_2\n" + "#line 1 \"path/to/file_1\"\n" + " content of file_1\n" + "#line 3"), + + })); TEST_F(CompileStringWithOptionsTest, WarningsOnLine) { // Some versions of Glslang will return an error, some will return just @@ -1225,6 +1224,63 @@ TEST_F(CompileStringWithOptionsTest, shaderc_glsl_compute_shader, options_.get())); } +// Simple Vulkan 1.2 tests +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_0ShaderToVulkan1_2Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_2); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_1ShaderToVulkan1_2Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_2); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeSubgroupBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + +// Simple Vulkan 1.3 tests +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_0ShaderToVulkan1_3Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_3); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_1ShaderToVulkan1_3Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_3); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeSubgroupBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + +// Simple Vulkan 1.4 tests +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_0ShaderToVulkan1_4Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_4); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + +TEST_F(CompileStringWithOptionsTest, + TargetEnvRespectedWhenCompilingVulkan1_1ShaderToVulkan1_4Succeeds) { + shaderc_compile_options_set_target_env(options_.get(), + shaderc_target_env_vulkan, + shaderc_env_version_vulkan_1_4); + EXPECT_TRUE(CompilesToValidSpv(compiler_, kGlslShaderComputeSubgroupBarrier, + shaderc_glsl_compute_shader, options_.get())); +} + // task shader TEST_F(CompileStringWithOptionsTest, TargetEnvRespectedWhenCompilingVulkan1_0TaskShaderToVulkan1_0Succeeds) { diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h index d9d02b951..09dd31e0b 100644 --- a/libshaderc_util/include/libshaderc_util/compiler.h +++ b/libshaderc_util/include/libshaderc_util/compiler.h @@ -24,10 +24,9 @@ #include #include -#include "glslang/Public/ShaderLang.h" - #include "counting_includer.h" #include "file_finder.h" +#include "glslang/Public/ShaderLang.h" #include "mutex.h" #include "resources.h" #include "string_piece.h" @@ -85,7 +84,8 @@ class Compiler { Vulkan_1_0 = ((1 << 22)), // Vulkan 1.0 Vulkan_1_1 = ((1 << 22) | (1 << 12)), // Vulkan 1.1 Vulkan_1_2 = ((1 << 22) | (2 << 12)), // Vulkan 1.2 - Vulkan_1_3 = ((1 << 22) | (3 << 12)), // Vulkan 1.2 + Vulkan_1_3 = ((1 << 22) | (3 << 12)), // Vulkan 1.3 + Vulkan_1_4 = ((1 << 22) | (4 << 12)), // Vulkan 1.4 // For OpenGL, use the numbering from #version in shaders. OpenGL_4_5 = 450, }; @@ -297,8 +297,8 @@ class Compiler { } // Sets the lowest binding number used when automatically assigning bindings - // for uniform resources of the given type, for all shader stages. The default - // base is zero. + // for uniform resources of the given type, for all shader stages. The + // default base is zero. void SetAutoBindingBase(UniformKind kind, uint32_t base) { for (auto stage : stages()) { SetAutoBindingBaseForStage(stage, kind, base); @@ -343,8 +343,8 @@ class Compiler { // shader stage. For example, // SetHlslRegisterSetAndBinding(Stage::Fragment, "t1", "4", "5") // means register "t1" in a fragment shader should map to binding 5 in set 4. - // (Glslang wants this data as strings, not ints or enums.) The string data is - // copied. + // (Glslang wants this data as strings, not ints or enums.) The string data + // is copied. void SetHlslRegisterSetAndBindingForStage(Stage stage, const std::string& reg, const std::string& set, const std::string& binding) { @@ -393,7 +393,8 @@ class Compiler { const string_piece& error_tag)>& stage_callback, CountingIncluder& includer, OutputType output_type, - std::ostream* error_stream, size_t* total_warnings, size_t* total_errors) const; + std::ostream* error_stream, size_t* total_warnings, + size_t* total_errors) const; static EShMessages GetDefaultRules() { return static_cast(EShMsgSpvRules | EShMsgVulkanRules | @@ -521,9 +522,9 @@ class Compiler { // and convert image variables to combined image-sampler variables. bool auto_combined_image_sampler_; - // The base binding number per uniform type, per stage, used when automatically - // binding uniforms that don't hzve explicit bindings in the shader source. - // The default is zero. + // The base binding number per uniform type, per stage, used when + // automatically binding uniforms that don't hzve explicit bindings in the + // shader source. The default is zero. uint32_t auto_binding_base_[kNumStages][kNumUniformKinds]; // True if the compiler should automatically map uniforms that don't @@ -544,7 +545,8 @@ class Compiler { // source language is HLSL. bool hlsl_legalization_enabled_; - // True if the compiler should support extension SPV_GOOGLE_hlsl_functionality1. + // True if the compiler should support extension + // SPV_GOOGLE_hlsl_functionality1. bool hlsl_functionality1_enabled_; // True if the compiler should support 16-bit HLSL types. diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc index e5f5d1055..9bf9a4348 100644 --- a/libshaderc_util/src/compiler.cc +++ b/libshaderc_util/src/compiler.cc @@ -178,7 +178,8 @@ std::tuple, size_t> Compiler::Compile( const string_piece& error_tag)>& stage_callback, CountingIncluder& includer, OutputType output_type, - std::ostream* error_stream, size_t* total_warnings, size_t* total_errors) const { + std::ostream* error_stream, size_t* total_warnings, + size_t* total_errors) const { // Compilation results to be returned: // Initialize the result tuple as a failed compilation. In error cases, we // should return result_tuple directly without setting its members. @@ -192,8 +193,8 @@ std::tuple, size_t> Compiler::Compile( // Check target environment. const auto target_client_info = GetGlslangClientInfo( - error_tag, target_env_, target_env_version_, - target_spirv_version_, target_spirv_version_is_forced_); + error_tag, target_env_, target_env_version_, target_spirv_version_, + target_spirv_version_is_forced_); if (!target_client_info.error.empty()) { *error_stream << target_client_info.error; *total_warnings = 0; @@ -272,7 +273,8 @@ std::tuple, size_t> Compiler::Compile( shader.setEntryPoint(entry_point_name); shader.setAutoMapBindings(auto_bind_uniforms_); if (auto_combined_image_sampler_) { - shader.setTextureSamplerTransformMode(EShTexSampTransUpgradeTextureRemoveSampler); + shader.setTextureSamplerTransformMode( + EShTexSampTransUpgradeTextureRemoveSampler); } shader.setAutoMapLocations(auto_map_locations_); const auto& bases = auto_binding_base_[static_cast(used_shader_stage)]; @@ -296,7 +298,7 @@ std::tuple, size_t> Compiler::Compile( } if (vulkan_rules_relaxed_) { glslang::EShSource language = glslang::EShSourceNone; - switch(source_language_) { + switch (source_language_) { case SourceLanguage::GLSL: language = glslang::EShSourceGlsl; break; @@ -307,7 +309,8 @@ std::tuple, size_t> Compiler::Compile( // This option will only be used if the Vulkan client is used. // If new versions of GL_KHR_vulkan_glsl come out, it would make sense to // let callers specify which version to use. For now, just use 100. - shader.setEnvInput(language, used_shader_stage, glslang::EShClientVulkan, 100); + shader.setEnvInput(language, used_shader_stage, glslang::EShClientVulkan, + 100); shader.setEnvInputVulkanRulesRelaxed(); } shader.setInvertY(invert_y_enabled_); @@ -494,8 +497,8 @@ std::tuple Compiler::PreprocessShader( &string_names, 1); shader.setPreamble(shader_preamble.data()); auto target_client_info = GetGlslangClientInfo( - error_tag, target_env_, target_env_version_, - target_spirv_version_, target_spirv_version_is_forced_); + error_tag, target_env_, target_env_version_, target_spirv_version_, + target_spirv_version_is_forced_); if (!target_client_info.error.empty()) { return std::make_tuple(false, "", target_client_info.error); } @@ -755,6 +758,9 @@ GlslangClientInfo GetGlslangClientInfo( } else if (env_version == Compiler::TargetEnvVersion::Vulkan_1_3) { result.client_version = glslang::EShTargetVulkan_1_3; result.target_language_version = glslang::EShTargetSpv_1_6; + } else if (env_version == Compiler::TargetEnvVersion::Vulkan_1_4) { + result.client_version = glslang::EShTargetVulkan_1_4; + result.target_language_version = glslang::EShTargetSpv_1_6; } else { errs << "error:" << error_tag << ": Invalid target client version " << static_cast(env_version) << " for Vulkan environment " diff --git a/libshaderc_util/src/compiler_test.cc b/libshaderc_util/src/compiler_test.cc index 4ebb91324..b580d0e39 100644 --- a/libshaderc_util/src/compiler_test.cc +++ b/libshaderc_util/src/compiler_test.cc @@ -14,10 +14,10 @@ #include "libshaderc_util/compiler.h" -#include - #include +#include + #include "death_test.h" #include "libshaderc_util/counting_includer.h" #include "libshaderc_util/spirv_tools_wrapper.h" @@ -353,16 +353,18 @@ TEST_F(CompilerTest, BadTargetEnvVulkanVersionFails) { compiler_.SetTargetEnv(Compiler::TargetEnv::Vulkan, static_cast(123)); EXPECT_FALSE(SimpleCompilationSucceeds(kVulkanVertexShader, EShLangVertex)); - EXPECT_THAT(errors_, - HasSubstr("Invalid target client version 123 for Vulkan environment 0")); + EXPECT_THAT( + errors_, + HasSubstr("Invalid target client version 123 for Vulkan environment 0")); } TEST_F(CompilerTest, BadTargetEnvOpenGLVersionFails) { compiler_.SetTargetEnv(Compiler::TargetEnv::OpenGL, static_cast(123)); EXPECT_FALSE(SimpleCompilationSucceeds(kVulkanVertexShader, EShLangVertex)); - EXPECT_THAT(errors_, - HasSubstr("Invalid target client version 123 for OpenGL environment 1")); + EXPECT_THAT( + errors_, + HasSubstr("Invalid target client version 123 for OpenGL environment 1")); } TEST_F(CompilerTest, SpirvTargetVersion1_0Succeeds) { @@ -535,18 +537,17 @@ TEST_P(LimitTest, Sample) { #define CASE(LIMIT, DEFAULT, NEW) \ { Compiler::Limit::LIMIT, DEFAULT, NEW } -INSTANTIATE_TEST_SUITE_P( - CompilerTest, LimitTest, - // See resources.cc for the defaults. - testing::ValuesIn(std::vector{ - // clang-format off +INSTANTIATE_TEST_SUITE_P(CompilerTest, LimitTest, + // See resources.cc for the defaults. + testing::ValuesIn(std::vector{ + // clang-format off // This is just a sampling of the possible values. CASE(MaxLights, 8, 99), CASE(MaxClipPlanes, 6, 10929), CASE(MaxTessControlAtomicCounters, 0, 72), CASE(MaxSamples, 4, 8), - // clang-format on - })); + // clang-format on + })); #undef CASE // Returns a fragment shader accessing a texture with the given @@ -819,9 +820,8 @@ TEST_F(CompilerTest, HlslFunctionality1Enabled) { EXPECT_THAT(disassembly, HasSubstr("OpExtension \"SPV_GOOGLE_hlsl_functionality1\"")) << disassembly; - EXPECT_THAT(disassembly, - HasSubstr("OpDecorateString %_entryPointOutput " - "UserSemantic \"SV_TARGET0\"")) + EXPECT_THAT(disassembly, HasSubstr("OpDecorateString %_entryPointOutput " + "UserSemantic \"SV_TARGET0\"")) << disassembly; } @@ -926,6 +926,8 @@ INSTANTIATE_TEST_SUITE_P( // Unforced SPIR-V version. Success cases. {CASE_VK(1_0, 1_4), false, GCASE_VK("", 1_0, 1_0)}, {CASE_VK(1_1, 1_4), false, GCASE_VK("", 1_1, 1_3)}, + {CASE_VK(1_3, 1_6), false, GCASE_VK("", 1_3, 1_6)}, + {CASE_VK(1_4, 1_6), false, GCASE_VK("", 1_4, 1_6)}, {CASE_GL(4_5, 1_4), false, GCASE_GL("", 450, 1_0)}, })); @@ -941,6 +943,12 @@ INSTANTIATE_TEST_SUITE_P( {CASE_VK(1_1, 1_1), true, GCASE_VK("", 1_1, 1_1)}, {CASE_VK(1_1, 1_2), true, GCASE_VK("", 1_1, 1_2)}, {CASE_VK(1_1, 1_3), true, GCASE_VK("", 1_1, 1_3)}, + {CASE_VK(1_3, 1_4), true, GCASE_VK("", 1_3, 1_4)}, + {CASE_VK(1_3, 1_5), true, GCASE_VK("", 1_3, 1_5)}, + {CASE_VK(1_3, 1_6), true, GCASE_VK("", 1_3, 1_6)}, + {CASE_VK(1_4, 1_4), true, GCASE_VK("", 1_4, 1_4)}, + {CASE_VK(1_4, 1_5), true, GCASE_VK("", 1_4, 1_5)}, + {CASE_VK(1_4, 1_6), true, GCASE_VK("", 1_4, 1_6)}, {CASE_GL(4_5, 1_0), true, GCASE_GL("", 450, 1_0)}, {CASE_GL(4_5, 1_1), true, GCASE_GL("", 450, 1_1)}, {CASE_GL(4_5, 1_2), true, GCASE_GL("", 450, 1_2)}, diff --git a/libshaderc_util/src/spirv_tools_wrapper.cc b/libshaderc_util/src/spirv_tools_wrapper.cc index fbc61cc8a..49426d0b6 100644 --- a/libshaderc_util/src/spirv_tools_wrapper.cc +++ b/libshaderc_util/src/spirv_tools_wrapper.cc @@ -40,6 +40,8 @@ spv_target_env GetSpirvToolsTargetEnv(Compiler::TargetEnv env, return SPV_ENV_VULKAN_1_2; case Compiler::TargetEnvVersion::Vulkan_1_3: return SPV_ENV_VULKAN_1_3; + case Compiler::TargetEnvVersion::Vulkan_1_4: + return SPV_ENV_VULKAN_1_4; default: break; } From 373ba6b4beed744c6b66e3db8fc513fa2f073a31 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 6 Dec 2024 16:36:23 -0500 Subject: [PATCH 055/117] Update dependencies SPIRV-Tools v2024.4.rc2 Glslang top of tree SPIRV-Headers top of tree --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index fd08b5c68..d8f506b67 100644 --- a/DEPS +++ b/DEPS @@ -10,8 +10,8 @@ vars = { 'glslang_revision': 'a0995c49ebcaca2c6d3b03efbabf74f3843decdb', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '36d5e2ddaa54c70d2f29081510c66f4fc98e5e53', - 'spirv_tools_revision': '3fb52548bc8a68d349d31e21bd4e80e3d953e87c', + 'spirv_headers_revision': '3f17b2af6784bfa2c5aa5dbb8e0e74a607dd8b3b', + 'spirv_tools_revision': '4d2f0b40bfe290dea6c6904dafdf7fd8328ba346', } deps = { From caa54d9779d5605aca4e1a0c0c962a3d8f4aeb31 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 6 Dec 2024 16:38:25 -0500 Subject: [PATCH 056/117] Finalize Shaderc v2024.4 --- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 071ac7690..22caae477 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ Revision history for Shaderc -v2024.4-dev - - Start development +v2024.4 + - Support Vulkan 1.4 v2024.3 - Update dependencies: Glslang, SPRIV-Tools, SPIRV-Headers From 0faaad2048f50b54606c4ea213d747a5e92940a6 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 6 Dec 2024 16:38:58 -0500 Subject: [PATCH 057/117] Start Shaderc v2024.5 development --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 22caae477..666657235 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2024.5-dev + - Start development + v2024.4 - Support Vulkan 1.4 From 65a9e40eb7a70df53e94883e364d8651bfdaa169 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Dec 2024 16:42:02 -0500 Subject: [PATCH 058/117] Update glslang, SPIRV-Tools SPIRV-Tools fixes - validation of multi-line debug info. - assembler: avoid infinite loop when trying to parse version string from comments --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d8f506b67..f683d55a3 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', - 'glslang_revision': 'a0995c49ebcaca2c6d3b03efbabf74f3843decdb', + 'glslang_revision': '340bf88f3fdb4f4a25b7071cd2c1205035fc6eaa', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '3f17b2af6784bfa2c5aa5dbb8e0e74a607dd8b3b', - 'spirv_tools_revision': '4d2f0b40bfe290dea6c6904dafdf7fd8328ba346', + 'spirv_tools_revision': '13b59bf1d84054b8ccd29cdc6b1303f69e8f9e77', } deps = { From e639dbc7aba483e101417cd25f7c70147401a143 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Dec 2024 19:59:27 -0500 Subject: [PATCH 059/117] kokoro: use CMake 3.31.2 Glslang requires CMake 3.27 or later Fixed: #1462 --- kokoro/android-release/build-docker.sh | 2 +- kokoro/linux/build-docker.sh | 2 +- kokoro/windows/build.bat | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kokoro/android-release/build-docker.sh b/kokoro/android-release/build-docker.sh index a81832513..1733c4905 100755 --- a/kokoro/android-release/build-docker.sh +++ b/kokoro/android-release/build-docker.sh @@ -25,7 +25,7 @@ set -e # Display commands being run. set -x -using cmake-3.17.2 +using cmake-3.31.2 using ninja-1.10.0 using ndk-r25c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir diff --git a/kokoro/linux/build-docker.sh b/kokoro/linux/build-docker.sh index bdc45731d..a4df892a1 100755 --- a/kokoro/linux/build-docker.sh +++ b/kokoro/linux/build-docker.sh @@ -25,7 +25,7 @@ set -x # Display commands being run. SKIP_TESTS="False" BUILD_TYPE="Debug" -using cmake-3.17.2 +using cmake-3.31.2 using ninja-1.10.0 using python-3.12 diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index 27da106dc..4636dd666 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -23,6 +23,8 @@ set VS_VERSION=%2 :: Force usage of python 3.6. set PATH=C:\python36;%PATH% +:: Glslang requires cmake 3.27 or later +set PATH=C:\cmake-3.31.2\bin;%PATH% cd %SRC% python utils\git-sync-deps From 79d51f18301a2b600ef3ab0d0af3434f0aa8dd0a Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 17 Dec 2024 17:19:24 -0500 Subject: [PATCH 060/117] kokoro: windows: use Python 3.12 crbug.com/350048185 --- kokoro/windows/build.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index 4636dd666..66402cc5f 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -21,8 +21,8 @@ set SRC=%cd%\github\shaderc set BUILD_TYPE=%1 set VS_VERSION=%2 -:: Force usage of python 3.6. -set PATH=C:\python36;%PATH% +:: Force usage of python 3.12 +set PATH=C:\python312;%PATH% :: Glslang requires cmake 3.27 or later set PATH=C:\cmake-3.31.2\bin;%PATH% From 690d259384193c90c01b52288e280b05a8481121 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 23 Dec 2024 13:20:02 -0500 Subject: [PATCH 061/117] Update cmake_minimum_required to 3.22.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffcb54b98..bd6b890f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.17.2) +cmake_minimum_required(VERSION 3.22.1) project(shaderc) enable_testing() From 76c3e73f64914dbc69933eda5caec4b3c32dcc88 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 7 Jan 2025 15:32:45 -0500 Subject: [PATCH 062/117] Update effcee, spirv-tools Effcee uses the new CMake method for setting the MSVC runtime CMP0091 NEW --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f683d55a3..f1253be6d 100644 --- a/DEPS +++ b/DEPS @@ -6,12 +6,12 @@ vars = { 'khronos_git': 'https://github.com/KhronosGroup', 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', - 'effcee_revision': 'd74d33d93043952a99ae7cd7458baf6bc8df1da0', + 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', 'glslang_revision': '340bf88f3fdb4f4a25b7071cd2c1205035fc6eaa', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '3f17b2af6784bfa2c5aa5dbb8e0e74a607dd8b3b', - 'spirv_tools_revision': '13b59bf1d84054b8ccd29cdc6b1303f69e8f9e77', + 'spirv_tools_revision': '8f98634c4a2615e24888c77f425d13ef4893e8dc', } deps = { From 90f2bda561cb7d4445fa261c166c8dddfea0a644 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 9 Jan 2025 17:07:37 -0500 Subject: [PATCH 063/117] kokoro: add VS2022 scripts Refactor how files and scripts are named. Add an %ARCH% argument to the build script, in anticipation of adding arm64 builds later. --- kokoro/windows/build.bat | 6 +++-- ...ug_2019.bat => build_2019_amd64_debug.bat} | 2 +- ..._2019.bat => build_2019_amd64_release.bat} | 2 +- kokoro/windows/build_2022_amd64_debug.bat | 23 +++++++++++++++++++ kokoro/windows/build_2022_amd64_release.bat | 23 +++++++++++++++++++ kokoro/windows/continuous_debug_2019.cfg | 2 +- kokoro/windows/continuous_release_2019.cfg | 2 +- kokoro/windows/presubmit_debug_2019.cfg | 2 +- kokoro/windows/presubmit_release_2019.cfg | 2 +- .../windows/vs2022_amd64_debug_continuous.cfg | 22 ++++++++++++++++++ .../windows/vs2022_amd64_debug_presubmit.cfg | 22 ++++++++++++++++++ .../vs2022_amd64_release_continuous.cfg | 22 ++++++++++++++++++ .../vs2022_amd64_release_presubmit.cfg | 22 ++++++++++++++++++ 13 files changed, 144 insertions(+), 8 deletions(-) rename kokoro/windows/{build_debug_2019.bat => build_2019_amd64_debug.bat} (94%) rename kokoro/windows/{build_release_2019.bat => build_2019_amd64_release.bat} (93%) create mode 100644 kokoro/windows/build_2022_amd64_debug.bat create mode 100644 kokoro/windows/build_2022_amd64_release.bat create mode 100644 kokoro/windows/vs2022_amd64_debug_continuous.cfg create mode 100644 kokoro/windows/vs2022_amd64_debug_presubmit.cfg create mode 100644 kokoro/windows/vs2022_amd64_release_continuous.cfg create mode 100644 kokoro/windows/vs2022_amd64_release_presubmit.cfg diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index 66402cc5f..9746a8651 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -20,6 +20,7 @@ set BUILD_ROOT=%cd% set SRC=%cd%\github\shaderc set BUILD_TYPE=%1 set VS_VERSION=%2 +set ARCH=%3 :: Force usage of python 3.12 set PATH=C:\python312;%PATH% @@ -38,8 +39,9 @@ cd %SRC%\build :: set up msvc build env :: ######################################### if %VS_VERSION% == 2019 ( - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 - echo "Using VS 2019..." + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% +) else if %VS_VERSION% == 2022 ( + call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% ) :: ######################################### diff --git a/kokoro/windows/build_debug_2019.bat b/kokoro/windows/build_2019_amd64_debug.bat similarity index 94% rename from kokoro/windows/build_debug_2019.bat rename to kokoro/windows/build_2019_amd64_debug.bat index ea173d984..ef2b10e3c 100644 --- a/kokoro/windows/build_debug_2019.bat +++ b/kokoro/windows/build_2019_amd64_debug.bat @@ -20,4 +20,4 @@ set SCRIPT_DIR=%~dp0 :: Call with correct parameter -call %SCRIPT_DIR%\build.bat Debug 2019 +call %SCRIPT_DIR%\build.bat Debug 2019 amd64 diff --git a/kokoro/windows/build_release_2019.bat b/kokoro/windows/build_2019_amd64_release.bat similarity index 93% rename from kokoro/windows/build_release_2019.bat rename to kokoro/windows/build_2019_amd64_release.bat index f0611e3d1..ebb09cc9b 100644 --- a/kokoro/windows/build_release_2019.bat +++ b/kokoro/windows/build_2019_amd64_release.bat @@ -20,4 +20,4 @@ set SCRIPT_DIR=%~dp0 :: Call with correct parameter -call %SCRIPT_DIR%\build.bat RelWithDebInfo 2019 +call %SCRIPT_DIR%\build.bat RelWithDebInfo 2019 amd64 diff --git a/kokoro/windows/build_2022_amd64_debug.bat b/kokoro/windows/build_2022_amd64_debug.bat new file mode 100644 index 000000000..a3e993a95 --- /dev/null +++ b/kokoro/windows/build_2022_amd64_debug.bat @@ -0,0 +1,23 @@ +:: Copyright (C) 2025 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. +:: +:: Windows Build Script. + +@echo on + +:: Find out the directory of the common build script. +set SCRIPT_DIR=%~dp0 + +:: Call with correct parameter +call %SCRIPT_DIR%\build.bat Debug 2022 amd64 diff --git a/kokoro/windows/build_2022_amd64_release.bat b/kokoro/windows/build_2022_amd64_release.bat new file mode 100644 index 000000000..467a57593 --- /dev/null +++ b/kokoro/windows/build_2022_amd64_release.bat @@ -0,0 +1,23 @@ +:: Copyright (C) 2025 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. +:: +:: Windows Build Script. + +@echo on + +:: Find out the directory of the common build script. +set SCRIPT_DIR=%~dp0 + +:: Call with correct parameter +call %SCRIPT_DIR%\build.bat RelWithDebInfo 2022 amd64 diff --git a/kokoro/windows/continuous_debug_2019.cfg b/kokoro/windows/continuous_debug_2019.cfg index 3600e1b5d..e0bb40a8b 100644 --- a/kokoro/windows/continuous_debug_2019.cfg +++ b/kokoro/windows/continuous_debug_2019.cfg @@ -13,7 +13,7 @@ # limitations under the License. # Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_debug_2019.bat" +build_file: "shaderc/kokoro/windows/build_2019_amd64_debug.bat" action { define_artifacts { diff --git a/kokoro/windows/continuous_release_2019.cfg b/kokoro/windows/continuous_release_2019.cfg index 8cbbc7e26..83440b34f 100644 --- a/kokoro/windows/continuous_release_2019.cfg +++ b/kokoro/windows/continuous_release_2019.cfg @@ -13,7 +13,7 @@ # limitations under the License. # Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_release_2019.bat" +build_file: "shaderc/kokoro/windows/build_2019_amd64_release.bat" action { define_artifacts { diff --git a/kokoro/windows/presubmit_debug_2019.cfg b/kokoro/windows/presubmit_debug_2019.cfg index 7aa76d895..cb670675a 100644 --- a/kokoro/windows/presubmit_debug_2019.cfg +++ b/kokoro/windows/presubmit_debug_2019.cfg @@ -13,4 +13,4 @@ # limitations under the License. # Presubmit build configuration. -build_file: "shaderc/kokoro/windows/build_debug_2019.bat" +build_file: "shaderc/kokoro/windows/build_2019_amd64_debug.bat" diff --git a/kokoro/windows/presubmit_release_2019.cfg b/kokoro/windows/presubmit_release_2019.cfg index 734cff0c0..62f6ad672 100644 --- a/kokoro/windows/presubmit_release_2019.cfg +++ b/kokoro/windows/presubmit_release_2019.cfg @@ -13,4 +13,4 @@ # limitations under the License. # Presubmit build configuration. -build_file: "shaderc/kokoro/windows/build_release_2019.bat" +build_file: "shaderc/kokoro/windows/build_2019_amd64_release.bat" diff --git a/kokoro/windows/vs2022_amd64_debug_continuous.cfg b/kokoro/windows/vs2022_amd64_debug_continuous.cfg new file mode 100644 index 000000000..1dbfab3d7 --- /dev/null +++ b/kokoro/windows/vs2022_amd64_debug_continuous.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2025 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. + +# Continuous build configuration. +build_file: "shaderc/kokoro/windows/build_2022_amd64_debug.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows/vs2022_amd64_debug_presubmit.cfg b/kokoro/windows/vs2022_amd64_debug_presubmit.cfg new file mode 100644 index 000000000..541793810 --- /dev/null +++ b/kokoro/windows/vs2022_amd64_debug_presubmit.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2025 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/windows/build_2022_amd64_debug.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows/vs2022_amd64_release_continuous.cfg b/kokoro/windows/vs2022_amd64_release_continuous.cfg new file mode 100644 index 000000000..3237fea7f --- /dev/null +++ b/kokoro/windows/vs2022_amd64_release_continuous.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2025 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. + +# Continuous build configuration. +build_file: "shaderc/kokoro/windows/build_2022_amd64_release.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows/vs2022_amd64_release_presubmit.cfg b/kokoro/windows/vs2022_amd64_release_presubmit.cfg new file mode 100644 index 000000000..d566e9b95 --- /dev/null +++ b/kokoro/windows/vs2022_amd64_release_presubmit.cfg @@ -0,0 +1,22 @@ +# Copyright (C) 2025 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/windows/build_2022_amd64_release.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} From b81a5e73c93656bb2e709ac1e050316f2818ae52 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 10 Jan 2025 11:00:45 -0500 Subject: [PATCH 064/117] kokoro: delete VS 2019 debug build We have coverage through VS 2022 debug --- kokoro/windows/build_2019_amd64_debug.bat | 23 ----------------------- kokoro/windows/continuous_debug_2019.cfg | 22 ---------------------- kokoro/windows/presubmit_debug_2019.cfg | 16 ---------------- 3 files changed, 61 deletions(-) delete mode 100644 kokoro/windows/build_2019_amd64_debug.bat delete mode 100644 kokoro/windows/continuous_debug_2019.cfg delete mode 100644 kokoro/windows/presubmit_debug_2019.cfg diff --git a/kokoro/windows/build_2019_amd64_debug.bat b/kokoro/windows/build_2019_amd64_debug.bat deleted file mode 100644 index ef2b10e3c..000000000 --- a/kokoro/windows/build_2019_amd64_debug.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright (C) 2023 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat Debug 2019 amd64 diff --git a/kokoro/windows/continuous_debug_2019.cfg b/kokoro/windows/continuous_debug_2019.cfg deleted file mode 100644 index e0bb40a8b..000000000 --- a/kokoro/windows/continuous_debug_2019.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2023 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_2019_amd64_debug.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/presubmit_debug_2019.cfg b/kokoro/windows/presubmit_debug_2019.cfg deleted file mode 100644 index cb670675a..000000000 --- a/kokoro/windows/presubmit_debug_2019.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2023 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/windows/build_2019_amd64_debug.bat" From 3158c54654b2d9589f402fa27aa7e28438fd6333 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 16 Jan 2025 14:57:02 -0500 Subject: [PATCH 065/117] Update spirv-tools, spirv-headers, Glslang Combo import of spirv-headers, spirv-tools to support SPV_INTERL_subgroup_matrix_multiply_accumulate --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index f1253be6d..153970bb0 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '340bf88f3fdb4f4a25b7071cd2c1205035fc6eaa', + 'glslang_revision': '8b0e7b6e839279f4547bf0bb14466c42d9869498', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '3f17b2af6784bfa2c5aa5dbb8e0e74a607dd8b3b', - 'spirv_tools_revision': '8f98634c4a2615e24888c77f425d13ef4893e8dc', + 'spirv_headers_revision': '2b2e05e088841c63c0b6fd4c9fb380d8688738d3', + 'spirv_tools_revision': 'f942f65e8b3e5a6cc85ce8d85f27556674d30289', } deps = { From 674ed20dae6bc7dad24f248c3c4b888d52b31714 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 23 Jan 2025 18:02:27 -0500 Subject: [PATCH 066/117] kokoro: use gcc 13 --- kokoro/linux/build_gcc_debug.sh | 2 +- kokoro/linux/build_gcc_debug_exception.sh | 2 +- kokoro/linux/build_gcc_release.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kokoro/linux/build_gcc_debug.sh b/kokoro/linux/build_gcc_debug.sh index 3a96cf762..9b815032b 100755 --- a/kokoro/linux/build_gcc_debug.sh +++ b/kokoro/linux/build_gcc_debug.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG "gcc-9" +source $SCRIPT_DIR/build.sh DEBUG "gcc-13" diff --git a/kokoro/linux/build_gcc_debug_exception.sh b/kokoro/linux/build_gcc_debug_exception.sh index 9849336ac..5465c7c46 100755 --- a/kokoro/linux/build_gcc_debug_exception.sh +++ b/kokoro/linux/build_gcc_debug_exception.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG_EXCEPTION "gcc-9" +source $SCRIPT_DIR/build.sh DEBUG_EXCEPTION "gcc-13" diff --git a/kokoro/linux/build_gcc_release.sh b/kokoro/linux/build_gcc_release.sh index 912360499..a30867cda 100755 --- a/kokoro/linux/build_gcc_release.sh +++ b/kokoro/linux/build_gcc_release.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RELEASE "gcc-9" +source $SCRIPT_DIR/build.sh RELEASE "gcc-13" From 9cf1c65a6444719e25abf7813cf658dd56d05e01 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 23 Jan 2025 18:26:22 -0500 Subject: [PATCH 067/117] kokoro: use clang 13 --- kokoro/linux/build_clang_asan.sh | 2 +- kokoro/linux/build_clang_debug.sh | 2 +- kokoro/linux/build_clang_release.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kokoro/linux/build_clang_asan.sh b/kokoro/linux/build_clang_asan.sh index 9110bc5cd..ff399dca8 100755 --- a/kokoro/linux/build_clang_asan.sh +++ b/kokoro/linux/build_clang_asan.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh ASAN "clang-10.0.0" +source $SCRIPT_DIR/build.sh ASAN "clang-13.0.1" diff --git a/kokoro/linux/build_clang_debug.sh b/kokoro/linux/build_clang_debug.sh index 227237e7b..87ee26d6b 100755 --- a/kokoro/linux/build_clang_debug.sh +++ b/kokoro/linux/build_clang_debug.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG "clang-10.0.0" +source $SCRIPT_DIR/build.sh DEBUG "clang-13.0.1" diff --git a/kokoro/linux/build_clang_release.sh b/kokoro/linux/build_clang_release.sh index 126f5d441..d42672dc7 100755 --- a/kokoro/linux/build_clang_release.sh +++ b/kokoro/linux/build_clang_release.sh @@ -22,4 +22,4 @@ set -e set -x SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RELEASE "clang-10.0.0" +source $SCRIPT_DIR/build.sh RELEASE "clang-13.0.1" From f5d626f6d2f0429e583b3d24433f184a2d81249a Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 29 Jan 2025 00:10:23 -0500 Subject: [PATCH 068/117] kokoro: use ndk-r27c --- 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 1733c4905..a4fc11c94 100755 --- a/kokoro/android-release/build-docker.sh +++ b/kokoro/android-release/build-docker.sh @@ -27,7 +27,7 @@ set -x using cmake-3.31.2 using ninja-1.10.0 -using ndk-r25c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir +using ndk-r27c # 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 12d178be1..5e0b74f32 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-r25c +using ndk-r27c clean_dir "$ROOT_DIR/build" cd "$ROOT_DIR/build" From ab0d3ed184e4919a236eecddb6514e4923a5e38f Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 29 Jan 2025 18:23:07 -0500 Subject: [PATCH 069/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 153970bb0..9fb890014 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '8b0e7b6e839279f4547bf0bb14466c42d9869498', + 'glslang_revision': '633e9b6e15b7b142eb311ecc316858eab5425033', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '2b2e05e088841c63c0b6fd4c9fb380d8688738d3', - 'spirv_tools_revision': 'f942f65e8b3e5a6cc85ce8d85f27556674d30289', + 'spirv_headers_revision': 'e7294a8ebed84f8c5bd3686c68dbe12a4e65b644', + 'spirv_tools_revision': '3364b982713a0440d1d342dd5eec65b122a61b71', } deps = { From 6c245b0b0b456ae320d378cf647d22e3d3048747 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Feb 2025 21:31:28 -0500 Subject: [PATCH 070/117] kokoro: use streamlined license-check image BUG=397439052 --- kokoro/linux/license_check.sh | 5 +---- kokoro/linux/license_check_docker.sh | 20 -------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100755 kokoro/linux/license_check_docker.sh diff --git a/kokoro/linux/license_check.sh b/kokoro/linux/license_check.sh index a36e4ff6a..2881a8a8a 100755 --- a/kokoro/linux/license_check.sh +++ b/kokoro/linux/license_check.sh @@ -22,7 +22,4 @@ ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )" docker run --rm -i \ --volume "${ROOT_DIR}:${ROOT_DIR}:ro" \ --workdir "${ROOT_DIR}" \ - --env ROOT_DIR="${ROOT_DIR}" \ - --env SCRIPT_DIR="${SCRIPT_DIR}" \ - --entrypoint "${SCRIPT_DIR}/license_check_docker.sh" \ - "gcr.io/shaderc-build/radial-build:latest" + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/license-checker diff --git a/kokoro/linux/license_check_docker.sh b/kokoro/linux/license_check_docker.sh deleted file mode 100755 index f88077e87..000000000 --- a/kokoro/linux/license_check_docker.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2020 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. - -set -e # Fail on any error. -set -x # Display commands being run. - -license-checker --dir="$ROOT_DIR" \ No newline at end of file From 2e56788ec45c955c19f4b7bf5d5f6cacb1d3a4c8 Mon Sep 17 00:00:00 2001 From: David Neto Date: Sat, 22 Feb 2025 17:29:40 -0500 Subject: [PATCH 071/117] kokoro: linux: use cpp-builder instead of radial-build Bug: crbug.com/391948942 --- kokoro/android-release/build.sh | 2 +- kokoro/linux/build.sh | 2 +- kokoro/ndk-build/build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kokoro/android-release/build.sh b/kokoro/android-release/build.sh index 3b5f11c61..86ce10211 100755 --- a/kokoro/android-release/build.sh +++ b/kokoro/android-release/build.sh @@ -35,4 +35,4 @@ docker run --rm -i \ --env TARGET_ARCH="${TARGET_ARCH}" \ --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ - "gcr.io/shaderc-build/radial-build:latest" + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/linux/build.sh b/kokoro/linux/build.sh index 3e6375c48..cf50524c9 100755 --- a/kokoro/linux/build.sh +++ b/kokoro/linux/build.sh @@ -37,4 +37,4 @@ docker run --rm -i \ --env COMPILER="${COMPILER}" \ --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ - "gcr.io/shaderc-build/radial-build:latest" + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/ndk-build/build.sh b/kokoro/ndk-build/build.sh index bf85b2d81..88f67ae7e 100644 --- a/kokoro/ndk-build/build.sh +++ b/kokoro/ndk-build/build.sh @@ -46,7 +46,7 @@ docker run --rm -i \ --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ --env BUILD_SHA="${BUILD_SHA}" \ --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ - "gcr.io/shaderc-build/radial-build:latest" + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder RESULT=$? # This is important. If the permissions are not fixed, kokoro will fail From f6dee14413462a7bc6d8dd102d6404c264946e2e Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Feb 2025 11:10:58 -0500 Subject: [PATCH 072/117] Update dependencies Glslang top of tree today SPIRV-Tools v2025.1.rc1 SPRIV-Headers top of tree today --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 9fb890014..85d14a588 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '633e9b6e15b7b142eb311ecc316858eab5425033', + 'glslang_revision': '8b822ee8ac2c3e52926820f46ad858532a895951', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'e7294a8ebed84f8c5bd3686c68dbe12a4e65b644', - 'spirv_tools_revision': '3364b982713a0440d1d342dd5eec65b122a61b71', + 'spirv_headers_revision': '54a521dd130ae1b2f38fef79b09515702d135bdd', + 'spirv_tools_revision': 'f289d047f49fb60488301ec62bafab85573668cc', } deps = { From 0968768c61d4eb7dd861114412e904bb3d59b7b6 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Feb 2025 11:48:39 -0500 Subject: [PATCH 073/117] Finalize Shaderc v2025.1 Skip version numbers so we match SPIRV-Tools. Do this to avoid confusion when included in the Vulkan SDK --- CHANGES | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 666657235..4eaac9d08 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,15 @@ Revision history for Shaderc -v2024.5-dev - - Start development +v2025.1 + - Update tools and compilers tested: + - Clang 13 + - GCC 13 + - VisualStudio 2022 + - CMake 3.31.2 + - Python 3.12 + - NDK r27c + - Skip version numbers to match SPIRV-Tools, to avoid + confusion. v2024.4 - Support Vulkan 1.4 From 8be073a9ff0d07288b3d138fb7c586ac53465227 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Feb 2025 11:51:18 -0500 Subject: [PATCH 074/117] Start Shaderc v2025.2 development --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 4eaac9d08..70c1a1abc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2025.2-dev + - Start v2025.2 development + v2025.1 - Update tools and compilers tested: - Clang 13 From acc976a6a92d37694afdf1e2bda80ce8c83ef75a Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 25 Mar 2025 16:40:33 -0400 Subject: [PATCH 075/117] update deps --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 85d14a588..96c67f637 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '8b822ee8ac2c3e52926820f46ad858532a895951', + 'glslang_revision': 'e57f993cff981c8c3ffd38967e030f04d13781a9', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '54a521dd130ae1b2f38fef79b09515702d135bdd', - 'spirv_tools_revision': 'f289d047f49fb60488301ec62bafab85573668cc', + 'spirv_headers_revision': '0e710677989b4326ac974fd80c5308191ed80965', + 'spirv_tools_revision': 'a48b473403b0990c62ff3175f1e63cbd8c906184', } deps = { From 0ab6bf5cefea23cf985ce6296a293170132984ae Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 10 Apr 2025 10:07:57 -0400 Subject: [PATCH 076/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 96c67f637..e29dcf07b 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'e57f993cff981c8c3ffd38967e030f04d13781a9', + 'glslang_revision': '4a038eafdf9e9f3e0ac2e200127df969f3a51ddb', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '0e710677989b4326ac974fd80c5308191ed80965', - 'spirv_tools_revision': 'a48b473403b0990c62ff3175f1e63cbd8c906184', + 'spirv_headers_revision': '7c2f5333e9c662620581361dffc327a99800bb52', + 'spirv_tools_revision': 'a871fc43e29038d96109a64a64219eacefdf0634', } deps = { From 0078f786584c3ccbf1eea42581b0565aaab5cc3c Mon Sep 17 00:00:00 2001 From: Jeff Bolz Date: Fri, 11 Apr 2025 23:33:22 -0500 Subject: [PATCH 077/117] update glslang dependency --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index e29dcf07b..cb2e39701 100644 --- a/DEPS +++ b/DEPS @@ -7,7 +7,7 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '4a038eafdf9e9f3e0ac2e200127df969f3a51ddb', + 'glslang_revision': 'ba1640446f3826a518721d1f083f3a8cca1120c3', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '7c2f5333e9c662620581361dffc327a99800bb52', From 030484bcfaaced573265bdc5c7d59cfa3e071f76 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 23 Apr 2025 11:15:21 -0400 Subject: [PATCH 078/117] Update to SPIRV-Tools v2025.2.rc2, SPIRV-Headers --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index cb2e39701..787c22546 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'ba1640446f3826a518721d1f083f3a8cca1120c3', + 'glslang_revision': '697683e6b8871420d7d942b1a2fe233242ab5608', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '7c2f5333e9c662620581361dffc327a99800bb52', - 'spirv_tools_revision': 'a871fc43e29038d96109a64a64219eacefdf0634', + 'spirv_headers_revision': 'aa6cef192b8e693916eb713e7a9ccadf06062ceb', + 'spirv_tools_revision': 'a62abcb402009b9ca5975e6167c09f237f630e0e', } deps = { From 3362e24c42ab5bf7ad32c0fec64b0a0ddeb2fda1 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 23 Apr 2025 11:19:06 -0400 Subject: [PATCH 079/117] Finalize Shaderc v2025.2 --- CHANGES | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 70c1a1abc..9463d6c6e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,8 @@ Revision history for Shaderc -v2025.2-dev - - Start v2025.2 development +v2025.2 + - Update dependencies: Glslang, SPIRV-Tools, SPIRV-Headers + - Supports BFloat16 floating point types v2025.1 - Update tools and compilers tested: From a5a8caa1951b3f893a08f63cab2dc877087dc05b Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 23 Apr 2025 11:19:32 -0400 Subject: [PATCH 080/117] Start Shaderc v2025.3 development --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 9463d6c6e..be0de21e3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2025.3-dev + - Start development + v2025.2 - Update dependencies: Glslang, SPIRV-Tools, SPIRV-Headers - Supports BFloat16 floating point types From 4e25659448a1083e9bb28e324bb8dc9cba277ce2 Mon Sep 17 00:00:00 2001 From: Ethan Date: Mon, 2 Jun 2025 09:19:56 -0700 Subject: [PATCH 081/117] Fixed glslc binaries being build even if enable install is off. --- glslc/CMakeLists.txt | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index 1277d87e7..597cac7eb 100644 --- a/glslc/CMakeLists.txt +++ b/glslc/CMakeLists.txt @@ -32,8 +32,8 @@ add_library(glslc STATIC shaderc_default_compile_options(glslc) target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR}) -if (SHADERC_ENABLE_WGSL_OUTPUT) - if (IS_DIRECTORY "${tint_SOURCE_DIR}/include") +if(SHADERC_ENABLE_WGSL_OUTPUT) + if(IS_DIRECTORY "${tint_SOURCE_DIR}/include") target_include_directories(glslc PRIVATE "${tint_SOURCE_DIR}/include") target_include_directories(glslc PRIVATE "${tint_SOURCE_DIR}") endif() @@ -43,25 +43,27 @@ if (SHADERC_ENABLE_WGSL_OUTPUT) endif(SHADERC_ENABLE_WGSL_OUTPUT) target_link_libraries(glslc PRIVATE - glslang SPIRV # Glslang libraries - $<$:libtint> # Tint libraries, optional - shaderc_util shaderc # internal Shaderc libraries + glslang SPIRV # Glslang libraries + $<$:libtint> # Tint libraries, optional + shaderc_util shaderc # internal Shaderc libraries ${CMAKE_THREAD_LIBS_INIT}) -add_executable(glslc_exe src/main.cc) -shaderc_default_compile_options(glslc_exe) -target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) -set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) -target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) -add_dependencies(glslc_exe build-version) +if(SHADERC_ENABLE_INSTALL) + add_executable(glslc_exe src/main.cc) + shaderc_default_compile_options(glslc_exe) + target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) + set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) + target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) + add_dependencies(glslc_exe build-version) +endif(SHADERC_ENABLE_INSTALL) shaderc_add_tests( TEST_PREFIX glslc LINK_LIBS glslc shaderc_util shaderc TEST_NAMES - file - resource_parse - stage) + file + resource_parse + stage) shaderc_add_asciidoc(glslc_doc_README README) From b31ef055f7efdd12592dc7a14a07a60295d6b7b4 Mon Sep 17 00:00:00 2001 From: Ethan Date: Mon, 2 Jun 2025 09:55:59 -0700 Subject: [PATCH 082/117] Added a way to disable the glsc CLI executable. --- CMakeLists.txt | 10 ++++++++++ glslc/CMakeLists.txt | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd6b890f1..1e4cc3616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,16 @@ else() message(STATUS "Configuring Shaderc to avoid building examples.") endif() +option(SHADERC_SKIP_EXECUTABLES "Skip building executables." ${SHADERC_SKIP_EXECUTABLES}) +if(NOT ${SHADERC_SKIP_EXECUTABLES}) + set(SHADERC_ENABLE_EXECUTABLES ON) +endif() +if (${SHADERC_SKIP_EXECUTABLES}) + message(STATUS "Configuring Shaderc to build executables.") +else() + message(STATUS "Configuring Shaderc to avoid building executables.") +endif() + option(SHADERC_SKIP_COPYRIGHT_CHECK "Skip copyright check" ${SHADERC_SKIP_COPYRIGHT_CHECK}) if(NOT ${SHADERC_SKIP_COPYRIGHT_CHECK}) set(SHADERC_ENABLE_COPYRIGHT_CHECK ON) diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index 597cac7eb..44d55761d 100644 --- a/glslc/CMakeLists.txt +++ b/glslc/CMakeLists.txt @@ -32,8 +32,8 @@ add_library(glslc STATIC shaderc_default_compile_options(glslc) target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR}) -if(SHADERC_ENABLE_WGSL_OUTPUT) - if(IS_DIRECTORY "${tint_SOURCE_DIR}/include") +if (SHADERC_ENABLE_WGSL_OUTPUT) + if (IS_DIRECTORY "${tint_SOURCE_DIR}/include") target_include_directories(glslc PRIVATE "${tint_SOURCE_DIR}/include") target_include_directories(glslc PRIVATE "${tint_SOURCE_DIR}") endif() @@ -43,27 +43,27 @@ if(SHADERC_ENABLE_WGSL_OUTPUT) endif(SHADERC_ENABLE_WGSL_OUTPUT) target_link_libraries(glslc PRIVATE - glslang SPIRV # Glslang libraries - $<$:libtint> # Tint libraries, optional - shaderc_util shaderc # internal Shaderc libraries + glslang SPIRV # Glslang libraries + $<$:libtint> # Tint libraries, optional + shaderc_util shaderc # internal Shaderc libraries ${CMAKE_THREAD_LIBS_INIT}) -if(SHADERC_ENABLE_INSTALL) +if(SHADERC_ENABLE_EXECUTABLES) add_executable(glslc_exe src/main.cc) shaderc_default_compile_options(glslc_exe) target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) add_dependencies(glslc_exe build-version) -endif(SHADERC_ENABLE_INSTALL) +endif(SHADERC_ENABLE_EXECUTABLES) shaderc_add_tests( TEST_PREFIX glslc LINK_LIBS glslc shaderc_util shaderc TEST_NAMES - file - resource_parse - stage) + file + resource_parse + stage) shaderc_add_asciidoc(glslc_doc_README README) From 3f3d2b00f925616eb9afdcf2125bb7c067fd6f1d Mon Sep 17 00:00:00 2001 From: Ethan Date: Tue, 3 Jun 2025 17:59:52 -0700 Subject: [PATCH 083/117] Fixed the messages being the wrong variable. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e4cc3616..06f5395c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ option(SHADERC_SKIP_EXECUTABLES "Skip building executables." ${SHADERC_SKIP_EXEC if(NOT ${SHADERC_SKIP_EXECUTABLES}) set(SHADERC_ENABLE_EXECUTABLES ON) endif() -if (${SHADERC_SKIP_EXECUTABLES}) +if (${SHADERC_ENABLE_EXECUTABLES}) message(STATUS "Configuring Shaderc to build executables.") else() message(STATUS "Configuring Shaderc to avoid building executables.") From 81afed4c36c08db1ba31252d1583889f812d48e3 Mon Sep 17 00:00:00 2001 From: Zacharie Corniere Date: Tue, 10 Jun 2025 12:18:47 +0200 Subject: [PATCH 084/117] fix SHADERC_ENABLE_TESTS leaving some tests active --- glslc/test/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/glslc/test/CMakeLists.txt b/glslc/test/CMakeLists.txt index 372f21afc..0ed00e8f0 100644 --- a/glslc/test/CMakeLists.txt +++ b/glslc/test/CMakeLists.txt @@ -12,17 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -add_test(NAME shaderc_expect_unittests - COMMAND ${Python_EXECUTABLE} -m unittest expect_unittest.py - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -add_test(NAME shaderc_glslc_test_framework_unittests - COMMAND ${Python_EXECUTABLE} -m unittest glslc_test_framework_unittest.py - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - if(${SHADERC_ENABLE_TESTS}) + + add_test(NAME shaderc_expect_unittests + COMMAND ${Python_EXECUTABLE} -m unittest expect_unittest.py + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_test(NAME shaderc_glslc_test_framework_unittests + COMMAND ${Python_EXECUTABLE} -m unittest glslc_test_framework_unittest.py + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_test(NAME glslc_tests COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glslc_test_framework.py $ $ --test-dir ${CMAKE_CURRENT_SOURCE_DIR}) + endif() From ecc3c48a8a9c69ab98e16c4b4633bd6dd60dc502 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 18 Jun 2025 15:37:07 -0400 Subject: [PATCH 085/117] Update dependencies to top of tree glslang spirv-headers spirv-tools --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 787c22546..f12c69436 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '697683e6b8871420d7d942b1a2fe233242ab5608', + 'glslang_revision': '05cfcc1613c28c1274036f53616d66324f7cd383', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'aa6cef192b8e693916eb713e7a9ccadf06062ceb', - 'spirv_tools_revision': 'a62abcb402009b9ca5975e6167c09f237f630e0e', + 'spirv_headers_revision': '4e209d3d7e555d49b9a4720a622065881f839ac8', + 'spirv_tools_revision': 'dec28643ed15f68a2bc95650de25e0a7486b564c', } deps = { From 3cd03b2fb954f1a38aefda2b3cf58fbb0eb8f2a8 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 24 Jun 2025 15:54:56 -0400 Subject: [PATCH 086/117] Update deps SPIRV-Tools v2025.3.rc1 SPIRV-Headers (corresponding header) Glslang top of tree --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index f12c69436..d05939fec 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '05cfcc1613c28c1274036f53616d66324f7cd383', + 'glslang_revision': 'efd24d75bcbc55620e759f6bf42c45a32abac5f8', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '4e209d3d7e555d49b9a4720a622065881f839ac8', - 'spirv_tools_revision': 'dec28643ed15f68a2bc95650de25e0a7486b564c', + 'spirv_headers_revision': '2a611a970fdbc41ac2e3e328802aed9985352dca', + 'spirv_tools_revision': '33e02568181e3312f49a3cf33df470bf96ef293a', } deps = { From 8c2e602ce440b7739c95ff3d69cecb1adf6becda Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 24 Jun 2025 16:00:31 -0400 Subject: [PATCH 087/117] Finalize Shaderc v2025.3 --- CHANGES | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index be0de21e3..1c8529eea 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,10 @@ Revision history for Shaderc -v2025.3-dev - - Start development +v2025.3 + - Update dependencies + - CMake updates: + - Actually disable all tests when specified + - Add a way to disable building glslc v2025.2 - Update dependencies: Glslang, SPIRV-Tools, SPIRV-Headers From 7839e41d3ae40dff04de332797c9b714ddd909a2 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 24 Jun 2025 16:00:56 -0400 Subject: [PATCH 088/117] Start Shaderc v2025.4 development --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 1c8529eea..5d0421cc9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2025.4-dev + - Start development + v2025.3 - Update dependencies - CMake updates: From c8456388a27b048b93e9082b36202c06200c8887 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 25 Jun 2025 13:59:20 -0400 Subject: [PATCH 089/117] Update DEPS --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index d05939fec..734d4b281 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'efd24d75bcbc55620e759f6bf42c45a32abac5f8', + 'glslang_revision': '0e41d3137e125b557dafa79675563c6cabdde392', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '2a611a970fdbc41ac2e3e328802aed9985352dca', - 'spirv_tools_revision': '33e02568181e3312f49a3cf33df470bf96ef293a', + 'spirv_headers_revision': '04b76709bf40a7ce8df3382060ef3620f19de566', + 'spirv_tools_revision': '604c3e75a41b3605ac86bdf5bc26987bd9f9589f', } deps = { From 91a28dc72688e31ec265a92f5ff0c567cd4f39e7 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 6 Aug 2025 13:51:22 -0400 Subject: [PATCH 090/117] Update DEPS --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 734d4b281..4f21d7b5e 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '0e41d3137e125b557dafa79675563c6cabdde392', + 'glslang_revision': '0d614c24699d986afd590b93a8c0f0946e997919', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '04b76709bf40a7ce8df3382060ef3620f19de566', - 'spirv_tools_revision': '604c3e75a41b3605ac86bdf5bc26987bd9f9589f', + 'spirv_headers_revision': 'a7361efd139bf65de0e86d43b01b01e0b34d387f', + 'spirv_tools_revision': 'b8b90dba56eb8c75050a712188d662fd51c953df', } deps = { From 402a16ea5a99a3acbda542d48e902c7e3aa50033 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 7 Aug 2025 11:15:35 -0400 Subject: [PATCH 091/117] Remove support for VS2019 Update badges and download links to VS2022 Remove kokoro build config for MSVC 2019. I have already removed the branch protection rule requiring it as a check. Bug: Google-internal bug crbug.com/437082422 --- README.md | 4 ++-- downloads.md | 4 ++-- kokoro/windows/build.bat | 4 +--- kokoro/windows/build_2019_amd64_release.bat | 23 --------------------- kokoro/windows/continuous_release_2019.cfg | 22 -------------------- kokoro/windows/presubmit_release_2019.cfg | 16 -------------- 6 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 kokoro/windows/build_2019_amd64_release.bat delete mode 100644 kokoro/windows/continuous_release_2019.cfg delete mode 100644 kokoro/windows/presubmit_release_2019.cfg diff --git a/README.md b/README.md index 0ebacfaaa..bc10b01fa 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ to provide: Linux[![Linux Build Status](https://storage.googleapis.com/shaderc/badges/build_status_linux_clang_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html) MacOS[![MacOS Build Status](https://storage.googleapis.com/shaderc/badges/build_status_macos_clang_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_release.html) -Windows[![Windows Build Status](https://storage.googleapis.com/shaderc/badges/build_status_windows_vs2019_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_release.html) +Windows[![Windows Build Status](https://storage.googleapis.com/shaderc/badges/build_status_windows_vs2022_amd64_release.svg)](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2022_release.html) [More downloads](downloads.md) @@ -176,7 +176,7 @@ On Linux, if cross compiling to Windows: On Windows, the following tools should be installed and available on your path: -- Visual Studio 2019 or later. Previous versions of Visual Studio may work but +- Visual Studio 2022 or later. Previous versions of Visual Studio may work but are untested and unsupported. - Git - including the associated tools, Bash, `diff`. diff --git a/downloads.md b/downloads.md index c69ed959e..a92e9c0f9 100644 --- a/downloads.md +++ b/downloads.md @@ -7,11 +7,11 @@ Download the latest builds. ## Release | Windows | Linux | MacOS | | --- | --- | --- | -| [MSVC 2019](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_release.html) | +| [VS 2022](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2022_amd64_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_release.html) | | | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_release.html) | | ## Debug | Windows | Linux | MacOS | | --- | --- | --- | -| [MSVC 2019](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2019_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_debug.html) | +| [VS 2022](https://storage.googleapis.com/shaderc/badges/build_link_windows_vs2022_amd64_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_debug.html) | [clang](https://storage.googleapis.com/shaderc/badges/build_link_macos_clang_debug.html) | | | [gcc](https://storage.googleapis.com/shaderc/badges/build_link_linux_gcc_debug.html) | | diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat index 9746a8651..0db2b0437 100644 --- a/kokoro/windows/build.bat +++ b/kokoro/windows/build.bat @@ -38,9 +38,7 @@ cd %SRC%\build :: ######################################### :: set up msvc build env :: ######################################### -if %VS_VERSION% == 2019 ( - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% -) else if %VS_VERSION% == 2022 ( +if %VS_VERSION% == 2022 ( call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% ) diff --git a/kokoro/windows/build_2019_amd64_release.bat b/kokoro/windows/build_2019_amd64_release.bat deleted file mode 100644 index ebb09cc9b..000000000 --- a/kokoro/windows/build_2019_amd64_release.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright (C) 2023 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat RelWithDebInfo 2019 amd64 diff --git a/kokoro/windows/continuous_release_2019.cfg b/kokoro/windows/continuous_release_2019.cfg deleted file mode 100644 index 83440b34f..000000000 --- a/kokoro/windows/continuous_release_2019.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2023 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_2019_amd64_release.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/presubmit_release_2019.cfg b/kokoro/windows/presubmit_release_2019.cfg deleted file mode 100644 index 62f6ad672..000000000 --- a/kokoro/windows/presubmit_release_2019.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2023 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/windows/build_2019_amd64_release.bat" From 1dd61a4e407eeba704eb3d8796056be0415ebec8 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 4 Sep 2025 17:00:26 -0400 Subject: [PATCH 092/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 4f21d7b5e..ba07923a7 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '0d614c24699d986afd590b93a8c0f0946e997919', + 'glslang_revision': '9d764997360b202d2ba7aaad9a401e57d8df56b3', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'a7361efd139bf65de0e86d43b01b01e0b34d387f', - 'spirv_tools_revision': 'b8b90dba56eb8c75050a712188d662fd51c953df', + 'spirv_headers_revision': '54ae32bce772b29a253b18583b86ab813ed1887c', + 'spirv_tools_revision': 'f1aa20b5c19eb7632c0d3255ff67c9e5cd18b405', } deps = { From 3a44d5d7850da3601aa43d523a3d228f045fb43d Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 4 Sep 2025 17:20:46 -0400 Subject: [PATCH 093/117] When glslc is not built, don't install or test it Fix the logic when SHADERC_SKIP_EXECUTABLES=ON * Don't try to install the glslc executable * Don't try to run tests that invoke glslc --- glslc/CMakeLists.txt | 8 +++++--- glslc/test/CMakeLists.txt | 16 ++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt index 44d55761d..948307e2e 100644 --- a/glslc/CMakeLists.txt +++ b/glslc/CMakeLists.txt @@ -68,9 +68,11 @@ shaderc_add_tests( shaderc_add_asciidoc(glslc_doc_README README) if(SHADERC_ENABLE_INSTALL) - install(TARGETS glslc_exe - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(SHADERC_ENABLE_EXECUTABLES) + install(TARGETS glslc_exe + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif(SHADERC_ENABLE_EXECUTABLES) endif(SHADERC_ENABLE_INSTALL) add_subdirectory(test) diff --git a/glslc/test/CMakeLists.txt b/glslc/test/CMakeLists.txt index 0ed00e8f0..c5ec68963 100644 --- a/glslc/test/CMakeLists.txt +++ b/glslc/test/CMakeLists.txt @@ -21,10 +21,14 @@ if(${SHADERC_ENABLE_TESTS}) COMMAND ${Python_EXECUTABLE} -m unittest glslc_test_framework_unittest.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - add_test(NAME glslc_tests - COMMAND ${Python_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/glslc_test_framework.py - $ $ - --test-dir ${CMAKE_CURRENT_SOURCE_DIR}) - + # These tests use the glslc executable, so they can only run if + # glslc has been built. + if(${SHADERC_ENABLE_EXECUTABLES}) + add_test(NAME glslc_tests + COMMAND ${Python_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/glslc_test_framework.py + $ $ + --test-dir ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + endif() From 49d6a9328a07fe084a2ac018123e39696a441416 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 4 Sep 2025 14:20:22 -0400 Subject: [PATCH 094/117] Add -fmax-id-bound flag Add an option for shaderc to be able to set the max id bound used in the compiler. This is useful for user who are hitting the limit, but are able to use a higher value. See https://github.com/KhronosGroup/SPIRV-Tools/issues/6260. --- DEPS | 2 +- glslc/src/main.cc | 9 ++++ glslc/test/option_fmax_id_bound.py | 50 +++++++++++++++++++ libshaderc/include/shaderc/shaderc.h | 3 ++ libshaderc/include/shaderc/shaderc.hpp | 4 ++ libshaderc/src/shaderc.cc | 5 ++ .../include/libshaderc_util/compiler.h | 4 ++ libshaderc_util/src/compiler.cc | 1 + 8 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 glslc/test/option_fmax_id_bound.py diff --git a/DEPS b/DEPS index ba07923a7..22d9b7922 100644 --- a/DEPS +++ b/DEPS @@ -11,7 +11,7 @@ vars = { 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '54ae32bce772b29a253b18583b86ab813ed1887c', - 'spirv_tools_revision': 'f1aa20b5c19eb7632c0d3255ff67c9e5cd18b405', + 'spirv_tools_revision': '1a2d8ddb1244e06c3830cac2b65a1027cbcf9e95', } deps = { diff --git a/glslc/src/main.cc b/glslc/src/main.cc index 5e7c68d4b..4de210068 100644 --- a/glslc/src/main.cc +++ b/glslc/src/main.cc @@ -338,6 +338,15 @@ int main(int argc, char** argv) { compiler.options().SetNanClamp(true); } else if (arg.starts_with("-fpreserve-bindings")) { compiler.options().SetPreserveBindings(true); + } else if (arg.starts_with("-fmax-id-bound=")) { + const string_piece value_str = arg.substr(std::strlen("-fmax-id-bound=")); + uint32_t bound = 0; + if (!shaderc_util::ParseUint32(value_str.str(), &bound)) { + std::cerr << "glslc: error: invalid value '" << value_str << "' in '" + << arg << "'" << std::endl; + return 1; + } + compiler.options().SetMaxIdBound(bound); } else if (((u_kind = shaderc_uniform_kind_image), (arg == "-fimage-binding-base")) || ((u_kind = shaderc_uniform_kind_texture), diff --git a/glslc/test/option_fmax_id_bound.py b/glslc/test/option_fmax_id_bound.py new file mode 100644 index 000000000..b5548bc0b --- /dev/null +++ b/glslc/test/option_fmax_id_bound.py @@ -0,0 +1,50 @@ +# Copyright 2025 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, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import expect +from glslc_test_framework import inside_glslc_testsuite +from placeholder import FileShader + +COMPUTE_SHADER = """#version 450 +#extension GL_EXT_control_flow_attributes : require + +layout(local_size_x=1) in; + +layout(binding=0) buffer Out { uint x; } g_out; + +void main() { + uint x = 0; + [[unroll]] + for (int i = 0; i < 100; ++i) { + x = x + uint(i); + } + g_out.x = x; +} +""" + +@inside_glslc_testsuite('OptionFMaxIdBound') +class TestFMaxIdBoundLow(expect.ErrorMessageSubstr): + """Tests that compilation fails with a low -fmax-id-bound.""" + + shader = FileShader(COMPUTE_SHADER, ".comp") + glslc_args = ['-c', shader, '-fmax-id-bound=300', '-O'] + expected_error_substr = [" ID overflow. Try running compact-ids"] + + +@inside_glslc_testsuite('OptionFMaxIdBound') +class TestFMaxIdBoundHigh(expect.ValidObjectFile): + """Tests that compilation passes with a high -fmax-id-bound.""" + + shader = FileShader(COMPUTE_SHADER, ".comp") + glslc_args = ['-c', shader, '-fmax-id-bound=200000', '-O'] diff --git a/libshaderc/include/shaderc/shaderc.h b/libshaderc/include/shaderc/shaderc.h index 3a3e97d6b..dd40744d0 100644 --- a/libshaderc/include/shaderc/shaderc.h +++ b/libshaderc/include/shaderc/shaderc.h @@ -463,6 +463,9 @@ SHADERC_EXPORT void shaderc_compile_options_set_binding_base_for_stage( SHADERC_EXPORT void shaderc_compile_options_set_preserve_bindings( shaderc_compile_options_t options, bool preserve_bindings); +SHADERC_EXPORT void shaderc_compile_options_set_max_id_bound( + shaderc_compile_options_t options, uint32_t max_id_bound); + // Sets whether the compiler should automatically assign locations to // uniform variables that don't have explicit locations in the shader source. SHADERC_EXPORT void shaderc_compile_options_set_auto_map_locations( diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp index a4e93ff84..77ccd7a70 100644 --- a/libshaderc/include/shaderc/shaderc.hpp +++ b/libshaderc/include/shaderc/shaderc.hpp @@ -317,6 +317,10 @@ class CompileOptions { shaderc_compile_options_set_preserve_bindings(options_, preserve_bindings); } + void SetMaxIdBound(uint32_t max_id_bound) { + shaderc_compile_options_set_max_id_bound(options_, max_id_bound); + } + // Sets whether the compiler automatically assigns locations to // uniform variables that don't have explicit locations. void SetAutoMapLocations(bool auto_map) { diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc index 821f31fb9..4a43b292e 100644 --- a/libshaderc/src/shaderc.cc +++ b/libshaderc/src/shaderc.cc @@ -540,6 +540,11 @@ void shaderc_compile_options_set_preserve_bindings( options->compiler.SetPreserveBindings(preserve_bindings); } +void shaderc_compile_options_set_max_id_bound(shaderc_compile_options_t options, + uint32_t max_id_bound) { + options->compiler.SetMaxIdBound(max_id_bound); +} + void shaderc_compile_options_set_auto_map_locations( shaderc_compile_options_t options, bool auto_map) { options->compiler.SetAutoMapLocations(auto_map); diff --git a/libshaderc_util/include/libshaderc_util/compiler.h b/libshaderc_util/include/libshaderc_util/compiler.h index 09dd31e0b..3f593d6de 100644 --- a/libshaderc_util/include/libshaderc_util/compiler.h +++ b/libshaderc_util/include/libshaderc_util/compiler.h @@ -319,6 +319,8 @@ class Compiler { preserve_bindings_ = preserve_bindings; } + void SetMaxIdBound(uint32_t max_id_bound) { max_id_bound_ = max_id_bound; } + // Sets whether the compiler automatically assigns locations to // uniform variables that don't have explicit locations. void SetAutoMapLocations(bool auto_map) { auto_map_locations_ = auto_map; } @@ -534,6 +536,8 @@ class Compiler { // True if the compiler should preserve all bindings, even when unused. bool preserve_bindings_; + uint32_t max_id_bound_ = 0x3FFFFF; + // True if the compiler should use HLSL IO mapping rules when compiling HLSL. bool hlsl_iomap_; diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc index 9bf9a4348..f2ed3c71d 100644 --- a/libshaderc_util/src/compiler.cc +++ b/libshaderc_util/src/compiler.cc @@ -370,6 +370,7 @@ std::tuple, size_t> Compiler::Compile( if (!opt_passes.empty()) { spvtools::OptimizerOptions opt_options; opt_options.set_preserve_bindings(preserve_bindings_); + opt_options.set_max_id_bound(max_id_bound_); std::string opt_errors; if (!SpirvToolsOptimize(target_env_, target_env_version_, opt_passes, From f4d3445ff311952851c74c34bde6a8b381e1a3df Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 25 Sep 2025 18:23:31 -0400 Subject: [PATCH 095/117] Update CHANGES with recent history --- CHANGES | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5d0421cc9..733faec9e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,12 @@ Revision history for Shaderc v2025.4-dev - - Start development + - Update dependencies + - Add option to set max SPIR-V ID bound. + glslc: -fmax-id-bound + - CMake: Fix some install logic: when glslc is not built, + don't try to install it. + - Remove testing of VS 2019 v2025.3 - Update dependencies From 15139395a041f27f72eb1d82727879e6b669fae8 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 25 Sep 2025 18:24:07 -0400 Subject: [PATCH 096/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 22d9b7922..ff0f51d52 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '9d764997360b202d2ba7aaad9a401e57d8df56b3', + 'glslang_revision': 'd213562e35573012b6348b2d584457c3704ac09b', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '54ae32bce772b29a253b18583b86ab813ed1887c', - 'spirv_tools_revision': '1a2d8ddb1244e06c3830cac2b65a1027cbcf9e95', + 'spirv_headers_revision': '01e0577914a75a2569c846778c2f93aa8e6feddd', + 'spirv_tools_revision': '19042c8921f35f7bec56b9e5c96c5f5691588ca8', } deps = { From c7e73e87aebdafa98e57809e0357e3d3285540aa Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 25 Sep 2025 18:27:50 -0400 Subject: [PATCH 097/117] Finalize Shaderc v2025.4 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 733faec9e..9e6365462 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Revision history for Shaderc -v2025.4-dev +v2025.4 - Update dependencies - Add option to set max SPIR-V ID bound. glslc: -fmax-id-bound From 73743588fe9c39f2f1c780a087d94afac691a189 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 25 Sep 2025 18:31:43 -0400 Subject: [PATCH 098/117] Start Shaderc v2025.5-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 9e6365462..a1b6fdc57 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2025.5-dev + - Start development + v2025.4 - Update dependencies - Add option to set max SPIR-V ID bound. From 5dcb0004757f09c994259d7b3904ac1d4ff57d47 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 12 Nov 2025 12:09:07 -0500 Subject: [PATCH 099/117] Update deps --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index ff0f51d52..d478627ad 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'd213562e35573012b6348b2d584457c3704ac09b', + 'glslang_revision': '7099c123729e02f81d70559e79ee4360096fdfe5', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '01e0577914a75a2569c846778c2f93aa8e6feddd', - 'spirv_tools_revision': '19042c8921f35f7bec56b9e5c96c5f5691588ca8', + 'spirv_headers_revision': 'b824a462d4256d720bebb40e78b9eb8f78bbb305', + 'spirv_tools_revision': '3ba5ba2f2e2e88b563bc0ddfaff13df8e9b3b254', } deps = { From fcd74b6e0c372dfcaa04ab5b737969abaf21fc83 Mon Sep 17 00:00:00 2001 From: codeandkey Date: Mon, 20 Oct 2025 14:00:30 -0700 Subject: [PATCH 100/117] Add linux-headers package to provide missing futex.h The subproject `third_party/abseil_cpp` fails to build due to a missing system header , likely due to changes introduced in newer Alpine base images. This adds the `linux-headers` package to the docker build to provide the missing header and correct the build. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 882123908..2bbde65b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ RUN apk add --update \ build-base \ cmake \ git \ + linux-headers \ ninja \ python3 \ py-pip \ From 64623490690d2655a176a00dbed48e5061982277 Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 18 Nov 2025 10:58:26 -0500 Subject: [PATCH 101/117] Update depenendencies --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d478627ad..9031aa584 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '7099c123729e02f81d70559e79ee4360096fdfe5', + 'glslang_revision': '4610b2dc55042777f29504020128051e087883fe', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': 'b824a462d4256d720bebb40e78b9eb8f78bbb305', - 'spirv_tools_revision': '3ba5ba2f2e2e88b563bc0ddfaff13df8e9b3b254', + 'spirv_tools_revision': '3b94e1446705e7db1489b4ea355a5dec55a70a1a', } deps = { From d7db7ea2af03bab44c4f6b1574837ef307dc4c0d Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Nov 2025 13:01:05 -0500 Subject: [PATCH 102/117] Update dependencies SPIRV-Tools v2025.5.rc1 --- CHANGES | 2 +- DEPS | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index a1b6fdc57..5e13e0bb7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ Revision history for Shaderc v2025.5-dev - - Start development + - Update dependencies v2025.4 - Update dependencies diff --git a/DEPS b/DEPS index 9031aa584..a32568491 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '4610b2dc55042777f29504020128051e087883fe', + 'glslang_revision': '7a47e2531cb334982b2a2dd8513dca0a3de4373d', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': 'b824a462d4256d720bebb40e78b9eb8f78bbb305', - 'spirv_tools_revision': '3b94e1446705e7db1489b4ea355a5dec55a70a1a', + 'spirv_tools_revision': '262bdab48146c937467f826699a40da0fdfc0f1a', } deps = { From c4b0af6c3664cd8b33ffddf452514e02a173b4d6 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Nov 2025 13:03:20 -0500 Subject: [PATCH 103/117] Finalize Shaderc v2025.5 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5e13e0bb7..8c7c771d6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,6 @@ Revision history for Shaderc -v2025.5-dev +v2025.5 - Update dependencies v2025.4 From e0a5092b4b05dbcc448b0883f3575163634f8e86 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 27 Nov 2025 13:03:49 -0500 Subject: [PATCH 104/117] Start v2025.6-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 8c7c771d6..a40320de5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2025.6-dev + - Start development + v2025.5 - Update dependencies From d15277d6bc180f6a0b8b601f0cab2bbcaac9b4d5 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 12 Jan 2026 16:11:17 -0500 Subject: [PATCH 105/117] Update depenendencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index a32568491..ce0b86a9b 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '7a47e2531cb334982b2a2dd8513dca0a3de4373d', + 'glslang_revision': 'b937eae5e2ae1e29efe8f8775feaa434239806d2', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'b824a462d4256d720bebb40e78b9eb8f78bbb305', - 'spirv_tools_revision': '262bdab48146c937467f826699a40da0fdfc0f1a', + 'spirv_headers_revision': 'babee77020ff82b571d723ce2c0262e2ec0ee3f1', + 'spirv_tools_revision': '65b2ace21293057714b7fa1e87bd764d3dcef305', } deps = { From e6e2d2c19147edbfa87c6babc4ee318d3f205ef9 Mon Sep 17 00:00:00 2001 From: David Neto Date: Mon, 19 Jan 2026 16:32:04 -0500 Subject: [PATCH 106/117] Update SPIRV-Tools, glslang --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index ce0b86a9b..c8bddd222 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'b937eae5e2ae1e29efe8f8775feaa434239806d2', + 'glslang_revision': '42b0ef1ddb872ddb5183efecd712944c279baf48', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': 'babee77020ff82b571d723ce2c0262e2ec0ee3f1', - 'spirv_tools_revision': '65b2ace21293057714b7fa1e87bd764d3dcef305', + 'spirv_tools_revision': '8ac4c4f80c5e338c7341152f7f0fa1bd2dc907d3', } deps = { From 0d7df6e9abc9372f2fd2a15df6b271dbd028a648 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 21 Jan 2026 16:58:53 -0500 Subject: [PATCH 107/117] Update dependencies --- DEPS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c8bddd222..8b43ea156 100644 --- a/DEPS +++ b/DEPS @@ -10,8 +10,8 @@ vars = { 'glslang_revision': '42b0ef1ddb872ddb5183efecd712944c279baf48', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'babee77020ff82b571d723ce2c0262e2ec0ee3f1', - 'spirv_tools_revision': '8ac4c4f80c5e338c7341152f7f0fa1bd2dc907d3', + 'spirv_headers_revision': '04f10f650d514df88b76d25e83db360142c7b174', + 'spirv_tools_revision': '2e570450355c2daaa32015df261c0e4beeab771b', } deps = { From 53759728ec32146360be0855f6442433b2222a92 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 21 Jan 2026 17:22:20 -0500 Subject: [PATCH 108/117] Add missing dates in CHANGES --- CHANGES | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index a40320de5..69f14c140 100644 --- a/CHANGES +++ b/CHANGES @@ -1,12 +1,12 @@ Revision history for Shaderc -v2025.6-dev +v2025.6-dev 2025-11-27 - Start development -v2025.5 +v2025.5 2025-11-27 - Update dependencies -v2025.4 +v2025.4 2025-09-25 - Update dependencies - Add option to set max SPIR-V ID bound. glslc: -fmax-id-bound @@ -14,17 +14,17 @@ v2025.4 don't try to install it. - Remove testing of VS 2019 -v2025.3 +v2025.3 2025-06-24 - Update dependencies - CMake updates: - Actually disable all tests when specified - Add a way to disable building glslc -v2025.2 +v2025.2 2025-04-23 - Update dependencies: Glslang, SPIRV-Tools, SPIRV-Headers - Supports BFloat16 floating point types -v2025.1 +v2025.1 2025-02-27 - Update tools and compilers tested: - Clang 13 - GCC 13 @@ -35,10 +35,10 @@ v2025.1 - Skip version numbers to match SPIRV-Tools, to avoid confusion. -v2024.4 +v2024.4 2024-12-06 - Support Vulkan 1.4 -v2024.3 +v2024.3 2024-09-23 - Update dependencies: Glslang, SPRIV-Tools, SPIRV-Headers - SPIRV-Tools is at v2024.4.rc1 - This incorporates a SPIRV-Tools fix which was limiting parallelism. @@ -53,7 +53,7 @@ v2024.3 - Use Python 3.12 on Linux CI bots - Fix Python 3.12 warnings for string escapes -v2024.2 +v2024.2 2024-06-21 - Update dependencies: Glslang: top of tree 2024-06-21 SPIRV-Header: top of tree 2024-06-21 @@ -61,11 +61,11 @@ v2024.2 - Build: - Remove support for VS2017 -v2024.1 +v2024.1 2024-04-30 - Update dependencies - Propagate test/install options to Glslang -v2024.0 +v2024.0 2024-03-08 - Update dependencies - Utilities: - Use Python3 explicitly in utility scripts From e5b1ffefd3c1f3d4d5e7704e59ca4dc6610d6ad0 Mon Sep 17 00:00:00 2001 From: David Neto Date: Wed, 21 Jan 2026 17:36:28 -0500 Subject: [PATCH 109/117] CHANGES file must have a valid version and date It must appear on the third line. This will prevent accidentally dropping the date. The missing dates have been messing up the version number generation for pkg-config processing. See #1529 --- utils/update_build_version.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/update_build_version.py b/utils/update_build_version.py index b7ce5b84e..7adcefcc8 100755 --- a/utils/update_build_version.py +++ b/utils/update_build_version.py @@ -72,14 +72,16 @@ def deduce_software_version(directory): """ # Match the first well-formed version-and-date line. + # It must be on the third line, and it must have an ISO date. # 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|[\.-]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(): - match = pattern.match(line) + lines = f.readlines()[2:] + if len(lines) > 0: + match = pattern.match(lines[0]) if match: return match.group(1) raise Exception('No version number found in {}'.format(changes_file)) From 301b4ede53d59b68bf55f95bb26412d9233c8187 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 22 Jan 2026 15:26:11 -0500 Subject: [PATCH 110/117] Finalize Shaderc v2026.1 Also update dependencies include: - Glslang 16.2.0 - SPIRV-Tools v2026.1rc1 - SPIRV-Headers top of tree Supports VK_EXT_descriptor_heap and other extensions --- CHANGES | 11 +++++++++-- DEPS | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 69f14c140..354a462f7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,14 @@ Revision history for Shaderc -v2025.6-dev 2025-11-27 - - Start development +v2026.1 2026-01-23 + - Update dependencies: + - Glslang 16.2.0 + - SPIRV-Tools v2026.1rc1. + - SPIRV-Headers top of tree + Supports VK_EXT_descriptor_heap and other extensions. + - Require the CHANGES file to have a valid date on its version lines + This avoid the problem of stale version information in the + pkg-config configuration files. v2025.5 2025-11-27 - Update dependencies diff --git a/DEPS b/DEPS index 8b43ea156..d04dde6a4 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': '42b0ef1ddb872ddb5183efecd712944c279baf48', + 'glslang_revision': 'f0bd0257c308b9a26562c1a30c4748a0219cc951', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', 'spirv_headers_revision': '04f10f650d514df88b76d25e83db360142c7b174', - 'spirv_tools_revision': '2e570450355c2daaa32015df261c0e4beeab771b', + 'spirv_tools_revision': 'fbe4f3ad913c44fe8700545f8ffe35d1382b7093', } deps = { From 722b6db0c6b224be4b3b16e54391022eab40c6d5 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 22 Jan 2026 15:27:40 -0500 Subject: [PATCH 111/117] Start Shaderc v2026.2-dev --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 354a462f7..5cc47d6ed 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Shaderc +v2026.2-dev 2026-01-22 + - Start development + v2026.1 2026-01-23 - Update dependencies: - Glslang 16.2.0 From 1d234d34d43cf5ade135803f7777484eaa48e27f Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 23 Jan 2026 12:01:18 -0500 Subject: [PATCH 112/117] Test GL_EXT_descriptor_heap Extend the expect.ValidaAssemblyFileWithSubstr so it can use a list of expected strings. --- glslc/test/expect.py | 32 ++++++++++----- glslc/test/feature_gl_ext_descriptor_heap.py | 41 ++++++++++++++++++++ 2 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 glslc/test/feature_gl_ext_descriptor_heap.py diff --git a/glslc/test/expect.py b/glslc/test/expect.py index c58557dd8..22e9f8e38 100644 --- a/glslc/test/expect.py +++ b/glslc/test/expect.py @@ -242,7 +242,7 @@ def verify_assembly_file_preamble(self, filename): line3 = assembly_file.readline() if (line1 != '; SPIR-V\n' or - line2 != '; Version: 1.0\n' or + (not line2.startswith('; Version: 1.')) or (not line3.startswith('; Generator: Google Shaderc over Glslang;'))): return False, 'Incorrect SPV assembly' @@ -427,10 +427,13 @@ class ValidAssemblyFileWithSubstr(ValidAssemblyFile): """Mixin class for checking that every input file generates a valid assembly file following the assembly file naming rule, there is no output on stdout/stderr, and all assembly files have the given substring specified - by expected_assembly_substr. + as self.expected_assembly_substr (if present) and substrings specified + by the list strings in self.expected_assembly_substrings (if present). + At least one string must be specified. - To mix in this class, subclasses need to provde expected_assembly_substr - as the expected substring. + To mix in this class, subclasses need to provide + self.expected_assembly_substr as the expected substring, or a list of + strings in self.expected_assembly_substrings. """ def check_assembly_with_substr(self, status): @@ -441,11 +444,22 @@ def check_assembly_with_substr(self, status): if not success: return False, message with open(assembly_filename, 'r') as f: - content = f.read() - if self.expected_assembly_substr not in convert_to_unix_line_endings(content): - return False, ('Incorrect assembly output:\n{asm}\n' - 'Expected substring not found:\n{exp}'.format( - asm=content, exp=self.expected_assembly_substr)) + content = convert_to_unix_line_endings(f.read()) + expected_strs = [] + if 'expected_assembly_substrings' in dir(self): + expected_strs.extend(self.expected_assembly_substrings) + if 'expected_assembly_substr' in dir(self): + expected_strs.append(self.expected_assembly_substr) + assert(type(expected_strs) is list) + assert(len(expected_strs) > 0) + for es in expected_strs: + assert(type(es) is str) + + for es in expected_strs: + if es not in content: + return False, ('Incorrect assembly output:\n{asm}\n' + 'Expected substring not found:\n{exp}'.format( + asm=content, exp=es)) return True, '' diff --git a/glslc/test/feature_gl_ext_descriptor_heap.py b/glslc/test/feature_gl_ext_descriptor_heap.py new file mode 100644 index 000000000..29535b3d7 --- /dev/null +++ b/glslc/test/feature_gl_ext_descriptor_heap.py @@ -0,0 +1,41 @@ +# Copyright 2026 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, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import expect +from glslc_test_framework import inside_glslc_testsuite +from placeholder import FileShader + +# See GL_EXT_descriptor_heap +# https://github.com/KhronosGroup/GLSL/blob/main/extensions/ext/GLSL_EXT_descriptor_heap.txt +GLSL_COMPUTE_SHADER_DESCRIPTOR_HEAP_BUFFER = """#version 450 +#extension GL_EXT_descriptor_heap : require + +layout(descriptor_heap) uniform U { uint source; } ubo[]; +layout(descriptor_heap) buffer B { uint dest; } ssbo[]; + +void main() +{ + ssbo[42].dest = ubo[2026].source; +}""" + +@inside_glslc_testsuite('GL_EXT_descriptor_heap') +class BufferSampleCompiles(expect.ValidAssemblyFileWithSubstr): + shader = FileShader(GLSL_COMPUTE_SHADER_DESCRIPTOR_HEAP_BUFFER, '.comp') + glslc_args = ['-S', shader, '--target-env=vulkan1.2'] + expected_assembly_substrings = [ + "OpCapability UntypedPointersKHR", + "OpCapability DescriptorHeapEXT", + "= OpUntypedAccessChainKHR", + "= OpBufferPointerEXT", + ] From 8d94c764aaa53ef0e828903104a097eb1f94902f Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 27 Feb 2026 18:20:04 -0500 Subject: [PATCH 113/117] Update dependencies SPIRV-Tools SPIRV-Headers Glslang --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index d04dde6a4..ee20d787b 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'f0bd0257c308b9a26562c1a30c4748a0219cc951', + 'glslang_revision': 'e966816ab28ab7cb448d5b33270b43c941b343d4', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': '04f10f650d514df88b76d25e83db360142c7b174', - 'spirv_tools_revision': 'fbe4f3ad913c44fe8700545f8ffe35d1382b7093', + 'spirv_headers_revision': 'f88a2d766840fc825af1fc065977953ba1fa4a91', + 'spirv_tools_revision': '4972c69eb50255b314fc0925ca757c4417e6b6c0', } deps = { From 356c5e311dc6980fa4613ba64c5c3b457a978abe Mon Sep 17 00:00:00 2001 From: dneto Date: Fri, 6 Mar 2026 14:46:39 -0500 Subject: [PATCH 114/117] Reorganize kokoro configurations, step 1 Create configuration files in the new locations. Next step: update Google-internal configuration to point to them And then: remove the old files in GitHub Issue: crbug.com/490434064 --- kokoro/android-cmake-armeabi-v7a/build.sh | 18 +++ .../android-cmake-armeabi-v7a/continuous.cfg | 15 +++ .../android-cmake-armeabi-v7a/presubmit.cfg | 15 +++ kokoro/android-cmake-x86/build.sh | 18 +++ kokoro/android-cmake-x86/continuous.cfg | 15 +++ kokoro/android-cmake-x86/presubmit.cfg | 15 +++ .../build.sh} | 0 kokoro/license-check/continuous.cfg | 15 +++ kokoro/license-check/presubmit.cfg | 15 +++ kokoro/linux-clang-asan/build.sh | 19 ++++ kokoro/linux-clang-asan/continuous.cfg | 15 +++ kokoro/linux-clang-asan/presubmit.cfg | 15 +++ kokoro/linux-clang-debug/build.sh | 19 ++++ kokoro/linux-clang-debug/continuous.cfg | 15 +++ kokoro/linux-clang-debug/presubmit.cfg | 15 +++ kokoro/linux-clang-release/build.sh | 19 ++++ kokoro/linux-clang-release/continuous.cfg | 15 +++ kokoro/linux-clang-release/presubmit.cfg | 15 +++ kokoro/linux-gcc-debug-exception/build.sh | 19 ++++ .../linux-gcc-debug-exception/continuous.cfg | 15 +++ .../linux-gcc-debug-exception/presubmit.cfg | 15 +++ kokoro/linux-gcc-debug/build.sh | 19 ++++ kokoro/linux-gcc-debug/continuous.cfg | 15 +++ kokoro/linux-gcc-debug/presubmit.cfg | 15 +++ kokoro/linux-gcc-release/build.sh | 19 ++++ kokoro/linux-gcc-release/continuous.cfg | 15 +++ kokoro/linux-gcc-release/presubmit.cfg | 15 +++ kokoro/linux/build.sh | 2 - kokoro/macos-clang-debug/build.sh | 19 ++++ kokoro/macos-clang-debug/continuous.cfg | 15 +++ kokoro/macos-clang-debug/presubmit.cfg | 15 +++ kokoro/macos-clang-release/build.sh | 19 ++++ kokoro/macos-clang-release/continuous.cfg | 15 +++ kokoro/macos-clang-release/presubmit.cfg | 15 +++ kokoro/ndk-build/continuous.cfg | 15 +++ kokoro/ndk-build/presubmit.cfg | 15 +++ kokoro/scripts/android/build-docker.sh | 62 +++++++++++ kokoro/scripts/android/build.sh | 38 +++++++ kokoro/scripts/linux/build-docker.sh | 104 ++++++++++++++++++ kokoro/scripts/linux/build.sh | 40 +++++++ kokoro/scripts/macos/build.sh | 63 +++++++++++ kokoro/scripts/ndk-build/build-docker.sh | 70 ++++++++++++ kokoro/scripts/ndk-build/build.sh | 56 ++++++++++ kokoro/scripts/windows/build.bat | 96 ++++++++++++++++ kokoro/windows-vs2022-amd64-debug/build.bat | 23 ++++ .../windows-vs2022-amd64-debug/continuous.cfg | 21 ++++ .../windows-vs2022-amd64-debug/presubmit.cfg | 21 ++++ kokoro/windows-vs2022-amd64-release/build.bat | 21 ++++ .../continuous.cfg | 21 ++++ .../presubmit.cfg | 21 ++++ 50 files changed, 1205 insertions(+), 2 deletions(-) create mode 100755 kokoro/android-cmake-armeabi-v7a/build.sh create mode 100644 kokoro/android-cmake-armeabi-v7a/continuous.cfg create mode 100644 kokoro/android-cmake-armeabi-v7a/presubmit.cfg create mode 100755 kokoro/android-cmake-x86/build.sh create mode 100644 kokoro/android-cmake-x86/continuous.cfg create mode 100644 kokoro/android-cmake-x86/presubmit.cfg rename kokoro/{linux/license_check.sh => license-check/build.sh} (100%) create mode 100644 kokoro/license-check/continuous.cfg create mode 100644 kokoro/license-check/presubmit.cfg create mode 100755 kokoro/linux-clang-asan/build.sh create mode 100644 kokoro/linux-clang-asan/continuous.cfg create mode 100644 kokoro/linux-clang-asan/presubmit.cfg create mode 100755 kokoro/linux-clang-debug/build.sh create mode 100644 kokoro/linux-clang-debug/continuous.cfg create mode 100644 kokoro/linux-clang-debug/presubmit.cfg create mode 100755 kokoro/linux-clang-release/build.sh create mode 100644 kokoro/linux-clang-release/continuous.cfg create mode 100644 kokoro/linux-clang-release/presubmit.cfg create mode 100755 kokoro/linux-gcc-debug-exception/build.sh create mode 100644 kokoro/linux-gcc-debug-exception/continuous.cfg create mode 100644 kokoro/linux-gcc-debug-exception/presubmit.cfg create mode 100755 kokoro/linux-gcc-debug/build.sh create mode 100644 kokoro/linux-gcc-debug/continuous.cfg create mode 100644 kokoro/linux-gcc-debug/presubmit.cfg create mode 100755 kokoro/linux-gcc-release/build.sh create mode 100644 kokoro/linux-gcc-release/continuous.cfg create mode 100644 kokoro/linux-gcc-release/presubmit.cfg create mode 100755 kokoro/macos-clang-debug/build.sh create mode 100644 kokoro/macos-clang-debug/continuous.cfg create mode 100644 kokoro/macos-clang-debug/presubmit.cfg create mode 100755 kokoro/macos-clang-release/build.sh create mode 100644 kokoro/macos-clang-release/continuous.cfg create mode 100644 kokoro/macos-clang-release/presubmit.cfg create mode 100644 kokoro/ndk-build/continuous.cfg create mode 100644 kokoro/ndk-build/presubmit.cfg create mode 100755 kokoro/scripts/android/build-docker.sh create mode 100755 kokoro/scripts/android/build.sh create mode 100755 kokoro/scripts/linux/build-docker.sh create mode 100755 kokoro/scripts/linux/build.sh create mode 100644 kokoro/scripts/macos/build.sh create mode 100755 kokoro/scripts/ndk-build/build-docker.sh create mode 100755 kokoro/scripts/ndk-build/build.sh create mode 100644 kokoro/scripts/windows/build.bat create mode 100644 kokoro/windows-vs2022-amd64-debug/build.bat create mode 100644 kokoro/windows-vs2022-amd64-debug/continuous.cfg create mode 100644 kokoro/windows-vs2022-amd64-debug/presubmit.cfg create mode 100644 kokoro/windows-vs2022-amd64-release/build.bat create mode 100644 kokoro/windows-vs2022-amd64-release/continuous.cfg create mode 100644 kokoro/windows-vs2022-amd64-release/presubmit.cfg diff --git a/kokoro/android-cmake-armeabi-v7a/build.sh b/kokoro/android-cmake-armeabi-v7a/build.sh new file mode 100755 index 000000000..ce34ea842 --- /dev/null +++ b/kokoro/android-cmake-armeabi-v7a/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# 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. + +SCRIPT_DIR=$(dirname "$BASH_SOURCE") +exec $SCRIPT_DIR/../scripts/android/build.sh "armeabi-v7a with NEON" diff --git a/kokoro/android-cmake-armeabi-v7a/continuous.cfg b/kokoro/android-cmake-armeabi-v7a/continuous.cfg new file mode 100644 index 000000000..c650a5dce --- /dev/null +++ b/kokoro/android-cmake-armeabi-v7a/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/android-cmake-armeabi-v7a/build.sh" diff --git a/kokoro/android-cmake-armeabi-v7a/presubmit.cfg b/kokoro/android-cmake-armeabi-v7a/presubmit.cfg new file mode 100644 index 000000000..c650a5dce --- /dev/null +++ b/kokoro/android-cmake-armeabi-v7a/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/android-cmake-armeabi-v7a/build.sh" diff --git a/kokoro/android-cmake-x86/build.sh b/kokoro/android-cmake-x86/build.sh new file mode 100755 index 000000000..5f2d45b2f --- /dev/null +++ b/kokoro/android-cmake-x86/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# 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. + +SCRIPT_DIR=$(dirname "$BASH_SOURCE") +exec $SCRIPT_DIR/../scripts/android/build.sh x86 diff --git a/kokoro/android-cmake-x86/continuous.cfg b/kokoro/android-cmake-x86/continuous.cfg new file mode 100644 index 000000000..cdc8d7946 --- /dev/null +++ b/kokoro/android-cmake-x86/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/android-cmake-x86/build.sh" diff --git a/kokoro/android-cmake-x86/presubmit.cfg b/kokoro/android-cmake-x86/presubmit.cfg new file mode 100644 index 000000000..cdc8d7946 --- /dev/null +++ b/kokoro/android-cmake-x86/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/android-cmake-x86/build.sh" diff --git a/kokoro/linux/license_check.sh b/kokoro/license-check/build.sh similarity index 100% rename from kokoro/linux/license_check.sh rename to kokoro/license-check/build.sh diff --git a/kokoro/license-check/continuous.cfg b/kokoro/license-check/continuous.cfg new file mode 100644 index 000000000..9f786f23b --- /dev/null +++ b/kokoro/license-check/continuous.cfg @@ -0,0 +1,15 @@ +# Copyright (C) 2020 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. + +build_file: "shaderc/kokoro/license-check/build.sh" diff --git a/kokoro/license-check/presubmit.cfg b/kokoro/license-check/presubmit.cfg new file mode 100644 index 000000000..9f786f23b --- /dev/null +++ b/kokoro/license-check/presubmit.cfg @@ -0,0 +1,15 @@ +# Copyright (C) 2020 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. + +build_file: "shaderc/kokoro/license-check/build.sh" diff --git a/kokoro/linux-clang-asan/build.sh b/kokoro/linux-clang-asan/build.sh new file mode 100755 index 000000000..9d805506a --- /dev/null +++ b/kokoro/linux-clang-asan/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh ASAN "clang-13.0.1" diff --git a/kokoro/linux-clang-asan/continuous.cfg b/kokoro/linux-clang-asan/continuous.cfg new file mode 100644 index 000000000..6ba986906 --- /dev/null +++ b/kokoro/linux-clang-asan/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-asan/build.sh" diff --git a/kokoro/linux-clang-asan/presubmit.cfg b/kokoro/linux-clang-asan/presubmit.cfg new file mode 100644 index 000000000..6ba986906 --- /dev/null +++ b/kokoro/linux-clang-asan/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-asan/build.sh" diff --git a/kokoro/linux-clang-debug/build.sh b/kokoro/linux-clang-debug/build.sh new file mode 100755 index 000000000..ca5f1eb20 --- /dev/null +++ b/kokoro/linux-clang-debug/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh DEBUG "clang-13.0.1" diff --git a/kokoro/linux-clang-debug/continuous.cfg b/kokoro/linux-clang-debug/continuous.cfg new file mode 100644 index 000000000..28e44e48f --- /dev/null +++ b/kokoro/linux-clang-debug/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-debug/build.sh" diff --git a/kokoro/linux-clang-debug/presubmit.cfg b/kokoro/linux-clang-debug/presubmit.cfg new file mode 100644 index 000000000..28e44e48f --- /dev/null +++ b/kokoro/linux-clang-debug/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-debug/build.sh" diff --git a/kokoro/linux-clang-release/build.sh b/kokoro/linux-clang-release/build.sh new file mode 100755 index 000000000..7bf53fff6 --- /dev/null +++ b/kokoro/linux-clang-release/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh RELEASE "clang-13.0.1" diff --git a/kokoro/linux-clang-release/continuous.cfg b/kokoro/linux-clang-release/continuous.cfg new file mode 100644 index 000000000..27cf0e58a --- /dev/null +++ b/kokoro/linux-clang-release/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-release/build.sh" diff --git a/kokoro/linux-clang-release/presubmit.cfg b/kokoro/linux-clang-release/presubmit.cfg new file mode 100644 index 000000000..27cf0e58a --- /dev/null +++ b/kokoro/linux-clang-release/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-clang-release/build.sh" diff --git a/kokoro/linux-gcc-debug-exception/build.sh b/kokoro/linux-gcc-debug-exception/build.sh new file mode 100755 index 000000000..3d860cca5 --- /dev/null +++ b/kokoro/linux-gcc-debug-exception/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh DEBUG_EXCEPTION "gcc-13" diff --git a/kokoro/linux-gcc-debug-exception/continuous.cfg b/kokoro/linux-gcc-debug-exception/continuous.cfg new file mode 100644 index 000000000..f113e4e14 --- /dev/null +++ b/kokoro/linux-gcc-debug-exception/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-debug-exception/build.sh" diff --git a/kokoro/linux-gcc-debug-exception/presubmit.cfg b/kokoro/linux-gcc-debug-exception/presubmit.cfg new file mode 100644 index 000000000..f113e4e14 --- /dev/null +++ b/kokoro/linux-gcc-debug-exception/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-debug-exception/build.sh" diff --git a/kokoro/linux-gcc-debug/build.sh b/kokoro/linux-gcc-debug/build.sh new file mode 100755 index 000000000..acc772397 --- /dev/null +++ b/kokoro/linux-gcc-debug/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh DEBUG "gcc-13" diff --git a/kokoro/linux-gcc-debug/continuous.cfg b/kokoro/linux-gcc-debug/continuous.cfg new file mode 100644 index 000000000..637f2beec --- /dev/null +++ b/kokoro/linux-gcc-debug/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-debug/build.sh" diff --git a/kokoro/linux-gcc-debug/presubmit.cfg b/kokoro/linux-gcc-debug/presubmit.cfg new file mode 100644 index 000000000..637f2beec --- /dev/null +++ b/kokoro/linux-gcc-debug/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-debug/build.sh" diff --git a/kokoro/linux-gcc-release/build.sh b/kokoro/linux-gcc-release/build.sh new file mode 100755 index 000000000..9e051f72a --- /dev/null +++ b/kokoro/linux-gcc-release/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh RELEASE "gcc-13" diff --git a/kokoro/linux-gcc-release/continuous.cfg b/kokoro/linux-gcc-release/continuous.cfg new file mode 100644 index 000000000..e5133ece8 --- /dev/null +++ b/kokoro/linux-gcc-release/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-release/build.sh" diff --git a/kokoro/linux-gcc-release/presubmit.cfg b/kokoro/linux-gcc-release/presubmit.cfg new file mode 100644 index 000000000..e5133ece8 --- /dev/null +++ b/kokoro/linux-gcc-release/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/linux-gcc-release/build.sh" diff --git a/kokoro/linux/build.sh b/kokoro/linux/build.sh index cf50524c9..ebef7465e 100755 --- a/kokoro/linux/build.sh +++ b/kokoro/linux/build.sh @@ -13,8 +13,6 @@ # 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. -# -# Linux Build Script. set -e # Fail on any error. diff --git a/kokoro/macos-clang-debug/build.sh b/kokoro/macos-clang-debug/build.sh new file mode 100755 index 000000000..0c5478b8b --- /dev/null +++ b/kokoro/macos-clang-debug/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/macos/build.sh DEBUG diff --git a/kokoro/macos-clang-debug/continuous.cfg b/kokoro/macos-clang-debug/continuous.cfg new file mode 100644 index 000000000..4e1fa454d --- /dev/null +++ b/kokoro/macos-clang-debug/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/macos-clang-debug/build.sh" diff --git a/kokoro/macos-clang-debug/presubmit.cfg b/kokoro/macos-clang-debug/presubmit.cfg new file mode 100644 index 000000000..4e1fa454d --- /dev/null +++ b/kokoro/macos-clang-debug/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/macos-clang-debug/build.sh" diff --git a/kokoro/macos-clang-release/build.sh b/kokoro/macos-clang-release/build.sh new file mode 100755 index 000000000..4bb7df004 --- /dev/null +++ b/kokoro/macos-clang-release/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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. + +set -e -x +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/macos/build.sh RelWithDebInfo diff --git a/kokoro/macos-clang-release/continuous.cfg b/kokoro/macos-clang-release/continuous.cfg new file mode 100644 index 000000000..49779db52 --- /dev/null +++ b/kokoro/macos-clang-release/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/macos-clang-release/build.sh" diff --git a/kokoro/macos-clang-release/presubmit.cfg b/kokoro/macos-clang-release/presubmit.cfg new file mode 100644 index 000000000..49779db52 --- /dev/null +++ b/kokoro/macos-clang-release/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/macos-clang-release/build.sh" diff --git a/kokoro/ndk-build/continuous.cfg b/kokoro/ndk-build/continuous.cfg new file mode 100644 index 000000000..4e6b1fa70 --- /dev/null +++ b/kokoro/ndk-build/continuous.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/scripts/ndk-build/build.sh" diff --git a/kokoro/ndk-build/presubmit.cfg b/kokoro/ndk-build/presubmit.cfg new file mode 100644 index 000000000..4e6b1fa70 --- /dev/null +++ b/kokoro/ndk-build/presubmit.cfg @@ -0,0 +1,15 @@ +# 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. + +build_file: "shaderc/kokoro/scripts/ndk-build/build.sh" diff --git a/kokoro/scripts/android/build-docker.sh b/kokoro/scripts/android/build-docker.sh new file mode 100755 index 000000000..b6c73f7de --- /dev/null +++ b/kokoro/scripts/android/build-docker.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Copyright (C) 2017-2022 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. +# +# Android Build Script. + + +# Fail on any error. +set -e + +. /bin/using.sh # Declare the bash `using` function for configuring toolchains. + +# Display commands being run. +set -x + +using cmake-3.31.2 +using ninja-1.10.0 +using ndk-r27c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir + +git config --global --add safe.directory '*' + +cd $ROOT_DIR +./utils/git-sync-deps + +[ -d build ] || mkdir build +cd $ROOT_DIR/build + +# Invoke the build. +BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} +echo $(date): Starting build... +cmake \ + -GNinja \ + -DCMAKE_MAKE_PROGRAM=ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DANDROID_ABI="$TARGET_ARCH" \ + -DSHADERC_SKIP_TESTS=ON \ + -DSPIRV_SKIP_TESTS=ON \ + -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ + -DANDROID_NDK=$ANDROID_NDK_HOME .. + +echo $(date): Build glslang library... +ninja glslang + +echo $(date): Build everything... +ninja + +echo $(date): Check Shaderc for copyright notices... +ninja check-copyright + +echo $(date): Build completed. diff --git a/kokoro/scripts/android/build.sh b/kokoro/scripts/android/build.sh new file mode 100755 index 000000000..04614d982 --- /dev/null +++ b/kokoro/scripts/android/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Copyright (C) 2020-2022 Google LLC +# +# 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. +# +# Linux Build Script. + +set -e # Fail on any error. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" +ROOT_DIR="$( cd "${SCRIPT_DIR}/../../.." >/dev/null 2>&1 && pwd )" + +TARGET_ARCH="$1" + +# --privileged is required for some sanitizer builds, as they seem to require +# PTRACE privileges +docker run --rm -i \ + --privileged \ + --volume "${ROOT_DIR}:${ROOT_DIR}" \ + --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \ + --workdir "${ROOT_DIR}" \ + --env ROOT_DIR="${ROOT_DIR}" \ + --env SCRIPT_DIR="${SCRIPT_DIR}" \ + --env TARGET_ARCH="${TARGET_ARCH}" \ + --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ + --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/scripts/linux/build-docker.sh b/kokoro/scripts/linux/build-docker.sh new file mode 100755 index 000000000..31c39f6ed --- /dev/null +++ b/kokoro/scripts/linux/build-docker.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# 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. + +# Linux Build Script run inside docker container. + +set -e # Fail on any error. + +. /bin/using.sh # Declare the bash `using` function for configuring toolchains. + +set -x # Display commands being run. + +SKIP_TESTS="False" +BUILD_TYPE="Debug" + +using cmake-3.31.2 +using ninja-1.10.0 +using python-3.12 + +if [ ! -z "$COMPILER" ]; then + using "$COMPILER" +fi + +# Possible configurations are: +# ASAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW + +if [ $CONFIG = "RELEASE" ] || [ $CONFIG = "RELEASE_MINGW" ] +then + BUILD_TYPE="RelWithDebInfo" +fi + +ADDITIONAL_CMAKE_FLAGS="" +if [ $CONFIG = "ASAN" ] +then + ADDITIONAL_CMAKE_FLAGS="-DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_C_FLAGS=-fsanitize=address" +elif [ $CONFIG = "COVERAGE" ] +then + ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON" + SKIP_TESTS="True" +elif [ $CONFIG = "DEBUG_EXCEPTION" ] +then + ADDITIONAL_CMAKE_FLAGS="-DDISABLE_EXCEPTIONS=ON -DDISABLE_RTTI=ON" +elif [ $CONFIG = "RELEASE_MINGW" ] +then + ADDITIONAL_CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake" + SKIP_TESTS="True" +fi + +git config --global --add safe.directory '*' + +cd $ROOT_DIR +./utils/git-sync-deps + +[ -d build ] || mkdir build +cd $ROOT_DIR/build + +# Invoke the build. +BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} +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 glslang-standalone + +echo $(date): Build everything... +ninja +echo $(date): Build completed. + +echo $(date): Check Shaderc for copyright notices... +ninja check-copyright + +if [ $CONFIG = "COVERAGE" ] +then + echo $(date): Check coverage... + ninja report-coverage + echo $(date): Check coverage completed. +fi + +echo $(date): Starting ctest... +if [ $SKIP_TESTS = "False" ] +then + ctest --output-on-failure -j4 +fi +echo $(date): ctest completed. + +# libshaderc_util/core is generated by the death test in shaderc_util_file_finder_test +rm -f libshaderc_util/core + +# Package the build. +ninja install +cd $KOKORO_ARTIFACTS_DIR +tar czf install.tgz install diff --git a/kokoro/scripts/linux/build.sh b/kokoro/scripts/linux/build.sh new file mode 100755 index 000000000..385a55d16 --- /dev/null +++ b/kokoro/scripts/linux/build.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Copyright (C) 2020 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. +# +# Linux Build Script. + +set -e # Fail on any error. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" +ROOT_DIR="$( cd "${SCRIPT_DIR}/../../.." >/dev/null 2>&1 && pwd )" + +CONFIG=$1 +COMPILER=$2 + +# --privileged is required for some sanitizer builds, as they seem to require +# PTRACE privileges +docker run --rm -i \ + --privileged \ + --volume "${ROOT_DIR}:${ROOT_DIR}" \ + --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \ + --workdir "${ROOT_DIR}" \ + --env ROOT_DIR="${ROOT_DIR}" \ + --env SCRIPT_DIR="${SCRIPT_DIR}" \ + --env CONFIG="${CONFIG}" \ + --env COMPILER="${COMPILER}" \ + --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ + --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/scripts/macos/build.sh b/kokoro/scripts/macos/build.sh new file mode 100644 index 000000000..c39c9b45d --- /dev/null +++ b/kokoro/scripts/macos/build.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# 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. +# +# MacOS Build Script. + +# Fail on any error. +set -e +# Display commands being run. +set -x + +BUILD_ROOT=$PWD +SRC=$PWD/github/shaderc +BUILD_TYPE=$1 + +# Get NINJA. +wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip +unzip -q ninja-mac.zip +chmod +x ninja +export PATH="$PWD:$PATH" + +cd $SRC +./utils/git-sync-deps + +mkdir build +cd $SRC/build + +# Invoke the build. +BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} +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 glslang-standalone + +echo $(date): Build everything... +ninja + +echo $(date): Check Shaderc for copyright notices... +ninja check-copyright + +echo $(date): Build completed. + +echo $(date): Starting ctest... +ctest --output-on-failure -j4 +echo $(date): ctest completed. + +# Package the build. +ninja install +cd $KOKORO_ARTIFACTS_DIR +tar czf install.tgz install diff --git a/kokoro/scripts/ndk-build/build-docker.sh b/kokoro/scripts/ndk-build/build-docker.sh new file mode 100755 index 000000000..9163d7a5f --- /dev/null +++ b/kokoro/scripts/ndk-build/build-docker.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# Copyright (c) 2018 Google LLC. +# +# 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. +# +# Linux Build Script. + +# Fail on any error. +set -e +# Display commands being run. +set -x + +# This is required to run any git command in the docker since owner will +# have changed between the clone environment, and the docker container. +git config --global --add safe.directory '*' + +. /bin/using.sh # Declare the bash `using` function for configuring toolchains. + +cd $ROOT_DIR + +function clean_dir() { + dir=$1 + if [[ -d "$dir" ]]; then + rm -fr "$dir" + fi + mkdir "$dir" +} + +# Get source for dependencies, as specified in the DEPS file +/usr/bin/python3 utils/git-sync-deps --treeless + +using ndk-r27c + +clean_dir "$ROOT_DIR/build" +cd "$ROOT_DIR/build" + +function do_ndk_build () { + echo $(date): Starting ndk-build $@... + $ANDROID_NDK_HOME/ndk-build \ + -C $ROOT_DIR/android_test \ + NDK_PROJECT_PATH=. \ + NDK_LIBS_OUT=./libs \ + NDK_APP_OUT=./app \ + V=1 \ + SPVTOOLS_LOCAL_PATH=$ROOT_DIR/third_party/spirv-tools \ + SPVHEADERS_LOCAL_PATH=$ROOT_DIR/third_party/spirv-headers \ + -j8 $@ +} + +# Builds all the ABIs (see APP_ABI in jni/Application.mk) +do_ndk_build + +# Check that libshaderc_combined builds +# Explicitly set each ABI, otherwise it will only pick x86. +# It seems to be the behaviour when specifying an explicit target. +for abi in x86 x86_64 armeabi-v7a arm64-v8a; do + do_ndk_build APP_ABI=$abi libshaderc_combined +done + +echo $(date): ndk-build completed. diff --git a/kokoro/scripts/ndk-build/build.sh b/kokoro/scripts/ndk-build/build.sh new file mode 100755 index 000000000..6d5d74a3b --- /dev/null +++ b/kokoro/scripts/ndk-build/build.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# Copyright (c) 2021 Google LLC. +# +# 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. +# +# Linux Build Script. + +# Fail on any error. +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" +ROOT_DIR="$( cd "${SCRIPT_DIR}/../../.." >/dev/null 2>&1 && pwd )" + +BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} + +# chown the given directory to the current user, if it exists. +# Docker creates files with the root user - this can upset the Kokoro artifact copier. +function chown_dir() { + dir=$1 + if [[ -d "$dir" ]]; then + sudo chown -R "$(id -u):$(id -g)" "$dir" + fi +} + +set +e +# Allow build failures + +# "--privileged" is required to run ptrace in the asan builds. +docker run --rm -i \ + --privileged \ + --volume "${ROOT_DIR}:${ROOT_DIR}" \ + --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \ + --workdir "${ROOT_DIR}" \ + --env SCRIPT_DIR=${SCRIPT_DIR} \ + --env ROOT_DIR=${ROOT_DIR} \ + --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ + --env BUILD_SHA="${BUILD_SHA}" \ + --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ + us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder +RESULT=$? + +# This is important. If the permissions are not fixed, kokoro will fail +# to pull build artifacts, and put the build in tool-failure state, which +# blocks the logs. +chown_dir "${ROOT_DIR}/build" +exit $RESULT diff --git a/kokoro/scripts/windows/build.bat b/kokoro/scripts/windows/build.bat new file mode 100644 index 000000000..0db2b0437 --- /dev/null +++ b/kokoro/scripts/windows/build.bat @@ -0,0 +1,96 @@ +:: 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. +:: +:: Windows Build Script. + +@echo on + +set BUILD_ROOT=%cd% +set SRC=%cd%\github\shaderc +set BUILD_TYPE=%1 +set VS_VERSION=%2 +set ARCH=%3 + +:: Force usage of python 3.12 +set PATH=C:\python312;%PATH% +:: Glslang requires cmake 3.27 or later +set PATH=C:\cmake-3.31.2\bin;%PATH% + +cd %SRC% +python utils\git-sync-deps + +cmake --version + +mkdir build +cd %SRC%\build + +:: ######################################### +:: set up msvc build env +:: ######################################### +if %VS_VERSION% == 2022 ( + call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% +) + +:: ######################################### +:: Start building. +:: ######################################### +echo "Starting build... %DATE% %TIME%" +if "%KOKORO_GITHUB_COMMIT%." == "." ( + set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT% +) else ( + set BUILD_SHA=%KOKORO_GITHUB_COMMIT% +) + +set CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=%KOKORO_ARTIFACTS_DIR%\install -DRE2_BUILD_TESTING=OFF -GNinja -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe + +cmake %CMAKE_FLAGS% .. +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% + +echo "Build glslang... %DATE% %TIME%" +ninja glslang-standalone +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% + +echo "Build everything... %DATE% %TIME%" +ninja +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% + +echo "Check Shaderc for copyright notices... %DATE% %TIME%" +ninja check-copyright +if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% +echo "Build Completed %DATE% %TIME%" + +:: This lets us use !ERRORLEVEL! inside an IF ... () and get the actual error at that point. +setlocal ENABLEDELAYEDEXPANSION + +:: ################################################ +:: Run the tests +:: ################################################ +echo "Running tests... %DATE% %TIME%" +ctest -C %BUILD_TYPE% --output-on-failure -j4 +if !ERRORLEVEL! NEQ 0 exit /b !ERRORLEVEL! +echo "Tests passed %DATE% %TIME%" + +:: ################################################ +:: Install and package. +:: ################################################ +ninja install +cd %KOKORO_ARTIFACTS_DIR% +zip -r install.zip install + +:: Clean up some directories. +rm -rf %SRC%\build +rm -rf %SRC%\install +rm -rf %SRC%\third_party + +exit /b 0 diff --git a/kokoro/windows-vs2022-amd64-debug/build.bat b/kokoro/windows-vs2022-amd64-debug/build.bat new file mode 100644 index 000000000..96af528ef --- /dev/null +++ b/kokoro/windows-vs2022-amd64-debug/build.bat @@ -0,0 +1,23 @@ +:: Copyright (C) 2025 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. +:: +:: Windows Build Script. + +@echo on + +:: Find out the directory of the common build script. +set SCRIPT_DIR=%~dp0 + +:: Call with correct parameter +call %SCRIPT_DIR%\..\scripts\windows\build.bat Debug 2022 amd64 diff --git a/kokoro/windows-vs2022-amd64-debug/continuous.cfg b/kokoro/windows-vs2022-amd64-debug/continuous.cfg new file mode 100644 index 000000000..6469e62f9 --- /dev/null +++ b/kokoro/windows-vs2022-amd64-debug/continuous.cfg @@ -0,0 +1,21 @@ +# Copyright (C) 2025 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. + +build_file: "shaderc/kokoro/windows-vs2022-amd64-debug/build.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows-vs2022-amd64-debug/presubmit.cfg b/kokoro/windows-vs2022-amd64-debug/presubmit.cfg new file mode 100644 index 000000000..6469e62f9 --- /dev/null +++ b/kokoro/windows-vs2022-amd64-debug/presubmit.cfg @@ -0,0 +1,21 @@ +# Copyright (C) 2025 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. + +build_file: "shaderc/kokoro/windows-vs2022-amd64-debug/build.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows-vs2022-amd64-release/build.bat b/kokoro/windows-vs2022-amd64-release/build.bat new file mode 100644 index 000000000..3fe22ebb0 --- /dev/null +++ b/kokoro/windows-vs2022-amd64-release/build.bat @@ -0,0 +1,21 @@ +:: Copyright (C) 2025 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. + +@echo on + +:: Find out the directory of the common build script. +set SCRIPT_DIR=%~dp0 + +:: Call with correct parameter +call %SCRIPT_DIR%\..\scripts\windows\build.bat RelWithDebInfo 2022 amd64 diff --git a/kokoro/windows-vs2022-amd64-release/continuous.cfg b/kokoro/windows-vs2022-amd64-release/continuous.cfg new file mode 100644 index 000000000..eb59c14ab --- /dev/null +++ b/kokoro/windows-vs2022-amd64-release/continuous.cfg @@ -0,0 +1,21 @@ +# Copyright (C) 2025 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. + +build_file: "shaderc/kokoro/windows-vs2022-amd64-release/build.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} diff --git a/kokoro/windows-vs2022-amd64-release/presubmit.cfg b/kokoro/windows-vs2022-amd64-release/presubmit.cfg new file mode 100644 index 000000000..eb59c14ab --- /dev/null +++ b/kokoro/windows-vs2022-amd64-release/presubmit.cfg @@ -0,0 +1,21 @@ +# Copyright (C) 2025 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. + +build_file: "shaderc/kokoro/windows-vs2022-amd64-release/build.bat" + +action { + define_artifacts { + regex: "install.zip" + } +} From 9e83db11dd5c55ec0b55e3a61d9a4d3134e43b33 Mon Sep 17 00:00:00 2001 From: dneto Date: Mon, 9 Mar 2026 17:36:47 -0400 Subject: [PATCH 115/117] kokoro: remove old kokoro scripts and job configs Each config is in its own dir, often delegating to a common kokoro/scripts file. Bug: crbug.com/490434064 --- kokoro/android-release/build-docker.sh | 60 ----------- kokoro/android-release/build.sh | 38 ------- kokoro/android-release/build_arm.sh | 25 ----- kokoro/android-release/build_x86.sh | 26 ----- kokoro/android-release/continuous_arm.cfg | 17 --- kokoro/android-release/continuous_x86.cfg | 17 --- kokoro/android-release/presubmit_arm.cfg | 16 --- kokoro/android-release/presubmit_x86.cfg | 16 --- kokoro/linux/build-docker.sh | 102 ------------------ kokoro/linux/build.sh | 38 ------- kokoro/linux/build_clang_asan.sh | 25 ----- kokoro/linux/build_clang_debug.sh | 25 ----- kokoro/linux/build_clang_release.sh | 25 ----- kokoro/linux/build_gcc_coverage.sh | 25 ----- kokoro/linux/build_gcc_debug.sh | 25 ----- kokoro/linux/build_gcc_debug_exception.sh | 25 ----- kokoro/linux/build_gcc_release.sh | 25 ----- kokoro/linux/build_mingw_release.sh | 25 ----- kokoro/linux/continuous_clang_asan.cfg | 16 --- kokoro/linux/continuous_clang_debug.cfg | 22 ---- kokoro/linux/continuous_clang_release.cfg | 22 ---- kokoro/linux/continuous_gcc_debug.cfg | 22 ---- .../linux/continuous_gcc_debug_exception.cfg | 16 --- kokoro/linux/continuous_gcc_release.cfg | 22 ---- kokoro/linux/continuous_license_check.cfg | 16 --- kokoro/linux/continuous_mingw_release.cfg | 16 --- kokoro/linux/presubmit_clang_asan.cfg | 16 --- kokoro/linux/presubmit_clang_debug.cfg | 16 --- kokoro/linux/presubmit_clang_release.cfg | 16 --- kokoro/linux/presubmit_gcc_debug.cfg | 17 --- kokoro/linux/presubmit_gcc_release.cfg | 16 --- kokoro/linux/presubmit_license_check.cfg | 16 --- kokoro/linux/presubmit_mingw_release.cfg | 16 --- kokoro/macos/build.sh | 63 ----------- kokoro/macos/build_clang_debug.sh | 26 ----- kokoro/macos/build_clang_release.sh | 26 ----- kokoro/macos/continuous_clang_debug.cfg | 22 ---- kokoro/macos/continuous_clang_release.cfg | 22 ---- kokoro/macos/presubmit_clang_debug.cfg | 16 --- kokoro/macos/presubmit_clang_release.cfg | 16 --- kokoro/windows/build.bat | 96 ----------------- kokoro/windows/build_2022_amd64_debug.bat | 23 ---- kokoro/windows/build_2022_amd64_release.bat | 23 ---- .../windows/vs2022_amd64_debug_continuous.cfg | 22 ---- .../windows/vs2022_amd64_debug_presubmit.cfg | 22 ---- .../vs2022_amd64_release_continuous.cfg | 22 ---- .../vs2022_amd64_release_presubmit.cfg | 22 ---- 47 files changed, 1241 deletions(-) delete mode 100755 kokoro/android-release/build-docker.sh delete mode 100755 kokoro/android-release/build.sh delete mode 100755 kokoro/android-release/build_arm.sh delete mode 100755 kokoro/android-release/build_x86.sh delete mode 100644 kokoro/android-release/continuous_arm.cfg delete mode 100644 kokoro/android-release/continuous_x86.cfg delete mode 100644 kokoro/android-release/presubmit_arm.cfg delete mode 100644 kokoro/android-release/presubmit_x86.cfg delete mode 100755 kokoro/linux/build-docker.sh delete mode 100755 kokoro/linux/build.sh delete mode 100755 kokoro/linux/build_clang_asan.sh delete mode 100755 kokoro/linux/build_clang_debug.sh delete mode 100755 kokoro/linux/build_clang_release.sh delete mode 100755 kokoro/linux/build_gcc_coverage.sh delete mode 100755 kokoro/linux/build_gcc_debug.sh delete mode 100755 kokoro/linux/build_gcc_debug_exception.sh delete mode 100755 kokoro/linux/build_gcc_release.sh delete mode 100755 kokoro/linux/build_mingw_release.sh delete mode 100644 kokoro/linux/continuous_clang_asan.cfg delete mode 100644 kokoro/linux/continuous_clang_debug.cfg delete mode 100644 kokoro/linux/continuous_clang_release.cfg delete mode 100644 kokoro/linux/continuous_gcc_debug.cfg delete mode 100644 kokoro/linux/continuous_gcc_debug_exception.cfg delete mode 100644 kokoro/linux/continuous_gcc_release.cfg delete mode 100644 kokoro/linux/continuous_license_check.cfg delete mode 100644 kokoro/linux/continuous_mingw_release.cfg delete mode 100644 kokoro/linux/presubmit_clang_asan.cfg delete mode 100644 kokoro/linux/presubmit_clang_debug.cfg delete mode 100644 kokoro/linux/presubmit_clang_release.cfg delete mode 100644 kokoro/linux/presubmit_gcc_debug.cfg delete mode 100644 kokoro/linux/presubmit_gcc_release.cfg delete mode 100644 kokoro/linux/presubmit_license_check.cfg delete mode 100644 kokoro/linux/presubmit_mingw_release.cfg delete mode 100644 kokoro/macos/build.sh delete mode 100644 kokoro/macos/build_clang_debug.sh delete mode 100644 kokoro/macos/build_clang_release.sh delete mode 100644 kokoro/macos/continuous_clang_debug.cfg delete mode 100644 kokoro/macos/continuous_clang_release.cfg delete mode 100644 kokoro/macos/presubmit_clang_debug.cfg delete mode 100644 kokoro/macos/presubmit_clang_release.cfg delete mode 100644 kokoro/windows/build.bat delete mode 100644 kokoro/windows/build_2022_amd64_debug.bat delete mode 100644 kokoro/windows/build_2022_amd64_release.bat delete mode 100644 kokoro/windows/vs2022_amd64_debug_continuous.cfg delete mode 100644 kokoro/windows/vs2022_amd64_debug_presubmit.cfg delete mode 100644 kokoro/windows/vs2022_amd64_release_continuous.cfg delete mode 100644 kokoro/windows/vs2022_amd64_release_presubmit.cfg diff --git a/kokoro/android-release/build-docker.sh b/kokoro/android-release/build-docker.sh deleted file mode 100755 index a4fc11c94..000000000 --- a/kokoro/android-release/build-docker.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2017-2022 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. -# -# Android Build Script. - - -# Fail on any error. -set -e - -. /bin/using.sh # Declare the bash `using` function for configuring toolchains. - -# Display commands being run. -set -x - -using cmake-3.31.2 -using ninja-1.10.0 -using ndk-r27c # Sets ANDROID_NDK_HOME, pointing at the NDK's root dir - -cd $ROOT_DIR -./utils/git-sync-deps - -mkdir build -cd $ROOT_DIR/build - -# Invoke the build. -BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} -echo $(date): Starting build... -cmake \ - -GNinja \ - -DCMAKE_MAKE_PROGRAM=ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DANDROID_ABI="$TARGET_ARCH" \ - -DSHADERC_SKIP_TESTS=ON \ - -DSPIRV_SKIP_TESTS=ON \ - -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ - -DANDROID_NDK=$ANDROID_NDK_HOME .. - -echo $(date): Build glslang library... -ninja glslang - -echo $(date): Build everything... -ninja - -echo $(date): Check Shaderc for copyright notices... -ninja check-copyright - -echo $(date): Build completed. diff --git a/kokoro/android-release/build.sh b/kokoro/android-release/build.sh deleted file mode 100755 index 86ce10211..000000000 --- a/kokoro/android-release/build.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2020-2022 Google LLC -# -# 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. -# -# Linux Build Script. - -set -e # Fail on any error. - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" -ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )" - -TARGET_ARCH="$1" - -# --privileged is required for some sanitizer builds, as they seem to require -# PTRACE privileges -docker run --rm -i \ - --privileged \ - --volume "${ROOT_DIR}:${ROOT_DIR}" \ - --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \ - --workdir "${ROOT_DIR}" \ - --env ROOT_DIR="${ROOT_DIR}" \ - --env SCRIPT_DIR="${SCRIPT_DIR}" \ - --env TARGET_ARCH="${TARGET_ARCH}" \ - --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ - --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ - us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/android-release/build_arm.sh b/kokoro/android-release/build_arm.sh deleted file mode 100755 index 6d43504a5..000000000 --- a/kokoro/android-release/build_arm.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Android Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh "armeabi-v7a with NEON" diff --git a/kokoro/android-release/build_x86.sh b/kokoro/android-release/build_x86.sh deleted file mode 100755 index c642ab1c9..000000000 --- a/kokoro/android-release/build_x86.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# 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. -# -# Android Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh x86 - diff --git a/kokoro/android-release/continuous_arm.cfg b/kokoro/android-release/continuous_arm.cfg deleted file mode 100644 index a4f931a09..000000000 --- a/kokoro/android-release/continuous_arm.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -# Continuous build configuration. -# -build_file: "shaderc/kokoro/android-release/build_arm.sh" diff --git a/kokoro/android-release/continuous_x86.cfg b/kokoro/android-release/continuous_x86.cfg deleted file mode 100644 index a8643d5d0..000000000 --- a/kokoro/android-release/continuous_x86.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -# Continuous build configuration. -# -build_file: "shaderc/kokoro/android-release/build_x86.sh" diff --git a/kokoro/android-release/presubmit_arm.cfg b/kokoro/android-release/presubmit_arm.cfg deleted file mode 100644 index b88294da7..000000000 --- a/kokoro/android-release/presubmit_arm.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/android-release/build_arm.sh" diff --git a/kokoro/android-release/presubmit_x86.cfg b/kokoro/android-release/presubmit_x86.cfg deleted file mode 100644 index 590753e0b..000000000 --- a/kokoro/android-release/presubmit_x86.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/android-release/build_x86.sh" diff --git a/kokoro/linux/build-docker.sh b/kokoro/linux/build-docker.sh deleted file mode 100755 index a4df892a1..000000000 --- a/kokoro/linux/build-docker.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - -# 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. - -# Linux Build Script run inside docker container. - -set -e # Fail on any error. - -. /bin/using.sh # Declare the bash `using` function for configuring toolchains. - -set -x # Display commands being run. - -SKIP_TESTS="False" -BUILD_TYPE="Debug" - -using cmake-3.31.2 -using ninja-1.10.0 -using python-3.12 - -if [ ! -z "$COMPILER" ]; then - using "$COMPILER" -fi - -# Possible configurations are: -# ASAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW - -if [ $CONFIG = "RELEASE" ] || [ $CONFIG = "RELEASE_MINGW" ] -then - BUILD_TYPE="RelWithDebInfo" -fi - -ADDITIONAL_CMAKE_FLAGS="" -if [ $CONFIG = "ASAN" ] -then - ADDITIONAL_CMAKE_FLAGS="-DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_C_FLAGS=-fsanitize=address" -elif [ $CONFIG = "COVERAGE" ] -then - ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON" - SKIP_TESTS="True" -elif [ $CONFIG = "DEBUG_EXCEPTION" ] -then - ADDITIONAL_CMAKE_FLAGS="-DDISABLE_EXCEPTIONS=ON -DDISABLE_RTTI=ON" -elif [ $CONFIG = "RELEASE_MINGW" ] -then - ADDITIONAL_CMAKE_FLAGS="-DCMAKE_TOOLCHAIN_FILE=$ROOT_DIR/cmake/linux-mingw-toolchain.cmake" - SKIP_TESTS="True" -fi - -cd $ROOT_DIR -./utils/git-sync-deps - -mkdir build -cd $ROOT_DIR/build - -# Invoke the build. -BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} -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 glslang-standalone - -echo $(date): Build everything... -ninja -echo $(date): Build completed. - -echo $(date): Check Shaderc for copyright notices... -ninja check-copyright - -if [ $CONFIG = "COVERAGE" ] -then - echo $(date): Check coverage... - ninja report-coverage - echo $(date): Check coverage completed. -fi - -echo $(date): Starting ctest... -if [ $SKIP_TESTS = "False" ] -then - ctest --output-on-failure -j4 -fi -echo $(date): ctest completed. - -# libshaderc_util/core is generated by the death test in shaderc_util_file_finder_test -rm -f libshaderc_util/core - -# Package the build. -ninja install -cd $KOKORO_ARTIFACTS_DIR -tar czf install.tgz install diff --git a/kokoro/linux/build.sh b/kokoro/linux/build.sh deleted file mode 100755 index ebef7465e..000000000 --- a/kokoro/linux/build.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2020 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. - -set -e # Fail on any error. - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" -ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )" - -CONFIG=$1 -COMPILER=$2 - -# --privileged is required for some sanitizer builds, as they seem to require -# PTRACE privileges -docker run --rm -i \ - --privileged \ - --volume "${ROOT_DIR}:${ROOT_DIR}" \ - --volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \ - --workdir "${ROOT_DIR}" \ - --env ROOT_DIR="${ROOT_DIR}" \ - --env SCRIPT_DIR="${SCRIPT_DIR}" \ - --env CONFIG="${CONFIG}" \ - --env COMPILER="${COMPILER}" \ - --env KOKORO_ARTIFACTS_DIR="${KOKORO_ARTIFACTS_DIR}" \ - --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ - us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder diff --git a/kokoro/linux/build_clang_asan.sh b/kokoro/linux/build_clang_asan.sh deleted file mode 100755 index ff399dca8..000000000 --- a/kokoro/linux/build_clang_asan.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh ASAN "clang-13.0.1" diff --git a/kokoro/linux/build_clang_debug.sh b/kokoro/linux/build_clang_debug.sh deleted file mode 100755 index 87ee26d6b..000000000 --- a/kokoro/linux/build_clang_debug.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG "clang-13.0.1" diff --git a/kokoro/linux/build_clang_release.sh b/kokoro/linux/build_clang_release.sh deleted file mode 100755 index d42672dc7..000000000 --- a/kokoro/linux/build_clang_release.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RELEASE "clang-13.0.1" diff --git a/kokoro/linux/build_gcc_coverage.sh b/kokoro/linux/build_gcc_coverage.sh deleted file mode 100755 index 7270334c6..000000000 --- a/kokoro/linux/build_gcc_coverage.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh COVERAGE "gcc-7" # gcc-8+ has issues with lcov diff --git a/kokoro/linux/build_gcc_debug.sh b/kokoro/linux/build_gcc_debug.sh deleted file mode 100755 index 9b815032b..000000000 --- a/kokoro/linux/build_gcc_debug.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG "gcc-13" diff --git a/kokoro/linux/build_gcc_debug_exception.sh b/kokoro/linux/build_gcc_debug_exception.sh deleted file mode 100755 index 5465c7c46..000000000 --- a/kokoro/linux/build_gcc_debug_exception.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh DEBUG_EXCEPTION "gcc-13" diff --git a/kokoro/linux/build_gcc_release.sh b/kokoro/linux/build_gcc_release.sh deleted file mode 100755 index a30867cda..000000000 --- a/kokoro/linux/build_gcc_release.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RELEASE "gcc-13" diff --git a/kokoro/linux/build_mingw_release.sh b/kokoro/linux/build_mingw_release.sh deleted file mode 100755 index 0b54dc68c..000000000 --- a/kokoro/linux/build_mingw_release.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# 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. -# -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RELEASE_MINGW diff --git a/kokoro/linux/continuous_clang_asan.cfg b/kokoro/linux/continuous_clang_asan.cfg deleted file mode 100644 index 129115135..000000000 --- a/kokoro/linux/continuous_clang_asan.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_clang_asan.sh" diff --git a/kokoro/linux/continuous_clang_debug.cfg b/kokoro/linux/continuous_clang_debug.cfg deleted file mode 100644 index 1021c4412..000000000 --- a/kokoro/linux/continuous_clang_debug.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_clang_debug.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/linux/continuous_clang_release.cfg b/kokoro/linux/continuous_clang_release.cfg deleted file mode 100644 index cffba600a..000000000 --- a/kokoro/linux/continuous_clang_release.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_clang_release.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/linux/continuous_gcc_debug.cfg b/kokoro/linux/continuous_gcc_debug.cfg deleted file mode 100644 index 526f08f78..000000000 --- a/kokoro/linux/continuous_gcc_debug.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_gcc_debug.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/linux/continuous_gcc_debug_exception.cfg b/kokoro/linux/continuous_gcc_debug_exception.cfg deleted file mode 100644 index cecd1556c..000000000 --- a/kokoro/linux/continuous_gcc_debug_exception.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_gcc_debug_exception.sh" diff --git a/kokoro/linux/continuous_gcc_release.cfg b/kokoro/linux/continuous_gcc_release.cfg deleted file mode 100644 index 8e0cde8e5..000000000 --- a/kokoro/linux/continuous_gcc_release.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_gcc_release.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/linux/continuous_license_check.cfg b/kokoro/linux/continuous_license_check.cfg deleted file mode 100644 index 066a4d3b9..000000000 --- a/kokoro/linux/continuous_license_check.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2020 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/license_check.sh" diff --git a/kokoro/linux/continuous_mingw_release.cfg b/kokoro/linux/continuous_mingw_release.cfg deleted file mode 100644 index a0d4e76fe..000000000 --- a/kokoro/linux/continuous_mingw_release.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/linux/build_mingw_release.sh" diff --git a/kokoro/linux/presubmit_clang_asan.cfg b/kokoro/linux/presubmit_clang_asan.cfg deleted file mode 100644 index fcaaa3632..000000000 --- a/kokoro/linux/presubmit_clang_asan.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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_clang_asan.sh" diff --git a/kokoro/linux/presubmit_clang_debug.cfg b/kokoro/linux/presubmit_clang_debug.cfg deleted file mode 100644 index 87abaf72d..000000000 --- a/kokoro/linux/presubmit_clang_debug.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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_clang_debug.sh" diff --git a/kokoro/linux/presubmit_clang_release.cfg b/kokoro/linux/presubmit_clang_release.cfg deleted file mode 100644 index 81ba77d28..000000000 --- a/kokoro/linux/presubmit_clang_release.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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_clang_release.sh" diff --git a/kokoro/linux/presubmit_gcc_debug.cfg b/kokoro/linux/presubmit_gcc_debug.cfg deleted file mode 100644 index f0eec27ca..000000000 --- a/kokoro/linux/presubmit_gcc_debug.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# 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_gcc_debug.sh" - diff --git a/kokoro/linux/presubmit_gcc_release.cfg b/kokoro/linux/presubmit_gcc_release.cfg deleted file mode 100644 index fda4333f8..000000000 --- a/kokoro/linux/presubmit_gcc_release.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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_gcc_release.sh" diff --git a/kokoro/linux/presubmit_license_check.cfg b/kokoro/linux/presubmit_license_check.cfg deleted file mode 100644 index 38db8f54e..000000000 --- a/kokoro/linux/presubmit_license_check.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2020 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/license_check.sh" diff --git a/kokoro/linux/presubmit_mingw_release.cfg b/kokoro/linux/presubmit_mingw_release.cfg deleted file mode 100644 index bfc53adc0..000000000 --- a/kokoro/linux/presubmit_mingw_release.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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" diff --git a/kokoro/macos/build.sh b/kokoro/macos/build.sh deleted file mode 100644 index c39c9b45d..000000000 --- a/kokoro/macos/build.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# 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. -# -# MacOS Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -BUILD_ROOT=$PWD -SRC=$PWD/github/shaderc -BUILD_TYPE=$1 - -# Get NINJA. -wget -q https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip -unzip -q ninja-mac.zip -chmod +x ninja -export PATH="$PWD:$PATH" - -cd $SRC -./utils/git-sync-deps - -mkdir build -cd $SRC/build - -# Invoke the build. -BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT} -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 glslang-standalone - -echo $(date): Build everything... -ninja - -echo $(date): Check Shaderc for copyright notices... -ninja check-copyright - -echo $(date): Build completed. - -echo $(date): Starting ctest... -ctest --output-on-failure -j4 -echo $(date): ctest completed. - -# Package the build. -ninja install -cd $KOKORO_ARTIFACTS_DIR -tar czf install.tgz install diff --git a/kokoro/macos/build_clang_debug.sh b/kokoro/macos/build_clang_debug.sh deleted file mode 100644 index ed889ff89..000000000 --- a/kokoro/macos/build_clang_debug.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# 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. -# -# MacOS Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh Debug - diff --git a/kokoro/macos/build_clang_release.sh b/kokoro/macos/build_clang_release.sh deleted file mode 100644 index 9599bac39..000000000 --- a/kokoro/macos/build_clang_release.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# 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. -# -# MacOS Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -SCRIPT_DIR=`dirname "$BASH_SOURCE"` -source $SCRIPT_DIR/build.sh RelWithDebInfo - diff --git a/kokoro/macos/continuous_clang_debug.cfg b/kokoro/macos/continuous_clang_debug.cfg deleted file mode 100644 index d8000a924..000000000 --- a/kokoro/macos/continuous_clang_debug.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/macos/build_clang_debug.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/macos/continuous_clang_release.cfg b/kokoro/macos/continuous_clang_release.cfg deleted file mode 100644 index 101d06eb4..000000000 --- a/kokoro/macos/continuous_clang_release.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/macos/build_clang_release.sh" - -action { - define_artifacts { - regex: "install.tgz" - } -} diff --git a/kokoro/macos/presubmit_clang_debug.cfg b/kokoro/macos/presubmit_clang_debug.cfg deleted file mode 100644 index d2748ae7a..000000000 --- a/kokoro/macos/presubmit_clang_debug.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/macos/build_clang_debug.sh" diff --git a/kokoro/macos/presubmit_clang_release.cfg b/kokoro/macos/presubmit_clang_release.cfg deleted file mode 100644 index 3041155e2..000000000 --- a/kokoro/macos/presubmit_clang_release.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# 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/macos/build_clang_release.sh" diff --git a/kokoro/windows/build.bat b/kokoro/windows/build.bat deleted file mode 100644 index 0db2b0437..000000000 --- a/kokoro/windows/build.bat +++ /dev/null @@ -1,96 +0,0 @@ -:: 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. -:: -:: Windows Build Script. - -@echo on - -set BUILD_ROOT=%cd% -set SRC=%cd%\github\shaderc -set BUILD_TYPE=%1 -set VS_VERSION=%2 -set ARCH=%3 - -:: Force usage of python 3.12 -set PATH=C:\python312;%PATH% -:: Glslang requires cmake 3.27 or later -set PATH=C:\cmake-3.31.2\bin;%PATH% - -cd %SRC% -python utils\git-sync-deps - -cmake --version - -mkdir build -cd %SRC%\build - -:: ######################################### -:: set up msvc build env -:: ######################################### -if %VS_VERSION% == 2022 ( - call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% -) - -:: ######################################### -:: Start building. -:: ######################################### -echo "Starting build... %DATE% %TIME%" -if "%KOKORO_GITHUB_COMMIT%." == "." ( - set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT% -) else ( - set BUILD_SHA=%KOKORO_GITHUB_COMMIT% -) - -set CMAKE_FLAGS=-DCMAKE_INSTALL_PREFIX=%KOKORO_ARTIFACTS_DIR%\install -DRE2_BUILD_TESTING=OFF -GNinja -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe - -cmake %CMAKE_FLAGS% .. -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% - -echo "Build glslang... %DATE% %TIME%" -ninja glslang-standalone -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% - -echo "Build everything... %DATE% %TIME%" -ninja -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% - -echo "Check Shaderc for copyright notices... %DATE% %TIME%" -ninja check-copyright -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -echo "Build Completed %DATE% %TIME%" - -:: This lets us use !ERRORLEVEL! inside an IF ... () and get the actual error at that point. -setlocal ENABLEDELAYEDEXPANSION - -:: ################################################ -:: Run the tests -:: ################################################ -echo "Running tests... %DATE% %TIME%" -ctest -C %BUILD_TYPE% --output-on-failure -j4 -if !ERRORLEVEL! NEQ 0 exit /b !ERRORLEVEL! -echo "Tests passed %DATE% %TIME%" - -:: ################################################ -:: Install and package. -:: ################################################ -ninja install -cd %KOKORO_ARTIFACTS_DIR% -zip -r install.zip install - -:: Clean up some directories. -rm -rf %SRC%\build -rm -rf %SRC%\install -rm -rf %SRC%\third_party - -exit /b 0 diff --git a/kokoro/windows/build_2022_amd64_debug.bat b/kokoro/windows/build_2022_amd64_debug.bat deleted file mode 100644 index a3e993a95..000000000 --- a/kokoro/windows/build_2022_amd64_debug.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright (C) 2025 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat Debug 2022 amd64 diff --git a/kokoro/windows/build_2022_amd64_release.bat b/kokoro/windows/build_2022_amd64_release.bat deleted file mode 100644 index 467a57593..000000000 --- a/kokoro/windows/build_2022_amd64_release.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright (C) 2025 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. -:: -:: Windows Build Script. - -@echo on - -:: Find out the directory of the common build script. -set SCRIPT_DIR=%~dp0 - -:: Call with correct parameter -call %SCRIPT_DIR%\build.bat RelWithDebInfo 2022 amd64 diff --git a/kokoro/windows/vs2022_amd64_debug_continuous.cfg b/kokoro/windows/vs2022_amd64_debug_continuous.cfg deleted file mode 100644 index 1dbfab3d7..000000000 --- a/kokoro/windows/vs2022_amd64_debug_continuous.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2025 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_2022_amd64_debug.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/vs2022_amd64_debug_presubmit.cfg b/kokoro/windows/vs2022_amd64_debug_presubmit.cfg deleted file mode 100644 index 541793810..000000000 --- a/kokoro/windows/vs2022_amd64_debug_presubmit.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2025 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/windows/build_2022_amd64_debug.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/vs2022_amd64_release_continuous.cfg b/kokoro/windows/vs2022_amd64_release_continuous.cfg deleted file mode 100644 index 3237fea7f..000000000 --- a/kokoro/windows/vs2022_amd64_release_continuous.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2025 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. - -# Continuous build configuration. -build_file: "shaderc/kokoro/windows/build_2022_amd64_release.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} diff --git a/kokoro/windows/vs2022_amd64_release_presubmit.cfg b/kokoro/windows/vs2022_amd64_release_presubmit.cfg deleted file mode 100644 index d566e9b95..000000000 --- a/kokoro/windows/vs2022_amd64_release_presubmit.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2025 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/windows/build_2022_amd64_release.bat" - -action { - define_artifacts { - regex: "install.zip" - } -} From 42c364eb27982ecfc9e00e384df205730e65b90c Mon Sep 17 00:00:00 2001 From: dneto Date: Mon, 16 Mar 2026 16:19:15 +0000 Subject: [PATCH 116/117] Update dependencies --- DEPS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index ee20d787b..a59ae9d3d 100644 --- a/DEPS +++ b/DEPS @@ -7,11 +7,11 @@ vars = { 'abseil_revision': '1315c900e1ddbb08a23e06eeb9a06450052ccb5e', 'effcee_revision': '08da24ec245a274fea3a128ba50068f163390565', - 'glslang_revision': 'e966816ab28ab7cb448d5b33270b43c941b343d4', + 'glslang_revision': '09c541ee5b22bbac307987b50d86ec2b4f683d75', 'googletest_revision': '1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2', 're2_revision': '4a8cee3dd3c3d81b6fe8b867811e193d5819df07', - 'spirv_headers_revision': 'f88a2d766840fc825af1fc065977953ba1fa4a91', - 'spirv_tools_revision': '4972c69eb50255b314fc0925ca757c4417e6b6c0', + 'spirv_headers_revision': '465055f6c9128772e20082e893d974146acf7a02', + 'spirv_tools_revision': 'e4bceacf59fdfe742047e94e41ef65a48999a0dd', } deps = { From 72381d6227b40a6045d71cc657532a6c887da45b Mon Sep 17 00:00:00 2001 From: CADIndie Date: Tue, 7 Apr 2026 20:41:38 -0500 Subject: [PATCH 117/117] Remove second ``void shaderc_compile_options_set_vulkan_rules_relaxed`` --- libshaderc/src/shaderc.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc index a256fac98..4a43b292e 100644 --- a/libshaderc/src/shaderc.cc +++ b/libshaderc/src/shaderc.cc @@ -578,11 +578,6 @@ void shaderc_compile_options_set_vulkan_rules_relaxed( options->compiler.SetVulkanRulesRelaxed(enable); } -void shaderc_compile_options_set_vulkan_rules_relaxed( - shaderc_compile_options_t options, bool enable) { - options->compiler.SetVulkanRulesRelaxed(enable); -} - void shaderc_compile_options_set_invert_y(shaderc_compile_options_t options, bool enable) { options->compiler.EnableInvertY(enable);