diff --git a/third_party/spirv-tools/external/spirv-headers/.gitattributes b/third_party/spirv-headers/.gitattributes similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/.gitattributes rename to third_party/spirv-headers/.gitattributes diff --git a/third_party/spirv-tools/external/spirv-headers/.gitignore b/third_party/spirv-headers/.gitignore similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/.gitignore rename to third_party/spirv-headers/.gitignore diff --git a/third_party/spirv-tools/external/spirv-headers/BUILD.bazel b/third_party/spirv-headers/BUILD.bazel similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/BUILD.bazel rename to third_party/spirv-headers/BUILD.bazel diff --git a/third_party/spirv-tools/external/spirv-headers/BUILD.gn b/third_party/spirv-headers/BUILD.gn similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/BUILD.gn rename to third_party/spirv-headers/BUILD.gn diff --git a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt b/third_party/spirv-headers/CMakeLists.txt similarity index 95% rename from third_party/spirv-tools/external/spirv-headers/CMakeLists.txt rename to third_party/spirv-headers/CMakeLists.txt index 2b8bb5e595..9cfba73af2 100644 --- a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt +++ b/third_party/spirv-headers/CMakeLists.txt @@ -28,7 +28,7 @@ # The SPIR-V headers from the SPIR-V Registry # https://www.khronos.org/registry/spir-v/ # -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.0) project(SPIRV-Headers VERSION 1.5.5) # There are two ways to use this project. @@ -44,9 +44,11 @@ project(SPIRV-Headers VERSION 1.5.5) # 2. cmake .. # 3. cmake --build . --target install -option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" ON) +option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" + ${SPIRV_HEADERS_SKIP_EXAMPLES}) -option(SPIRV_HEADERS_SKIP_INSTALL "Skip install" ON) +option(SPIRV_HEADERS_SKIP_INSTALL "Skip install" + ${SPIRV_HEADERS_SKIP_INSTALL}) if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES}) set(SPIRV_HEADERS_ENABLE_EXAMPLES ON) diff --git a/third_party/spirv-tools/external/spirv-headers/CODE_OF_CONDUCT.md b/third_party/spirv-headers/CODE_OF_CONDUCT.md similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/CODE_OF_CONDUCT.md rename to third_party/spirv-headers/CODE_OF_CONDUCT.md diff --git a/third_party/spirv-headers/FILAMENT_README.md b/third_party/spirv-headers/FILAMENT_README.md new file mode 100644 index 0000000000..c3eed55a2e --- /dev/null +++ b/third_party/spirv-headers/FILAMENT_README.md @@ -0,0 +1,5 @@ +This project is pulled in as a dependency for spirv-tools. The Vulkan +backend also has a dependency on this project. This project should not +be updated directly, instead, please see +/third_party/spirv-tools/FILAMENT_README.md for instructions for +update. diff --git a/third_party/spirv-tools/external/spirv-headers/LICENSE b/third_party/spirv-headers/LICENSE similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/LICENSE rename to third_party/spirv-headers/LICENSE diff --git a/third_party/spirv-tools/external/spirv-headers/README.md b/third_party/spirv-headers/README.md similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/README.md rename to third_party/spirv-headers/README.md diff --git a/third_party/spirv-tools/external/spirv-headers/SPIRV-Headers.pc.in b/third_party/spirv-headers/SPIRV-Headers.pc.in similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/SPIRV-Headers.pc.in rename to third_party/spirv-headers/SPIRV-Headers.pc.in diff --git a/third_party/spirv-tools/external/spirv-headers/WORKSPACE b/third_party/spirv-headers/WORKSPACE similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/WORKSPACE rename to third_party/spirv-headers/WORKSPACE diff --git a/third_party/spirv-tools/external/spirv-headers/cmake/Config.cmake.in b/third_party/spirv-headers/cmake/Config.cmake.in similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/cmake/Config.cmake.in rename to third_party/spirv-headers/cmake/Config.cmake.in diff --git a/third_party/spirv-tools/external/spirv-headers/example/CMakeLists.txt b/third_party/spirv-headers/example/CMakeLists.txt similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/example/CMakeLists.txt rename to third_party/spirv-headers/example/CMakeLists.txt diff --git a/third_party/spirv-tools/external/spirv-headers/example/example.cpp b/third_party/spirv-headers/example/example.cpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/example/example.cpp rename to third_party/spirv-headers/example/example.cpp diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/GLSL.std.450.h b/third_party/spirv-headers/include/spirv/1.0/GLSL.std.450.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/GLSL.std.450.h rename to third_party/spirv-headers/include/spirv/1.0/GLSL.std.450.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/OpenCL.std.h b/third_party/spirv-headers/include/spirv/1.0/OpenCL.std.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/OpenCL.std.h rename to third_party/spirv-headers/include/spirv/1.0/OpenCL.std.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json b/third_party/spirv-headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json rename to third_party/spirv-headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json b/third_party/spirv-headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json rename to third_party/spirv-headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json b/third_party/spirv-headers/include/spirv/1.0/spirv.core.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.core.grammar.json rename to third_party/spirv-headers/include/spirv/1.0/spirv.core.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.cs b/third_party/spirv-headers/include/spirv/1.0/spirv.cs similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.cs rename to third_party/spirv-headers/include/spirv/1.0/spirv.cs diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h b/third_party/spirv-headers/include/spirv/1.0/spirv.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.h rename to third_party/spirv-headers/include/spirv/1.0/spirv.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp b/third_party/spirv-headers/include/spirv/1.0/spirv.hpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp rename to third_party/spirv-headers/include/spirv/1.0/spirv.hpp diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 b/third_party/spirv-headers/include/spirv/1.0/spirv.hpp11 similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.hpp11 rename to third_party/spirv-headers/include/spirv/1.0/spirv.hpp11 diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json b/third_party/spirv-headers/include/spirv/1.0/spirv.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.json rename to third_party/spirv-headers/include/spirv/1.0/spirv.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua b/third_party/spirv-headers/include/spirv/1.0/spirv.lua similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.lua rename to third_party/spirv-headers/include/spirv/1.0/spirv.lua diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py b/third_party/spirv-headers/include/spirv/1.0/spirv.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.py rename to third_party/spirv-headers/include/spirv/1.0/spirv.py diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/GLSL.std.450.h b/third_party/spirv-headers/include/spirv/1.1/GLSL.std.450.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/GLSL.std.450.h rename to third_party/spirv-headers/include/spirv/1.1/GLSL.std.450.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/OpenCL.std.h b/third_party/spirv-headers/include/spirv/1.1/OpenCL.std.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/OpenCL.std.h rename to third_party/spirv-headers/include/spirv/1.1/OpenCL.std.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json b/third_party/spirv-headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json rename to third_party/spirv-headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json b/third_party/spirv-headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json rename to third_party/spirv-headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json b/third_party/spirv-headers/include/spirv/1.1/spirv.core.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.core.grammar.json rename to third_party/spirv-headers/include/spirv/1.1/spirv.core.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.cs b/third_party/spirv-headers/include/spirv/1.1/spirv.cs similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.cs rename to third_party/spirv-headers/include/spirv/1.1/spirv.cs diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h b/third_party/spirv-headers/include/spirv/1.1/spirv.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.h rename to third_party/spirv-headers/include/spirv/1.1/spirv.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp b/third_party/spirv-headers/include/spirv/1.1/spirv.hpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp rename to third_party/spirv-headers/include/spirv/1.1/spirv.hpp diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 b/third_party/spirv-headers/include/spirv/1.1/spirv.hpp11 similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.hpp11 rename to third_party/spirv-headers/include/spirv/1.1/spirv.hpp11 diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json b/third_party/spirv-headers/include/spirv/1.1/spirv.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.json rename to third_party/spirv-headers/include/spirv/1.1/spirv.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua b/third_party/spirv-headers/include/spirv/1.1/spirv.lua similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.lua rename to third_party/spirv-headers/include/spirv/1.1/spirv.lua diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py b/third_party/spirv-headers/include/spirv/1.1/spirv.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.py rename to third_party/spirv-headers/include/spirv/1.1/spirv.py diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/GLSL.std.450.h b/third_party/spirv-headers/include/spirv/1.2/GLSL.std.450.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/GLSL.std.450.h rename to third_party/spirv-headers/include/spirv/1.2/GLSL.std.450.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/OpenCL.std.h b/third_party/spirv-headers/include/spirv/1.2/OpenCL.std.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/OpenCL.std.h rename to third_party/spirv-headers/include/spirv/1.2/OpenCL.std.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json b/third_party/spirv-headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json rename to third_party/spirv-headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json b/third_party/spirv-headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json rename to third_party/spirv-headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json b/third_party/spirv-headers/include/spirv/1.2/spirv.core.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.core.grammar.json rename to third_party/spirv-headers/include/spirv/1.2/spirv.core.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.cs b/third_party/spirv-headers/include/spirv/1.2/spirv.cs similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.cs rename to third_party/spirv-headers/include/spirv/1.2/spirv.cs diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h b/third_party/spirv-headers/include/spirv/1.2/spirv.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.h rename to third_party/spirv-headers/include/spirv/1.2/spirv.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp b/third_party/spirv-headers/include/spirv/1.2/spirv.hpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp rename to third_party/spirv-headers/include/spirv/1.2/spirv.hpp diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 b/third_party/spirv-headers/include/spirv/1.2/spirv.hpp11 similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.hpp11 rename to third_party/spirv-headers/include/spirv/1.2/spirv.hpp11 diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json b/third_party/spirv-headers/include/spirv/1.2/spirv.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.json rename to third_party/spirv-headers/include/spirv/1.2/spirv.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua b/third_party/spirv-headers/include/spirv/1.2/spirv.lua similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.lua rename to third_party/spirv-headers/include/spirv/1.2/spirv.lua diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py b/third_party/spirv-headers/include/spirv/1.2/spirv.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.py rename to third_party/spirv-headers/include/spirv/1.2/spirv.py diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml b/third_party/spirv-headers/include/spirv/spir-v.xml similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml rename to third_party/spirv-headers/include/spirv/spir-v.xml diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h b/third_party/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h rename to third_party/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h b/third_party/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h rename to third_party/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h b/third_party/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h rename to third_party/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h b/third_party/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h rename to third_party/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h b/third_party/spirv-headers/include/spirv/unified1/DebugInfo.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h rename to third_party/spirv-headers/include/spirv/unified1/DebugInfo.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h b/third_party/spirv-headers/include/spirv/unified1/GLSL.std.450.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h rename to third_party/spirv-headers/include/spirv/unified1/GLSL.std.450.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h b/third_party/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h rename to third_party/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h b/third_party/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h rename to third_party/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h b/third_party/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h rename to third_party/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h b/third_party/spirv-headers/include/spirv/unified1/OpenCL.std.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h rename to third_party/spirv-headers/include/spirv/unified1/OpenCL.std.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h b/third_party/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h rename to third_party/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json b/third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.bf b/third_party/spirv-headers/include/spirv/unified1/spirv.bf similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.bf rename to third_party/spirv-headers/include/spirv/unified1/spirv.bf diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json b/third_party/spirv-headers/include/spirv/unified1/spirv.core.grammar.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json rename to third_party/spirv-headers/include/spirv/unified1/spirv.core.grammar.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs b/third_party/spirv-headers/include/spirv/unified1/spirv.cs similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs rename to third_party/spirv-headers/include/spirv/unified1/spirv.cs diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h b/third_party/spirv-headers/include/spirv/unified1/spirv.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h rename to third_party/spirv-headers/include/spirv/unified1/spirv.h diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp b/third_party/spirv-headers/include/spirv/unified1/spirv.hpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp rename to third_party/spirv-headers/include/spirv/unified1/spirv.hpp diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 b/third_party/spirv-headers/include/spirv/unified1/spirv.hpp11 similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 rename to third_party/spirv-headers/include/spirv/unified1/spirv.hpp11 diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json b/third_party/spirv-headers/include/spirv/unified1/spirv.json similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json rename to third_party/spirv-headers/include/spirv/unified1/spirv.json diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua b/third_party/spirv-headers/include/spirv/unified1/spirv.lua similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua rename to third_party/spirv-headers/include/spirv/unified1/spirv.lua diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py b/third_party/spirv-headers/include/spirv/unified1/spirv.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py rename to third_party/spirv-headers/include/spirv/unified1/spirv.py diff --git a/third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spv.d b/third_party/spirv-headers/include/spirv/unified1/spv.d similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spv.d rename to third_party/spirv-headers/include/spirv/unified1/spv.d diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/CMakeLists.txt b/third_party/spirv-headers/tools/buildHeaders/CMakeLists.txt similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/CMakeLists.txt rename to third_party/spirv-headers/tools/buildHeaders/CMakeLists.txt diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/generate_language_headers.py b/third_party/spirv-headers/tools/buildHeaders/bin/generate_language_headers.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/generate_language_headers.py rename to third_party/spirv-headers/tools/buildHeaders/bin/generate_language_headers.py diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/makeExtinstHeaders.py b/third_party/spirv-headers/tools/buildHeaders/bin/makeExtinstHeaders.py similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/makeExtinstHeaders.py rename to third_party/spirv-headers/tools/buildHeaders/bin/makeExtinstHeaders.py diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/makeHeaders b/third_party/spirv-headers/tools/buildHeaders/bin/makeHeaders similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/bin/makeHeaders rename to third_party/spirv-headers/tools/buildHeaders/bin/makeHeaders diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/header.cpp b/third_party/spirv-headers/tools/buildHeaders/header.cpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/header.cpp rename to third_party/spirv-headers/tools/buildHeaders/header.cpp diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/header.h b/third_party/spirv-headers/tools/buildHeaders/header.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/header.h rename to third_party/spirv-headers/tools/buildHeaders/header.h diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp b/third_party/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp rename to third_party/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/jsonToSpirv.h b/third_party/spirv-headers/tools/buildHeaders/jsonToSpirv.h similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/jsonToSpirv.h rename to third_party/spirv-headers/tools/buildHeaders/jsonToSpirv.h diff --git a/third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/main.cpp b/third_party/spirv-headers/tools/buildHeaders/main.cpp similarity index 100% rename from third_party/spirv-tools/external/spirv-headers/tools/buildHeaders/main.cpp rename to third_party/spirv-headers/tools/buildHeaders/main.cpp diff --git a/third_party/spirv-tools/CMakeLists.txt b/third_party/spirv-tools/CMakeLists.txt index 8437fd570a..487a40a481 100755 --- a/third_party/spirv-tools/CMakeLists.txt +++ b/third_party/spirv-tools/CMakeLists.txt @@ -24,6 +24,8 @@ if (POLICY CMP0054) endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) +set(SPIRV-Headers_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../spirv-headers) + if (APPLE) set(CMAKE_MACOSX_RPATH ON) endif (APPLE) @@ -106,6 +108,7 @@ set(SPIRV_LIB_FUZZING_ENGINE_LINK_OPTIONS "" CACHE STRING "Used by OSS-Fuzz to c option(SPIRV_BUILD_LIBFUZZER_TARGETS "Build libFuzzer targets" OFF) set(SPIRV_WERROR OFF) + if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND (NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))) set(COMPILER_IS_LIKE_GNU TRUE) endif() @@ -313,8 +316,6 @@ option(SPIRV_SKIP_EXECUTABLES ${SPIRV_SKIP_EXECUTABLES_OPTION}) option(SPIRV_SKIP_TESTS "Skip building tests along with the library" ${SPIRV_SKIP_TESTS_OPTION}) - - if ("${SPIRV_SKIP_EXECUTABLES}") set(SPIRV_SKIP_TESTS ON) endif() @@ -378,4 +379,3 @@ endif() set(SPIRV_LIBRARIES "-lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link") set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools-shared") - diff --git a/third_party/spirv-tools/FILAMENT_README.md b/third_party/spirv-tools/FILAMENT_README.md index 5020b06c78..9c9bb3e437 100644 --- a/third_party/spirv-tools/FILAMENT_README.md +++ b/third_party/spirv-tools/FILAMENT_README.md @@ -1,34 +1,20 @@ -When updating spirv-tools to a new version there are several `CMakeLists.txt` files that need -to patched with Filament specific changes. This can be done by running the following command at -Filament's root: +When updating SPIRV-Tools to a new version, run the following from *this* directory ``` -git apply third_party/spirv-tools/filament-specific-changes.patch +bash filament-update.sh [git commit hash] ``` -The following procedure can be used to update spirv-tools. Note that there is a secondary repository -that needs to be downloaded (spirv-headers). +This will pull in the updated source for SPRIV-Tools and pull in the right version of SPIRV-Headers. +The script will also try to apply Filament specific changes to the `CMakeLists.txt`. It could be +that the diff application will fail, in which case, the updater will need to resolve the difference +manually and update `filament-specific-changes.patch`. + +The above script will bring in the changes, but you would still need to add it to a git commit +(i.e. pull request) by doing ``` -curl -L https://github.com/KhronosGroup/spirv-tools/archive/master.zip > master.zip -unzip master.zip -rsync -r SPIRV-Tools-master/ spirv-tools/ --delete -rm -rf SPIRV-Tools-master master.zip -curl -L https://github.com/KhronosGroup/spirv-headers/archive/master.zip > master.zip -unzip master.zip -mv SPIRV-Headers-master/ spirv-tools/external/spirv-headers -rm master.zip - -git add spirv-tools +git add -u third_party/spriv-tools third_party/spirv-headers ``` -The patch file also edits the `.gitignore` to allow `spirv-headers` to be committed. +from the Filament source root. -Finally, remember to bring back the Filament-specific changes in CMakeLists. - -To restore this file and the patch file do: - -``` -git checkout main spirv-tools/FILAMENT_README.md -git checkout main spirv-tools/filament-specific-changes.patch -``` diff --git a/third_party/spirv-tools/external/CMakeLists.txt b/third_party/spirv-tools/external/CMakeLists.txt index a081e119bf..179a4012f9 100644 --- a/third_party/spirv-tools/external/CMakeLists.txt +++ b/third_party/spirv-tools/external/CMakeLists.txt @@ -45,6 +45,8 @@ if (IS_DIRECTORY ${SPIRV_HEADER_DIR}) # Do this so enclosing projects can use SPIRV-Headers_SOURCE_DIR to find # headers to include. if (NOT DEFINED SPIRV-Headers_SOURCE_DIR) + set(SPIRV_HEADERS_SKIP_INSTALL ON) + set(SPIRV_HEADERS_SKIP_EXAMPLES ON) add_subdirectory(${SPIRV_HEADER_DIR}) endif() else() diff --git a/third_party/spirv-tools/external/spirv-headers/.github/workflows/presubmit.yml b/third_party/spirv-tools/external/spirv-headers/.github/workflows/presubmit.yml deleted file mode 100644 index d9c25faef5..0000000000 --- a/third_party/spirv-tools/external/spirv-headers/.github/workflows/presubmit.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Presubmit -on: [push, pull_request] - -jobs: - build: - name: Build ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - uses: actions/checkout@v2 - - name: Install Ubuntu packages - if: matrix.os == 'ubuntu-latest' - run: sudo apt install -y dos2unix - - name: Install macOS packages - if: matrix.os == 'macos-latest' - run: brew install dos2unix - - name: Build - run: | - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=install .. - cmake --build . --target install - - name: Build spec tools - run: | - cd tools/buildHeaders - mkdir build - cd build - cmake .. - cmake --build . --target install - - name: Build headers - run: | - cd tools/buildHeaders - ./bin/makeHeaders - - name: Check generated headers - run: git diff --exit-code diff --git a/third_party/spirv-tools/filament-specific-changes.patch b/third_party/spirv-tools/filament-specific-changes.patch index a6d1fb5213..8f54585742 100644 --- a/third_party/spirv-tools/filament-specific-changes.patch +++ b/third_party/spirv-tools/filament-specific-changes.patch @@ -1,24 +1,22 @@ -diff --git a/third_party/spirv-tools/.gitignore b/third_party/spirv-tools/.gitignore -index ec709ba79..a87496a7d 100644 ---- a/third_party/spirv-tools/.gitignore -+++ b/third_party/spirv-tools/.gitignore -@@ -5,8 +5,6 @@ compile_commands.json - /build*/ - /buildtools/ - /external/googletest --/external/SPIRV-Headers --/external/spirv-headers - /external/effcee - /external/re2 - /external/protobuf diff --git a/third_party/spirv-tools/CMakeLists.txt b/third_party/spirv-tools/CMakeLists.txt index 76b87d8c5..53b3404d1 100755 --- a/third_party/spirv-tools/CMakeLists.txt +++ b/third_party/spirv-tools/CMakeLists.txt -@@ -24,8 +24,14 @@ if (POLICY CMP0054) +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.19) + if (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) + endif() +@@ -24,8 +24,16 @@ if (POLICY CMP0054) endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) - + ++set(SPIRV-Headers_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../spirv-headers) ++ +if (APPLE) + set(CMAKE_MACOSX_RPATH ON) +endif (APPLE) @@ -63,7 +61,7 @@ index 76b87d8c5..53b3404d1 100755 # Check for symbol exports on Linux. # At the moment, this check will fail on the OSX build machines for the Android NDK. -@@ -286,11 +297,13 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) +@@ -286,11 +297,11 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) endif() # Defaults to OFF if the user didn't set it. @@ -72,13 +70,11 @@ index 76b87d8c5..53b3404d1 100755 - ${SPIRV_SKIP_EXECUTABLES}) -option(SPIRV_SKIP_TESTS - "Skip building tests along with the library" ${SPIRV_SKIP_TESTS}) -+ option(SPIRV_SKIP_EXECUTABLES -+ "Skip building the executable and tests along with the library" -+ ${SPIRV_SKIP_EXECUTABLES_OPTION}) -+ option(SPIRV_SKIP_TESTS -+ "Skip building tests along with the library" ${SPIRV_SKIP_TESTS_OPTION}) -+ -+ ++option(SPIRV_SKIP_EXECUTABLES ++ "Skip building the executable and tests along with the library" ++ ${SPIRV_SKIP_EXECUTABLES_OPTION}) ++option(SPIRV_SKIP_TESTS ++ "Skip building tests along with the library" ${SPIRV_SKIP_TESTS_OPTION}) if ("${SPIRV_SKIP_EXECUTABLES}") set(SPIRV_SKIP_TESTS ON) endif() @@ -131,36 +127,6 @@ index 76b87d8c5..53b3404d1 100755 - DESTINATION - ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -endif() -diff --git a/third_party/spirv-tools/FILAMENT_README.md b/third_party/spirv-tools/FILAMENT_README.md -index 39e4620a0..3aa363ebf 100644 ---- a/third_party/spirv-tools/FILAMENT_README.md -+++ b/third_party/spirv-tools/FILAMENT_README.md -@@ -1,9 +1,6 @@ --When updating spirv-tools to a new version, make sure to preserve all the changes marked with --the following in `CMakeLists.txt` and `source/CMakeLists.txt`: -- --`# Filament specific changes` -- --You can easily apply these changes by running the following command at Filament's root: -+When updating spirv-tools to a new version there are several `CMakeLists.txt` files that need -+to patched with Filament specific changes. This can be done by running the following command at -+Filament's root: - - ``` - git apply third_party/spirv-tools/filament-specific-changes.patch -diff --git a/third_party/spirv-tools/external/CMakeLists.txt b/third_party/spirv-tools/external/CMakeLists.txt -index 179a4012f..a081e119b 100644 ---- a/third_party/spirv-tools/external/CMakeLists.txt -+++ b/third_party/spirv-tools/external/CMakeLists.txt -@@ -45,8 +45,6 @@ if (IS_DIRECTORY ${SPIRV_HEADER_DIR}) - # Do this so enclosing projects can use SPIRV-Headers_SOURCE_DIR to find - # headers to include. - if (NOT DEFINED SPIRV-Headers_SOURCE_DIR) -- set(SPIRV_HEADERS_SKIP_INSTALL ON) -- set(SPIRV_HEADERS_SKIP_EXAMPLES ON) - add_subdirectory(${SPIRV_HEADER_DIR}) - endif() - else() diff --git a/third_party/spirv-tools/source/CMakeLists.txt b/third_party/spirv-tools/source/CMakeLists.txt index 98559b8fe..0734d6a82 100644 --- a/third_party/spirv-tools/source/CMakeLists.txt @@ -194,21 +160,3 @@ index 98559b8fe..0734d6a82 100644 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") -diff --git a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt b/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt -index 147f7adee..d8d1d7e35 100644 ---- a/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt -+++ b/third_party/spirv-tools/external/spirv-headers/CMakeLists.txt -@@ -49,11 +49,9 @@ add_custom_target(install-headers - COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv - $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv) - --option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" -- ${SPIRV_HEADERS_SKIP_EXAMPLES}) -+option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" ON) - --option(SPIRV_HEADERS_SKIP_INSTALL "Skip install" -- ${SPIRV_HEADERS_SKIP_INSTALL}) -+option(SPIRV_HEADERS_SKIP_INSTALL "Skip install" ON) - - if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES}) - set(SPIRV_HEADERS_ENABLE_EXAMPLES ON) diff --git a/third_party/spirv-tools/filament-update.sh b/third_party/spirv-tools/filament-update.sh new file mode 100644 index 0000000000..5e52c24d21 --- /dev/null +++ b/third_party/spirv-tools/filament-update.sh @@ -0,0 +1,53 @@ +# Copyright (C) 2023 The Android Open Source Project +# 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. + + +# This script is used to update SPIRV-Tools from source. +# This script takes in a git commit hash as an argument. + +#!/usr/bin/env bash + +TOOLS_HASH=$1 + +function sync_khronos_repo() { + local REPO=$1 + local HASH=$2 + pushd . + cd /tmp + rm -rf ${REPO} && git clone git@github.com:KhronosGroup/${REPO}.git + cd ${REPO} + git reset --hard ${HASH} + popd +} + +# First we update SPIRV-Tools to the given git hash +sync_khronos_repo SPIRV-Tools ${TOOLS_HASH} + +rsync -r /tmp/SPIRV-Tools/ ./ --delete +rm -rf .git .github +# Recover the filament specific files lost in the above rsync +git checkout filament-specific-changes.patch FILAMENT_README.md filament-update.sh +git apply filament-specific-changes.patch + +HEADERS_HASH=`grep "spirv_headers_revision\':" DEPS | awk '{ print $2 }' | sed "s/[\'\,\\n]//g"` + +# Next we update SPIRV-Headers to the right hash (dependency as given by SPIRV-Tools) +sync_khronos_repo SPIRV-Headers ${HEADERS_HASH} + +pushd . +cd ../spirv-headers +rsync -r /tmp/SPIRV-Headers/ ./ --delete +rm -rf .git .github +# Recover the filament specific files lost in the above rsync +git checkout FILAMENT_README.md +popd