Repository navigation
Releases
v0.32.1
Dependency update: gputypes v0.8.2 → v0.9.2.
The public API is unchanged — the signature-level golden regenerates with zero diff (1 package / 346 identifiers). The gputypes types this module exposes — DownlevelCapabilities, Features, TextureFormat — keep their shapes between the two pins; gputypes' own v0.9.0 Backends widening is its release's event, and Backends is not part of gpucontext's public surface. Consumers are lifted to gputypes ≥ v0.9.2 by Go's module version selection when they take this release.
The Go floor stays at 1.25 in this release. The move to 1.27 is a separate, ecosystem-wide step that will be made as one movement later.
Note: this tag is placed on the dependency-bump commit (the last commit before the separate Go-floor change on main), so the CHANGELOG in this tagged tree still lists the entry under [Unreleased]; this note is the release record of its composition.
v0.32.0 — IME contract (ADR-045)
Changed (breaking)
- IME contract (ADR-045), based on gpucontext#30 by @besmpl. One extended
IMEControllerinstead of versioned
interfaces; all text positions are UTF-8 byte offsets.IMEController:SetIMEPosition(x, y int)is replaced bySetIMECursorArea(IMECursorArea)(logical DIP).
New methods:SetIMEContentType,SetIMESurroundingText,CancelIME,IMECapabilities. Every method must
be safe from any goroutine.IMEState:CursorPos,SelectionStartandSelectionEndare replaced byCursorandSelection
(IMETextRange). A{-1, -1}cursor means the IME hides it (HasCursor).- Migration: hosts implement the new methods. Methods for unsupported operations are no-ops, and
IMECapabilitiesreports what the platform does. Consumers readstate.Cursor.Startwhere they read
state.CursorPos.
Added
IMETextRange,IMESurroundingText,IMECursorArea,IMEDeleteSurroundingEvent, with UTF-8 validation that
never clamps.ContentPurpose(incl.Chat) and theContentHintbitset, with names from tables keyed by the constants.IMECapabilitiesin three groups, as in winit: cursor area, content type, surrounding text.- Optional
IMEEventSource(OnIMECanceled,OnIMEDisabled,OnIMEDeleteSurrounding), found by type assertion.
Documentation
WindowProvider.RequestRedrawmust be safe to call from any goroutine, and requests coalesce.- Package doc, AGENTS.md and ROADMAP list the IME interfaces.
Changed
- deps: gputypes v0.8.0 → v0.8.2
Full Changelog: v0.31.3...v0.32.0
v0.31.3 — gputypes v0.8.0 dep bump (ADR-072)
Dep bump: gputypes v0.7.0 → v0.8.0 (Viewport, ScissorRect, DrawArgs, DrawIndexedArgs).
v0.31.2 — docs fix for struct-based UpdateRegion API
Fixed
- docs: update README and ROADMAP for struct-based
UpdateRegionAPI (image.Rectangle+ImageDataLayout). v0.31.1 shipped with stale documentation showing old 6-parameter signature. Code was correct in v0.31.1, docs fixed in v0.31.2.
v0.31.1 — struct-based TextureRegionUpdater.UpdateRegion
Changed
TextureRegionUpdater.UpdateRegion— struct API (#484) — replaced six positional int parameters withimage.Rectangle+ImageDataLayout(WebGPU / Go stdlib idiom). Fixes silent parameter-swap bugs. Zero-value layout = offset 0, tight packed rows, region height.
v0.31.0 — strided TextureRegionUpdater.UpdateRegion
Changed
TextureRegionUpdater.UpdateRegion— strided upload (gogpu/gogpu#484) — addedbytesPerRowparameter (pre-v1.0 signature change).0= tightly packed rows (w * bytesPerPixel), matching WebGPUImageDataLayout.bytesPerRow. Enables zero-copy dirty-band uploads from full-frame buffers withoutextractRegionmemcpy.
v0.30.0 — DownlevelCapabilities on DeviceProvider (ADR-071)
Add DownlevelCapabilities() to DeviceProvider interface — the 7th method.
Added
DeviceProvider.DownlevelCapabilities()— returnsgputypes.DownlevelCapabilitiesfor backend capability queries. Enables consumers (gg, g3d, Born ML) to check compute support, indirect execution, and other capabilities that may be absent on non-conformant backends (GLES 3.0, CPU software rasterizer).
Returns zero-value if implementation does not track downlevel capabilities (backward compatible — treat as no capabilities).
Architecture decision (ADR-071): interface method, not type-assert. Follows Flutter Impeller "check capabilities, not backend type" principle (context.h:97). Matches Rust wgpu Adapter::get_downlevel_capabilities().
Changed
- deps: gputypes v0.6.0 → v0.7.0 (DownlevelCapabilities types)
Cascade
gputypes v0.7.0 (released) → gpucontext v0.30.0 → wgpu v0.33.0 → gogpu → gg
v0.29.0 — Features() on DeviceProvider
Features() on DeviceProvider
New method on DeviceProvider interface — enables consumers to query optional device capabilities without importing wgpu.
Added
DeviceProvider.Features() gputypes.Features— returns bitfield of optional device capabilities (e.g.,FeatureRayQuery,FeatureTimestampQuery). Returns 0 if implementation does not track features (backward compatible). Matches Rust wgpudevice.features()pattern.
Changed
- deps: gputypes v0.5.2 → v0.6.0 (ray tracing types)
Consumers
Implementations updated in cascade:
gogpu— returns features fromwgpu.Device.Features()gg—NullDeviceHandlereturns 0 (no GPU, no features)g3d— can now queryFeatureRayQuerybefore using RT
v0.28.0 — MouseButton and Modifiers stringers
Added
MouseButton.String()— button names (Left, Right, Middle, X1, X2) for debugging and loggingModifiers.String()— deterministic modifier string (Ctrl+Alt+Shift+Super+CapsLock+NumLock), order matches gogpu/ui event convention
Changed
- deps: gputypes v0.5.1 → v0.5.2
- Shared string constants between Key, Button, and MouseButton stringers
v0.27.0 — SurfaceCompositor Interface (ADR-067)
Added
- SurfaceCompositor interface (ADR-067) — compositor-level bridge between gogpu and content renderers (gg, g3d). 4 methods: ShouldPreserveContent, DamageRects, MarkContentRendered, CompositeMSAAOverlay. Enterprise pattern validated by Chromium cc/Skia, GTK4 GSK, Flutter flow/ source code.