Skip to content

Commit 8167baf

Browse files
committed
Merge branch 'rc/1.68.2' into release
2 parents 4e37a44 + 474a4f3 commit 8167baf

File tree

100 files changed

+2174
-905
lines changed

Some content is hidden

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

100 files changed

+2174
-905
lines changed

.github/workflows/postsubmit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ jobs:
2121
- name: Run update script
2222
env:
2323
GH_TOKEN: ${{ secrets.FILAMENTBOT_TOKEN }}
24+
COMMIT_MESSAGE: ${{ steps.get_commit_msg.outputs.msg }}
2425
run: |
25-
GOLDEN_BRANCH=$(echo "${{ steps.get_commit_msg.outputs.msg }}" | python3 test/renderdiff/src/commit_msg.py)
26+
GOLDEN_BRANCH=$(echo "${COMMIT_MESSAGE}" | python3 test/renderdiff/src/commit_msg.py)
2627
COMMIT_HASH="${{ steps.get_commit_msg.outputs.hash }}"
2728
if [[ "${GOLDEN_BRANCH}" != "main" ]]; then
2829
git config --global user.email "filament.bot@gmail.com"

.github/workflows/presubmit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,17 @@ jobs:
134134
env:
135135
COMMIT_MESSAGE: ${{ steps.get_commit_msg.outputs.msg }}
136136
run: |
137-
ls ./gltf/Models
138137
TEST_DIR=test/renderdiff
139138
source ${TEST_DIR}/src/preamble.sh
140-
start_
139+
set -eux
141140
GOLDEN_BRANCH=$(echo "${COMMIT_MESSAGE}" | python3 ${TEST_DIR}/src/commit_msg.py)
142-
bash ${TEST_DIR}/generate.sh && \
143-
python3 ${TEST_DIR}/src/golden_manager.py \
141+
bash ${TEST_DIR}/generate.sh
142+
python3 ${TEST_DIR}/src/golden_manager.py \
144143
--branch=${GOLDEN_BRANCH} \
145144
--output=${GOLDEN_OUTPUT_DIR}
146145
147-
# Note that we need to upload the output even if comparison fails, so we undo `set -ex`
148-
end_
146+
# Note that we need to upload the output even if comparison fails, so we undo `set -eux`
147+
set +eux
149148
150149
python3 ${TEST_DIR}/src/compare.py \
151150
--src=${GOLDEN_OUTPUT_DIR} \
@@ -158,6 +157,7 @@ jobs:
158157
cat compare_output.txt >> "$GITHUB_OUTPUT"
159158
echo "$DELIMITER" >> "$GITHUB_OUTPUT"
160159
fi
160+
shell: bash
161161
- uses: actions/upload-artifact@v4
162162
with:
163163
name: presubmit-renderdiff-result

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,9 @@ add_subdirectory(${LIBRARIES}/utils)
872872
add_subdirectory(${LIBRARIES}/viewer)
873873
add_subdirectory(${FILAMENT}/shaders)
874874
add_subdirectory(${EXTERNAL}/abseil/tnt)
875-
add_subdirectory(${EXTERNAL}/basisu/tnt)
875+
# Add zstd before basisu to force it to use the external zstd target,
876+
# preventing a duplicate symbol conflict with its bundled version.
877+
add_subdirectory(${EXTERNAL}/zstd/tnt)
876878
add_subdirectory(${EXTERNAL}/civetweb/tnt)
877879
add_subdirectory(${EXTERNAL}/imgui/tnt)
878880
add_subdirectory(${EXTERNAL}/robin-map/tnt)
@@ -886,7 +888,7 @@ add_subdirectory(${EXTERNAL}/jsmn/tnt)
886888
add_subdirectory(${EXTERNAL}/stb/tnt)
887889
add_subdirectory(${EXTERNAL}/getopt)
888890
add_subdirectory(${EXTERNAL}/perfetto/tnt)
889-
add_subdirectory(${EXTERNAL}/zstd/tnt)
891+
add_subdirectory(${EXTERNAL}/basisu/tnt)
890892

891893

892894
# Note that this has to be placed after mikktspace in order for combine_static_libs to work.

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

5757
## Documentation

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ 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.68.2
11+
12+
- Support `setPresentationTime` with the Metal backend.
13+
1014
## v1.68.1
1115

1216

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ buildscript {
100100
'kotlin': '2.0.21',
101101
'kotlin_coroutines': '1.9.0',
102102
'buildTools': '35.0.0',
103-
'ndk': '27.0.11718014',
103+
'ndk': '29.0.14206865',
104104
'androidx_core': '1.13.1',
105105
'androidx_annotations': '1.9.0'
106106
]

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ using namespace filament;
2525

