Complete emsdk/WebGPU toolchain hardening foundation - #459
Conversation
When .emsdk-version is >= 5.0, TETRIS_CPP_WEBGPU=auto now links emdawnwebgpu → Canvas2D only — the removed -s USE_WEBGPU=1 flag is no longer attempted, with an intentional log line explaining the skip. Also add buildCanvasConfiguration unit tests and align cpp/README.md with the actual auto port order on the pinned toolchain. Co-authored-by: Noah Cohn <noahc42@gmail.com>
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Most of the toolchain + device-policy foundation from the 2026-07-22 audit landed in #457. This PR closes the remaining gap:
TETRIS_CPP_WEBGPU=autono longer attempts the removed legacy-s USE_WEBGPU=1flag when.emsdk-versionis ≥ 5.0, so a cleannpm run cpp:releaseon the pinned emsdk linksemdawnwebgpuwithout a wasted failed link.Also adds a
buildCanvasConfigurationunit test and alignscpp/README.mdwith the actual auto port order on the pinned toolchain.Acceptance checklist
.emsdk-versionis 5.0.7 (matches CI cache key +cpp/README.md)autoprefersemdawnwebgpu; on pinned 5.x, legacy is skipped intentionally (logged)build-info.jsonemitswasmBytes/jsBytes;cpp-renderer.ymlCI asserts bothrequestGpuAdapterAndDevicehasrequiredLimits, centralizedbuildCanvasConfiguration,GameSettings.gpuPowerwiring — covered bytests/gpu-context.test.ts"type": "module"inpackage.json— ESLint runs cleanChanges in this PR
scripts/build-cpp.mjs:shouldSkipLegacyWebGpu()— when pin major ≥ 5,auto→['EMDAWN', 'NONE']with an explanatory log linetests/build-cpp.test.ts: assert skip logic +jsBytescontracttests/gpu-context.test.ts:buildCanvasConfigurationpremultiplied-alpha testcpp/README.md: document auto behavior on pinned 5.xNot in scope (deferred)
WGPUPresentMode_Mailboxexperiment for high-end — stillFifo+ premultiplied; can follow once shader parity work resumesTest plan
npm test(213 tests)npm run lint(noMODULE_TYPELESS_PACKAGE_JSONwarning)npm run cpp:releaseon emsdk 5.0.7 →webGpuBackendId: "emdawn"with no legacy attempt (CIcpp-renderer.yml)