Skip to content

Commit c6fa905

Browse files
committed
Merge branch 'rc/1.71.3' into release
2 parents 6be37a9 + 463f727 commit c6fa905

24,994 files changed

Lines changed: 716376 additions & 4576444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/renderdiff-generate/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
- name: Prerequisites
1111
if: runner.os == 'macOS'
1212
run: |
13-
# Must have at least clang-16 for a webgpu/dawn build.
13+
# Must have at least clang-17 for a webgpu/dawn build.
1414
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
1515
# this enforces the gltf_viewer build to use apple clang as oppose the brew clang used for get-mesa
1616
echo "CC=/usr/bin/clang" >> $GITHUB_ENV
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Android
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-android');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`Android build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-android not found in the workflow run.`);
27+
}

.github/workflows/status-ios.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: iOS
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-ios');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`iOS build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-ios not found in the workflow run.`);
27+
}

.github/workflows/status-linux.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Linux
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-linux');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`Linux build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-linux not found in the workflow run.`);
27+
}

.github/workflows/status-macos.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: macOS
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-mac');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`macOS build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-mac not found in the workflow run.`);
27+
}

.github/workflows/status-web.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Web
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-web');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`Web build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-web not found in the workflow run.`);
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Windows
2+
run-name: ${{ github.event.workflow_run.display_title }}
3+
4+
on:
5+
workflow_run:
6+
workflows: ["Postsubmit CI"]
7+
types: [completed]
8+
9+
jobs:
10+
status:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const { data: { jobs } } = await github.rest.actions.listJobsForWorkflowRun({
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
run_id: ${{ github.event.workflow_run.id }}
21+
});
22+
const job = jobs.find(j => j.name === 'build-windows');
23+
if (job && job.conclusion !== 'success') {
24+
core.setFailed(`Windows build failed: ${job.conclusion}`);
25+
} else if (!job) {
26+
core.warning(`Job build-windows not found in the workflow run.`);
27+
}

BUILDING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
To build Filament, you must first install the following tools:
66

