Skip to content

Releases: gogpu/gg

v0.50.10

Choose a tag to compare

@kolkov kolkov released this 30 Jul 12:53
5188a24

Fixed

  • Bind group use-after-free with shared command encoder (wgpu#287) — RenderFrameGrouped() released bind groups via defer before gogpu submitted the shared encoder, causing HAL descriptor corruption. Fix: defer release to BeginFrame() for shared-encoder frames where VSync guarantees GPU completion. Own-encoder path unchanged. Matches Skia Graphite frame-scoped resource lifecycle.

Changed

  • Updated gogpu/wgpu v0.30.27 → v0.30.29 (ADR-056 unified resource lifecycle, Release() via ResourceRef.Drop(), atomic LastSubmissionIndex).
  • Updated example dependencies to gg v0.50.9, gogpu v0.47.1, gpucontext v0.23.0, wgpu v0.30.29. Removed stale replace directives from cjk_text and multi_damage_demo.

v0.50.9

Choose a tag to compare

@kolkov kolkov released this 30 Jul 09:42
b4eb63f

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) — DrawGPUTextureBase no longer covers preserved g3d output with an opaque textured quad when PreserveContent is active.
  • FlushGPUWithView ignored external content (#449, #450) — added PreserveContent flag to GPURenderTarget; render session uses LoadOp::Load instead of Clear when set.
  • ggcanvas did not forward content preservation (#451) — Canvas.Render now detects ContentPreserver capability and forwards the state to the GPU render target.
  • ggcanvas did not use shared command encoder (#454) — Canvas.Render now detects CommandEncoderProvider on the render target and records into the borrowed frame encoder for single-submit compositing with gogpu.

Changed

  • Updated gogpu/gpucontext v0.22.0 → v0.23.0 (InputEvent sealed interface).
  • Updated gogpu/wgpu v0.30.25 → v0.30.27 (GLES depth/stencil fix, MSAA external content preservation).

v0.50.8 — dual fill/stroke, blend modes, shaper HVAR, ScaleAbout

Choose a tag to compare

@kolkov kolkov released this 26 Jul 21:56
fba1f2d

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/SetStrokeBrush now genuinely independent (Canvas 2D fillStyle/strokeStyle semantics). 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, BlendDestination constants. GetBlendMode().
  • ScaleAbout(sx, sy, x, y) and ShearAbout (#442) — API symmetry with RotateAbout.
  • LoadFontFace undeprecated — 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/wgpu v0.30.22 → v0.30.23, gogpu/naga v0.17.15 → v0.17.16, go-webgpu/goffi v0.6.0 → v0.6.2.

Performance

  • Paint refactor (brushState inlining): -40% faster FillRect, -42% faster PaintColorAt. Zero overhead for single-color usage.

v0.50.7 — variable font outlines under transforms (#405)

Choose a tag to compare

@kolkov kolkov released this 17 Jul 15:56
61f710d

Fixed

  • Variable font outlines under transforms (#405) — when dc.Shear() or dc.Rotate() was applied, variable font variations (e.g. wght=700) were silently ignored because the vector outline path called ExtractOutline() without gvar deltas. All 7 outline extraction paths now use ExtractOutlineHintedVar() with face.Variations(), matching the Skia/skrifa/FreeType invariant: gvar deltas are glyph geometry, applied unconditionally. Cache keys (OutlineCacheKey, GlyphMaskKey, msdf.GlyphKey) now include VariationHash to 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.Variations field — propagates font variations through GlyphRenderer.
  • GlyphMaskKey.VariationHash / msdf.GlyphKey.VariationHash — variation-aware cache keys.
  • 17 enterprise tests covering all fixed paths.

Changed

  • Updated gogpu/wgpu v0.30.21 → v0.30.22.

v0.50.6 — Software backend GPU texture compositing

Choose a tag to compare

@kolkov kolkov released this 15 Jul 20:32
b78f749

Fixed

  • Software backend GPU texture compositing — five latent bugs fixed in the
    software SPIR-V render path, enabling DrawGPUTexture overlays (RepaintBoundary
    pattern) on CPU-only adapters. Coordinated fixes across wgpu hal/software/
    (3 bugs) and gg internal/gpu/ (2 bugs):
    • wgpu: CopyTextureToBuffer row stride — row-by-row copy respecting
      BytesPerRow alignment (was flat memcpy, causing 128-byte/row shift at 800px).
    • wgpu: configureRasterPipeline blend state — extract premultiplied alpha
      blend from Fragment.Targets[0].Blend (was always BlendDisabled).
    • wgpu: readTexel BGRA format — swap R/B channels for BGRA8Unorm textures
      (was always reading as RGBA).
    • gg: ensurePipelineWithStencil for readback — create image pipeline when
      earlyBlitOnly skips ensurePipelines() on blit-only readback path.
    • gg: uploadPixmapToView overwrite guard — prevent c.pixmap background from
      overwriting offscreen texture content after flushCPUToView upload.

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.
  • glyphMaskDebugLog uses slogger().Debug() instead of fmt.Fprintf(os.Stderr).

v0.50.5

Choose a tag to compare

@kolkov kolkov released this 12 Jul 11:28
bb69045

Fixed

  • Software backend offscreen textures — split deviceReady from gpuReady in GPU shared state. On rasterAtlas strategy (software adapter), device is alive for texture/buffer operations while shape pipelines (SDF/stencil/convex) are skipped. CreateOffscreenTexture now checks deviceReady instead of gpuReady. ensurePipelines() skips shape pipelines on rasterAtlas to prevent SPIR-V hang. Follows Skia Graphite kRasterAtlas pattern.

  • GPU tests hardcoded MSAA sampleCount=4 — 48 test sites replaced with testSampleCount(t, device) probe that delegates to production resolveSampleCount (Skia Graphite pattern). Tests now pass on software backends (llvmpipe, SwiftShader) that only support sampleCount=1.

Added

  • Software offscreen uploaduploadPixmapToView() uploads CPU-rasterized pixmap to offscreen GPU texture via Queue.WriteTexture on rasterAtlas strategy. RGBA→BGRA swizzle. CopyDst usage on offscreen textures.

  • SurfacePixelWriter zero-copy path — duck-typed interface in ggcanvas.Render(). On software backend, writes pixmap directly to surface framebuffer via wgpu.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

Choose a tag to compare

@kolkov kolkov released this 09 Jul 10:26
1fd19d0

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). SDFAccelerator now implements AdapterAware — shapes route to CPU rasterizer on software.

Added

  • Tiered GPU rendering strategygpuRenderStrategy enum (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

Choose a tag to compare

@kolkov kolkov released this 07 Jul 22:04
91499d2

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

Choose a tag to compare

@kolkov kolkov released this 05 Jul 09:43
f753b20

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)

Choose a tag to compare

@kolkov kolkov released this 01 Jul 11:46

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

image
go get github.com/gogpu/gg@v0.50.1