Skip to content

Commit adee213

Browse files
committed
Address PR Comments
2 parents fe5d494 + 361ba2a commit adee213

File tree

173 files changed

+4397
-2001
lines changed

Some content is hidden

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

173 files changed

+4397
-2001
lines changed

.github/actions/dep-versions/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ runs:
33
using: "composite"
44
steps:
55
- name: Set up dependency versions
6-
shell: bash
6+
shell: bash
77
run: cat ./build/common/versions >> $GITHUB_ENV

.github/actions/web-prereq/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Web Preqrequisites'
2+
runs:
3+
using: "composite"
4+
steps:
5+
- uses: ./.github/actions/dep-versions
6+
- name: Cache EMSDK
7+
id: emsdk-cache
8+
uses: actions/cache@v4 # Use a specific version
9+
with:
10+
path: emsdk
11+
key: ${{ runner.os }}-emsdk-${{ env.GITHUB_EMSDK_VERSION }}
12+
- name: Install Web Prerequisites
13+
shell: bash
14+
run: |
15+
bash ./build/common/get-emscripten.sh
16+
echo "EMSDK=$PWD/emsdk" >> $GITHUB_ENV

.github/workflows/mac-continuous.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
path: out/filament-release-darwin.tgz
2727
- name: Check public headers
2828
run: |
29-
build/common/check-headers.sh out/release/filament/include
29+
test/check-headers/test.sh out/release/filament/include

.github/workflows/presubmit.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
with:
9797
fetch-depth: 0
9898
- uses: ./.github/actions/linux-prereq
99+
- uses: ./.github/actions/web-prereq
99100
- name: Run build script
100101
run: |
101102
cd build/web && printf "y" | ./build.sh presubmit
@@ -123,13 +124,15 @@ jobs:
123124
- uses: ./.github/actions/mac-prereq
124125
- name: Cache Mesa and deps
125126
id: mesa-cache
126-
uses: actions/cache@v4 # Use a specific version
127+
uses: actions/cache@v4
127128
with:
128129
path: mesa
129130
key: ${{ runner.os }}-mesa-deps-2-${{ vars.MESA_VERSION }}
130-
- name: Get Mesa
131-
id: mesa-prereq
132-
run: bash test/utils/get_mesa.sh
131+
- name: Prerequisites
132+
id: prereqs
133+
run: |
134+
bash build/common/get-mesa.sh
135+
pip install tifffile numpy
133136
- name: Run Test
134137
run: bash test/renderdiff/test.sh
135138
- uses: actions/upload-artifact@v4
@@ -150,8 +153,8 @@ jobs:
150153
- name: Run test
151154
run: ./out/cmake-debug/libs/filamat/test_filamat --gtest_filter=MaterialCompiler.Wgsl*
152155

153-
code-correcteness:
154-
name: code-correctness
156+
test-code-correctness:
157+
name: test-code-correctness
155158
runs-on: 'macos-14-xlarge'
156159
steps:
157160
- uses: actions/checkout@v4.1.6

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,9 @@ jobs:
6565
6666
build-mac:
6767
name: build-mac
68-
runs-on: ${{ matrix.os }}
68+
runs-on: macos-14-xlarge
6969
if: github.event_name == 'release' || github.event.inputs.platform == 'desktop'
7070

71-
strategy:
72-
matrix:
73-
os: [macos-14-xlarge, ubuntu-22.04-32core]
74-
7571
steps:
7672
- name: Decide Git ref
7773
id: git_ref
@@ -118,6 +114,7 @@ jobs:
118114
with:
119115
ref: ${{ steps.git_ref.outputs.ref }}
120116
- uses: ./.github/actions/linux-prereq
117+
- uses: ./.github/actions/web-prereq
121118
- name: Run build script
122119
env:
123120
TAG: ${{ steps.git_ref.outputs.tag }}
@@ -166,6 +163,9 @@ jobs:
166163
mv out/filamat-android-release.aar out/filamat-${TAG}-android.aar
167164
mv out/gltfio-android-release.aar out/gltfio-${TAG}-android.aar
168165
mv out/filament-utils-android-release.aar out/filament-utils-${TAG}-android.aar
166+
cd out/android-release/filament
167+
tar -czf ../../filament-${TAG}-android-native.tgz .
168+
cd ../../..
169169
- name: Sign sample-gltf-viewer
170170
run: |
171171
echo "${APK_KEYSTORE_BASE64}" > filament.jks.base64
@@ -187,7 +187,7 @@ jobs:
187187
script: |
188188
const upload = require('./build/common/upload-release-assets');
189189
const { TAG } = process.env;
190-
const globber = await glob.create(['out/*.aar', 'out/*.apk'].join('\n'));
190+
const globber = await glob.create(['out/*.aar', 'out/*.apk', 'out/*.tgz'].join('\n'));
191191
await upload({ github, context }, await globber.glob(), TAG);
192192
193193
build-ios:

.github/workflows/web-continuous.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
- uses: ./.github/actions/linux-prereq
20+
- uses: ./.github/actions/web-prereq
2021
- name: Run build script
2122
run: |
2223
cd build/web && printf "y" | ./build.sh continuous

