Repository navigation
vgpu 0.6.0 is a stable pre-1.0 release with compatibility changes. Read the migration guide before upgrading from 0.5.0 or a release candidate.
Highlights
- Prepared ShaderSource v2 artifacts move WGSL reflection into the build; dynamic shaders use
prepareShader(). Loaders and renderers must be upgraded together. Next.js Turbopack integrations gainwgslTurbopackRule()for compiler-aware persistent caches. - Scene composition uses explicit transforms, camera state, hierarchy evaluation and fixed-capacity instances. Applications own shading, lights, input handling and scheduling.
- Frame-owned compute passes preserve compute/render ordering and capture managed uniform values per operation. Await preparation before entering synchronous frame callbacks.
- Canvas surfaces support optional depth/MSAA and pipeline preparation outside frames. Sampled intermediate work uses offscreen targets.
- Device loss has an explicit
gpu.lostnotification. Resource binding validation, consumer lifetimes and bundle ownership have clearer contracts and diagnostics. - Repeated encodes and managed uniforms reuse unchanged work. Odd-length Uint16 index uploads are accepted while retaining logical draw/write bounds.
canvasMouseTrackerexposes normalized and drawing-buffer pixel coordinates explicitly.
Upgrade
npm install --save-exact vgpu@0.6.0
# If you directly import WGSL tooling, preparation helpers or WGSL types:
npm install --save-exact @vgpu/wgsl@0.6.0Update any directly installed @vgpu/* packages in the fixed release group to 0.6.0 as well. The optional @vgpu/native companion remains beta with the existing platform/toolchain qualifications.
- From 0.5.0, apply the guide's relevant API steps, starting with shader preparation.
- From 0.6.0-rc.0, apply the shader/loader and binding/lifetime steps; keep prior scene/frame/device-loss/mouse adaptations.
- From 0.6.0-rc.1, no additional API rewrite is required; verify the encode and index-upload fixes.
- From 0.6.0-rc.2, update matching packages and rebuild. Runtime implementation is unchanged.
Known limitation: a multi-binding Draw.set({ a, b }) can partially apply before throwing. After this failure, repair bindings and explicitly re-record affected bundles before replay. The guide explains the error path and verification.
See the vgpu changelog, WGSL changelog, and release preparation PR #498 for package details and migration review evidence.