From 7aefa99e069ffbab0e0fa58293ea7c821ba12bc1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 3 Jun 2024 12:37:46 -0700 Subject: [PATCH 01/15] Acquire a mutex before releasing CAMetalDrawables on main thread. (#7888) PresentDrawable was moved to main thread by default in google#7535 and stopped most crashes when a drawable is released. But there still appears to be crashes if a drawable is released on main thread at the same time that -nextDrawable is called from the Filament render thread. (It's likely that the drawable pool in CAMetalLayer is completely non-thread-safe.) So, add a mutex to the swapchain and always acquire it before creating or releasing a CAMetalDrawable. Users can opt out of this behavior by passing -DFILAMENT_LOCK_METAL_DRAWABLE_POOL=0. --- filament/backend/src/metal/MetalHandles.h | 1 + filament/backend/src/metal/MetalHandles.mm | 36 ++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/filament/backend/src/metal/MetalHandles.h b/filament/backend/src/metal/MetalHandles.h index 05ce7529d27..4d6f864639f 100644 --- a/filament/backend/src/metal/MetalHandles.h +++ b/filament/backend/src/metal/MetalHandles.h @@ -109,6 +109,7 @@ class MetalSwapChain : public HwSwapChain { NSUInteger headlessWidth = 0; NSUInteger headlessHeight = 0; CAMetalLayer* layer = nullptr; + std::mutex layerDrawableMutex; MetalExternalImage externalImage; SwapChainType type; diff --git a/filament/backend/src/metal/MetalHandles.mm b/filament/backend/src/metal/MetalHandles.mm index 7ebe639786f..3d56956387f 100644 --- a/filament/backend/src/metal/MetalHandles.mm +++ b/filament/backend/src/metal/MetalHandles.mm @@ -174,13 +174,21 @@ static inline MTLTextureUsage getMetalTextureUsage(TextureUsage usage) { } assert_invariant(isCaMetalLayer()); - drawable = [layer nextDrawable]; + + // CAMetalLayer's drawable pool is not thread safe. Use a mutex when + // calling -nextDrawable, or when releasing the last known reference + // to any CAMetalDrawable returned from a previous -nextDrawable. + { + std::lock_guard lock(layerDrawableMutex); + drawable = [layer nextDrawable]; + } FILAMENT_CHECK_POSTCONDITION(drawable != nil) << "Could not obtain drawable."; return drawable.texture; } void MetalSwapChain::releaseDrawable() { + std::lock_guard lock(layerDrawableMutex); drawable = nil; } @@ -256,9 +264,11 @@ static inline MTLTextureUsage getMetalTextureUsage(TextureUsage usage) { PresentDrawableData(const PresentDrawableData&) = delete; PresentDrawableData& operator=(const PresentDrawableData&) = delete; - static PresentDrawableData* create(id drawable, MetalDriver* driver) { + static PresentDrawableData* create(id drawable, + std::mutex* drawableMutex, MetalDriver* driver) { + assert_invariant(drawableMutex); assert_invariant(driver); - return new PresentDrawableData(drawable, driver); + return new PresentDrawableData(drawable, drawableMutex, driver); } static void maybePresentAndDestroyAsync(PresentDrawableData* that, bool shouldPresent) { @@ -277,16 +287,22 @@ static void maybePresentAndDestroyAsync(PresentDrawableData* that, bool shouldPr } private: - PresentDrawableData(id drawable, MetalDriver* driver) - : mDrawable(drawable), mDriver(driver) {} + PresentDrawableData(id drawable, std::mutex* drawableMutex, + MetalDriver* driver) + : mDrawable(drawable), mDrawableMutex(drawableMutex), mDriver(driver) {} static void cleanupAndDestroy(PresentDrawableData *that) { - that->mDrawable = nil; + { + std::lock_guard lock(*(that->mDrawableMutex)); + that->mDrawable = nil; + } + that->mDrawableMutex = nullptr; that->mDriver = nullptr; delete that; } id mDrawable; + std::mutex* mDrawableMutex = nullptr; MetalDriver* mDriver = nullptr; }; @@ -304,8 +320,8 @@ void presentDrawable(bool presentFrame, void* user) { struct Callback { Callback(std::shared_ptr callback, id drawable, - MetalDriver* driver) - : f(callback), data(PresentDrawableData::create(drawable, driver)) {} + std::mutex* drawableMutex, MetalDriver* driver) + : f(callback), data(PresentDrawableData::create(drawable, drawableMutex, driver)) {} std::shared_ptr f; // PresentDrawableData* is destroyed by maybePresentAndDestroyAsync() later. std::unique_ptr data; @@ -320,8 +336,8 @@ static void func(void* user) { // This callback pointer will be captured by the block. Even if the scheduled handler is never // called, the unique_ptr will still ensure we don't leak memory. - __block auto callback = - std::make_unique(frameScheduled.callback, drawable, context.driver); + __block auto callback = std::make_unique( + frameScheduled.callback, drawable, &layerDrawableMutex, context.driver); backend::CallbackHandler* handler = frameScheduled.handler; MetalDriver* driver = context.driver; From 749b063af39b2752276cb1268d199ee82abb80cc Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 3 Jun 2024 10:21:23 -0700 Subject: [PATCH 02/15] PerformanceHintManager needs a valid Java thread FIXES=[343965368, 343550453] --- .../backend/platforms/PlatformEGLAndroid.h | 5 +++++ filament/backend/src/VirtualMachineEnv.cpp | 12 +++++++++++- .../opengl/platforms/PlatformEGLAndroid.cpp | 18 +++++++++++++++++- .../utils/android/PerformanceHintManager.h | 6 ++++++ .../src/android/PerformanceHintManager.cpp | 7 +++++++ 5 files changed, 46 insertions(+), 2 deletions(-) diff --git a/filament/backend/include/backend/platforms/PlatformEGLAndroid.h b/filament/backend/include/backend/platforms/PlatformEGLAndroid.h index d0caeb8c89b..c3cc7da89d8 100644 --- a/filament/backend/include/backend/platforms/PlatformEGLAndroid.h +++ b/filament/backend/include/backend/platforms/PlatformEGLAndroid.h @@ -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; diff --git a/filament/backend/src/VirtualMachineEnv.cpp b/filament/backend/src/VirtualMachineEnv.cpp index ba156a8ad48..c7ff7b17906 100644 --- a/filament/backend/src/VirtualMachineEnv.cpp +++ b/filament/backend/src/VirtualMachineEnv.cpp @@ -16,13 +16,23 @@ #include "private/backend/VirtualMachineEnv.h" +#include #include +#include + 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; diff --git a/filament/backend/src/opengl/platforms/PlatformEGLAndroid.cpp b/filament/backend/src/opengl/platforms/PlatformEGLAndroid.cpp index 94d602a0ba8..577b66fb315 100644 --- a/filament/backend/src/opengl/platforms/PlatformEGLAndroid.cpp +++ b/filament/backend/src/opengl/platforms/PlatformEGLAndroid.cpp @@ -19,6 +19,8 @@ #include #include +#include + #include "opengl/GLUtils.h" #include "ExternalStreamManagerAndroid.h" @@ -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); diff --git a/libs/utils/include/utils/android/PerformanceHintManager.h b/libs/utils/include/utils/android/PerformanceHintManager.h index 9808186475c..40101773157 100644 --- a/libs/utils/include/utils/android/PerformanceHintManager.h +++ b/libs/utils/include/utils/android/PerformanceHintManager.h @@ -55,9 +55,15 @@ class UTILS_PUBLIC PerformanceHintManager : int reportActualWorkDuration(int64_t actualDurationNanos) noexcept; }; + // caveat: This must be called on a Java thread PerformanceHintManager() noexcept; ~PerformanceHintManager() noexcept; + // Whether PerformanceHintManager APIs are supported (which doesn't mean PerformanceHintManager + // itself is, use isValid()). + static bool isSupported() noexcept; + + // Whether PerformanceHintManager can be used. bool isValid() const; int64_t getPreferredUpdateRateNanos() const noexcept; diff --git a/libs/utils/src/android/PerformanceHintManager.cpp b/libs/utils/src/android/PerformanceHintManager.cpp index c2c8f8b8f15..4b8dd08d83e 100644 --- a/libs/utils/src/android/PerformanceHintManager.cpp +++ b/libs/utils/src/android/PerformanceHintManager.cpp @@ -47,6 +47,13 @@ PerformanceHintManager::PerformanceHintManager() noexcept { PerformanceHintManager::~PerformanceHintManager() noexcept = default; +bool PerformanceHintManager::isSupported() noexcept { + if (__builtin_available(android __ANDROID_API_T__, *)) { + return true; + } + return false; +} + bool PerformanceHintManager::isValid() const { return mImpl->mManager != nullptr; } From b5d7de06bcdb56a2d26b2caec6bd5774998c5670 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 3 Jun 2024 13:55:01 -0700 Subject: [PATCH 03/15] Engine::unprotected() drops the command queue back to unprotected mode FIXES=[344021154] --- android/filament-android/src/main/cpp/Engine.cpp | 7 +++++++ .../java/com/google/android/filament/Engine.java | 13 +++++++++++++ filament/include/filament/Engine.h | 8 ++++++++ filament/src/Engine.cpp | 4 ++++ filament/src/details/Engine.cpp | 9 +++++++++ filament/src/details/Engine.h | 3 +++ web/filament-js/jsbindings.cpp | 2 ++ 7 files changed, 46 insertions(+) diff --git a/android/filament-android/src/main/cpp/Engine.cpp b/android/filament-android/src/main/cpp/Engine.cpp index a4ace378534..4b3b33e530f 100644 --- a/android/filament-android/src/main/cpp/Engine.cpp +++ b/android/filament-android/src/main/cpp/Engine.cpp @@ -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 diff --git a/android/filament-android/src/main/java/com/google/android/filament/Engine.java b/android/filament-android/src/main/java/com/google/android/filament/Engine.java index 827fcf11caf..5a28d1eae87 100644 --- a/android/filament-android/src/main/java/com/google/android/filament/Engine.java +++ b/android/filament-android/src/main/java/com/google/android/filament/Engine.java @@ -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) { @@ -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); diff --git a/filament/include/filament/Engine.h b/filament/include/filament/Engine.h index bade124fbe0..2aed82736f2 100644 --- a/filament/include/filament/Engine.h +++ b/filament/include/filament/Engine.h @@ -930,6 +930,14 @@ class UTILS_PUBLIC Engine { */ void pumpMessageQueues(); + /** + * Switch the command queue to unprotected mode. Protected mode can be activated via + * Renderer::beginFrame() using a protected SwapChain. + * @see Renderer + * @see SwapChain + */ + void unprotected() noexcept; + /** * Returns the default Material. * diff --git a/filament/src/Engine.cpp b/filament/src/Engine.cpp index ae37b3cea1e..ad110dbc922 100644 --- a/filament/src/Engine.cpp +++ b/filament/src/Engine.cpp @@ -329,6 +329,10 @@ void Engine::pumpMessageQueues() { downcast(this)->pumpMessageQueues(); } +void Engine::unprotected() noexcept { + downcast(this)->unprotected(); +} + void Engine::setAutomaticInstancingEnabled(bool enable) noexcept { downcast(this)->setAutomaticInstancingEnabled(enable); } diff --git a/filament/src/details/Engine.cpp b/filament/src/details/Engine.cpp index 54e16bb69c5..2547b40103d 100644 --- a/filament/src/details/Engine.cpp +++ b/filament/src/details/Engine.cpp @@ -476,6 +476,8 @@ void FEngine::shutdown() { destroy(mDefaultMaterial); + destroy(mUnprotectedDummySwapchain); + /* * clean-up after the user -- we call terminate on each "leaked" object and clear each list. * @@ -1253,6 +1255,13 @@ void FEngine::resetBackendState() noexcept { } #endif +void FEngine::unprotected() noexcept { + if (UTILS_UNLIKELY(!mUnprotectedDummySwapchain)) { + mUnprotectedDummySwapchain = createSwapChain(1, 1, 0); + } + mUnprotectedDummySwapchain->makeCurrent(getDriverApi()); +} + // ------------------------------------------------------------------------------------------------ Engine::Builder::Builder() noexcept = default; diff --git a/filament/src/details/Engine.h b/filament/src/details/Engine.h index 85f065bf83e..972e446d552 100644 --- a/filament/src/details/Engine.h +++ b/filament/src/details/Engine.h @@ -406,6 +406,8 @@ class FEngine : public Engine { getDriver().purge(); } + void unprotected() noexcept; + void setAutomaticInstancingEnabled(bool enable) noexcept { // instancing is not allowed at feature level 0 if (hasFeatureLevel(FeatureLevel::FEATURE_LEVEL_1)) { @@ -539,6 +541,7 @@ class FEngine : public Engine { mutable FMaterial const* mDefaultMaterial = nullptr; mutable FMaterial const* mSkyboxMaterial = nullptr; + mutable FSwapChain* mUnprotectedDummySwapchain = nullptr; mutable FTexture* mDefaultIblTexture = nullptr; mutable FIndirectLight* mDefaultIbl = nullptr; diff --git a/web/filament-js/jsbindings.cpp b/web/filament-js/jsbindings.cpp index 79a573b0423..735305a5638 100644 --- a/web/filament-js/jsbindings.cpp +++ b/web/filament-js/jsbindings.cpp @@ -388,6 +388,8 @@ class_("Engine") return Engine::create(); }, allow_raw_pointers()) + .function("unprotected", &Engine::unprotected) + .function("enableAccurateTranslations", &Engine::enableAccurateTranslations) .function("setAutomaticInstancingEnabled", &Engine::setAutomaticInstancingEnabled) From bea02427edee198f81eb10a2fc33d992f3804866 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 3 Jun 2024 16:50:04 -0700 Subject: [PATCH 04/15] keep the normal transforms in float during skinning FIXES=[342459864] --- NEW_RELEASE_NOTES.md | 2 ++ filament/src/details/SkinningBuffer.cpp | 10 ++---- .../include/filament/MaterialEnums.h | 2 +- .../include/private/filament/UibStructs.h | 5 +-- shaders/src/common_types.glsl | 3 +- shaders/src/getters.vs | 35 +++++++++++-------- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index 4a1a9c7fa7e..d6831f9f350 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -7,3 +7,5 @@ for next branch cut* header. appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). ## Release notes for next branch cut + +- engine: fix skinning normals with large transforms (b/342459864) [⚠️ **New Material Version**] diff --git a/filament/src/details/SkinningBuffer.cpp b/filament/src/details/SkinningBuffer.cpp index d35fe1c70dd..b7092638670 100644 --- a/filament/src/details/SkinningBuffer.cpp +++ b/filament/src/details/SkinningBuffer.cpp @@ -114,6 +114,7 @@ void FSkinningBuffer::setBones(FEngine& engine, setBones(engine, mHandle, transforms, count, offset); } +UTILS_UNUSED static uint32_t packHalf2x16(half2 v) noexcept { uint32_t lo = getBits(v[0]); uint32_t hi = getBits(v[1]); @@ -144,13 +145,8 @@ PerRenderableBoneUib::BoneData FSkinningBuffer::makeBone(mat4f transform) noexce transform[1], transform[2] }, - .cof = { - packHalf2x16({ cofactors[0].x, cofactors[0].y }), - packHalf2x16({ cofactors[0].z, cofactors[1].x }), - packHalf2x16({ cofactors[1].y, cofactors[1].z }), - packHalf2x16({ cofactors[2].x, cofactors[2].y }) - // cofactor[2][2] is not stored because we don't have space for it - } + .cof0 = cofactors[0], + .cof1x = cofactors[1].x }; } diff --git a/libs/filabridge/include/filament/MaterialEnums.h b/libs/filabridge/include/filament/MaterialEnums.h index 25eb74d63bf..c15c6c457c8 100644 --- a/libs/filabridge/include/filament/MaterialEnums.h +++ b/libs/filabridge/include/filament/MaterialEnums.h @@ -28,7 +28,7 @@ namespace filament { // update this when a new version of filament wouldn't work with older materials -static constexpr size_t MATERIAL_VERSION = 52; +static constexpr size_t MATERIAL_VERSION = 53; /** * Supported shading models diff --git a/libs/filabridge/include/private/filament/UibStructs.h b/libs/filabridge/include/private/filament/UibStructs.h index 6a6f14ece16..4f06f43b409 100644 --- a/libs/filabridge/include/private/filament/UibStructs.h +++ b/libs/filabridge/include/private/filament/UibStructs.h @@ -327,8 +327,9 @@ struct PerRenderableBoneUib { // NOLINT(cppcoreguidelines-pro-type-member-init) struct alignas(16) BoneData { // bone transform, last row assumed [0,0,0,1] math::float4 transform[3]; - // 8 first cofactor matrix of transform's upper left - math::uint4 cof; + // 4 first cofactor matrix of transform's upper left + math::float3 cof0; + float cof1x; }; BoneData bones[CONFIG_MAX_BONE_COUNT]; }; diff --git a/shaders/src/common_types.glsl b/shaders/src/common_types.glsl index cf24b409295..3208c1ba955 100644 --- a/shaders/src/common_types.glsl +++ b/shaders/src/common_types.glsl @@ -19,7 +19,8 @@ struct ShadowData { #if defined(VARIANT_HAS_SKINNING_OR_MORPHING) struct BoneData { highp mat3x4 transform; // bone transform is mat4x3 stored in row-major (last row [0,0,0,1]) - highp uvec4 cof; // 8 first cofactor matrix of transform's upper left + highp float3 cof0; // 3 first cofactor matrix of transform's upper left + highp float cof1x; // 4th cofactor }; #endif diff --git a/shaders/src/getters.vs b/shaders/src/getters.vs index cccc08319c7..024ec9ff411 100644 --- a/shaders/src/getters.vs +++ b/shaders/src/getters.vs @@ -34,25 +34,32 @@ int getVertexIndex() { #if defined(VARIANT_HAS_SKINNING_OR_MORPHING) #define MAX_SKINNING_BUFFER_WIDTH 2048u -vec3 mulBoneNormal(vec3 n, uint i) { +vec3 mulBoneNormal(vec3 n, uint j) { highp mat3 cof; - // the first 8 elements of the cofactor matrix are stored as fp16 - highp vec2 x0y0 = unpackHalf2x16(bonesUniforms.bones[i].cof[0]); - highp vec2 z0x1 = unpackHalf2x16(bonesUniforms.bones[i].cof[1]); - highp vec2 y1z1 = unpackHalf2x16(bonesUniforms.bones[i].cof[2]); - highp vec2 x2y2 = unpackHalf2x16(bonesUniforms.bones[i].cof[3]); - // the last element must be computed by hand - highp float a = bonesUniforms.bones[i].transform[0][0]; - highp float b = bonesUniforms.bones[i].transform[0][1]; - highp float d = bonesUniforms.bones[i].transform[1][0]; - highp float e = bonesUniforms.bones[i].transform[1][1]; + highp float a = bonesUniforms.bones[j].transform[0][0]; + highp float b = bonesUniforms.bones[j].transform[0][1]; + highp float c = bonesUniforms.bones[j].transform[0][2]; + highp float d = bonesUniforms.bones[j].transform[1][0]; + highp float e = bonesUniforms.bones[j].transform[1][1]; + highp float f = bonesUniforms.bones[j].transform[1][2]; + highp float g = bonesUniforms.bones[j].transform[2][0]; + highp float h = bonesUniforms.bones[j].transform[2][1]; + highp float i = bonesUniforms.bones[j].transform[2][2]; + + cof[0] = bonesUniforms.bones[j].cof0; + + cof[1].xyz = vec3( + bonesUniforms.bones[j].cof1x, + a * i - c * g, + c * d - a * f); - cof[0].xyz = vec3(x0y0, z0x1.x); - cof[1].xyz = vec3(z0x1.y, y1z1); - cof[2].xyz = vec3(x2y2, a * e - b * d); + cof[2].xyz = vec3( + d * h - e * g, + b * g - a * h, + a * e - b * d); return normalize(cof * n); } From f077fff012555564a275c570068605134532019a Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 4 Jun 2024 15:03:43 -0700 Subject: [PATCH 05/15] Update actions/checkout to a supported version of Node.js (#7904) --- .github/workflows/android-continuous.yml | 2 +- .github/workflows/ios-continuous.yml | 2 +- .github/workflows/linux-continuous.yml | 2 +- .github/workflows/mac-continuous.yml | 2 +- .github/workflows/npm-deploy.yml | 2 +- .github/workflows/presubmit.yml | 10 +++++----- .github/workflows/release.yml | 10 +++++----- .github/workflows/web-continuous.yml | 2 +- .github/workflows/windows-continuous.yml | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/android-continuous.yml b/.github/workflows/android-continuous.yml index 2ee0ff2b690..9bcab7ae8e0 100644 --- a/.github/workflows/android-continuous.yml +++ b/.github/workflows/android-continuous.yml @@ -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' diff --git a/.github/workflows/ios-continuous.yml b/.github/workflows/ios-continuous.yml index 680a9a75fd7..bba6fcf35a8 100644 --- a/.github/workflows/ios-continuous.yml +++ b/.github/workflows/ios-continuous.yml @@ -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 diff --git a/.github/workflows/linux-continuous.yml b/.github/workflows/linux-continuous.yml index 5334922b3a2..5f19febd82a 100644 --- a/.github/workflows/linux-continuous.yml +++ b/.github/workflows/linux-continuous.yml @@ -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 diff --git a/.github/workflows/mac-continuous.yml b/.github/workflows/mac-continuous.yml index 682102e21b4..6413a537f58 100644 --- a/.github/workflows/mac-continuous.yml +++ b/.github/workflows/mac-continuous.yml @@ -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 diff --git a/.github/workflows/npm-deploy.yml b/.github/workflows/npm-deploy.yml index 0fdf1817517..44ef2dbbeec 100644 --- a/.github/workflows/npm-deploy.yml +++ b/.github/workflows/npm-deploy.yml @@ -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 diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index eebd55c2fa8..3fa9918e7ef 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -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:]` @@ -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 @@ -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' @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2312795605b..d4b7239a1a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/web-continuous.yml b/.github/workflows/web-continuous.yml index ef2f539977b..01d7c50cb6d 100644 --- a/.github/workflows/web-continuous.yml +++ b/.github/workflows/web-continuous.yml @@ -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 diff --git a/.github/workflows/windows-continuous.yml b/.github/workflows/windows-continuous.yml index c2b115e577c..14a8cbfa41c 100644 --- a/.github/workflows/windows-continuous.yml +++ b/.github/workflows/windows-continuous.yml @@ -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 From 68c7a6c7b6113253d77fe8a700aa151ff0f22667 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 4 Jun 2024 15:33:02 -0700 Subject: [PATCH 06/15] Update Android dependencies to latest (#7902) --- android/build.gradle | 12 ++++++------ android/gradle/wrapper/gradle-wrapper.properties | 2 +- build/android/build.sh | 3 ++- build/android/ndk.version | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4d6ebb91f83..47173999c6c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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 = [ @@ -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}" } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ad7df40dfff..980175fc261 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/build/android/build.sh b/build/android/build.sh index 4a6b9eebe96..3eb0a98a44e 100755 --- a/build/android/build.sh +++ b/build/android/build.sh @@ -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 diff --git a/build/android/ndk.version b/build/android/ndk.version index 365a3c41561..f58ef0240a5 100644 --- a/build/android/ndk.version +++ b/build/android/ndk.version @@ -1 +1 @@ -26.1.10909125 \ No newline at end of file +27.0.11718014 \ No newline at end of file From d1022527ac2b5e128d612993288df319a3b6bb3e Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 5 Jun 2024 10:40:15 -0700 Subject: [PATCH 07/15] export PanicStream since it's a public API --- libs/utils/include/utils/Panic.h | 2 +- libs/utils/include/utils/sstream.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/utils/include/utils/Panic.h b/libs/utils/include/utils/Panic.h index 872b99d4bfc..6e9ac3f494e 100644 --- a/libs/utils/include/utils/Panic.h +++ b/libs/utils/include/utils/Panic.h @@ -486,7 +486,7 @@ struct Voidify final { void operator&&(const T&) const&& {} }; -class PanicStream { +class UTILS_PUBLIC PanicStream { public: PanicStream( char const* function, diff --git a/libs/utils/include/utils/sstream.h b/libs/utils/include/utils/sstream.h index 605b678e6d3..58d14fefffb 100644 --- a/libs/utils/include/utils/sstream.h +++ b/libs/utils/include/utils/sstream.h @@ -17,11 +17,14 @@ #ifndef TNT_UTILS_SSTREAM_H #define TNT_UTILS_SSTREAM_H +#include #include +#include + namespace utils::io { -class sstream : public ostream { +class UTILS_PUBLIC sstream : public ostream { public: ostream& flush() noexcept override; const char* c_str() const noexcept; From 4c6d653d603437130d84697dc592da62954ce902 Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Wed, 5 Jun 2024 12:15:45 -0700 Subject: [PATCH 08/15] samples: Enable backend selection for hellopbr (#7898) --- samples/hellopbr.cpp | 69 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/samples/hellopbr.cpp b/samples/hellopbr.cpp index c38eca6dbbc..f5cae37706e 100644 --- a/samples/hellopbr.cpp +++ b/samples/hellopbr.cpp @@ -29,6 +29,10 @@ #include #include +#include + +#include + #include "generated/resources/resources.h" #include "generated/resources/monkey.h" @@ -39,6 +43,7 @@ using namespace filament::math; using Backend = Engine::Backend; struct App { + Config config; utils::Entity light; Material* material; MaterialInstance* materialInstance; @@ -48,13 +53,65 @@ struct App { static const char* IBL_FOLDER = "assets/ibl/lightroom_14b"; -int main(int argc, char** argv) { - Config config; - config.title = "hellopbr"; - config.iblDirectory = FilamentApp::getRootAssetsPath() + IBL_FOLDER; +static void printUsage(char* name) { + std::string exec_name(utils::Path(name).getName()); + std::string usage( + "EXEC renders a simple PBR example\n" + "Usage:\n" + " EXEC [options]\n" + "Options:\n" + " --help, -h\n" + " Prints this message\n\n" + " --api, -a\n" + " Specify the backend API: opengl, vulkan, or metal\n" + ); + const std::string from("EXEC"); + for (size_t pos = usage.find(from); pos != std::string::npos; pos = usage.find(from, pos)) { + usage.replace(pos, from.length(), exec_name); + } + std::cout << usage; +} +static int handleCommandLineArguments(int argc, char* argv[], App* app) { + static constexpr const char* OPTSTR = "ha:"; + static const struct option OPTIONS[] = { + { "help", no_argument, nullptr, 'h' }, + { "api", required_argument, nullptr, 'a' }, + { nullptr, 0, nullptr, 0 } + }; + int opt; + int option_index = 0; + while ((opt = getopt_long(argc, argv, OPTSTR, OPTIONS, &option_index)) >= 0) { + std::string arg(optarg ? optarg : ""); + switch (opt) { + default: + case 'h': + printUsage(argv[0]); + exit(0); + case 'a': + if (arg == "opengl") { + app->config.backend = Engine::Backend::OPENGL; + } else if (arg == "vulkan") { + app->config.backend = Engine::Backend::VULKAN; + } else if (arg == "metal") { + app->config.backend = Engine::Backend::METAL; + } else { + std::cerr << "Unrecognized backend. Must be 'opengl'|'vulkan'|'metal'.\n"; + exit(1); + } + break; + } + } + return optind; +} + +int main(int argc, char** argv) { App app; - auto setup = [config, &app](Engine* engine, View* view, Scene* scene) { + app.config.title = "hellopbr"; + app.config.iblDirectory = FilamentApp::getRootAssetsPath() + IBL_FOLDER; + handleCommandLineArguments(argc, argv, &app); + + auto setup = [config=app.config, &app](Engine* engine, View* view, Scene* scene) { auto& tcm = engine->getTransformManager(); auto& rcm = engine->getRenderableManager(); auto& em = utils::EntityManager::get(); @@ -100,7 +157,7 @@ int main(int argc, char** argv) { tcm.setTransform(ti, app.transform * mat4f::rotation(now, float3{ 0, 1, 0 })); }); - FilamentApp::get().run(config, setup, cleanup); + FilamentApp::get().run(app.config, setup, cleanup); return 0; } From 020668733a1a1104a232c6cfef8d338a8a21915b Mon Sep 17 00:00:00 2001 From: Serge Metral Date: Wed, 5 Jun 2024 14:58:31 -0700 Subject: [PATCH 09/15] Adding the begin frame message for later xtrace post processing. (#7903) BUG=343930963 --- filament/backend/src/vulkan/VulkanDriver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filament/backend/src/vulkan/VulkanDriver.cpp b/filament/backend/src/vulkan/VulkanDriver.cpp index 60669cc3398..7eed4d867cd 100644 --- a/filament/backend/src/vulkan/VulkanDriver.cpp +++ b/filament/backend/src/vulkan/VulkanDriver.cpp @@ -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 sch, From af2ecf201f5b9116cba84d0c6ca0593fae1d52f1 Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Fri, 7 Jun 2024 10:29:38 -0700 Subject: [PATCH 10/15] vk: workaround extension name length = 0 (adreno) (#7910) --- .../backend/src/vulkan/platform/VulkanPlatform.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/filament/backend/src/vulkan/platform/VulkanPlatform.cpp b/filament/backend/src/vulkan/platform/VulkanPlatform.cpp index aaa8c7d00e2..c08fb73e775 100644 --- a/filament/backend/src/vulkan/platform/VulkanPlatform.cpp +++ b/filament/backend/src/vulkan/platform/VulkanPlatform.cpp @@ -176,6 +176,12 @@ ExtensionSet getInstanceExtensions(ExtensionSet const& externallyRequiredExts = static_cast(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); } @@ -200,6 +206,12 @@ ExtensionSet getDeviceExtensions(VkPhysicalDevice device) { static_cast(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); } From 682150ceec4dc886c1602fb281422b8966debe01 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 7 Jun 2024 15:20:10 -0700 Subject: [PATCH 11/15] add debug option to disable sub-passes --- filament/src/details/Engine.h | 1 + filament/src/details/Renderer.cpp | 8 ++++++-- samples/gltf_viewer.cpp | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/filament/src/details/Engine.h b/filament/src/details/Engine.h index 972e446d552..b8cdb498773 100644 --- a/filament/src/details/Engine.h +++ b/filament/src/details/Engine.h @@ -598,6 +598,7 @@ class FEngine : public Engine { // capture to file. At the moment, only supported by the Metal backend. bool doFrameCapture = false; bool disable_buffer_padding = false; + bool disable_subpasses = false; } renderer; struct { bool debug_froxel_visualization = false; diff --git a/filament/src/details/Renderer.cpp b/filament/src/details/Renderer.cpp index 9066f6ed958..15094a07591 100644 --- a/filament/src/details/Renderer.cpp +++ b/filament/src/details/Renderer.cpp @@ -95,6 +95,8 @@ FRenderer::FRenderer(FEngine& engine) : &engine.debug.renderer.doFrameCapture); debugRegistry.registerProperty("d.renderer.disable_buffer_padding", &engine.debug.renderer.disable_buffer_padding); + debugRegistry.registerProperty("d.renderer.disable_subpasses", + &engine.debug.renderer.disable_subpasses); debugRegistry.registerProperty("d.shadowmap.display_shadow_texture", &engine.debug.shadowmap.display_shadow_texture); debugRegistry.registerProperty("d.shadowmap.display_shadow_texture_scale", @@ -596,12 +598,14 @@ void FRenderer::renderJob(RootArenaScope& rootArenaScope, FView& view) { hasColorGrading && msaaSampleCount <= 1 && !bloomOptions.enabled && !dofOptions.enabled && !taaOptions.enabled && - driver.isFrameBufferFetchSupported(), + driver.isFrameBufferFetchSupported() && + !engine.debug.renderer.disable_subpasses, .customResolve = msaaOptions.customResolve && msaaSampleCount > 1 && hasColorGrading && - driver.isFrameBufferFetchMultiSampleSupported(), + driver.isFrameBufferFetchMultiSampleSupported() && + !engine.debug.renderer.disable_subpasses, .translucent = needsAlphaChannel, .fxaa = hasFXAA, .dithering = hasDithering, diff --git a/samples/gltf_viewer.cpp b/samples/gltf_viewer.cpp index b846fea6f93..6b83316f1b9 100644 --- a/samples/gltf_viewer.cpp +++ b/samples/gltf_viewer.cpp @@ -856,6 +856,8 @@ int main(int argc, char** argv) { } ImGui::Checkbox("Disable buffer padding", debug.getPropertyAddress("d.renderer.disable_buffer_padding")); + ImGui::Checkbox("Disable sub-passes", + debug.getPropertyAddress("d.renderer.disable_subpasses")); ImGui::Checkbox("Camera at origin", debug.getPropertyAddress("d.view.camera_at_origin")); ImGui::Checkbox("Far Origin", &app.originIsFarAway); From 9917d4b7d9466b3add2018f0518b8febb55e7bff Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Mon, 10 Jun 2024 14:32:49 -0700 Subject: [PATCH 12/15] Null out pending edits once latched (#7916) Otherwise, we'd keep swapping between the edited version and the original, causing matdbg to not work. --- filament/src/details/Material.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filament/src/details/Material.cpp b/filament/src/details/Material.cpp index 790c3874c7c..b8fa8d2999b 100644 --- a/filament/src/details/Material.cpp +++ b/filament/src/details/Material.cpp @@ -661,7 +661,7 @@ bool FMaterial::hasPendingEdits() noexcept { void FMaterial::latchPendingEdits() noexcept { std::lock_guard const lock(mPendingEditsLock); - std::swap(mPendingEdits, mMaterialParser); + mMaterialParser.reset(mPendingEdits.release()); } /** From 43331d04e506b88dea9b1355267fe02a9145bfff Mon Sep 17 00:00:00 2001 From: Powei Feng Date: Tue, 11 Jun 2024 12:21:14 -0700 Subject: [PATCH 13/15] gltfio: [extended] Fix generated color default (#7917) Fixes #7905 --- libs/gltfio/src/extended/AssetLoaderExtended.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/gltfio/src/extended/AssetLoaderExtended.cpp b/libs/gltfio/src/extended/AssetLoaderExtended.cpp index 7261abfbf02..7cb4fb32309 100644 --- a/libs/gltfio/src/extended/AssetLoaderExtended.cpp +++ b/libs/gltfio/src/extended/AssetLoaderExtended.cpp @@ -207,7 +207,17 @@ std::vector computeGeometries(cgltf_primitive const* prim, uint8_t c size_t const requiredSize = byteCount * vertexCount; auto gendata = (uint8_t*) malloc(requiredSize); - memset(gendata, 0xff, requiredSize); + + if (vattr == filament::VertexAttribute::COLOR) { + // Assume white as the default if colors need to be generated. + float4* dataf = (float4*) gendata; + for (size_t i = 0; i < vertexCount; ++i) { + dataf[i] = float4(1.0, 1.0, 1.0, 1.0f); + } + } else { + memset(gendata, 0xff, requiredSize); + } + vslots.push_back({ .slot = slot, .sizeInBytes = requiredSize, From df34f92f8f68f55ae5a21a489c996b38b1410f6a Mon Sep 17 00:00:00 2001 From: Benjamin Doherty Date: Tue, 11 Jun 2024 16:42:09 -0700 Subject: [PATCH 14/15] Release Filament 1.52.3 --- NEW_RELEASE_NOTES.md | 2 -- README.md | 4 ++-- RELEASE_NOTES.md | 4 ++++ android/gradle.properties | 2 +- ios/CocoaPods/Filament.podspec | 4 ++-- web/filament-js/package.json | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index d6831f9f350..4a1a9c7fa7e 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -7,5 +7,3 @@ for next branch cut* header. appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). ## Release notes for next branch cut - -- engine: fix skinning normals with large transforms (b/342459864) [⚠️ **New Material Version**] diff --git a/README.md b/README.md index 19cae79da9c..b5bfa85a931 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation 'com.google.android.filament:filament-android:1.52.2' + implementation 'com.google.android.filament:filament-android:1.52.3' } ``` @@ -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.2' +pod 'Filament', '~> 1.52.3' ``` ### Snapshots diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2f435a36fe5..be8c42cb1a2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -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 diff --git a/android/gradle.properties b/android/gradle.properties index 42ffe525103..665aff2f68d 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.google.android.filament -VERSION_NAME=1.52.2 +VERSION_NAME=1.52.3 POM_DESCRIPTION=Real-time physically based rendering engine for Android. diff --git a/ios/CocoaPods/Filament.podspec b/ios/CocoaPods/Filament.podspec index 07efca5ee48..f9048285350 100644 --- a/ios/CocoaPods/Filament.podspec +++ b/ios/CocoaPods/Filament.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |spec| spec.name = "Filament" - spec.version = "1.52.2" + spec.version = "1.52.3" spec.license = { :type => "Apache 2.0", :file => "LICENSE" } spec.homepage = "https://google.github.io/filament" spec.authors = "Google LLC." spec.summary = "Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WASM/WebGL." spec.platform = :ios, "11.0" - spec.source = { :http => "https://github.com/google/filament/releases/download/v1.52.2/filament-v1.52.2-ios.tgz" } + spec.source = { :http => "https://github.com/google/filament/releases/download/v1.52.3/filament-v1.52.3-ios.tgz" } # Fix linking error with Xcode 12; we do not yet support the simulator on Apple silicon. spec.pod_target_xcconfig = { diff --git a/web/filament-js/package.json b/web/filament-js/package.json index 3f92b649838..57233b0a578 100644 --- a/web/filament-js/package.json +++ b/web/filament-js/package.json @@ -1,6 +1,6 @@ { "name": "filament", - "version": "1.52.2", + "version": "1.52.3", "description": "Real-time physically based rendering engine", "main": "filament.js", "module": "filament.js", From 6e3cccf30c72f798e5a4eedda0ab6a3730b6e934 Mon Sep 17 00:00:00 2001 From: Benjamin Doherty Date: Tue, 11 Jun 2024 16:42:17 -0700 Subject: [PATCH 15/15] Bump version to 1.53.0 --- README.md | 4 ++-- android/gradle.properties | 2 +- ios/CocoaPods/Filament.podspec | 4 ++-- web/filament-js/package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b5bfa85a931..b04cd6fa55d 100644 --- a/README.md +++ b/README.md @@ -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' } ``` @@ -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 diff --git a/android/gradle.properties b/android/gradle.properties index 665aff2f68d..3e27e614990 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -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. diff --git a/ios/CocoaPods/Filament.podspec b/ios/CocoaPods/Filament.podspec index f9048285350..45fce39806e 100644 --- a/ios/CocoaPods/Filament.podspec +++ b/ios/CocoaPods/Filament.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |spec| spec.name = "Filament" - spec.version = "1.52.3" + spec.version = "1.53.0" spec.license = { :type => "Apache 2.0", :file => "LICENSE" } spec.homepage = "https://google.github.io/filament" spec.authors = "Google LLC." spec.summary = "Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WASM/WebGL." spec.platform = :ios, "11.0" - spec.source = { :http => "https://github.com/google/filament/releases/download/v1.52.3/filament-v1.52.3-ios.tgz" } + spec.source = { :http => "https://github.com/google/filament/releases/download/v1.53.0/filament-v1.53.0-ios.tgz" } # Fix linking error with Xcode 12; we do not yet support the simulator on Apple silicon. spec.pod_target_xcconfig = { diff --git a/web/filament-js/package.json b/web/filament-js/package.json index 57233b0a578..56b18b1cf46 100644 --- a/web/filament-js/package.json +++ b/web/filament-js/package.json @@ -1,6 +1,6 @@ { "name": "filament", - "version": "1.52.3", + "version": "1.53.0", "description": "Real-time physically based rendering engine", "main": "filament.js", "module": "filament.js",