Skip to content

Commit 2f3292b

Browse files
authored
Merge branch 'main' into ajh/descriptor_set_debugging
2 parents 61306c7 + 7ccbdb4 commit 2f3292b

Some content is hidden

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

41 files changed

+844
-304
lines changed

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

+1-1
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

+16
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/presubmit.yml

+8-5
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 test/utils/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,7 +153,7 @@ jobs:
150153
- name: Run test
151154
run: ./out/cmake-debug/libs/filamat/test_filamat --gtest_filter=MaterialCompiler.Wgsl*
152155

153-
code-correcteness:
156+
code-correctness:
154157
name: code-correctness
155158
runs-on: 'macos-14-xlarge'
156159
steps:

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118
with:
119119
ref: ${{ steps.git_ref.outputs.ref }}
120120
- uses: ./.github/actions/linux-prereq
121+
- uses: ./.github/actions/web-prereq
121122
- name: Run build script
122123
env:
123124
TAG: ${{ steps.git_ref.outputs.tag }}

.github/workflows/web-continuous.yml

+1
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

+2
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

NEW_RELEASE_NOTES.md

-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ for next branch cut* header.
77
appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md).
88

99
## Release notes for next branch cut
10-
11-
- materials: remove dependence on per-view descset layout from filamat. [⚠️ **New Material Version**]

README.md

+2-2
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.4'
34+
implementation 'com.google.android.filament:filament-android:1.59.5'
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.4'
54+
pod 'Filament', '~> 1.59.5'
5555
```
5656

5757
## Documentation

RELEASE_NOTES.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ 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.0
11+
12+
- materials: remove dependence on per-view descset layout from filamat. [⚠️ **New Material Version**]
13+
- `ColorGrading::Builder::toneMapper` now takes a `shared_ptr<ToneMapper>`
14+
1015
## v1.59.5
1116

1217

android/filament-android/src/main/cpp/ColorGrading.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <filament/ColorGrading.h>
2020
#include <filament/ToneMapper.h>
21+
#include <memory>
2122

2223
#include <math/vec3.h>
2324
#include <math/vec4.h>
@@ -67,8 +68,9 @@ extern "C" JNIEXPORT void JNICALL
6768
Java_com_google_android_filament_ColorGrading_nBuilderToneMapper(JNIEnv*, jclass,
6869
jlong nativeBuilder, jlong toneMapper_) {
6970
ColorGrading::Builder* builder = (ColorGrading::Builder*) nativeBuilder;
70-
const ToneMapper* toneMapper = (const ToneMapper*) toneMapper_;
71-
builder->toneMapper(toneMapper);
71+
ToneMapper* toneMapper = reinterpret_cast<ToneMapper*>(toneMapper_);
72+
std::shared_ptr<ToneMapper> toneMapperCopy(toneMapper->clone());
73+
builder->toneMapper(toneMapperCopy);
7274
}
7375

7476
#pragma clang diagnostic push

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ public Builder dimensions(int dim) {
214214
*
215215
* The default tone mapping operator is {@link ToneMapper.ACESLegacy}.
216216
*
217-
* The specified tone mapper must have a lifecycle that exceeds the lifetime of
218-
* this builder. Since the build(Engine&) method is synchronous, it is safe to
219-
* delete the tone mapper object after that finishes executing.
217+
* The copy of the specified tone mapper is set to this builder. It is safe to delete
218+
* the original tone mapper object while the copied one is held by the built ColorGrading
219+
* object.
220220
*
221221
* @param toneMapper The tone mapping operator to apply to the HDR color buffer
222222
*

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.google.android.filament
2-
VERSION_NAME=1.59.4
2+
VERSION_NAME=1.59.5
33

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

build/android/build.sh

+1-28
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

+15
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

+19
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

-5
This file was deleted.

build/common/get-emscripten.sh

+22
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 ..

build/common/versions

+2-1
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

+1-25
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

build/linux/build.sh

+2-29
Original file line numberDiff line numberDiff line change
@@ -1,38 +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-
# build-common.sh will generate the following variables:
31-
# $GENERATE_ARCHIVES
32-
# $BUILD_DEBUG
33-
# $BUILD_RELEASE
34-
source `dirname $0`/../common/ci-common.sh
358
source `dirname $0`/../common/build-common.sh
36-
379
pushd `dirname $0`/../.. > /dev/null
10+
3811
./build.sh -c $RUN_TESTS $GENERATE_ARCHIVES $BUILD_DEBUG $BUILD_RELEASE

build/mac/build.sh

+2-25
Original file line numberDiff line numberDiff line change
@@ -1,34 +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
10+
3411
./build.sh -c $RUN_TESTS $GENERATE_ARCHIVES $BUILD_DEBUG $BUILD_RELEASE

0 commit comments

Comments
 (0)