BUILDING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ python ./emsdk.py activate latest
363363
source ./emsdk_env.sh
364364
```
365365

366+
Alternatively, you can try running the script `build/common/get-emscripten.sh`.
367+
366368
After this you can invoke the [easy build](#easy-build) script as follows:
367369

368370
```shell

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repositories {
3131
}
3232
3333
dependencies {
34-
implementation 'com.google.android.filament:filament-android:1.59.3'
34+
implementation 'com.google.android.filament:filament-android:1.60.0'
3535
}
3636
```
3737

@@ -51,7 +51,7 @@ Here are all the libraries available in the group `com.google.android.filament`:
5151
iOS projects can use CocoaPods to install the latest release:
5252

5353
```shell
54-
pod 'Filament', '~> 1.59.3'
54+
pod 'Filament', '~> 1.60.0'
5555
```
5656

5757
## Documentation

RELEASE_NOTES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ A new header is inserted each time a *tag* is created.
77
Instead, if you are authoring a PR for the main branch, add your release note to
88
[NEW_RELEASE_NOTES.md](./NEW_RELEASE_NOTES.md).
99

10+
## v1.60.1
11+
12+
13+
## v1.60.0
14+
15+
- materials: remove dependence on per-view descset layout from filamat. [⚠️ **New Material Version**]
16+
- matc non-functional change: Update GLSL postprocessor to
17+
isolate calls to SPVRemap from calls to SPIRV-Cross.
18+
19+
20+
## v1.59.5
21+
22+
1023
## v1.59.4
1124

1225

android/filament-android/src/main/java/com/google/android/filament/View.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ public enum JitterPattern {
19801980
}
19811981

19821982
/**
1983-
* reconstruction filter width typically between 0.2 (sharper, aliased) and 1.5 (smoother)
1983+
* reconstruction filter width typically between 1 (sharper) and 2 (smoother)
19841984
*/
19851985
public float filterWidth = 1.0f;
19861986
/**

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.google.android.filament
2-
VERSION_NAME=1.59.3
2+
VERSION_NAME=1.60.0
33

44
POM_DESCRIPTION=Real-time physically based rendering engine for Android.
55

build.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function print_fgviewer_help {
151151
}
152152

153153
# Unless explicitly specified, NDK version will be selected as highest available version within same major release chain
154-
FILAMENT_NDK_VERSION=${FILAMENT_NDK_VERSION:-$(cat `dirname $0`/build/android/ndk.version | cut -f 1 -d ".")}
154+
FILAMENT_NDK_VERSION=${FILAMENT_NDK_VERSION:-$(cat `dirname $0`/build/common/versions | grep GITHUB_NDK_VERSION | sed s/GITHUB_NDK_VERSION=//g | cut -f 1 -d ".")}
155155

156156
# Requirements
157157
CMAKE_MAJOR=3
@@ -463,16 +463,6 @@ function ensure_android_build {
463463
echo "Error: Android NDK side-by-side version ${FILAMENT_NDK_VERSION} or compatible must be installed, exiting"
464464
exit 1
465465
fi
466-
467-
local cmake_version=$(cmake --version)
468-
if [[ "${cmake_version}" =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then
469-
if [[ "${BASH_REMATCH[1]}" -lt "${CMAKE_MAJOR}" ]] || \
470-
[[ "${BASH_REMATCH[2]}" -lt "${CMAKE_MINOR}" ]]; then
471-
echo "Error: cmake version ${CMAKE_MAJOR}.${CMAKE_MINOR}+ is required," \
472-
"${BASH_REMATCH[1]}.${BASH_REMATCH[2]} installed, exiting"
473-
exit 1
474-
fi
475-
fi
476466
}
477467

478468
function build_android {

build/android/build.sh

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,13 @@
11
#!/bin/bash
22

3-
# Usage: the first argument selects the build type:
4-
# - release, to build release only
5-
# - debug, to build debug only
6-
# - continuous, to build release and debug
7-
# - presubmit, for presubmit builds
8-
#
9-
# The default is release
10-
11-
echo "This script is intended to run in a CI environment and may modify your current environment."
12-
echo "Please refer to BUILDING.md for more information."
13-
14-
read -r -p "Do you wish to proceed (y/n)? " choice
15-
case "${choice}" in
16-
y|Y)
17-
echo "Build will proceed..."
18-
;;
19-
n|N)
20-
exit 0
21-
;;
22-
*)
23-
exit 0
24-
;;
25-
esac
3+
source `dirname $0`/../common/ci-check.sh
264

275
set -e
286
set -x
297

308
UNAME=`echo $(uname)`
319
LC_UNAME=`echo $UNAME | tr '[:upper:]' '[:lower:]'`
3210

33-
# build-common.sh will generate the following variables:
34-
# $GENERATE_ARCHIVES
35-
# $BUILD_DEBUG
36-
# $BUILD_RELEASE
37-
source `dirname $0`/../common/ci-common.sh
3811
source `dirname $0`/../common/build-common.sh
3912

4013
if [[ "$GITHUB_WORKFLOW" ]]; then

build/common/build-common.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
#!/bin/bash
22

3+
# build-common.sh will generate the following variables:
4+
# $GENERATE_ARCHIVES
5+
# $BUILD_DEBUG
6+
# $BUILD_RELEASE
7+
8+
# Typically a build script (build.sh) would source this script. For example,
9+
# source `dirname $0`/../common/build-common.sh
10+
11+
# Usage: the first argument selects the build type:
12+
# - release, to build release only
13+
# - debug, to build debug only
14+
# - continuous, to build release and debug
15+
# - presubmit, for presubmit builds
16+
#
17+
# The default is release
318
if [[ ! "$TARGET" ]]; then
419
if [[ "$1" ]]; then
520
TARGET=$1

build/common/ci-check.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
echo "This script is intended to run in a CI environment and may modify your current environment."
2+
echo "Please refer to BUILDING.md for more information."
3+
4+
read -r -p "Do you wish to proceed (y/n)? " choice
5+
case "${choice}" in
6+
y|Y)
7+
echo "Build will proceed..."
8+
;;
9+
n|N)
10+
exit 0
11+
;;
12+
*)
13+
exit 0
14+
;;
15+
esac
16+
17+
if [[ "$GITHUB_WORKFLOW" ]]; then
18+
echo "Running workflow $GITHUB_WORKFLOW (event: $GITHUB_EVENT_NAME, action: $GITHUB_ACTION)"
19+
fi

build/common/ci-common.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

build/common/get-emscripten.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ -d "./emsdk" ]; then
4+
echo "emsdk folder found. Assume emsdk has been installed."
5+
cd emsdk
6+
./emsdk activate latest
7+
source ./emsdk_env.sh
8+
export EMSDK="$PWD"
9+
cd ..
10+
exit 0
11+
fi
12+
13+
# Install emscripten.
14+
EMSDK_VERSION=${GITHUB_EMSDK_VERSION-3.1.60}
15+
curl -L https://github.com/emscripten-core/emsdk/archive/refs/tags/${EMSDK_VERSION}.zip > emsdk.zip
16+
unzip emsdk.zip ; mv emsdk-* emsdk ; cd emsdk
17+
./emsdk install latest
18+
./emsdk activate latest
19+
source ./emsdk_env.sh
20+
21+
export EMSDK="$PWD"
22+
cd ..

test/utils/get_mesa.sh renamed to build/common/get-mesa.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
#!/usr/bin/bash
1616

17-
set -x
17+
set -e
1818
if [[ "$GITHUB_WORKFLOW" ]]; then
19-
set -e
19+
set -x
2020
fi
2121

2222
OS_NAME=$(uname -s)
@@ -35,7 +35,7 @@ source ${ORIG_DIR}/venv/bin/activate
3535

3636
NEEDED_PYTHON_DEPS=("mako" "setuptools" "pyyaml")
3737
for cmd in "${NEEDED_PYTHON_DEPS[@]}"; do
38-
if ! python3 -m pip show "${cmd}" >/dev/null 2>&1; then
38+
if ! python3 -m pip show -q "${cmd}" >/dev/null 2>&1; then
3939
python3 -m pip install ${cmd}
4040
fi
4141
done
@@ -145,6 +145,6 @@ deactivate
145145
popd
146146

147147
if [[ "$GITHUB_WORKFLOW" ]]; then
148-
set +e
148+
set +x
149149
fi
150-
set +x
150+
set +e

build/common/versions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ GITHUB_CMAKE_VERSION=3.19.5
33
GITHUB_NINJA_VERSION=1.10.2
44
GITHUB_MESA_VERSION=24.2.1
55
GITHUB_LLVM_VERSION=16
6-
GITHUB_NDK_VERSION=27.0.11718014
6+
GITHUB_NDK_VERSION=27.0.11718014
7+
GITHUB_EMSDK_VERSION=3.1.60

build/ios/build.sh

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,11 @@
11
#!/bin/bash
22

3-
# Usage: the first argument selects the build type:
4-
# - release, to build release only
5-
# - debug, to build debug only
6-
# - continuous, to build release and debug
7-
# - presubmit, for presubmit builds
8-
#
9-
# The default is release
10-
11-
echo "This script is intended to run in a CI environment and may modify your current environment."
12-
echo "Please refer to BUILDING.md for more information."
13-
14-
read -r -p "Do you wish to proceed (y/n)? " choice
15-
case "${choice}" in
16-
y|Y)
17-
echo "Build will proceed..."
18-
;;
19-
n|N)
20-
exit 0
21-
;;
22-
*)
23-
exit 0
24-
;;
25-
esac
3+
source `dirname $0`/../common/ci-check.sh
264

275
set -e
286
set -x
297

30-
source `dirname $0`/../common/ci-common.sh
318
source `dirname $0`/../common/build-common.sh
32-
339
pushd `dirname $0`/../.. > /dev/null
3410

3511
# If we're generating an archive for release or continuous builds, then we'll also build for the

0 commit comments

Comments
 (0)