Skip to content

Commit

Permalink
Merge branch 'rc/1.53.0' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
bejado committed Jun 18, 2024
2 parents bbd4177 + 6e3cccf commit 64f03b3
Show file tree
Hide file tree
Showing 42 changed files with 258 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/ios && printf "y" | ./build.sh continuous
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/linux && printf "y" | ./build.sh continuous
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/mac && printf "y" | ./build.sh continuous
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: npm-deploy
runs-on: macos-14
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.inputs.release_tag }}
# Setup .npmrc file to publish to npm
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
os: [macos-14, ubuntu-22.04]

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
WORKFLOW_OS=`echo \`uname\` | sed "s/Darwin/mac/" | tr [:upper:] [:lower:]`
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
build\windows\build-github.bat presubmit
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/ios && printf "y" | ./build.sh presubmit
Expand All @@ -70,7 +70,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/web && printf "y" | ./build.sh presubmit
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
TAG=${REF##*/}
echo "ref=${REF}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ steps.git_ref.outputs.ref }}
- name: Run build script
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
TAG=${REF##*/}
echo "ref=${REF}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ steps.git_ref.outputs.ref }}
- name: Run build script
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
TAG=${REF##*/}
echo "ref=${REF}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ steps.git_ref.outputs.ref }}
- uses: actions/setup-java@v3
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
TAG=${REF##*/}
echo "ref=${REF}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ steps.git_ref.outputs.ref }}
- name: Run build script
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
echo "ref=${REF}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
with:
ref: ${{ steps.git_ref.outputs.ref }}
- name: Run build script
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-14

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
cd build/web && printf "y" | ./build.sh continuous
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3.3.0
- uses: actions/checkout@v4.1.6
- name: Run build script
run: |
build\windows\build-github.bat continuous
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repositories {
}
dependencies {
implementation 'com.google.android.filament:filament-android:1.52.3'
implementation 'com.google.android.filament:filament-android:1.53.0'
}
```

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

```shell
pod 'Filament', '~> 1.52.3'
pod 'Filament', '~> 1.53.0'
```

### Snapshots
Expand Down
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ A new header is inserted each time a *tag* is created.
Instead, if you are authoring a PR for the main branch, add your release note to
[NEW_RELEASE_NOTES.md](./NEW_RELEASE_NOTES.md).

## v1.53.0

- engine: fix skinning normals with large transforms (b/342459864) [⚠️ **New Material Version**]

## v1.52.3


Expand Down
12 changes: 6 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ buildscript {
'minSdk': 21,
'targetSdk': 34,
'compileSdk': 34,
'kotlin': '1.9.21',
'kotlin_coroutines': '1.7.3',
'kotlin': '2.0.0',
'kotlin_coroutines': '1.9.0-RC',
'buildTools': '34.0.0',
'ndk': '26.1.10909125',
'androidx_core': '1.12.0',
'androidx_annotations': '1.7.0'
'ndk': '27.0.11718014',
'androidx_core': '1.13.1',
'androidx_annotations': '1.8.0'
]

ext.deps = [
Expand All @@ -104,7 +104,7 @@ buildscript {
]

dependencies {
classpath 'com.android.tools.build:gradle:8.2.0'
classpath 'com.android.tools.build:gradle:8.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
}

Expand Down
7 changes: 7 additions & 0 deletions android/filament-android/src/main/cpp/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,13 @@ Java_com_google_android_filament_Engine_nSetPaused(JNIEnv*, jclass,
engine->setPaused(paused);
}

extern "C" JNIEXPORT void JNICALL
Java_com_google_android_filament_Engine_nUnprotected(JNIEnv*, jclass,
jlong nativeEngine, jboolean paused) {
Engine* engine = (Engine*) nativeEngine;
engine->unprotected();
}

// Managers...

extern "C" JNIEXPORT jlong JNICALL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,18 @@ public void setPaused(boolean paused) {
nSetPaused(getNativeObject(), paused);
}

/**
* Switch the command queue to unprotected mode. Protected mode can be activated via
* Renderer::beginFrame() using a protected SwapChain.
* @see Renderer
* @see SwapChain
*/
public void unprotected() {
nUnprotected(getNativeObject());
}


@UsedByReflection("TextureHelper.java")
public long getNativeObject() {
if (mNativeObject == 0) {
Expand Down Expand Up @@ -1366,6 +1378,7 @@ private static void assertDestroy(boolean success) {
private static native void nFlush(long nativeEngine);
private static native boolean nIsPaused(long nativeEngine);
private static native void nSetPaused(long nativeEngine, boolean paused);
private static native void nUnprotected(long nativeEngine);
private static native long nGetTransformManager(long nativeEngine);
private static native long nGetLightManager(long nativeEngine);
private static native long nGetRenderableManager(long nativeEngine);
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.google.android.filament
VERSION_NAME=1.52.3
VERSION_NAME=1.53.0

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

Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Nov 17 10:40:18 PST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion build/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ FILAMENT_NDK_VERSION=${FILAMENT_NDK_VERSION:-$(cat `dirname $0`/ndk.version)}

# Install the required NDK version specifically (if not present)
if [[ ! -d "${ANDROID_HOME}/ndk/$FILAMENT_NDK_VERSION" ]]; then
${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager "ndk;$FILAMENT_NDK_VERSION" > /dev/null
yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses
${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager "ndk;$FILAMENT_NDK_VERSION"
fi

# Only build 1 64 bit target during presubmit to cut down build times during presubmit
Expand Down
2 changes: 1 addition & 1 deletion build/android/ndk.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26.1.10909125
27.0.11718014
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ class PlatformEGLAndroid : public PlatformEGL {
AcquiredImage transformAcquiredImage(AcquiredImage source) noexcept override;

private:
struct InitializeJvmForPerformanceManagerIfNeeded {
InitializeJvmForPerformanceManagerIfNeeded();
};

int mOSVersion;
ExternalStreamManagerAndroid& mExternalStreamManager;
InitializeJvmForPerformanceManagerIfNeeded const mInitializeJvmForPerformanceManagerIfNeeded;
utils::PerformanceHintManager mPerformanceHintManager;
utils::PerformanceHintManager::Session mPerformanceHintSession;

Expand Down
12 changes: 11 additions & 1 deletion filament/backend/src/VirtualMachineEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,23 @@

#include "private/backend/VirtualMachineEnv.h"

#include <utils/compiler.h>
#include <utils/debug.h>

#include <jni.h>

namespace filament {

JavaVM* VirtualMachineEnv::sVirtualMachine = nullptr;

// This is called when the library is loaded. We need this to get a reference to the global VM
/*
* This is typically called by filament_jni.so when it is loaded. If filament_jni.so is not used,
* then this must be called manually -- however, this is a problem because VirtualMachineEnv.h
* is currently private and part of backend.
* For now, we authorize this usage, but we will need to fix it; by making a proper public
* API for this.
*/
UTILS_PUBLIC
UTILS_NOINLINE
jint VirtualMachineEnv::JNI_OnLoad(JavaVM* vm) noexcept {
JNIEnv* env = nullptr;
Expand Down
18 changes: 17 additions & 1 deletion filament/backend/src/opengl/platforms/PlatformEGLAndroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <backend/platforms/PlatformEGL.h>
#include <backend/platforms/PlatformEGLAndroid.h>

#include <private/backend/VirtualMachineEnv.h>

#include "opengl/GLUtils.h"
#include "ExternalStreamManagerAndroid.h"

Expand Down Expand Up @@ -82,9 +84,23 @@ using EGLStream = Platform::Stream;

// ---------------------------------------------------------------------------------------------

PlatformEGLAndroid::InitializeJvmForPerformanceManagerIfNeeded::InitializeJvmForPerformanceManagerIfNeeded() {
// PerformanceHintManager() needs the calling thread to be a Java thread; so we need
// to attach this thread to the JVM before we initialize PerformanceHintManager.
// This should be done in PerformanceHintManager(), but libutils doesn't have access to
// VirtualMachineEnv.
if (PerformanceHintManager::isSupported()) {
(void)VirtualMachineEnv::get().getEnvironment();
}
}

// ---------------------------------------------------------------------------------------------

PlatformEGLAndroid::PlatformEGLAndroid() noexcept
: PlatformEGL(),
mExternalStreamManager(ExternalStreamManagerAndroid::create()) {
mExternalStreamManager(ExternalStreamManagerAndroid::create()),
mInitializeJvmForPerformanceManagerIfNeeded(),
mPerformanceHintManager() {

char scratch[PROP_VALUE_MAX + 1];
int length = __system_property_get("ro.build.version.release", scratch);
Expand Down
3 changes: 3 additions & 0 deletions filament/backend/src/vulkan/VulkanDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,10 @@ void VulkanDriver::collectGarbage() {
}
void VulkanDriver::beginFrame(int64_t monotonic_clock_ns,
int64_t refreshIntervalNs, uint32_t frameId) {
FVK_SYSTRACE_CONTEXT();
FVK_SYSTRACE_START("beginFrame");
// Do nothing.
FVK_SYSTRACE_END();
}

void VulkanDriver::setFrameScheduledCallback(Handle<HwSwapChain> sch,
Expand Down
12 changes: 12 additions & 0 deletions filament/backend/src/vulkan/platform/VulkanPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ ExtensionSet getInstanceExtensions(ExtensionSet const& externallyRequiredExts =
static_cast<char const*>(nullptr) /* pLayerName */);
for (auto const& extProps: availableExts) {
utils::CString name { extProps.extensionName };

// To workaround an Adreno bug where the extension name could be of 0 length.
if (name.size() == 0) {
continue;
}

if (setContains(TARGET_EXTS, name) || setContains(externallyRequiredExts, name)) {
exts.insert(name);
}
Expand All @@ -200,6 +206,12 @@ ExtensionSet getDeviceExtensions(VkPhysicalDevice device) {
static_cast<const char*>(nullptr) /* pLayerName */);
for (auto const& extension: extensions) {
utils::CString name { extension.extensionName };

// To workaround an Adreno bug where the extension name could be of 0 length.
if (name.size() == 0) {
continue;
}

if (setContains(TARGET_EXTS, name)) {
exts.insert(name);
}
Expand Down
Loading

0 comments on commit 64f03b3

Please sign in to comment.