Skip to content

Update Babylon.js to 9.31.3 - #1958

Merged
bkaradzic-microsoft merged 7 commits into
BabylonJS:masterfrom
bkaradzic-microsoft:deps/babylonjs-9.31.3
Oct 22, 2026
Merged

bkaradzic-microsoft merged 7 commits into
BabylonJS:masterfrom
bkaradzic-microsoft:deps/babylonjs-9.31.3

Conversation

@bkaradzic-microsoft

@bkaradzic-microsoft bkaradzic-microsoft commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Updates the Babylon.js npm packages from 9.29.0 to 9.31.3, the latest published version. This picks up BabylonJS/Babylon.js#19005 ([Native] NativeEngine rendering parity).

  • Apps/package.json: the eight runtime babylonjs* packages.
  • Apps/UnitTests/JavaScript/package.json: babylonjs, babylonjs-materials, @babylonjs/core, @babylonjs/materials.
  • Apps/package-lock.json: regenerated with npm install --package-lock-only. Only the Babylon.js entries change.

No reference images change. Babylon.js changed none of the reference images or test entries BN uses between 9.29.0 and 9.31.3.

Validation tests

Apps/Playground/Scripts/config.json enables 173 of the 249 tests that had excludeFromAutomaticTesting, raising enabled tests from 471 to 644 (5 of them, the IBL Voxel/Screen-space Shadowing tests, are excluded on D3D11; see below). Each excluded test was run on its own on Win32 D3D11 V8, and the ones that passed are enabled.

Enabled tests by previous exclusion reason:

Previous reason Tests
Pixel comparison fails (more than 20% pixels differ) 103
GPUParticleSystem ARRAY_BUFFER TypeError 34
Test crashes or hangs 20
CDF renderer / IBL prefiltering FLOAT undefined 6
Other (missing Image, cubemap load, texture formats, asset loads, FrameGraph hang, and others) 10

3 tests pass on their own but fail pixel comparison when they run after other tests in the same process, so they stay excluded with an updated reason: Order independent transparency (fails after Reverse depth buffer and CSM shadows), Command encoder order in WebGPU 1, and OpenPBR Thin Walled Subsurface Transmission Blending - IBL.

Runner fix: reset stencil state between tests

cube-with-holes-using-stencil-buffer sets the stencil function, mask, and operations directly on the engine. cleanupAfterTest in validation_native.js only called setStencilBuffer(false), so the rest leaked into later tests and broke both FrameGraph (nrge) highlight layer tests. Cleanup now restores the full StencilState defaults, and those two tests are enabled.

OpenGL exclusions

76 of the enabled tests fail on Ubuntu JSC (Mesa llvmpipe), so they get "excludedGraphicsApis": ["OpenGL"] with a reason. They were checked one by one in an Ubuntu 24.04 environment that matches the CI runner.

OpenGL failure Tests
Particle shader Error compiling effect 38
4x MSAA render target format not supported 21
llvmpipe crash (LLVM ERROR: Cannot emit physreg copy instruction, SSAO) 7
Pixel comparison fails (3.4–4.4%) 4
Motion blur instances (4.7–10.7%) 3
No depth/stencil format 2
Timeout 1

Win32 CI hang: device loss on WARP

The Win32 V8 job hung on GitHub's GPU-less runners, where D3D11 runs on the WARP software rasterizer. A hang dump showed m_deviceLost = true with every thread idle. The IBL Voxel Shadowing and IBL Screen-space Shadowing tests remove the device (DXGI_ERROR_DEVICE_REMOVED) on that WARP. Every later test then failed its readback with operation canceled until one waited forever. Locally, under WARP on Windows 11, these tests pass.

  • config.json: the five IBL Voxel/Screen-space Shadowing tests are excluded on D3D11 only. They still run on OpenGL.
  • validation_native.js: once a framebuffer readback is canceled, the runner reports the test that was running and stops the run with a failure, instead of continuing on a lost device.

Local results: Win32 D3D11 V8 644/644, run as two processes (323/323 + 321/321; also the first half under WARP: 323/323); Ubuntu 24.04 JSC OpenGL 517/517.

