From 76be9a444bfb1db977a74f1282ee8e9eb5643885 Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 14:16:39 +0200
Subject: [PATCH 1/6] Update BN commitid
---
Package/gulpfile.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Package/gulpfile.js b/Package/gulpfile.js
index 2d498c74e..236c16f94 100644
--- a/Package/gulpfile.js
+++ b/Package/gulpfile.js
@@ -230,7 +230,7 @@ const createPackage = async () => {
exec('npm pack', 'Assembled');
};
-const COMMIT_ID = 'ce2edf0851e0c8483559832a4f8eb9d39c6b2f53';
+const COMMIT_ID = 'b9aab7a366a0b0e81e65945449a3dd9960609d78';
const ZIP_URL = `https://github.com/BabylonJS/BabylonNative/archive/${COMMIT_ID}.zip`;
const TARGET_DIR = path.resolve(__dirname, '../Modules/@babylonjs/react-native/shared/BabylonNative');
const ZIP_PATH = path.join(TARGET_DIR, `${COMMIT_ID}.zip`);
From 6bd791c73ff9210d694af8fe805908fced5fe2f6 Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 14:50:38 +0200
Subject: [PATCH 2/6] related updates
---
Modules/@babylonjs/react-native/README.md | 2 +-
.../@babylonjs/react-native/react-native-babylon.podspec | 6 +-----
.../react-native/shared/BabylonNative/CMakeLists.txt | 1 -
.../windows/BabylonReactNative/BabylonReactNative.vcxproj | 5 -----
4 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/Modules/@babylonjs/react-native/README.md b/Modules/@babylonjs/react-native/README.md
index 166e8d4f0..66c9c38df 100644
--- a/Modules/@babylonjs/react-native/README.md
+++ b/Modules/@babylonjs/react-native/README.md
@@ -74,7 +74,7 @@ Babylon.js minimal version:
|BabylonReactNative version | Babylon.js version | BabylonNative commit |
| ----------- | ------------------------ | --- |
-|2.0.2 | 9.0.0 | ce2edf0851e0c8483559832a4f8eb9d39c6b2f53
+|2.0.2 | 9.0.0 | b9aab7a366a0b0e81e65945449a3dd9960609d78
|2.0.0 | 8.3.0 | 6c25966e8f8c0f3a0c13fdf77064f1bde790391f
diff --git a/Modules/@babylonjs/react-native/react-native-babylon.podspec b/Modules/@babylonjs/react-native/react-native-babylon.podspec
index c1e80889d..8e2ffe593 100644
--- a/Modules/@babylonjs/react-native/react-native-babylon.podspec
+++ b/Modules/@babylonjs/react-native/react-native-babylon.podspec
@@ -32,7 +32,6 @@ items = ['/shared/BabylonNative/Repo/Polyfills/Canvas',
'/_deps/glslang-build/OGLCompilersDLL',
'/_deps/glslang-build/SPIRV',
'/_deps/urllib-build',
- '/_deps/libwebp-build',
'/_deps/jsruntimehost-build/Polyfills/XMLHttpRequest',
'/_deps/jsruntimehost-build/Polyfills/Scheduling',
'/_deps/jsruntimehost-build/Core/JsRuntime',
@@ -102,10 +101,7 @@ Pod::Spec.new do |s|
'Window',
'XMLHttpRequest',
'ShaderCache',
- 'ShaderCompiler',
- 'webp',
- 'metal-cpp',
- 'sharpyuv']
+ 'ShaderCompiler']
if ENV['BABYLON_NATIVE_PLUGIN_NATIVECAMERA'] != '0'
libs << 'NativeCamera'
diff --git a/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt b/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt
index be49daed7..5e0aa01c2 100644
--- a/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt
+++ b/Modules/@babylonjs/react-native/shared/BabylonNative/CMakeLists.txt
@@ -10,7 +10,6 @@ set(FETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS "${CMAKE_CURRENT_SOURCE_DIR}/deps/cm
set(FETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsruntimehost-src")
set(FETCHCONTENT_SOURCE_DIR_URLLIB "${CMAKE_CURRENT_SOURCE_DIR}/deps/urllib-src")
set(FETCHCONTENT_SOURCE_DIR_SPIRV-CROSS "${CMAKE_CURRENT_SOURCE_DIR}/deps/spirv-cross-src")
-set(FETCHCONTENT_SOURCE_DIR_LIBWEBP "${CMAKE_CURRENT_SOURCE_DIR}/deps/libwebp-src")
set(FETCHCONTENT_SOURCE_DIR_GLSLANG "${CMAKE_CURRENT_SOURCE_DIR}/deps/glslang-src")
set(FETCHCONTENT_SOURCE_DIR_BASE-N "${CMAKE_CURRENT_SOURCE_DIR}/deps/base-n-src")
set(FETCHCONTENT_SOURCE_DIR_IOS-CMAKE "${CMAKE_CURRENT_SOURCE_DIR}/deps/ios-cmake-src")
diff --git a/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj b/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj
index 9fdeec3b5..557fab908 100644
--- a/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj
+++ b/Modules/@babylonjs/react-native/windows/BabylonReactNative/BabylonReactNative.vcxproj
@@ -148,7 +148,6 @@
$(BabylonNativeBuildDir)_deps\jsruntimehost-build\Polyfills\XMLHttpRequest\$(Configuration);
$(BabylonNativeBuildDir)_deps\jsruntimehost-build\Core\Foundation\$(Configuration);
$(BabylonNativeBuildDir)_deps\urllib-build\$(Configuration);
- $(BabylonNativeBuildDir)_deps\libwebp-build\$(Configuration);
$(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bgfx\$(Configuration);
$(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bx\$(Configuration);
$(BabylonNativeBuildDir)_deps\bgfx.cmake-build\cmake\bimg\$(Configuration);
@@ -207,8 +206,6 @@
SPIRVd.lib;
UrlLib.lib;
Window.lib;
- libwebp.lib;
- libsharpyuv.lib;
Scheduling.lib;
XMLHttpRequest.lib;
WindowsApp.lib;
@@ -269,8 +266,6 @@
Scheduling.lib;
XMLHttpRequest.lib;
WindowsApp.lib;
- libwebp.lib;
- libsharpyuv.lib;
%(AdditionalDependencies);
%(AdditionalOptions)
From 3633bb3e3f09cab7cb71c41b34775fb7dcc15ae5 Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 14:57:42 +0200
Subject: [PATCH 3/6] sse for bx
---
Modules/@babylonjs/react-native/android/CMakeLists.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Modules/@babylonjs/react-native/android/CMakeLists.txt b/Modules/@babylonjs/react-native/android/CMakeLists.txt
index 79782c3b9..369c74959 100644
--- a/Modules/@babylonjs/react-native/android/CMakeLists.txt
+++ b/Modules/@babylonjs/react-native/android/CMakeLists.txt
@@ -71,6 +71,16 @@ add_library(jsi ALIAS ReactAndroid::jsi)
set(BABYLON_NATIVE_BUILD_APPS OFF CACHE BOOL "")
set(BABYLON_REACT_NATIVE_SHARED_DIR "${CMAKE_CURRENT_LIST_DIR}/../shared")
set(BABYLON_NATIVE_PLUGIN_NATIVEENGINE_WEBP OFF CACHE BOOL "")
+
+# bx's simd128_sse.inl uses SSE4.1 intrinsics (_mm_blendv_ps, _mm_round_ps) under
+# its "SSE4.2 minspec" assumption. Babylon Native only adds -msse4.2 for desktop
+# x86_64 (its guard excludes ANDROID). The x86_64 Android ABI already mandates
+# SSE4.2, but the 32-bit x86 ABI baseline is only SSSE3, so bx fails to compile
+# there without this flag.
+if(ANDROID_ABI STREQUAL "x86" OR ANDROID_ABI STREQUAL "x86_64")
+ add_compile_options(-msse4.2)
+endif()
+
add_subdirectory(${BABYLON_REACT_NATIVE_SHARED_DIR} ${CMAKE_CURRENT_BINARY_DIR}/shared)
if (TARGET NativeXr)
From 658242d2622a97dea83c499bd0e759fefd70d84f Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 16:14:12 +0200
Subject: [PATCH 4/6] up BN
---
Apps/Playground/android/gradle.properties | 4 +++-
.../@babylonjs/react-native/android/CMakeLists.txt | 10 ----------
Modules/@babylonjs/react-native/android/build.gradle | 11 ++++++++++-
Package/gulpfile.js | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/Apps/Playground/android/gradle.properties b/Apps/Playground/android/gradle.properties
index 2a9e5673c..10e55c7dd 100644
--- a/Apps/Playground/android/gradle.properties
+++ b/Apps/Playground/android/gradle.properties
@@ -32,7 +32,9 @@ android.jetifier.ignorelist=hermes-android
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew -PreactNativeArchitectures=x86_64
-reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
+# NOTE: the 32-bit x86 ABI is not supported. bgfx's bx requires SSE4.x
+# intrinsics, which are above the Android x86 ABI baseline (SSSE3).
+reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86_64
# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
diff --git a/Modules/@babylonjs/react-native/android/CMakeLists.txt b/Modules/@babylonjs/react-native/android/CMakeLists.txt
index 369c74959..79782c3b9 100644
--- a/Modules/@babylonjs/react-native/android/CMakeLists.txt
+++ b/Modules/@babylonjs/react-native/android/CMakeLists.txt
@@ -71,16 +71,6 @@ add_library(jsi ALIAS ReactAndroid::jsi)
set(BABYLON_NATIVE_BUILD_APPS OFF CACHE BOOL "")
set(BABYLON_REACT_NATIVE_SHARED_DIR "${CMAKE_CURRENT_LIST_DIR}/../shared")
set(BABYLON_NATIVE_PLUGIN_NATIVEENGINE_WEBP OFF CACHE BOOL "")
-
-# bx's simd128_sse.inl uses SSE4.1 intrinsics (_mm_blendv_ps, _mm_round_ps) under
-# its "SSE4.2 minspec" assumption. Babylon Native only adds -msse4.2 for desktop
-# x86_64 (its guard excludes ANDROID). The x86_64 Android ABI already mandates
-# SSE4.2, but the 32-bit x86 ABI baseline is only SSSE3, so bx fails to compile
-# there without this flag.
-if(ANDROID_ABI STREQUAL "x86" OR ANDROID_ABI STREQUAL "x86_64")
- add_compile_options(-msse4.2)
-endif()
-
add_subdirectory(${BABYLON_REACT_NATIVE_SHARED_DIR} ${CMAKE_CURRENT_BINARY_DIR}/shared)
if (TARGET NativeXr)
diff --git a/Modules/@babylonjs/react-native/android/build.gradle b/Modules/@babylonjs/react-native/android/build.gradle
index 52894ac97..eceddcac2 100644
--- a/Modules/@babylonjs/react-native/android/build.gradle
+++ b/Modules/@babylonjs/react-native/android/build.gradle
@@ -39,7 +39,16 @@ apply plugin: 'kotlin-android'
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
- return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
+ def architectures = value ? value.split(",").collect { it.trim() } : ["armeabi-v7a", "x86_64", "arm64-v8a"]
+ // The 32-bit x86 ABI is not supported: bgfx's bx uses SSE4.x intrinsics
+ // (_mm_blendv_ps, _mm_round_ps), which are above the Android x86 ABI baseline
+ // of SSSE3 and fail to compile. Drop it rather than break the whole build for
+ // consumers still carrying x86 in the React Native default property.
+ def unsupported = architectures.findAll { it == "x86" }
+ if (!unsupported.isEmpty()) {
+ logger.warn("BabylonReactNative: skipping unsupported ABI 'x86' (requires SSE4.x, unavailable on the Android x86 baseline).")
+ }
+ return architectures - unsupported
}
static def findNodeModules(baseDir) {
diff --git a/Package/gulpfile.js b/Package/gulpfile.js
index 236c16f94..9bb01dfb0 100644
--- a/Package/gulpfile.js
+++ b/Package/gulpfile.js
@@ -230,7 +230,7 @@ const createPackage = async () => {
exec('npm pack', 'Assembled');
};
-const COMMIT_ID = 'b9aab7a366a0b0e81e65945449a3dd9960609d78';
+const COMMIT_ID = 'a4031689b3c4ec08062f0e044b67970eb2382c9f';
const ZIP_URL = `https://github.com/BabylonJS/BabylonNative/archive/${COMMIT_ID}.zip`;
const TARGET_DIR = path.resolve(__dirname, '../Modules/@babylonjs/react-native/shared/BabylonNative');
const ZIP_PATH = path.join(TARGET_DIR, `${COMMIT_ID}.zip`);
From 0ed4a40f77489479da97845d1f26d23e0d75b0af Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 16:47:55 +0200
Subject: [PATCH 5/6] use macos15
---
.github/workflows/android.yml | 2 +-
.github/workflows/ios.yml | 2 +-
.github/workflows/package.yml | 2 +-
.github/workflows/publish.yml | 2 +-
.github/workflows/publish_preview.yml | 2 +-
.github/workflows/test_android.yml | 2 +-
.github/workflows/test_ios.yml | 2 +-
.github/workflows/typescript.yml | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 587afac3a..5045777e7 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -4,7 +4,7 @@ on:
jobs:
build-android:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index 647e40dff..e2f074826 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -5,7 +5,7 @@ on:
jobs:
build-iOS:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
index acec94c3a..3317003ed 100644
--- a/.github/workflows/package.yml
+++ b/.github/workflows/package.yml
@@ -4,7 +4,7 @@ on:
jobs:
package:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 43291c2f1..ead4c1b27 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -13,7 +13,7 @@ jobs:
uses: ./.github/workflows/package.yml
publish:
- runs-on: macos-latest
+ runs-on: macos-15
needs: [package]
steps:
- name: Setup Node.js
diff --git a/.github/workflows/publish_preview.yml b/.github/workflows/publish_preview.yml
index e632f7f5c..fb96e64d8 100644
--- a/.github/workflows/publish_preview.yml
+++ b/.github/workflows/publish_preview.yml
@@ -22,7 +22,7 @@ jobs:
uses: ./.github/workflows/package.yml
publish:
- runs-on: macos-latest
+ runs-on: macos-15
needs: [package]
steps:
- name: Setup Node.js
diff --git a/.github/workflows/test_android.yml b/.github/workflows/test_android.yml
index 44101829e..ee71632dd 100644
--- a/.github/workflows/test_android.yml
+++ b/.github/workflows/test_android.yml
@@ -5,7 +5,7 @@ on:
jobs:
build-test-android:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
diff --git a/.github/workflows/test_ios.yml b/.github/workflows/test_ios.yml
index 1512f7591..38a9123b9 100644
--- a/.github/workflows/test_ios.yml
+++ b/.github/workflows/test_ios.yml
@@ -5,7 +5,7 @@ on:
jobs:
build-test-iOS:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml
index 7fd954d80..70a833b70 100644
--- a/.github/workflows/typescript.yml
+++ b/.github/workflows/typescript.yml
@@ -4,7 +4,7 @@ on:
workflow_call
jobs:
Build:
- runs-on: macos-latest
+ runs-on: macos-15
steps:
- name: Checkout Repo
uses: actions/checkout@v4.2.2
From 576ee190668570ece3e1e3294a6326f6d6d40036 Mon Sep 17 00:00:00 2001
From: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Date: Thu, 30 Jul 2026 17:20:00 +0200
Subject: [PATCH 6/6] metal-cpp
---
Package/gulpfile.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Package/gulpfile.js b/Package/gulpfile.js
index 9bb01dfb0..178a95281 100644
--- a/Package/gulpfile.js
+++ b/Package/gulpfile.js
@@ -380,7 +380,10 @@ const buildBabylonNativeSourceTree = async () => {
deleteFolderRecursive(`${UNZIP_FOLDER}/Install`);
// dependencies cleanup
- deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/3rdparty`, ['renderdoc', 'stb', 'sdf']);
+ // Keep only the 3rdparty folders that bgfx/src actually includes:
+ // renderdoc (debug_renderdoc.cpp), metal-cpp (renderer_mtl.h), h264 (video.h),
+ // plus stb/sdf.
+ deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/3rdparty`, ['renderdoc', 'stb', 'sdf', 'metal-cpp', 'h264']);
deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/examples`,['common']);
deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/bindings`);
deleteFolderRecursive(`${DEPS_OUTPUT_DIR}/bgfx.cmake-src/bgfx/docs`);