Skip to content

Releases: gogpu/gogpu

v0.54.0 — strided UpdateRegion, GPUStats, struct params

Choose a tag to compare

@kolkov kolkov released this 31 Aug 12:47
8596758

Added

  • Strided Texture.UpdateRegion (#484) — image.Rectangle + gpucontext.ImageDataLayout (WebGPU / Go stdlib idiom). Zero-value layout = offset 0, tightly packed rows. Enables zero-copy dirty-band uploads from full-frame RGBA buffers without extractRegion memcpy.
  • GPUStats — two-level observability (#484) — Rust wgpu + Flutter FrameTiming pattern:
    • Renderer.GetCounters() — cumulative texture count, allocated bytes, upload totals
    • Context.FrameStats() — per-frame UploadBytes, UploadRegions, PresentSkipped, FrameDuration
    • Feature-gated: GOGPU_STATS=1 or EnableStats() / DisableStats(). Zero-cost when off.

Changed

  • Struct params (ADR-072) — SetViewport, SetScissorRect, Draw use gputypes.Viewport, gputypes.ScissorRect, gputypes.DrawArgs structs instead of positional parameters
  • deps: wgpu v0.33.0 → v0.34.2 (struct params, type alias removal, pipeline disk cache), gpucontext v0.30.0 → v0.31.3, gputypes v0.7.0 → v0.8.0

Fixed

  • darwin lint: goconst, gocognit

v0.53.2

Choose a tag to compare

@kolkov kolkov released this 30 Aug 11:43

Added

  • DownlevelCapabilities() on GPUContextProvider (ADR-071) — exposes 27 backend capability flags for graceful degradation. Consumers check DownlevelFlagsComputeShaders without importing wgpu.

Fixed

  • lint: errorlint + nilnil in print_windows.go

Changed

  • deps: wgpu v0.32.1 → v0.33.0 (DownlevelCapabilities across all 7 backends, RequireDownlevelFlags validation)
  • deps: gpucontext v0.29.0 → v0.30.0 (DownlevelCapabilities interface method)
  • deps: gputypes v0.6.0 → v0.7.0 (DownlevelFlags 27 constants, DownlevelCapabilities struct, ShaderModel)

v0.53.1

Choose a tag to compare

@kolkov kolkov released this 28 Aug 09:31
2e4eb3d

Fixed

  • macOS: SetMenu separators lost between Role items (#456)
  • macOS: About icon missing on Role+Action (#456)
  • macOS: SetMenu appended to App Menu instead of replacing (#456)
  • macOS: only one separator visible in App Menu (#456)
  • macOS: RoleServices was a no-op (#456)
  • macOS: stale SetMenu callbacks after replace (#457)

Added

  • Features() on GPUContextProvider — exposes device feature flags (e.g. FeatureRayQuery) for RT capability discovery

Changed

  • deps: wgpu v0.31.4 → v0.32.1, gpucontext v0.28.0 → v0.29.0, gputypes v0.5.2 → v0.6.0
    • wgpu: Software backend RT features, inline ray queries (experimental)
    • gpucontext: Features() added to DeviceProvider interface
    • gputypes: Features type + RT feature flags

v0.53.0 — presentation sync, macOS drag/menu fixes

Choose a tag to compare

@kolkov kolkov released this 13 Aug 07:22
b7e268e

Added

  • One-shot presentation synchronization (#452, @kivutar) — Context.RequestPresentationSync() gates rendering after the next successfully presented frame without enabling continuous compositor pacing. Wayland supports forced wl_surface.frame callbacks for GPU and software presentation, including secondary windows; failed presentations cancel and retain the request for retry.

Fixed

  • macOS: outgoing drag crashes with NSRangeException (#429, #453, @lkmavi) — NSDraggingItem zero-size frame abort. Fixed: 32pt frame centered on pointer + NSWorkspace.iconForFile: preview. Hardening: local NSAutoreleasePool, skip relative paths, re-entrancy guard, HFA [4]float64 buffer, defensive [icon copy] before setSize:.
  • macOS: SetMenu leaf items invisible on menu bar (#449) — role items routed to App Menu submenu. Non-role leaf items log warning.
  • macOS: Role + Action items dropped (#449) — custom Action takes precedence over system selector with role key equivalent preserved.
  • macOS: AddToSystemMenu inconsistency (#449) — unified with addPlatformItem for single code path.

Changed

  • deps: gpucontext v0.27.0 → v0.28.0, wgpu v0.31.2 → v0.31.4
  • ci: exclude SA5011 false positives in test files

v0.52.1 — Compositor Package Extraction (ADR-069)

Choose a tag to compare

@kolkov kolkov released this 11 Aug 08:22
4beb54f

v0.52.1 — Compositor Package Extraction (ADR-069) + wgpu v0.31.2

Changed

  • refactor: extract internal/compositor/ package (ADR-069, #446) — compositor code extracted from root package using Struct Ownership + Callback Interface pattern (Flutter flow/ + Go stdlib ssa.Func).
    • DamageSource, ComputeDamageScissor, UnionAllSources → internal/compositor/
    • OverlayPipeline, damage/FPS debug overlays → internal/compositor/
    • BlitPipeline struct (14 fields from Renderer), BlitResources, CompositeState → internal/compositor/
    • Context.RegisterDamageSource() return type: *DamageSource → gpucontext.DamageReporter (interface)
    • Zero type aliases, zero wrapper functions, direct compositor.* calls
    • Unidirectional deps: root → compositor (compositor never imports root)
    • renderer.go reduced by ~320 LOC
  • deps: wgpu v0.31.0 → v0.31.2
  • ci: go mod tidy drift check + compositor unidirectional deps guard

v0.52.0 — Compositor-Owned Render Target (ADR-067)

Choose a tag to compare

@kolkov kolkov released this 10 Aug 19:00
458f232

v0.52.0 — Compositor-Owned Render Target (ADR-067)

Fundamental architecture redesign. The compositor (gogpu) now owns the composition texture; the drawing library (gg) renders into a provided view. Enterprise pattern validated by Chromium cc/, GTK4 GSK, and Flutter flow/ source code.

Added

  • Compositor-owned render target (ADR-067, #443)
    • composView: content cache texture — gg/g3d draw here, persists between frames
    • Overlay draws on swapchain after blit — never accumulates, fade works on idle content
    • blitPipeline: passthrough copy (composition → swapchain, no blend)
    • compositePipeline: premultiplied alpha blend (MSAA overlay compositing)
    • tryOverlayOnlyFrame(): overlay-only frames when content idle
    • externalContent flag: separate from frameCleared (g3d → gg coordination)
    • Persistent MSAA composite bind group on RenderTarget (not per-frame)
    • damage_scissor.go: canonical damage scissor computation (moved from gg)
    • compositor_blit.go: SurfaceCompositor implementation, BlitDrawRecorder, CompositorBlitResources
    • 20+ tests for overlay lifecycle, damage scissor, compositor resources

Changed

  • deps: gpucontext v0.26.0 → v0.27.0 (SurfaceCompositor interface)

v0.51.0 — Damage Overlay System + DComp Transparency

Choose a tag to compare

@kolkov kolkov released this 10 Aug 07:49
2a3a514

Added

  • Damage source registration (#437, ADR-065) — multi-renderer damage aggregation. Context.RegisterDamageSource() + per-frame ReportDamage(). Compositor unions all sources at present time. Chromium cc/DamageTracker pattern.
  • Pluggable debug overlay system (ADR-066) — GTK4 Inspector-inspired. Context.RegisterDebugOverlay() for N overlays. Self-sustaining render loop. 3 concrete overlays: damage rects, FPS counter, dirty widgets.
  • Damage debug overlay — instanced flat-color quads, per-source palette, 400ms fade. GOGPU_DEBUG_DAMAGE=overlay.
  • FPS debug overlay — colored bar (green/yellow/red), 120-sample ring. GOGPU_DEBUG_FPS=overlay.
  • Context.MarkPreserveContent() — for g3d/video external content.

Fixed

  • Windows: DComp per-pixel alpha for DX12 (#430, @shaolei) — two-tier transparency: DX12 uses DirectComposition + WS_EX_NOREDIRECTIONBITMAP; Vulkan/GLES/Auto uses DwmEnableBlurBehindWindow. A/B tested on Windows 11 + RTX 4060.
  • FPS overlay infinite redraw — Draw() returned true unconditionally.

Changed

  • deps: gpucontext v0.24.0 → v0.26.0, wgpu v0.30.36 → v0.31.0

v0.50.2 — Sound types, X11 connection demux, DnD fixes

Choose a tag to compare

@kolkov kolkov released this 07 Aug 08:58
5039b03

Added

  • 12 SystemSound types (#433, ADR-063) — UWP ElementSoundPlayer parity: Click, Invoke, Focus, MoveNext, MovePrev, GoBack, Show, Hide, Alert, Error, Warning, Success.
  • Config.WithSoundFeedback(true) — one-line sound enable in app config.

Fixed

  • X11: connection dual-reader event/reply loss (#431, #435, @unxed, ADR-062) — single reader goroutine (xgb pattern) replaces two competing socket readers. Fixes: drop position always 0,0, ~60% of incoming drops lost.
  • X11: drag source UngrabPointer on release (#435, @unxed) — prevents deadlock when target shows modal dialog.
  • Windows: Click mapped to notification beep (#433) — now plays Windows Navigation Start.wav.

Tested by @unxed on native X11 (Cinnamon/Nemo, Linux Mint). Windows verified visually (outgoing + incoming drag).

v0.50.1 — X11 XDND drag-and-drop fixes

Choose a tag to compare

@kolkov kolkov released this 07 Aug 03:05
aca586c

Fixed

  • X11: drag source targets never accept drop (#431, @unxed) — SendClientMessage used wrong event mask for XDND. Changed to event_mask=0 per Qt6, GTK4, SDL3, winit.
  • X11: drop position always 0,0 (#431, @unxed) — waitForXdndSelectionNotify discarded late XdndPosition events (TCP batching). Coordinate conversion corrected to TranslateCoordinates.
  • X11: drag source reported DragMoved on failed drops (#431, @unxed) — waitForXdndFinished discarded SelectionRequest, so target got no data. Session filtering prevents stale events from previous drag.
  • X11: sign extension in XdndPosition (#431, @unxed) — negative multi-monitor coords corrupted.
  • X11: isXDNDAware sync roundtrip per motion event (#431, @unxed) — cached XdndAware atom.

Tested and confirmed by @unxed on native X11 (Cinnamon/Nemo, Linux Mint, Intel HD Graphics 520).

v0.50.0 — Outgoing Drag-and-Drop

Choose a tag to compare

@kolkov kolkov released this 06 Aug 09:40
a3d71dc

Added

  • Outgoing drag-and-drop (drag source) (#427, ADR-061) — Window.StartDrag(DragData, callback) initiates file drag from gogpu window to external apps. All 5 platforms: Windows (COM OLE2 DoDragDrop + IDataObject/IDropSource/IEnumFORMATETC), macOS (NSDraggingSource + beginDraggingSessionWithItems), X11 (XDND v5 protocol), Wayland (wl_data_source + wl_data_device.start_drag), Browser (stub). Enterprise references: Qt6 qwindowsdrag.cpp, SDL3, winit.
  • Drag source example — examples/drag_source/ demonstrates click-hold-drag to desktop with file copy result.

Fixed

  • Windows DoDragDrop returned 0x80004021 (CO_E_NOT_SUPPORTED) — OleInitialize must be the first COM call on the main thread, before CoInitializeEx.
  • Windows DoDragDrop exited modal loop immediately — DRAGDROP_S_USEDEFAULTCURSORS constant was 0x00040002 (wrong), correct value is 0x00040102.
  • Windows drag: Explorer rejected dropped files — IDataObject::EnumFormatEtc returned E_NOTIMPL. Implemented IEnumFORMATETC with CF_HDROP.
  • Windows COM QueryInterface accepted all IIDs — now returns E_NOINTERFACE for unknown interfaces.
  • macOS drag result callback — added draggingSession:endedAtPoint:operation: for async completion.

Changed

  • deps: wgpu v0.30.35 → v0.30.36 (Vulkan present semaphore fix)
  • Removed scripts/ directory