Skip to content

Tags

Tags

v0.54.0

Toggle v0.54.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.54.0 — strided UpdateRegion, GPUStats, struct params (ADR…

…-072)

v0.53.2

Toggle v0.53.2's commit message
Merge branch 'main' of https://github.com/gogpu/gogpu

v0.53.1

Toggle v0.53.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.53.1 — deps cascade + macOS fixes

v0.53.0

Toggle v0.53.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.53.0 — presentation sync, macOS drag/menu fixes

v0.52.1

Toggle v0.52.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
refactor: extract internal/compositor/ package + wgpu v0.31.2 (ADR-069)

* refactor: extract damage_source + damage_scissor to internal/compositor/ (ADR-069 Phase 1)

Struct Ownership pattern (Flutter flow/ + Go stdlib ssa.Func):
- DamageSource type moved to internal/compositor
- ComputeDamageScissor, DamageRectsUnion, UnionAllSources exported
- Context.RegisterDamageSource() returns gpucontext.DamageReporter (interface)
- Direct compositor.* calls at all call sites (no wrapper layer)
- Zero type aliases, zero public API change

* refactor: extract overlay pipeline + debug overlays to internal/compositor/ (ADR-069 Phase 2+3)

Overlay infrastructure (pipeline, shader, instanced draw) and debug overlays
(damage + FPS) moved to compositor package. Root package retains only thin
init stubs that wire RenderTarget fields to compositor structs.

Root: 103 LOC (init only). Compositor: 980 LOC (full implementation).
Zero type aliases, zero wrappers, direct compositor.* calls.

* refactor: extract blit pipeline to internal/compositor/ (ADR-069 Phase 4)

BlitPipeline struct owns 14 blit fields (from Renderer) + Init/Destroy.
CompositeState struct owns per-surface MSAA bind group state.
EncodeBlitPass, RecordBaseBlitDraws, RecordOverlayBlitDraws as free functions.
EncodeSurfaceCompositePass as BlitPipeline method.

Root compositor_blit.go: 91 LOC (SurfaceCompositor impl only).
Renderer.go: -318 LOC removed.
Compositor: +621 LOC (blit.go + blit_pipeline.go).

* ci: add go mod tidy drift + compositor unidirectional deps guard

* docs: add CHANGELOG entry for v0.52.1

* chore(deps): wgpu v0.31.0 → v0.31.2

v0.52.0

Toggle v0.52.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: compositor-owned render target (ADR-067)

Fundamental architecture: compositor (gogpu) owns composition texture,
drawing library (gg) renders into provided view. Enterprise pattern
validated by Chromium cc/, GTK4 GSK, Flutter flow/ source code.

