Skip to content

Add native Linux SDK and bounded offscreen Vulkan WebGPU surfaces - #68

Merged
danwalmsley merged 12 commits into
mainfrom
codex/linux-headless-platform
Sep 12, 2026
Merged

danwalmsley merged 12 commits into
mainfrom
codex/linux-headless-platform

Conversation

@danwalmsley

Copy link
Copy Markdown
Collaborator

Purpose

Provide WebScene's native Linux/offscreen graphics half of AppScene's selectable headless platform, using the native document and image-lease contracts rather than JavaScript or a private app host. Builds on the merged macOS/Windows WebGPU foundation #43 and native SDK #64. Related to #46; this does not close full Linux desktop GPU parity.

Implementation

  • Native-only Linux x86_64 SDK producer and relocatable imported CMake targets: Core, NativeWeb, SharedCSS, Compiler and optional WebGPU. No V8/Runtime component.
  • Linux native_webgpu_surface selects a Dawn Vulkan offscreen surface. Existing macOS/Windows selection is preserved.
  • Reuse bounded three-slot image pools, immutable leases, retained-resize generation handling and queue completion. Submitted producers remain owned until GPU completion even when a snapshot is dropped; no per-frame CPU readback or queue-idle wait.
  • Explicit screenshot/export readback with aligned rows, RGBA conversion, byte limits and cancellation-safe consumer ownership. Software adapters require explicit opt-in and are reported separately.
  • Installed-SDK native UI and actual GPU-pixel/lifetime tests; native link garbage collection excludes runtime HTML parser code while retaining shared CSS.
  • Equivalent cascade comparator avoids the Clang 18 frontend crash found in the original recursive-lambda CSS implementation without weakening assertions.

Architecture/build/scope documentation: docs/graphics/native-linux-offscreen.md.

Validation status

  • Corrected Linux build: 19/19 original native document/compiler contracts passed.
  • Independent non-GPU Linux SDK built and installed; its real webscene-uic executable also launched successfully in the Linux verification environment.
  • Evidence: https://github.com/SceneTech/WebScene/actions/runs/34647629118 (tested source after applying commit c3edfd7c7a4e69d0ae127b3acb61bb461a59200e).
  • Graphics-enabled paired SDK and composed application qualification is still running; keep draft until its actual execution and bundle audits pass. Syntax checks alone are not GPU qualification.

Limits

Offscreen native Linux support is not an X11/Wayland window presenter, external-memory FD bridge, hardware performance certification, Linux video implementation, full WebGPU/WPT conformance, or completion of Kestrel's native migration. Software Vulkan evidence must not be reported as hardware parity. The paired AppScene PR will be linked here.

danwalmsley and others added 11 commits September 11, 2026 21:46
Keep native-only Runtime rejection effective after prior find_package calls,
honor optional components, and add installed-consumer regression contracts.
Preserve the concurrent Lavapipe/completion fix bd12775. Related to #69.
…okup in CI

Build and execute the compiled shared-CSS consumer against the installed
no-GPU profile. Keep WebGPU contracts required by default in paired
headless SDK qualification. Preserve native completion service changes.

Copy link
Copy Markdown
Collaborator Author

Paired AppScene implementation PR: https://github.com/SceneTech/AppScene/pull/56 . Architecture/acceptance tracker: #69.

Added SDK hardening in a549598048d576ea218a3bc7c7c13ddf6a70178d and installed-consumer CI in 531ee5d1a2a71abc3c9389f9bc4f826ad36f98d5. Both commits preserve the concurrent Lavapipe selection and independent native completion changes.

The Linux CMake package now revalidates each component lookup instead of skipping subsequent requests through a global include guard. Missing required Runtime remains rejected after a prior native lookup; optional missing components remain optional. Four real installed-package configure regressions cover repeated lookups, optional components and recovery after a rejected lookup.

The independent no-GPU SDK workflow now builds/runs the compiled-HTML/shared-CSS consumer against its installation, runs the component regressions and publishes its executable/test output. The GPU tests remain required by default; only the explicitly selected no-GPU SDK profile disables GPU contracts. AppScene's paired workflow pins 531ee5d1a2a71abc3c9389f9bc4f826ad36f98d5 and retains the actual offscreen pixel/lifetime tests.

Historical 19/19 native/compiler results are not final-revision GPU qualification. Keep draft until the pinned native SDK/application/capture/audit workflow succeeds; no Linux desktop hardware or Kestrel-native completion is claimed.

@danwalmsley
danwalmsley marked this pull request as ready for review September 12, 2026 08:39
@danwalmsley
danwalmsley merged commit d7459d1 into main Sep 12, 2026
14 of 16 checks passed
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