Skip to content

Releases: gogpu/gpucontext

v0.21.0

15 Jun 17:36

Choose a tag to compare

GPU Handles: Interface → Struct Tokens (BREAKING)

Device, Queue, Adapter, Surface, Instance changed from interfaces to opaque struct tokens wrapping unsafe.Pointer.

Why

v0.20.0 used unexported sentinel methods on interfaces, but Go spec prohibits cross-package satisfaction of interfaces with unexported methods. *wgpu.Device could never implement gpucontext.Device — build broke in gogpu/gg/ui. v0.20.0 is yanked.

New Pattern

Same as existing TextureView and CommandEncoder (ADR-018):

  • 8 bytes, value type, zero allocations
  • GC-safe: unsafe.Pointer in struct fields is traced by GC (reflect.Value precedent)
  • Compile-time type distinct: DeviceQueueAdapter

Migration

// Before (v0.19.0):
dev := provider.Device()           // interface
wgpuDev := dev.(*wgpu.Device)      // type assertion

// After (v0.21.0):
dev := provider.Device()           // struct
wgpuDev := (*wgpu.Device)(dev.Pointer())  // unsafe.Pointer extraction

// Nil check: dev != nil → !dev.IsNil()

Full Changelog: v0.20.0...v0.21.0

v0.20.0

15 Jun 16:10

Choose a tag to compare

Changed (BREAKING)

  • Sentinel methods on type token interfacesDevice, Queue, Adapter, Surface, Instance now have unexported sentinel methods (gpuDevice(), gpuQueue(), etc.). Only concrete GPU implementations satisfy them — compile-time type safety instead of interface{}.

Full Changelog: v0.19.0...v0.20.0

v0.19.0 -- ScrollPhase + IsMomentum

16 May 21:02

Choose a tag to compare

Added

  • ScrollPhase + IsMomentum on ScrollEvent (ADR-032) -- ScrollPhase enum (None, Began, Changed, Ended, Canceled) and IsMomentum bool field. Enables apps to distinguish active trackpad gestures from momentum/inertial scroll. macOS: maps NSEvent.phase and NSEvent.momentumPhase. Zero-value backward compatible.
go get github.com/gogpu/gpucontext@v0.19.0

v0.18.0 — SubpixelLayout for LCD/ClearType Detection

09 May 13:11
618d898

Choose a tag to compare

Added

  • SubpixelLayout on PlatformProvider (ADR-024) — SubpixelLayout() method returns display subpixel arrangement (SubpixelNone, SubpixelRGB, SubpixelBGR, SubpixelVRGB, SubpixelVBGR). Enables auto-detection of LCD/ClearType font rendering in gg. Follows Qt6 QPlatformScreen pattern — subpixel is a display/OS property, not GPU. NullPlatformProvider returns SubpixelNone.

Full Changelog: v0.17.0...v0.18.0

v0.17.0

06 May 14:55
871ad21

Choose a tag to compare

What's Changed

Added

  • AdapterInfo on DeviceProvider (ADR-020) — AdapterInfo() method returns AdapterInfo{Name, Type} with AdapterType enum (Discrete, Integrated, Software, Unknown). Enables gg render mode auto-selection: CPU rasterizer on software adapters vs GPU accelerator on real hardware.

Fixed

  • Lint cleanup — extracted stringNone constant, 0 lint issues on all platforms.

Full Changelog: v0.16.0...v0.17.0

v0.16.0 — Runtime Fullscreen Toggle Interface

30 Apr 20:39
fe459b9

Choose a tag to compare

WindowChrome: SetFullscreen + IsFullscreen

Added runtime fullscreen toggle to the WindowChrome interface (ADR-018).

Added

  • SetFullscreen(bool) — enter/exit fullscreen mode
  • IsFullscreen() bool — query fullscreen state
  • NullWindowChrome no-op defaults

Enables App.SetFullscreen(bool) in gogpu for borderless fullscreen (Windows), native toggleFullScreen: (macOS), _NET_WM_STATE_FULLSCREEN (X11), xdg_toplevel.set_fullscreen (Wayland).

Triggered by ui#88 (@AgentNemo00).

v0.15.0

25 Apr 19:40

Choose a tag to compare

Type-Safe GPU Resource Handles (ADR-018)

Breaking: TextureView changed from interface{} to opaque struct{ptr unsafe.Pointer}.

Changed

  • TextureView — compile-time type safety via opaque handle (Vulkan/Ebitengine/Go Protobuf Opaque pattern). 8 bytes, value type, zero allocations, GC-safe.

Added

  • CommandEncoder — opaque handle for shared encoder pipeline (ADR-017). Same pattern as TextureView.

Migration

// Before (v0.14.0)
var view gpucontext.TextureView = wgpuView // interface{} accepted anything

// After (v0.15.0)  
view := gpucontext.NewTextureView(unsafe.Pointer(wgpuView))
if view.IsNil() { ... }  // was: view == nil
ptr := view.Pointer()     // unsafe.Pointer for type assertion

v0.14.0

22 Apr 14:11

Choose a tag to compare

Added

  • TextureView type token interface — type-safe render target for cross-package GPU operations. Follows Device/Queue/Surface pattern.

Full Changelog: v0.13.0...v0.14.0

v0.13.0

21 Apr 17:29

Choose a tag to compare

v0.13.0 — TextureRegionUpdater + gputypes v0.5.0

Added

  • TextureRegionUpdater interface — UpdateRegion(x, y, w, h int, data []byte) error for partial texture upload. Enables incremental rendering where only dirty regions are uploaded to GPU instead of full texture.

Changed

  • Dependencies: gputypes v0.2.0 → v0.5.0 (PrimitiveState zero value = WebGPU spec default)

Full Changelog: v0.12.0...v0.13.0

v0.12.0 — CursorMode + PointerEvent deltas

09 Apr 14:32
124e637

Choose a tag to compare

Added

  • CursorModeCursorModeNormal, CursorModeLocked, CursorModeConfined for mouse grab / pointer lock (SDL parity)
  • PointerEvent.DeltaX/DeltaY — relative mouse movement in locked cursor mode