feat(wasm): run relinked titles in the browser with WebGPU #6879
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6879"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-16T15:44:24Z.
What
Temporarily closed to land the focused prerequisites one at a time. The relinker fix #10017 has merged; #11341 is the active Emscripten library-portability prerequisite. The integration remains preserved on
SteelCrab:feat/wasm-browseratbf328da04a4b2ac2638b6b85f912b30bd02e6c2d. Resume the runtime topic after the prerequisites merge, then reduce, rebase and rerun the full runtime verification.Runtime integration for translated titles using Emscripten memory64 and WebGPU. Build and run instructions:
docs/dev/WASM_RUNTIME.md.The focused prerequisite topics and intended landing order are listed below. Each PR's Tested section records its own base, validation and CI ownership:
relinkerlibrary-portabilitynative-compatibility-and-wgslrust-translatorThe runtime integration stays closed while the focused prerequisites land. #10017 has merged, #11341 replaces closed #9092 as the active library topic, and the shader/translator prerequisites remain staged for later. The first merged contribution raises the open-PR limit to 20; sequential staging is retained for focused review. Full native CI still requires a maintainer dispatch.
This head still contains the integration bundle and conflicts with main. After the remaining prerequisites merge, rebase it to remove their copies and leave the runtime, its web/tools files, docs and build/CI wiring. Runtime-specific library adapters must be kept within that runtime topic during the reduction. Then rerun the complete verification on that reduced head and replace Tested with those exact results.
The independent native
GuestBesselSecondKindZerocorrection, its native regression additions and its debt removal have now been dropped from this PR's effective diff. The preserved integration head predates merged #8864; its next rebase must inherit that correction. In this preserved head, the WebAssembly portability guard omits the unavailable host fenv call and does not setmxcsr |= 4. #8864 owns the native correction and is already merged.Tested
Historical staging checks before temporary closure: Ubuntu 26.04.1 x86-64, GCC 15.2, Emscripten 6.0.12, Node 26.12.0 and Rust 1.98.0.
Math.cpp,Bessel.cppandProcess.cppand passed after dropping the independent correction.MathTests.cppcompiled with this head'sMath.cppandProcess.cppand passed under Node 26. This covers seeded guest MXCSR/errno preservation for signed-zero Bessel calls, binary128 NaNs and hyperbolic-helper exceptions.cargo test --release --locked --manifest-path core/wasm-aot/Cargo.toml -- --nocapturewas executed locally: 98 passed, 0 failed, 4 explicitly ignored on the current integration sources. The isolated #9096 extraction has a fifth ignored case for production-runtime coverage.tools/check_conventions.py --base origin/mainpasses. The complete PR Conventions check remains unresolved while the current-main and one-topic checklist entries are false. They will be checked after the actual reduction and rebase.Runtime claim ownership:
emscripten-runtimeanyps5-runtime-webandanyps5-runtime-test; full build not rerun for this staging-only revision.emscripten-runtimewasm_platform,wasm_math,wasm_web_scriptsCTest cases and generated-NID-thunk Python tests. Only the focused math check was rerun in this staging revision.emscripten-runtimecargo ... --test runtime -- --ignoredruns the test-host case. On the reduced head, also buildanyps5-runtime-node, exportANYPS5_WASM_RUNTIME_NODE, and run both cases introduced by #9096; this post-merge verification remains pending.emscripten-runtimeThe separate prerequisite PRs contain their current local test counts and remote Conventions links. The Emscripten and WGSL workflow runs expired awaiting maintainer approval before creating any jobs; they are not passing remote build results.
The full runtime-only rebase, complete runtime build, both Node runtime cases, shader validation and browser verification have not been rerun on a reduced head: the prerequisite PRs are unmerged. Earlier integration and candidate-branch results recorded in this PR's history are not results for that future head.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T10:37:32Z.
Progress report (
a07e985→6f459b6)📈 System libraries: 60.48% (+0.02%, +4 implemented, +1 declared functions)
✅ 4 implemented
longjmp_nid_postfixsetjmp_nid_postfixsiglongjmp_nid_postfixsigsetjmp_nid_postfix🆕 1 declared as stubs
getcontext_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T10:38:19Z.
Review: CHANGES_REQUESTED
Thanks, this is an ambitious piece of work. In its current form it can't be reviewed or merged as one PR:
core/wasm-aottranslator, the Emscriptencore/wasm-runtime(GPU thread, audio, input, saves), the WGSL backend and recompiler cache-key changes, ~33 files acrosscore/libs/prx, rootCMakeLists.txtand docs (179 files, +22955). Please split along those lines, each with its own tests and a "Depends on" chain: (1)fix(relinker)imports keepSTT_OBJECT/STT_FUNC(small, can go first), (2) the libs changes that only let sources build under Emscripten, (3) the WGSL backend + cache key (native tests, SPIR-V output unchanged), (4)wasm-aot, (5)wasm-runtime.mainthat need your attention:core/libs/prx/libc/src/GuestArena.cpp,core/shader/recompiler/CacheKey.hpp,Recompiler.cpp,Recompiler.hpp,ShaderDiskCache.cpp.cargo testforcore/wasm-aotand the shader check (anyps5-wgsl, naga,wgsl-check). Please rerun them on the rebased head and update Tested.wgslto the shader cache key; the PR that does so needs a native test showing the SPIR-V artifact and key for existing shaders are unchanged.Feel free to reopen the split PRs once these are addressed.
Imported from boykopovar/AnyPS5. Originally posted by valenciana-nc on 2026-10-21T03:31:39Z.
Manual overlap review found that this port also changes
GuestBesselSecondKindZero. I opened draft #8864 for a one-line correctness fix: the console-binary evidence already recorded indocs/dev/debt/libc.mdsaysy0f,y1fandynfdo not raise an exception at ±0. A regression test fails on main; removing the explicitferaiseexcept(FE_DIVBYZERO)makes it pass. Could #8864 land first, with this port rebased to omit its correspondingmxcsr |= 4too? The fix does not depend on the WASM port.Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-21T04:05:18Z.
Agreed, let’s land #8864 first. I’ll then rebase this port and remove the corresponding mxcsr |= 4 change. Thanks for catching this!
Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-21T05:58:57Z.
Scoped this PR to the relinker symbol-type fix. Local tests: 238/238 passed
Conventions passed. The remaining WASM changes will follow in separate PRs after this merges.
Build CI awaits maintainer approval.
@adriadam10
Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-21T07:22:54Z.
@adriadam10 Correction to my earlier scope note: #6879 is restored as the full WASM browser/runtime PR. I propose keeping this PR for runtime integration, landing focused prerequisites, then rebasing #6879 after they merge. #8864 remains a prerequisite.
Prepared against main
86b84244fb:The capture checks also pass (16 stages, 8 pipelines) with the independent masked-select fix; its regression fails on main and passes with the fix. The relinker symbol-type fix is needed for imported-data inputs: mislabeled STT_FUNC produces an ImportStub instead of HostData. These dependencies will be explicit; #6879 remains the WASM PR.
The one-open-PR limit currently prevents submitting prerequisites alongside #6879. Would you approve this staging plan and use the maintainer-reopen exception if needed? Could you also approve the pending toolchain workflow runs or trigger Build? Each extraction includes its focused CI coverage.
Full runtime verification against main
f894ba69d3is on a separate candidate. It fixes nested recompiler test sources replacing product startup; a new production-library guest regression fails before the fix and passes after it. The runtime CI now builds the production Node target and executes both runtime cases. Local results: 98 Rust tests plus both runtime cases pass; 19 Naga stages and 11 Vulkan pipelines pass with no validation errors; Chromium 151/SwiftShader runs the synthetic guest and creates all three public compute pipelines. The shader-debt conflict with that main revision is resolved on the candidate. #6879's title, body and code remain preserved while staging agreement is pending; these candidate results are not remote CI results.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T10:29:29Z.
Review: CHANGES_REQUESTED
Thanks for the staging plan, it is the right direction. The head is still the full bundle (221 files, +28914: relinker, Emscripten libs, WGSL, wasm-aot, wasm-runtime) and conflicts with
main, so it can't be reviewed or merged yet.core/wasm-runtime, its web/tools files and docs, then rerun the full runtime verification you describe on the rebased head and put the results in Tested.GuestBesselSecondKindZerochange as agreed with #8864.Leaving it as changes requested until it is reduced to the runtime topic.
Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-21T12:31:15Z.
@adriadam10 The prerequisites are submitted: #8899 → #9092 → #9094 → #9096. Each includes focused tests, dependencies and CI coverage, and all four pass Conventions.
The intake bot still closed them under the one-open-PR limit. Its exception requires a maintainer to reopen them directly. Could you reopen these four and approve/rerun the required CI workflows?
After they and #8864 merge, I’ll reduce #6879 to the runtime topic, rebase it and rerun the full verification.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:06:59Z.
I am reviewing #9506, which adds
sceNetSetDnsInfo,sceNetSetDns6InfoandsceNetGetDns6Infoplus a new registered test and debt entry. The overlap bot could not compare some of these branches because of base conflicts, and this PR author has not yet recorded an agreed merge order. Please confirm whether your current changes overlap these exact exports, CMake/test insertion, or debt section, and whether #9506 can land before your PR or should depend on yours. The #9506 author is being asked to record the agreed order inDepends onand the overlap note.Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-22T07:26:55Z.
Thanks for checking, @MarcZX10!
I compared both diffs. The only change #6879 makes to
core/libs/prx/libSceNet/Export.cppis adding#include <sys/time.h>. It does not modify the DNS exports, test registration, orlibSceNetdebt section changed by #9506.Please feel free to land #9506 first—it does not depend on #6879, so
Depends on: nonecan stay. I’ll rebase #6879 afterward, preserving your DNS changes and keeping the portability include.Thanks for helping coordinate the merge order!
Pull request closed