Skip to content

Tags: gogpu/gg

Tags

v0.50.10

Toggle v0.50.10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(gpu): bind group lifecycle + deps v0.30.29 + examples update (#460)

* fix(gpu): defer bind group release for shared encoder (ADR-056, #287)

Shared encoder path released bind groups before gogpu submitted,
causing use-after-free. Own-encoder path unaffected (submit before
return). Fix: defer release to BeginFrame() for shared encoder,
matching Skia Graphite frame-scoped resource lifecycle.

Tested: Vulkan 2314+ frames, DX12, GLES — all 60 FPS stable.

* fix(gpu): defer bind group release for shared encoder + update examples

Shared encoder path released bind groups before submit, causing
use-after-free (wgpu#287). Defer to BeginFrame() for shared encoder.
Update all 14 examples to latest ecosystem deps. Remove stale replace
directives.

v0.50.9

Toggle v0.50.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: prepare release v0.50.9 (#459)

v0.50.8

Toggle v0.50.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.50.8 — dual fill/stroke, blend modes, shaper HVAR, ScaleA…

…bout (#438, #442, #405) (#443)

* feat: ScaleAbout, ShearAbout, undeprecate LoadFontFace, README patterns (#442)

- ScaleAbout(sx, sy, x, y) and ShearAbout — API symmetry with RotateAbout
- LoadFontFace undeprecated — convenient one-liner for quick start
- README: Common Patterns section (FillPreserve+Stroke, Clear, fonts, transforms)
- 5 enterprise tests for ScaleAbout/ShearAbout (pixel-exact match vs manual)

Addresses root.cz tutorial feedback by @tisnik.

* chore: update deps — wgpu v0.30.23, naga v0.17.16, goffi v0.6.2

* fix: shaper HVAR advances for variable fonts (#405)

OwnShaper and BuiltinShaper used hmtx-only advances (base weight),
while ExtractOutlineHintedVar (ADR-054) applied gvar deltas to outlines.
Wider bold glyphs positioned at narrower base-weight spacing caused
letters to overlap under shear/rotation.

Fix: buildShapedGlyphs uses GlyphAdvanceVar (HVAR-adjusted) when face
has variations, matching skrifa invariant: advance_source == outline_source.

Reported by @tsl0922: 'r' and 'l' merge in 'hello world' with shear.

* feat: separate fill and stroke brushes + Push/Pop paint save (#438)

SetFillBrush and SetStrokeBrush are now genuinely independent, matching
HTML5 Canvas fillStyle/strokeStyle semantics. Previously aliased to same
brush. SetColor/SetRGB/SetHexColor set both (backward compat).

Paint uses brushState struct for each side with explicit FillColorAt/
StrokeColorAt methods. SoftwareRenderer and GPU pipeline route fill/stroke
to correct brush via strokeMode flag.

Push/Pop now saves and restores paint state (fill brush, stroke brush,
blend mode) matching Cairo cairo_save/Canvas ctx.save.

ADR-055. 8 dual-paint enterprise tests + 9 agent tests.
Performance: -40% faster FillRect (brushState inlining more cache-friendly).

* chore: prepare release v0.50.8

v0.50.7

Toggle v0.50.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: variable font outlines ignore gvar under transforms (#405) (#435)

All 7 outline extraction paths now use ExtractOutlineHintedVar with
face.Variations(), matching the Skia/skrifa/FreeType invariant: gvar
deltas are glyph geometry, applied unconditionally regardless of
downstream transform or rendering path.

Cache keys (OutlineCacheKey, GlyphMaskKey, msdf.GlyphKey) include
VariationHash to prevent cross-variation cache poisoning.

ADR-054. 17 enterprise tests. wgpu v0.30.21 -> v0.30.22.

v0.50.6

Toggle v0.50.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.50.6 — software backend GPU texture compositing (#433)

* feat: backend-agnostic draw queue + software GPU texture compositing (ADR-051)

Unified draw queue: all draw commands (shapes, paths, images, GPU textures,
text, glyph masks) flow through single pendingDraws slice with per-draw clip
snapshots (ADR-052). Dispatch at flush time routes to GPU render pass or CPU
SoftwareRenderer based on adapter strategy. Matches Skia Graphite DrawList
and Flutter DisplayList patterns.

Software backend (rasterAtlas strategy):
- Mixed CPU/GPU dispatch: shapes CPU-rasterized, textures GPU-composited
- ensurePipelineWithStencil for blit-only readback path
- uploadPixmapToView guard prevents overwriting offscreen texture content
- Three-tier clip: rect bounds + ClipMask snapshot + path (ADR-052)
- SurfacePixelWriter zero-copy present path
- DrawRecording + Snap() for future parallelism (ADR-053 Phase 0)

Requires wgpu v0.30.21 (CopyTextureToBuffer row stride, blend state,
BGRA readTexel fixes).

* test: enterprise test suite for draw queue, dispatch, clip, and profiling

80+ new tests across 5 files: canvas.Render mock tests (all 3 present paths),
draw queue dispatch verification, scissor group splitting, clip mask lifetime
safety, stroke dispatch pixel verification (TDD, diff=0). 30 profiling
benchmarks. Test files split by domain.

* feat: compositing + software overlay examples

compositing: boundary texture test with offscreen textures, DrawGPUTexture,
DrawImage, text, animated shapes. Catches invisible boundary bugs on all backends.

software_overlay: minimal DrawGPUTexture test — bright red+green offscreen
overlay on blue background. Regression test for software backend compositing.

* docs: CHANGELOG v0.50.5, ARCHITECTURE software backend, deps wgpu v0.30.21

CHANGELOG: unified draw queue (ADR-051), three-tier clip (ADR-052), software
backend 5-bug fix, SurfacePixelWriter zero-copy, enterprise test suite,
performance optimizations (P0-P3).

ARCHITECTURE: new Software Backend Strategy section documenting rasterAtlas
flow, key invariants, BGRA swizzle chain.

Dependencies: wgpu v0.30.20 → v0.30.21 (CopyTextureToBuffer row stride,
blend state, BGRA readTexel fixes). Example go.mod/go.sum updates.

* fix: resolve nestif lint in readback pipeline guard

v0.50.5

Toggle v0.50.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: software backend — deviceReady split, MSAA probe, zero-copy pres…

…ent (#430)

* fix: split deviceReady from gpuReady for software offscreen textures

Separate device availability (texture/buffer ops) from shape pipeline
readiness (SDF/stencil/convex). On rasterAtlas strategy, deviceReady=true
but gpuReady=false — device is alive for offscreen compositing while
shape pipelines are skipped (SPIR-V hang). Matches Skia Graphite where
TextureProxy::Make() works regardless of PathRendererStrategy.

- CreateOffscreenTexture checks deviceReady instead of gpuReady
- ensurePipelines() skips SDF/stencil/convex on rasterAtlas
- IsDeviceReady() accessor for texture-level readiness
- Close() resets both flags
- 8 new tests for the split

* fix: replace hardcoded MSAA sampleCount=4 with probe in all GPU tests

48 test sites assumed hardware GPU with 4x MSAA. On software backends
(llvmpipe, SwiftShader) this fails — SampleCount=4 rejected. Added
testSampleCount(t, device) helper that delegates to production
resolveSampleCount (Skia Graphite probe pattern). Tests now pass on
both hardware (4x) and software (1x) backends.

* chore: update wgpu v0.30.12 + gogpu v0.44.2 (TextureView.Texture accessor)

* feat: software offscreen upload via Queue.WriteTexture (Skia rasterAtlas)

On rasterAtlas strategy, Flush() with offscreen target.View uploads
CPU-rasterized pixmap to GPU texture via Queue.WriteTexture — no render
pass needed. RGBA→BGRA swizzle for format match. Added CopyDst usage
to offscreen texture for WriteTexture compatibility.

Requires wgpu v0.30.12 TextureView.Texture() accessor.

* test: uploadPixmapToView + Flush rasterAtlas integration tests

7 tests covering software offscreen upload path:
- uploadPixmapToView with real noop device + offscreen texture
- Nil queue, empty data, nil view edge cases
- Flush rasterAtlas triggers upload (pending==0 + offscreen view)
- Flush full strategy skips upload (goes to flushVello)
- RGBA swizzle path coverage

* feat: SurfacePixelWriter zero-copy path in ggcanvas.Render

On software backend, bypass texture creation + render pass + SPIR-V.
SurfacePixelWriter duck-typed interface: if RenderTarget implements
WriteSurfacePixels, write pixmap directly to surface framebuffer
(single memcpy+swizzle). Falls through to universal path if unavailable.

Requires gogpu RenderTarget to implement SurfacePixelWriter by
delegating to wgpu.Surface.WritePixels (wgpu v0.30.14+).

* chore: update wgpu v0.30.17 + gogpu v0.44.4 + deps cascade

Dependencies: wgpu v0.30.12 → v0.30.17 (PresentPixels, TextureView.Texture,
Tier 1 blit, goffi v0.6.0), gogpu v0.44.2 → v0.44.4 (WriteSurfacePixels),
gpucontext v0.21.0 → v0.21.1, x/sys v0.46.0 → v0.47.0.

SurfacePixelWriter damage rect fix: forward rects BEFORE PresentPixels
(it reads ws.damageRects internally).

v0.50.4

Toggle v0.50.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.4 — deps update + public docs sync (#428)

Dependencies: x/image v0.43.0 → v0.44.0, x/text v0.39.0 → v0.40.0.
Updated ROADMAP.md, ARCHITECTURE.md, CHANGELOG.md to v0.50.4.

v0.50.3

Toggle v0.50.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.3 — wgpu v0.30.10, gogpu v0.44.1, x/text v0.39.0 (#419)

v0.50.2

Toggle v0.50.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: v0.50.2 — wgpu v0.30.9, gogpu v0.43.4, composite tests (#417)

* fix(examples): add WithContinuousRender(true) for gogpu v0.43.3

gogpu v0.43.3 changed default to event-driven rendering.
Examples using animation/continuous updates need explicit opt-in.

* chore: v0.50.2 — wgpu v0.30.9 (goffi fix), gogpu v0.43.4, composite tests

- wgpu v0.30.8 → v0.30.9 (goffi v0.5.6 callback stack-move fix)
- gogpu v0.43.3 → v0.43.4 (cascade)
- Examples: WithContinuousRender(true) for event-driven default
- Composite glyph tests + doc fixes
- CHANGELOG finalized for v0.50.2

v0.50.1

Toggle v0.50.1's commit message
chore: finalize CHANGELOG for v0.50.1