Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spirv-headers: fix failed headers check #7416

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions third_party/spirv-headers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.0)
cmake_minimum_required(VERSION 3.19)
project(SPIRV-Headers VERSION 1.5.5)

# There are two ways to use this project.
Expand All @@ -44,11 +44,9 @@ project(SPIRV-Headers VERSION 1.5.5)
# 2. cmake ..
# 3. cmake --build . --target install

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)
Expand Down
27 changes: 27 additions & 0 deletions third_party/spirv-headers/filament-specific-changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/third_party/spirv-headers/CMakeLists.txt b/third_party/spirv-headers/CMakeLists.txt
index 9cfba73af..2b8bb5e59 100644
--- a/third_party/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.0)
+cmake_minimum_required(VERSION 3.19)
project(SPIRV-Headers VERSION 1.5.5)

# There are two ways to use this project.
@@ -44,11 +44,9 @@ project(SPIRV-Headers VERSION 1.5.5)
# 2. cmake ..
# 3. cmake --build . --target install

-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)
14 changes: 0 additions & 14 deletions third_party/spirv-tools/.github/workflows/wasm.yml

This file was deleted.

2 changes: 2 additions & 0 deletions third_party/spirv-tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ compile_commands.json
/build*/
/buildtools/
/external/googletest
/external/SPIRV-Headers
/external/spirv-headers
/external/effcee
/external/re2
/external/protobuf
Expand Down
5 changes: 3 additions & 2 deletions third_party/spirv-tools/filament-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rm -rf .git .github
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"`
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}
Expand All @@ -49,5 +49,6 @@ 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
git checkout filament-specific-changes.patch FILAMENT_README.md
git apply filament-specific-changes.patch
popd