Skip to content

docs: macOS inline-3D weave-backend port design#26

Open
dfattal wants to merge 1 commit into
mainfrom
docs/macos-port-design
Open

docs: macOS inline-3D weave-backend port design#26
dfattal wants to merge 1 commit into
mainfrom
docs/macos-port-design

Conversation

@dfattal

@dfattal dfattal commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The DisplayXR Browser builds + links on macOS today (arm64, M150) with the inline-3D WebXR API surface compiled in — only the weave backend is BUILDFLAG(IS_WIN)-gated (D3D11 + DirectComposition). This adds the port blueprint.

Key decision: implement the synchronous GPU-process path only and leave the async mojo bridge + DXGIHandle typemap Windows-gated. The macOS runtime weave is synchronous by contract (displayxr-runtime #760: IOSurface in/out, no fence), so the async path — and its hard mach-port/IOSurface mojom typemap — earns nothing on mac. This collapses the port to a 5-PR plan:

  1. Scaffolding + weak-linked loader + InitializeCore(mac)/IsSupported
  2. Eyes/views (LocateViewsForRect mac, timespec time-conv)
  3. GPU-process sync weave (Metal canvas-IOSurface → input blit → xrWeaveSubmitDXR)
  4. Viz compose (woven IOSurface → CARendererLayerTree overlay, no fence)
  5. Batch (spec v3, perf)

PR3+PR4 are the critical path; the runtime half (#760) is already merged. Includes the full IS_WIN-gate enumeration (21 sites), the transport substitution table, BUILD.gn/loader changes, and 6 open questions to verify in the live tree.

🤖 Generated with Claude Code

The browser builds+links on macOS today with the inline-3D WebXR API surface
compiled in; only the weave backend is BUILDFLAG(IS_WIN)-gated. This is the
blueprint for porting it, consuming the runtime's macOS XR_DXR_weave service
(displayxr-runtime #760: IOSurface in/out, synchronous, batched).

Key decision: implement the SYNC GPU-process path only and leave the async
mojo bridge + DXGIHandle typemap Windows-gated — the mac runtime weave is
synchronous by contract, so the async path (and its hard mach-port/IOSurface
mojom typemap) earns nothing on mac. Collapses the port to a 5-PR plan
(scaffolding+loader → views → GPU sync weave → CALayer compose → batch),
with PR3+PR4 the critical path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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