In one process, test memory growth (~20 MB per test) reaches ~8 GB near the end of the Win32 suite. That is not addressed in this PR.

Picks up BabylonJS/Babylon.js#19005 (NativeEngine rendering parity).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The dependency updates are consistent, but the upstream NativeEngine rendering changes need integration validation against Babylon Native before approval.

No open issues 🎉

1 file not reviewed
  • Apps/package-lock.json: Generated file
What changed in this PR

Updates Babylon.js from 9.29.0 to 9.31.3 across the applications and JavaScript unit tests to pick up upstream NativeEngine rendering parity improvements.

Changes:

  • Updates eight runtime packages and four unit-test dependencies.
  • Synchronizes Babylon.js versions, package URLs, and integrity hashes in the shared lockfile without unrelated dependency changes.
File Description
Apps/​UnitTests/​JavaScript/​package.json Updates Babylon.js test dependencies to 9.31.3.
Apps/​package.json Updates eight Babylon.js runtime dependencies to 9.31.3.
Apps/​package-lock.json Locks the updated packages and synchronizes workspace declarations.

Review effort: Balanced

Babylon.js 9.31.3 includes BabylonJS/Babylon.js#19005 (NativeEngine rendering
parity). Every test with excludeFromAutomaticTesting was run individually on
Win32 D3D11 V8; the 176 that pass are enabled.

Three motion blur instance tests regress on OpenGL with 9.31.3 (4.7-10.7% pixel
diff on Ubuntu JSC), so they are excluded on OpenGL only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
bkaradzic-microsoft and others added 5 commits October 21, 2026 17:53
…sitive tests

- Exclude 74 newly enabled tests on OpenGL (Ubuntu JSC llvmpipe): unsupported
  MSAA render target formats, particle effect compile errors, llvmpipe
  crashes, pixel diffs, and a timeout. Each has a reason.
- Run Win32 validation (GitHub and the Azure nightly) as two interleaved
  shards. Tests leak ~20 MB each, so one process for the whole suite reaches
  ~8 GB and crashes or hangs near the end.
- Re-exclude 5 tests that pass in isolation but fail after other tests in
  the same process (329, 384, 436, 457, 601).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
…watchdog

- validation_native.js: cleanupAfterTest now restores the full StencilState
  defaults (mask, func, ref, func mask, ops). "cube-with-holes-using-stencil-buffer"
  set them directly on the engine and leaked them into later tests (457, 436).
- config.json: re-enable 436 and 457 (OpenGL still excluded); refine the
  reasons for the remaining order-sensitive exclusions (329, 384, 601).
- build-win32.yml: give each validation shard a 30 min timeout; on timeout,
  write a full dump (uploaded with crash dumps) and kill the process so a hang
  fails fast instead of running into the 180 min job timeout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
The Win32 V8 CI job hung because "IBL Voxel Shadowing" and its Left-Handed
variant remove the D3D11 device (DXGI_ERROR_DEVICE_REMOVED) on the WARP
software rasterizer of GPU-less runners. Every later test then failed its
readback ("operation canceled") until one waited forever. The hang dump
showed m_deviceLost = true with all threads idle.

- config.json: exclude the three IBL Voxel Shadowing tests on D3D11. They
  pass on hardware D3D11 and on OpenGL.
- validation_native.js: once a framebuffer readback is canceled, report the
  test that was running and stop the run with a failure instead of
  continuing on a lost device.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
Like the voxel variants, both IBL Screen-space Shadowing tests remove the
D3D11 device on the WARP rasterizer of GPU-less CI runners. The new
readback-cancel abort reported them right away.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c1f8e152-c900-4b79-8de8-309df92cbceb
Run the Win32 and nightly validation suites in one process again, as on
master. Sharding worked around tests leaking memory (~8 GB by the end of
the suite); that leak should be fixed rather than hidden in CI scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae

@bghgary bghgary left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Reviewed by Copilot on behalf of @bghgary]

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants