Skip to content

Restore the JsRuntimeHost pin lost in the master merge - #12

Merged
CedricGuillemet merged 4 commits into
CedricGuillemet:nativeDawnfrom
bkaradzic-microsoft:nativeDawn-fixes
Aug 25, 2026
Merged

Restore the JsRuntimeHost pin lost in the master merge#12
CedricGuillemet merged 4 commits into
CedricGuillemet:nativeDawnfrom
bkaradzic-microsoft:nativeDawn-fixes

Conversation

@bkaradzic-microsoft

Copy link
Copy Markdown
Collaborator

The nativeDawn branch currently aborts partway through the validation sweep. Merging master in resolved the CMakeLists.txt conflict in favour of master's JsRuntimeHost pin, reverting this branch from cb988ba (JsRuntimeHost master) to 9271f13 from four weeks earlier and silently dropping three fixes:

Losing BabylonJS#227 reintroduced the promise leak. The sweep went from completing to aborting, with peak private bytes more than doubling.

result peak
before the merge ran=632 passed=628 5397 MB
after the merge crash (exit 3) at Sponza Clustered Lighting (node material pbr) 12134 MB
with the pin restored ran=632 passed=627, 0 validation errors 5797 MB

The one-test delta is Iridescence NME, a known flake that passes in isolation at 0.250% against a 2.5% tolerance. The other four failures are the pre-existing Draco WASM LinkErrors.

cb988ba is current JsRuntimeHost master, so this is a restore rather than a bump. Note that BabylonJS/BabylonNative master is still on 9271f13 and carries the same promise leak on the V8 path.

Merging master into nativeDawn resolved the CMakeLists.txt conflict in
favour of master's pin, reverting the branch from cb988ba (JsRuntimeHost
master) back to 9271f13 from four weeks earlier. That silently dropped
three fixes:

  BabylonJS#223 keep escaped handles alive when their escapable scope closes
  BabylonJS#225 QuickJS: report success from the napi_throw family
  BabylonJS#227 Fix V8 N-API leaking every promise ever created

Losing BabylonJS#227 reintroduced the promise leak, and the full validation sweep
went from completing to aborting partway through with peak private bytes
climbing from 5.4 GB to 12.1 GB.

  before: ran=632 passed=628, peak 5397 MB
  merged: crash at 'Sponza Clustered Lighting (node material pbr)',
          exit 3, peak 12134 MB
  after:  ran=632 passed=627, peak 5797 MB, 0 validation errors

The remaining delta is Iridescence NME, a known flake that passes in
isolation (0.250% against a 2.5% tolerance); the other four are the
pre-existing Draco WASM LinkErrors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88569c10-a7ff-4373-9a58-afa9c68b8c09
@bkaradzic-microsoft

Copy link
Copy Markdown
Collaborator Author

Upstream now carries this pin too: BabylonJS#1848 merged as e748ec4b, moving master from 9271f13 to cb988ba.

That makes this PR a straight alignment with master rather than a branch-local override, and it means the next master merge into nativeDawn can no longer re-revert it — the conflict that caused this regression in the first place is gone.

bkaradzic and others added 3 commits August 24, 2026 14:05
…e stale reasons

Five tests were excluded on every graphics API because bgfx/D3D11 fails
them, even though their own recorded reason said Dawn passes. Dropping
WebGPU from excludedGraphicsApis keeps bgfx quarantined while restoring
the coverage on Dawn:

  SOGS with SH no texture lookup                    0.019% (allowed 5%)
  Gaussian Splatting Debug Part Test                1.530% (allowed 5%)
  Gaussian Splatting Debug Part Auto Tracking Test  2.190% (allowed 5%)
  Gaussian Splatting Part Serialize Test            0.748% (allowed 5%)
  needDepthPrePass extended material families       exact match

All five were re-measured in isolation and then in a full in-order sweep,
so none of them depends on running alone.

Three more carried the same "Dawn passes this test" claim but do not.
Re-measured and recorded what they actually do:

  Gaussian Splatting GLTF  36.513% off (allowed 2.5%)
  Sprite maps              96.170% off (allowed 2.5%)
  GUI                       4.066% off (allowed 4%)

Sweep: ran=637 passed=633 failed=4, zero validation errors. The four
failures are the pre-existing Draco WASM LinkErrors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88569c10-a7ff-4373-9a58-afa9c68b8c09
The device descriptor requested no optional features at all. Features are
opt-in exactly like limits, and requestDevice() hands the JS layer this one
pre-created device, so every optional capability the hardware had was
permanently invisible to Babylon.js.

The most visible casualty was float32-filterable. Without it r32float and
rgba32float textures are UnfilterableFloat, so pairing one with a filtering
sampler fails validation with "None of the supported sample types
(UnfilterableFloat) ... match the expected sample types (Float)", taking the
whole render pass and command buffer down with it. Across the OpenPBR
anisotropy tests that was 264 validation errors; it is now 0, and 18 of those
23 tests render correctly (several pixel-exact) where all 23 failed before.

Dawn's own extensions start at 0x00050000 and are excluded: several change
device semantics or need matching toggles.

Full sweep: ran=636 passed=632, the 4 failures being the pre-existing Draco
WASM LinkError tests. No measurable runtime cost (7m23s vs 7m48s before).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88569c10-a7ff-4373-9a58-afa9c68b8c09
Requesting the adapter's standard features unblocked a large batch of tests
that were globally excluded. Re-probing all 180 globally-excluded tests with
features enabled found 85 now rendering correctly, against 21 on the same
probe before that change -- the new passes are almost entirely float-texture
work (IBL/CDF prefiltering, OpenPBR, voxel and screen-space shadowing, IES
profiles), several of whose exclusion reasons literally read "CDF renderer /
IBL prefiltering fails with 'FLOAT' undefined".

These stay excluded on bgfx, where they still crash, hang or mis-render, so
each entry swaps excludeFromAutomaticTesting for the non-WebGPU API list and
keeps its original reason.

Two of the 85 are deliberately left quarantined: "SOGS with SH" and "Draco
Mesh Compression (fallback)" pass in an excluded-only chunk but their own
reasons already document them aborting or drifting after earlier tests in a
full run, which the sweep confirmed.

Full in-order sweep: ran=719 passed=715, up from ran=636 passed=632. The 4
failures are the same pre-existing Draco WASM ones, unchanged by this commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88569c10-a7ff-4373-9a58-afa9c68b8c09
@CedricGuillemet
CedricGuillemet merged commit eeb4276 into CedricGuillemet:nativeDawn Aug 25, 2026
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