77
- CMake 3.22.1 (or more recent)
8-
- clang 16.0 (or more recent) (Required for Linux and macOS; see [Windows](#windows) section for MSVC support)
8+
- clang 17.0 (or more recent) (Required for Linux and macOS; see [Windows](#windows) section for MSVC support)
99
- [ninja 1.10](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) (or more recent)
1010

1111
Additional dependencies may be required for your operating system. Please refer to the appropriate
@@ -79,6 +79,10 @@ The following CMake options are boolean options specific to Filament:
7979
- `FILAMENT_INSTALL_BACKEND_TEST`: Install the backend test library so it can be consumed on iOS
8080
- `FILAMENT_USE_EXTERNAL_GLES3`: Experimental: Compile Filament against OpenGL ES 3
8181
- `FILAMENT_SKIP_SAMPLES`: Don't build sample apps
82+
- `FILAMENT_ENABLE_EXCEPTIONS`: Enable C++ exceptions (default: ON, OFF for iOS). Required for JNI bindings.
83+
- `FILAMENT_ENABLE_RTTI`: Enable C++ RTTI (default: OFF).
84+
85+
Note: If you intend to use the JNI library (Android/Java build), you need to have `FILAMENT_ENABLE_EXCEPTIONS` enabled. If you are using Filament on Android as a pure native library and want to save space, you can disable it (e.g., using `./build.sh -E`).
8286

8387
To turn an option on or off:
8488

@@ -93,17 +97,17 @@ Options can also be set with the CMake GUI.
9397

9498
Make sure you've installed the following dependencies:
9599

96-
- `clang-16` or higher
100+
- `clang-17` or higher
97101
- `libglu1-mesa-dev`
98-
- `libc++-16-dev` (`libcxx-devel` and `libcxx-static` on Fedora) or higher
99-
- `libc++abi-16-dev` (`libcxxabi-static` on Fedora) or higher
102+
- `libc++-17-dev` (`libcxx-devel` and `libcxx-static` on Fedora) or higher
103+
- `libc++abi-17-dev` (`libcxxabi-static` on Fedora) or higher
100104
- `ninja-build`
101105
- `libxi-dev`
102106
- `libxcomposite-dev` (`libXcomposite-devel` on Fedora)
103107
- `libxxf86vm-dev` (`libXxf86vm-devel` on Fedora)
104108

105109
```shell
106-
sudo apt install clang-16 libglu1-mesa-dev libc++-16-dev libc++abi-16-dev ninja-build libxi-dev libxcomposite-dev libxxf86vm-dev -y
110+
sudo apt install clang-17 libglu1-mesa-dev libc++-17-dev libc++abi-17-dev ninja-build libxi-dev libxcomposite-dev libxxf86vm-dev -y
107111
```
108112

109113
After dependencies have been installed, we highly recommend using the [easy build](#easy-build)
@@ -124,7 +128,7 @@ Your Linux distribution might default to `gcc` instead of `clang`, if that's the
124128
```shell
125129
mkdir out/cmake-release
126130
cd out/cmake-release
127-
# Or use a specific version of clang, for instance /usr/bin/clang-16
131+
# Or use a specific version of clang, for instance /usr/bin/clang-17
128132
CC=/usr/bin/clang CXX=/usr/bin/clang++ CXXFLAGS=-stdlib=libc++ \
129133
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../release/filament ../..
130134
```
@@ -134,8 +138,8 @@ solution is to use `update-alternatives` to both change the default compiler, an
134138
specific version of clang:
135139

136140
```shell
137-
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
138-
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
141+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100
142+
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100
139143
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
140144
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
141145
```
@@ -408,7 +412,7 @@ same version that our continuous builds use.
408412

409413
```shell
410414
cd <your chosen parent folder for the emscripten SDK>
411-
curl -L https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.60.zip > emsdk.zip
415+
curl -L https://github.com/emscripten-core/emsdk/archive/refs/tags/5.0.4.zip > emsdk.zip
412416
unzip emsdk.zip ; mv emsdk-* emsdk ; cd emsdk
413417
python ./emsdk.py install latest
414418
python ./emsdk.py activate latest

CMakeLists.txt

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,34 @@ endif()
1919
# ==================================================================================================
2020
# Project declaration
2121
# ==================================================================================================
22-
project(TNT)
22+
set(EXTRA_LANGS)
23+
24+
# This is only needed for the webgpu on MacOS build.
25+
if (APPLE AND NOT IOS)
26+
set(EXTRA_LANGS OBJC OBJCXX)
27+
endif()
28+
29+
project(TNT C CXX ${EXTRA_LANGS})
2330

2431
# ==================================================================================================
2532
# Options
2633
# ==================================================================================================
2734
option(FILAMENT_USE_EXTERNAL_GLES3 "Experimental: Compile Filament against OpenGL ES 3" OFF)
2835

36+
# Note: If you intend to use the JNI library (Android/Java build), you need to have
37+
# exceptions enabled (the default). If you are using Filament on Android as a pure
38+
# native library and want to save space, you can disable them.
39+
# We disable exceptions on iOS by default. This fixes an availability error we see when using
40+
# std::visit and std::get, which are not supported on iOS 11.0 when exceptions are enabled.
41+
if (IOS)
42+
set(FILAMENT_ENABLE_EXCEPTIONS_DEFAULT OFF)
43+
else()
44+
set(FILAMENT_ENABLE_EXCEPTIONS_DEFAULT ON)
45+
endif()
46+
option(FILAMENT_ENABLE_EXCEPTIONS "Enable C++ exceptions" ${FILAMENT_ENABLE_EXCEPTIONS_DEFAULT})
47+
48+
option(FILAMENT_ENABLE_RTTI "Enable C++ RTTI" OFF)
49+
2950
option(FILAMENT_ENABLE_LTO "Enable link-time optimizations if supported by the compiler" OFF)
3051
option(FILAMENT_SKIP_SAMPLES "Don't build samples" OFF)
3152

@@ -100,6 +121,15 @@ set(FILAMENT_OSMESA_PATH "" CACHE STRING
100121
# Enable exceptions by default in spirv-cross.
101122
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS OFF)
102123

124+
if (NOT FILAMENT_ENABLE_EXCEPTIONS)
125+
add_compile_options(-fno-exceptions)
126+
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON)
127+
endif()
128+
129+
if (NOT FILAMENT_ENABLE_RTTI)
130+
add_compile_options(-fno-rtti)
131+
endif()
132+
103133
# ==================================================================================================
104134
# CMake policies
105135
# ==================================================================================================
@@ -337,6 +367,14 @@ endif()
337367
# ==================================================================================================
338368
# General compiler flags
339369
# ==================================================================================================
370+
371+
# This is only needed for the webgpu on MacOS build.
372+
# Don't enable for iOS because we need to support ios min target 11.0
373+
if (APPLE AND NOT IOS)
374+
set(CMAKE_OBJCXX_STANDARD 20)
375+
set(CMAKE_OBJCXX_STANDARD_REQUIRED ON)
376+
endif()
377+
340378
set(CXX_STANDARD "-std=c++20")
341379
if (WIN32)
342380
set(CXX_STANDARD "/std:c++20")
@@ -353,6 +391,7 @@ else()
353391
endif()
354392
if (APPLE)
355393
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-extension")
394+
set(CMAKE_OBJCXX_FLAGS "${CMAKE_CXX_FLAGS}")
356395
endif()
357396
endif()
358397

@@ -400,8 +439,7 @@ if (ANDROID)
400439
endif()
401440

402441
if (CYGWIN)
403-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
404-
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON)
442+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
405443
endif()
406444

407445
if (MSVC)
@@ -435,30 +473,17 @@ if (NOT MSVC)
435473
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections")
436474
endif()
437475

438-
# On Android RELEASE builds, we disable exceptions and RTTI to save some space (about 75 KiB
439-
# saved by -fno-exception and 10 KiB saved by -fno-rtti).
440-
if (ANDROID OR IOS OR WEBGL)
441-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-exceptions -fno-rtti")
442-
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON)
443-
444-
if (ANDROID OR WEBGL)
445-
# Omitting unwind info prevents the generation of readable stack traces in crash reports on iOS
446-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-unwind-tables -fno-asynchronous-unwind-tables")
447-
endif()
448-
endif()
449-
450-
# Turn off exceptions on iOS debug as well. This fixes an availability error we see when using
451-
# std::visit, which is not supported on iOS 11.0 when exceptions are enabled.
452-
if (IOS)
453-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-exceptions")
454-
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON)
476+
if (ANDROID OR WEBGL)
477+
# On Android and WebGL RELEASE builds, we omit unwind info to save space.
478+
# (We keep unwind info on iOS to allow readable stack traces in crash reports.)
479+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-unwind-tables -fno-asynchronous-unwind-tables")
455480
endif()
456481

457-
# With WebGL, we disable RTTI even for debug builds because we pass emscripten::val back and forth
482+
# With WebGL, we disable RTTI because we pass emscripten::val back and forth
458483
# between C++ and JavaScript in order to efficiently access typed arrays, which are unbound.
459484
# NOTE: This is not documented in emscripten so we should consider a different approach.
460485
if (WEBGL)
461-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-rtti")
486+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
462487
endif()
463488

464489
if (WEBGL_PTHREADS)
@@ -659,7 +684,6 @@ if (FILAMENT_SUPPORTS_METAL)
659684
set(MATC_API_FLAGS ${MATC_API_FLAGS} -a metal)
660685
endif()
661686

662-
# With WebGPU, push constants are not supported. Skinning uses them.
663687
# WebGPU has a proposal to add push constants at https://github.com/gpuweb/gpuweb/blob/main/proposals/push-constants.md
664688
# With WebGPU, Tint does not support ClipDistance which is used in Stereo. Mentioned in comment
665689
# https://github.com/google/dawn/blob/855d17b08abdf02f9142bf5a8f14d0ea088810a4/src/tint/lang/spirv/reader/ast_parser/function.cc#L4434

0 commit comments

Comments
 (0)