Releases: gogpu/gg
Release list
v0.50.10
Fixed
- Bind group use-after-free with shared command encoder (wgpu#287) —
RenderFrameGrouped()released bind groups viadeferbefore gogpu submitted the shared encoder, causing HAL descriptor corruption. Fix: defer release toBeginFrame()for shared-encoder frames where VSync guarantees GPU completion. Own-encoder path unchanged. Matches Skia Graphite frame-scoped resource lifecycle.
Changed
- Updated
gogpu/wgpuv0.30.27 → v0.30.29 (ADR-056 unified resource lifecycle,Release()viaResourceRef.Drop(), atomicLastSubmissionIndex). - Updated example dependencies to gg v0.50.9, gogpu v0.47.1, gpucontext v0.23.0, wgpu v0.30.29. Removed stale
replacedirectives from cjk_text and multi_damage_demo.
v0.50.9
Fixed
- External content preservation with MSAA (#455, #457 by @besmpl) — when gg renders an overlay on top of external 3D content (e.g. g3d scene), MSAA vector/mixed frames now use a transparent resolve + alpha-composite path that preserves the underlying content without duplicating pipeline variants or reducing antialiasing quality. Ordinary frames have zero overhead.
- External content overwritten by compositor base (#452, #453) —
DrawGPUTextureBaseno longer covers preserved g3d output with an opaque textured quad whenPreserveContentis active. FlushGPUWithViewignored external content (#449, #450) — addedPreserveContentflag toGPURenderTarget; render session usesLoadOp::Loadinstead ofClearwhen set.- ggcanvas did not forward content preservation (#451) —
Canvas.Rendernow detectsContentPreservercapability and forwards the state to the GPU render target. - ggcanvas did not use shared command encoder (#454) —
Canvas.Rendernow detectsCommandEncoderProvideron the render target and records into the borrowed frame encoder for single-submit compositing with gogpu.
Changed
- Updated
gogpu/gpucontextv0.22.0 → v0.23.0 (InputEvent sealed interface). - Updated
gogpu/wgpuv0.30.25 → v0.30.27 (GLES depth/stencil fix, MSAA external content preservation).
v0.50.8 — dual fill/stroke, blend modes, shaper HVAR, ScaleAbout
Fixed
SetBlendMode()was a no-op (#439) — all 29 W3C blend modes now wired through the CPU rendering pipeline. Default SourceOver path: zero overhead.- Shaper HVAR advances for variable fonts (#405) — OwnShaper and BuiltinShaper used base-weight hmtx advances while outlines had gvar deltas applied. Letters overlapped under shear/rotation. Fix: shapers now use HVAR-adjusted advances (skrifa invariant).
- Separate fill and stroke brushes (#438) —
SetFillBrush/SetStrokeBrushnow genuinely independent (Canvas 2DfillStyle/strokeStylesemantics). Previously aliased. - Push/Pop saves paint state — fill brush, stroke brush, and blend mode now saved/restored by
Push/Pop(Cairo/Canvas pattern). Previously paint was not saved.
Added
- All 29 W3C blend modes for direct Fill/Stroke: 14 Porter-Duff, 11 advanced separable, 4 HSL non-separable.
BlendClear,BlendSource,BlendDestinationconstants.GetBlendMode(). ScaleAbout(sx, sy, x, y)andShearAbout(#442) — API symmetry withRotateAbout.LoadFontFaceundeprecated — convenient one-liner for quick start.- README "Common Patterns" section: FillPreserve+Stroke, Clear vs ClearWithColor, transforms.
- 140+ enterprise tests: pixel verification for all 29 blend modes, dual fill/stroke, shaper HVAR advances, ScaleAbout/ShearAbout.
Changed
- Updated
gogpu/wgpuv0.30.22 → v0.30.23,gogpu/nagav0.17.15 → v0.17.16,go-webgpu/goffiv0.6.0 → v0.6.2.
Performance
- Paint refactor (
brushStateinlining): -40% faster FillRect, -42% faster PaintColorAt. Zero overhead for single-color usage.
v0.50.7 — variable font outlines under transforms (#405)
Fixed
- Variable font outlines under transforms (#405) — when
dc.Shear()ordc.Rotate()was applied, variable font variations (e.g.wght=700) were silently ignored because the vector outline path calledExtractOutline()without gvar deltas. All 7 outline extraction paths now useExtractOutlineHintedVar()withface.Variations(), matching the Skia/skrifa/FreeType invariant: gvar deltas are glyph geometry, applied unconditionally. Cache keys (OutlineCacheKey,GlyphMaskKey,msdf.GlyphKey) now includeVariationHashto prevent cross-variation cache poisoning.
Added
GlyphMaskRasterizer.RasterizeHintedVar()— rasterize glyph masks with font variations applied (gvar + hinting in one pass).GlyphMaskRasterizer.RasterizeAliasedVar()— aliased (binary coverage) variant with font variations.RenderParams.Variationsfield — propagates font variations throughGlyphRenderer.GlyphMaskKey.VariationHash/msdf.GlyphKey.VariationHash— variation-aware cache keys.- 17 enterprise tests covering all fixed paths.
Changed
- Updated
gogpu/wgpuv0.30.21 → v0.30.22.
v0.50.6 — Software backend GPU texture compositing
Fixed
- Software backend GPU texture compositing — five latent bugs fixed in the
software SPIR-V render path, enablingDrawGPUTextureoverlays (RepaintBoundary
pattern) on CPU-only adapters. Coordinated fixes across wgpuhal/software/
(3 bugs) and gginternal/gpu/(2 bugs):- wgpu:
CopyTextureToBufferrow stride — row-by-row copy respecting
BytesPerRowalignment (was flat memcpy, causing 128-byte/row shift at 800px). - wgpu:
configureRasterPipelineblend state — extract premultiplied alpha
blend fromFragment.Targets[0].Blend(was alwaysBlendDisabled). - wgpu:
readTexelBGRA format — swap R/B channels forBGRA8Unormtextures
(was always reading as RGBA). - gg:
ensurePipelineWithStencilfor readback — create image pipeline when
earlyBlitOnlyskipsensurePipelines()on blit-only readback path. - gg:
uploadPixmapToViewoverwrite guard — preventc.pixmapbackground from
overwriting offscreen texture content afterflushCPUToViewupload.
- wgpu:
Added
examples/compositing/— boundary texture test with offscreen textures,
DrawGPUTexture, DrawImage, text, animated shapes on all backends.examples/software_overlay/— minimal DrawGPUTexture regression test.
Changed
- Dependencies: wgpu v0.30.20 → v0.30.21 (software backend fixes).
- ARCHITECTURE.md: new Software Backend Strategy section.
glyphMaskDebugLogusesslogger().Debug()instead offmt.Fprintf(os.Stderr).
v0.50.5
Fixed
-
Software backend offscreen textures — split
deviceReadyfromgpuReadyin GPU shared state. On rasterAtlas strategy (software adapter), device is alive for texture/buffer operations while shape pipelines (SDF/stencil/convex) are skipped.CreateOffscreenTexturenow checksdeviceReadyinstead ofgpuReady.ensurePipelines()skips shape pipelines on rasterAtlas to prevent SPIR-V hang. Follows Skia GraphitekRasterAtlaspattern. -
GPU tests hardcoded MSAA sampleCount=4 — 48 test sites replaced with
testSampleCount(t, device)probe that delegates to productionresolveSampleCount(Skia Graphite pattern). Tests now pass on software backends (llvmpipe, SwiftShader) that only support sampleCount=1.
Added
-
Software offscreen upload —
uploadPixmapToView()uploads CPU-rasterized pixmap to offscreen GPU texture viaQueue.WriteTextureon rasterAtlas strategy. RGBA→BGRA swizzle.CopyDstusage on offscreen textures. -
SurfacePixelWriter zero-copy path — duck-typed interface in
ggcanvas.Render(). On software backend, writes pixmap directly to surface framebuffer viawgpu.Surface.PresentPixels(single memcpy+swizzle, no render pass). Damage rects forwarded before present.
Changed
- Dependencies: wgpu v0.30.10 → v0.30.19, gogpu v0.44.1 → v0.44.6, gpucontext v0.21.0 → v0.21.1, goffi v0.5.6 → v0.6.0, golang.org/x/image v0.43.0 → v0.44.0, golang.org/x/text v0.39.0 → v0.40.0, golang.org/x/sys v0.46.0 → v0.47.0.
v0.50.4
Fixed
- Composite glyph DoS hardening (#418) — added shared work budget (
maxCompositeComponents=4096) and cycle-detection map to both composite recursion sites. The depth-only guard (32 levels) did not bound multiplicative fan-out. Cycle hits degrade gracefully; gvar delta application skipped for composites (wrong point-number space). Patch contributed by issue author. - Software adapter hang (#421) — SDF GPU pipeline hung on software/CPU adapters (llvmpipe, SwiftShader, WARP).
SDFAcceleratornow implementsAdapterAware— shapes route to CPU rasterizer on software.
Added
- Tiered GPU rendering strategy —
gpuRenderStrategyenum (Full/NoMSAA/RasterAtlas) auto-detected from adapter type + MSAA support. - CI GPU golden tests — Mesa lavapipe on Ubuntu CI. GPU/CPU dual-render comparison tests.
Changed
- Dependencies: golang.org/x/image v0.43.0 → v0.44.0, golang.org/x/text v0.39.0 → v0.40.0.
v0.50.3 — wgpu v0.30.10, gogpu v0.44.1
Changed
- wgpu v0.30.9 → v0.30.10
- gogpu v0.43.4 → v0.44.1 (macOS live resize fix)
- x/text v0.38.0 → v0.39.0
go get github.com/gogpu/gg@v0.50.3
v0.50.2 — goffi callback fix cascade + composite tests
Changed
- wgpu v0.30.8 → v0.30.9 (goffi v0.5.6 callback stack-move corruption fix)
- gogpu v0.43.3 → v0.43.4 (cascade)
- Examples:
WithContinuousRender(true)for gogpu v0.43.3 event-driven default
Added
- Comprehensive composite glyph tests (i, j, accented characters)
go get github.com/gogpu/gg@v0.50.2
v0.50.1 — TT hinting fixes (skrifa parity)
Fixed
- TT GETINFO instruction — ClearType selector bits were off by one vs skrifa/FreeType. Segoe UI prep program received wrong ClearType answers, causing incorrect Y coordinates for complex glyphs ('w' at 12ppem). Golden test: 20/20 points match skrifa.
- ttDiv16Dot16 rounding — truncated → rounded division matching skrifa
Fixed::div. Improves IUP interpolation precision for all TT-hinted fonts. - Space glyph TT hinting — empty glyphs (space, .notdef) now produce integer-pixel hinted advances. Before: space 24ppem=6.5742 (uneven word spacing). After: 7.0000 (skrifa parity diff=0).
Changed
- Dependencies: wgpu v0.30.7 → v0.30.8 (MSAA, BGRA, buffer offsets), gogpu v0.43.2 → v0.43.3 (WM_PAINT fix)
Text rendering quality
go get github.com/gogpu/gg@v0.50.1