2626
extern "C" JNIEXPORT jlong JNICALL
2727
Java_com_google_android_filament_Material_nBuilderBuild(JNIEnv *env, jclass,
28-
jlong nativeEngine, jobject buffer_, jint size, jint shBandCount, jint shadowQuality) {
28+
jlong nativeEngine, jobject buffer_, jint size, jint shBandCount, jint shadowQuality, jint uboBatchingMode) {
2929
Engine* engine = (Engine*) nativeEngine;
3030
AutoBuffer buffer(env, buffer_, size);
3131
auto builder = Material::Builder();
3232
if (shBandCount) {
3333
builder.sphericalHarmonicsBandCount(shBandCount);
3434
}
3535
builder.shadowSamplingQuality((Material::Builder::ShadowSamplingQuality)shadowQuality);
36+
builder.uboBatching((Material::UboBatchingMode)uboBatchingMode);
3637
Material* material = builder
3738
.package(buffer.getData(), buffer.getSize())
3839
.build(*engine);

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,20 @@ public enum CompilerPriorityQueue {
261261
LOW
262262
}
263263

264+
/**
265+
* Defines whether a material instance should use UBO batching or not.
266+
*/
267+
public enum UboBatchingMode {
268+
/**
269+
* For default, it follows the engine settings.
270+
* If UBO batching is enabled on the engine and the material domain is SURFACE, it
271+
* turns on the UBO batching. Otherwise, it turns off the UBO batching.
272+
*/
273+
DEFAULT,
274+
/** Disable the Ubo Batching for this material */
275+
DISABLED
276+
}
277+
264278
public static class UserVariantFilterBit {
265279
/** Directional lighting */
266280
public static int DIRECTIONAL_LIGHTING = 0x01;
@@ -372,6 +386,7 @@ public enum ShadowSamplingQuality {
372386
private int mSize;
373387
private int mShBandCount = 0;
374388
private ShadowSamplingQuality mShadowSamplingQuality = ShadowSamplingQuality.LOW;
389+
private UboBatchingMode mUboBatchingMode = UboBatchingMode.DEFAULT;
375390

376391

377392
/**
@@ -416,6 +431,17 @@ public Builder shadowSamplingQuality(ShadowSamplingQuality quality) {
416431
return this;
417432
}
418433

434+
/**
435+
* Set the batching mode of the instances created from this material.
436+
* @param uboBatchingMode
437+
* @return Reference to this Builder for chaining calls.
438+
*/
439+
@NonNull
440+
public Builder uboBatching(UboBatchingMode mode) {
441+
mUboBatchingMode = mode;
442+
return this;
443+
}
444+
419445
/**
420446
* Creates and returns the Material object.
421447
*
@@ -428,7 +454,7 @@ public Builder shadowSamplingQuality(ShadowSamplingQuality quality) {
428454
@NonNull
429455
public Material build(@NonNull Engine engine) {
430456
long nativeMaterial = nBuilderBuild(engine.getNativeObject(),
431-
mBuffer, mSize, mShBandCount, mShadowSamplingQuality.ordinal());
457+
mBuffer, mSize, mShBandCount, mShadowSamplingQuality.ordinal(), mUboBatchingMode.ordinal());
432458
if (nativeMaterial == 0) throw new IllegalStateException("Couldn't create Material");
433459
return new Material(nativeMaterial);
434460
}
@@ -1094,7 +1120,7 @@ void clearNativeObject() {
10941120
mNativeObject = 0;
10951121
}
10961122

1097-
private static native long nBuilderBuild(long nativeEngine, @NonNull Buffer buffer, int size, int shBandCount, int shadowQuality);
1123+
private static native long nBuilderBuild(long nativeEngine, @NonNull Buffer buffer, int size, int shBandCount, int shadowQuality, int uboBatchingMode);
10981124
private static native long nCreateInstance(long nativeMaterial);
10991125
private static native long nCreateInstanceWithName(long nativeMaterial, @NonNull String name);
11001126
private static native long nGetDefaultInstance(long nativeMaterial);

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.68.1
2+
VERSION_NAME=1.68.2
33

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

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function print_fgviewer_help {
158158
}
159159

160160
# Unless explicitly specified, NDK version will be selected as highest available version within same major release chain
161-
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 ".")}
161+
FILAMENT_NDK_VERSION=$(cat `dirname $0`/build/common/versions | grep GITHUB_NDK_VERSION | sed s/GITHUB_NDK_VERSION=//g | cut -f 1 -d ".")
162162

163163
# Internal variables
164164
ISSUE_CLEAN=false

0 commit comments

Comments
 (0)