Skip to content

Add WebGPU FSR upscaling and compatible Swan/JavaScriptKit dependencies - #202

Merged
SpectralDragon merged 1 commit into
codex/shader-graphfrom
codex/webgpu-fsr-swan
Oct 23, 2026
Merged

SpectralDragon merged 1 commit into
codex/shader-graphfrom
codex/webgpu-fsr-swan

Conversation

@SpectralDragon

Copy link
Copy Markdown
Contributor

WebGPU previously reported spatial upscaling as unsupported, so .renderUpscaling(.spatial(renderScale: 0.75)) kept rendering at native resolution. It now encodes FSR 1 EASU followed by RCAS through the existing spatial-upscale API, with cached pipelines and size-dependent resources. Metal continues to select MetalFX.

Use the pinned AdaEngine/swan revision 790df787281e9cf1c2358a11bb42b2ec2df01029 with JavaScriptKit 0.59.0 so checked-in BridgeJS and its runtime share the same ABI. Allow SwiftSyntax 602–603 in the engine and bundled Gravity, preserve Editor's 602 compatibility, and adapt the WASM WebSocket data conversion.

This is stacked on #198 and targets codex/shader-graph; its diff contains only commit f5f20fd70. Retarget to main after the Shader Graph dependency lands. The diff is 502 reviewable lines, or 601 lines including documentation and lockfiles.

Validation on Swift 6.3.2 / Xcode 26.6:

  • script/validate_webgpu.sh: 225 tests in 46 suites passed using the remote Swan fork and Dawn 148, including golden frames and FSR GPU readback for edges, alpha, RGBA/BGRA, resizing, cache eviction and queued views.
  • Full export-web --product AdaWebPlayer --swift-sdk swift-6.3.2-RELEASE_wasm --debug passed with ADAENGINE_SWAN_PACKAGE_PATH and SWAN_LOCAL_DAWN unset; verified reactor ABI and all bundled resource entries.
  • Exported Player rendered the bundled basic 3D scene in the browser with no BridgeJS/WebGPU console errors. This does not establish acceptance of the separate Shader Graph export scenarios in Add native Shader Graph authoring and runtime — handoff #198.
  • Editor dependency resolution passed with SwiftSyntax 602 and JavaScriptKit 0.59.0; git diff --check passed.

The FSR path supports single-sample 2D RGBA8/BGRA8 UNORM targets. HDR/sRGB, equal-size images and downscaling retain the existing presentation fallback; pixel-perfect presentation keeps its dedicated path.

Implement EASU and RCAS with cached WebGPU resources and GPU readback coverage.
Use the AdaEngine Swan fork with JavaScriptKit 0.59 and compatible SwiftSyntax
constraints, including the WASM WebSocket API adjustment.

Validated with 225 WebGPU tests, a full AdaWebPlayer WASM export without local
Swan overrides, and a browser render of the exported 3D scene.
@SpectralDragon
SpectralDragon marked this pull request as ready for review October 23, 2026 16:17
@SpectralDragon
SpectralDragon merged commit 56151b9 into codex/shader-graph Oct 23, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T16:18:34.935327Z f5f20fd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant