Releases: gogpu/gogpu
Releases · gogpu/gogpu
Release list
v0.54.0 — strided UpdateRegion, GPUStats, struct params
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 withoutextractRegionmemcpy. - GPUStats — two-level observability (#484) — Rust wgpu + Flutter FrameTiming pattern:
Renderer.GetCounters()— cumulative texture count, allocated bytes, upload totalsContext.FrameStats()— per-frameUploadBytes,UploadRegions,PresentSkipped,FrameDuration- Feature-gated:
GOGPU_STATS=1orEnableStats()/DisableStats(). Zero-cost when off.
Changed
- Struct params (ADR-072) —
SetViewport,SetScissorRect,Drawusegputypes.Viewport,gputypes.ScissorRect,gputypes.DrawArgsstructs 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
Added
DownlevelCapabilities()onGPUContextProvider(ADR-071) — exposes 27 backend capability flags for graceful degradation. Consumers checkDownlevelFlagsComputeShaderswithout 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
Fixed
- macOS:
SetMenuseparators lost between Role items (#456) - macOS: About icon missing on Role+Action (#456)
- macOS:
SetMenuappended to App Menu instead of replacing (#456) - macOS: only one separator visible in App Menu (#456)
- macOS:
RoleServiceswas a no-op (#456) - macOS: stale
SetMenucallbacks after replace (#457)
Added
Features()onGPUContextProvider— 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 toDeviceProviderinterface - gputypes:
Featurestype + RT feature flags
v0.53.0 — presentation sync, macOS drag/menu fixes
Added
- One-shot presentation synchronization (#452, @kivutar) —
Context.RequestPresentationSync()gates rendering after the next successfully presented frame without enabling continuous compositor pacing. Wayland supports forcedwl_surface.framecallbacks 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) —NSDraggingItemzero-size frame abort. Fixed: 32pt frame centered on pointer +NSWorkspace.iconForFile:preview. Hardening: localNSAutoreleasePool, skip relative paths, re-entrancy guard, HFA[4]float64buffer, defensive[icon copy]beforesetSize:. - macOS:
SetMenuleaf items invisible on menu bar (#449) — role items routed to App Menu submenu. Non-role leaf items log warning. - macOS:
Role + Actionitems dropped (#449) — customActiontakes precedence over system selector with role key equivalent preserved. - macOS:
AddToSystemMenuinconsistency (#449) — unified withaddPlatformItemfor 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)
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 (Flutterflow/+ Go stdlibssa.Func).DamageSource,ComputeDamageScissor,UnionAllSources→internal/compositor/OverlayPipeline, damage/FPS debug overlays →internal/compositor/BlitPipelinestruct (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.goreduced by ~320 LOC
- deps: wgpu v0.31.0 → v0.31.2
- ci:
go mod tidydrift check + compositor unidirectional deps guard
v0.52.0 — Compositor-Owned Render Target (ADR-067)
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 idleexternalContentflag: separate fromframeCleared(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:SurfaceCompositorimplementation,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
Added
- Damage source registration (#437, ADR-065) — multi-renderer damage aggregation.
Context.RegisterDamageSource()+ per-frameReportDamage(). Compositor unions all sources at present time. Chromiumcc/DamageTrackerpattern. - 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 usesDwmEnableBlurBehindWindow. A/B tested on Windows 11 + RTX 4060. - FPS overlay infinite redraw —
Draw()returnedtrueunconditionally.
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
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
Fixed
- X11: drag source targets never accept drop (#431, @unxed) —
SendClientMessageused wrong event mask for XDND. Changed toevent_mask=0per Qt6, GTK4, SDL3, winit. - X11: drop position always 0,0 (#431, @unxed) —
waitForXdndSelectionNotifydiscarded lateXdndPositionevents (TCP batching). Coordinate conversion corrected toTranslateCoordinates. - X11: drag source reported DragMoved on failed drops (#431, @unxed) —
waitForXdndFinisheddiscardedSelectionRequest, 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:
isXDNDAwaresync roundtrip per motion event (#431, @unxed) — cachedXdndAwareatom.
Tested and confirmed by @unxed on native X11 (Cinnamon/Nemo, Linux Mint, Intel HD Graphics 520).
v0.50.0 — Outgoing Drag-and-Drop
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) —
OleInitializemust be the first COM call on the main thread, beforeCoInitializeEx. - Windows DoDragDrop exited modal loop immediately —
DRAGDROP_S_USEDEFAULTCURSORSconstant was0x00040002(wrong), correct value is0x00040102. - Windows drag: Explorer rejected dropped files —
IDataObject::EnumFormatEtcreturnedE_NOTIMPL. ImplementedIEnumFORMATETCwith CF_HDROP. - Windows COM QueryInterface accepted all IIDs — now returns
E_NOINTERFACEfor 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