Skip to content

Releases: PerryTS/webgpu

v0.3.0 — Windows: surface-compatible adapter, link libs, mount-aware swapchain

Choose a tag to compare

@proggeramlug proggeramlug released this 03 Jul 08:46
4accf9d

Windows fixes from the win64 report (PerryTS/perry#5812). requestAdapter's signature gained an optional parameter, hence the minor bump.

What's changed

  • Surface-compatible adapter selectionrequestAdapter now takes an optional compatibleSurface handle and threads it through to wgpu's compatible_surface. Fixes surfaceConfigure failing with "no queue family supports presentation" on d3d12/vulkan (Metal was unaffected). The render example and README now use surface-first order: wrap the view, then requestAdapter(surface).
  • Windows link libraries — the manifest now declares targets.windows.libs: ["d3dcompiler", "opengl32"], covering wgpu's D3DCompile and wgl* entry points that its own #[link] attrs don't. Fixes LNK2019 unresolved externals when linking a Windows app.
  • Mount-aware swapchain (surfaceGetCurrentTexture, Windows-only) — perry-ui parks widget HWNDs under a hidden message-only window and reparents them into the app window when App() mounts, which broke swapchains created before the mount:
    • Visibility gate: returns 0 ("not presentable yet" — the existing retry contract) while the window chain is hidden, preventing a permanent main-thread block in getCurrentTexture once the present queue filled pre-mount.
    • Reparent rebind: when the HWND's top-level ancestor changed since configure, the wgpu surface is recreated and re-configured so the swapchain is rebuilt against the visible ancestry (a plain re-configure keeps the stale DWM composition binding on dx12).
    • Debug knobs: PERRY_WEBGPU_DIAG=1 (per-call window-state logging), PERRY_WEBGPU_NO_REBIND=1 (bisection escape hatch).
  • README: Windows notes + surface-first example order.

Verified end-to-end on Windows 11 x64 (d3d12): pre-mount render bursts survive to mount, rebind on first post-mount acquire, frames composite (pixel-probed).

Full Changelog: v0.2.0...v0.3.0

v0.2.0 — on-screen GPUSurface

Choose a tag to compare

@proggeramlug proggeramlug released this 24 Jun 11:52

On-screen GPUSurface (window swapchain)

Render a WebGPU swapchain into a perry-ui window — the on-screen surface that was previously out of scope. Verified end-to-end on macOS (renders a live triangle).

New surface API: requestSurface · surfaceFromNativeView · surfaceGetViewPtr · surfaceGetPreferredFormat · surfaceConfigure · surfaceGetCurrentTexture · surfacePresent · surfaceUnconfigure · surfaceDrop

Canonical flow: wrap a perry-ui BloomView via surfaceFromNativeView, then the spec render loop plus one explicit surfacePresent. See examples/triangle-macos.

Packaging: the ergonomic camelCase API now links + routes under Perry — requires a Perry build with ergonomic-export routing (PerryTS/perry#5621) and the json descriptor param (PerryTS/perry#5626). Manifest now declares per-target crate/lib, an exports.perry entry, json descriptor params, and ios/android targets.

Platforms: macOS verified end-to-end; iOS/Windows/Android compile against their platform handles (await on-device validation); Linux pending a display-handle entry point.

Full details: #1.

v0.1.1 — release-flow validation

Choose a tag to compare

@proggeramlug proggeramlug released this 08 May 09:18

First release shipped via the GitHub Actions + npm trusted-publisher path. No code changes from 0.1.0 — version bump only, to validate the auto-publish workflow.