Phase 1 — Composition texture:
- composTex/composView on RenderTarget (lazy, overlay-only)
- renderView() redirects content to composView when active
- Dedicated blit pipeline (independent of gg's texQuadPipeline)
- blitComposToSwapchain with passthrough copy (no double-blend)
- Overlay-only frame support (tryOverlayOnlyFrame)

Phase 2 — Compositor resources:
- compositor_blit.go: BlitDrawRecorder, CompositorBlitResources,
  EncodeCompositorBlitPass, encodeSurfaceCompositePass, damage scissor
- SurfaceCompositor interface implementation on RenderTarget
- Persistent MSAA composite bind group (not per-frame)
- externalContent flag (separate from frameCleared)
- FPS overlay: Draw() returns o.mode.overlay (not unconditional true)

Tests: 6 overlay lifecycle + 10 damage scissor + 4 union + compositor

Verified: gg-only 60fps, g3d+gg 63fps, g3d+ui, ui gallery, overlay,
transparent (4 backends). All scenarios working.

Issues: gogpu#442, gogpu#443. PR gogpu#444 superseded.

v0.51.0

Toggle v0.51.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.51.0 — damage overlay + DComp alpha + deps (ADR-065, ADR-…

…066)

* feat: damage source registration + debug overlay system (ADR-065 + ADR-066)

- DamageSource with RegisterDamageSource, ReportDamage, ReportDamageWithReason
- Pluggable DebugOverlay system (GTK4 Inspector pattern)
- Built-in damage overlay (flat-color quad GPU pipeline, per-source colors, 400ms fade)
- FPS counter overlay (colored bar, slog reporting)
- Removed SetDamageRects, MarkExternalContent (pre-v1.0 clean cut)
- Added MarkPreserveContent (GPU LoadOp concern, split from MarkExternalContent)
- 36 new test functions, 962 total test cases passing

Fixes: gogpu#437

* docs: GOGPU_DEBUG_DAMAGE=1 → =overlay (pre-v1.0 clean cut)

* refactor: extract shared overlayPipeline, add constants — 0 lint issues

- overlay_pipeline.go: shared GPU pipeline init for damage + FPS overlays
- Constants: shaderEntryVS/FS, overlayModeOverlay/Log, overlayNameDamage/FPS
- Removed unused //nolint:funlen directives
- dupl(2) + goconst(12) + nolintlint(3) = 17 issues → 0

* fix: overlay visual bugs — synthetic gogpu source, FPS warmup, fill alpha

- Synthetic 'gogpu' DamageSource for built-in rendering (DrawTriangle)
- FPS overlay: skip first 10 frames (unreliable startup timing)
- Fill alpha 18% (visible but see-through)
- Removed double-scaling of damage rects (gg already scales logical→physical)
- Known: border rendering needs dynamic uniform buffer (single fill per draw for now)

* refactor: instanced overlay rendering — fill + border in one Draw(6,N)

Enterprise-level fix for uniform buffer race: all per-rect data packed
into vertex buffer with VertexStepModeInstance. One render pass, one
draw call for N quads. Fill (18% alpha) + 4 border strips (70% alpha)
per damage flash.

Shader: screen uniforms (16B) + per-instance rectXY/rectWH/color (32B stride).
Instance buffer: grow-on-demand (gg SDF pattern).
Uniform buffer: 48B → 16B (only screen dimensions).

* fix: border width 3px → 1px, alpha 70% → 50% (less intrusive)

* chore: prepare release v0.51.0 — damage overlay + DComp alpha + deps bump

- Damage source registration (ADR-065) + debug overlay system (ADR-066)
- DComp per-pixel alpha for DX12 (gogpu#430, @shaolei)
- FPS overlay infinite redraw fix
- deps: gpucontext v0.26.0, wgpu v0.31.0

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.
release: v0.50.2 — sound types, X11 connection demux, DnD fixes

v0.50.1

Toggle v0.50.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(x11): XDND drag-and-drop — event_mask, SelectionRequest, position…

…, session filtering (gogpu#431)

* fix(x11): XDND event_mask=0 + TranslateCoordinates for drop position (gogpu#431)

Two X11 drag-and-drop bugs reported by @unxed:

1. SendClientMessage used SubstructureNotify|SubstructureRedirect for XDND — target
   windows don't select SubstructureRedirect, X server silently drops events.
   All enterprise references (Qt6, GTK4, SDL3, winit) use event_mask=0.

2. Drop position used GetGeometry (parent-relative) instead of TranslateCoordinates
   (root-to-window). Reparented windows always returned 0,0.
   Qt6 uses xcb_translate_coordinates (qxcbdrag.cpp:282).

* fix(x11): XDND source — SelectionRequest in wait loop, session filtering, sign extension (gogpu#431)

Fixes from @unxed's testing on native X11 (Cinnamon/Nemo, Linux Mint):

1. waitForXdndFinished now handles SelectionRequest — target requests drag
   data right after XdndDrop, discarding it caused 'invalid drag type'
2. Session filtering via ownsSession() — stale XdndFinished from previous
   drag no longer ends the current session (caused 118ms DragMoved)
3. dragResultFromFinished: only ActionCopy→DragCopied, else DragCancelled
   (we only offer ActionCopy, accepting other actions was false positive)
4. Sign extension fix: uint32(uint16(rootX)) for negative multi-monitor coords
5. Drain stale events after GrabPointer before drag loop
6. Cache XdndAware atom in findXDNDTargetWindow (was InternAtom per motion event)

* fix(x11): handle late XdndPosition in waitForXdndSelectionNotify (gogpu#431)

TCP batching can deliver XdndPosition AFTER XdndDrop but BEFORE
SelectionNotify. The old code discarded all non-SelectionNotify events
in the wait loop, so late XdndPosition was lost and lastX/lastY stayed
at 0,0. Same pattern as the outgoing drag fix (waitForXdndFinished
discarding SelectionRequest).

Root cause of bug 1 (drop position always 0,0) reported by @unxed.

* docs: finalize CHANGELOG v0.50.1 with all X11 XDND fixes

* fix(x11): skip XdndStatus after drop, fix CHANGELOG accuracy (gogpu#431)

Address @unxed review:
1. Late XdndPosition in waitForXdndSelectionNotify now updates coords only,
   without sending XdndStatus (spec: no position replies after drop)
2. CHANGELOG: clarify that waitForXdndSelectionNotify discarding events was
   the actual root cause of position 0,0, not TranslateCoordinates alone

v0.50.0

Toggle v0.50.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: outgoing drag-and-drop (drag source) v0.50.0 (gogpu#427, ADR-061)

* feat: outgoing drag-and-drop (drag source) — all 5 platforms (gogpu#427, ADR-061)

Window.StartDrag(DragData, onComplete) initiates dragging files FROM the
application TO the desktop or other apps. Full implementations:

- Windows: COM OLE2 DoDragDrop + IDataObject (CF_HDROP) + IDropSource
- macOS: NSDraggingSource + beginDraggingSessionWithItems + NSURL
- X11: XDND v5 source protocol (pointer grab, XdndEnter/Position/Drop)
- Wayland: wl_data_source + wl_data_device.start_drag (text/uri-list)
- Browser: architectural limitation (HTML5 requires native dragstart)

Neither SDL3, winit, nor GLFW implement drag source — this puts gogpu
ahead of all windowing libraries. 1507 LOC across 16 files.

* fix(drag): macOS async result callback via endedAtPoint:operation:

StartDrag was synchronous (always returned Copy). Now async:
- Added draggingSession:sourceOperationMaskForDraggingContext: to GoGPUView
- Added draggingSession:endedAtPoint:operation: callback for accurate result
- SetDragSourceCallback map pattern (same as viewDragHandlers)
- drag_darwin.go updated for async signature

* fix(drag): Windows DoDragDrop — correct HRESULT, OleInitialize, IEnumFORMATETC

Three root causes fixed:
- DRAGDROP_S_USEDEFAULTCURSORS was 0x00040002 (wrong), correct is 0x00040102
- OleInitialize must be first COM call (before CoInitializeEx) to install drag-drop message filter
- QueryInterface accepted all IIDs — now rejects unknown interfaces (E_NOINTERFACE)

Added IEnumFORMATETC for Explorer format discovery during drag-over.
Vtable moved to GlobalAlloc (non-GC memory) for COM safety.

* docs: prepare release v0.50.0 — CHANGELOG, ROADMAP, ARCHITECTURE, README

- CHANGELOG v0.50.0 section: outgoing drag source, Windows fixes, macOS callback
- ROADMAP: Current State v0.50.0, Drag & Drop shipped, version history
- ARCHITECTURE: add drag-and-drop to platform features, remove gpu/backend/rust (ADR-038), fix compose status, update ui widget count
- README: incoming + outgoing drag in features table

* style: gofmt drag_windows.go and test files