diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec5b1b..9d2b5d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.29.0] - 2026-08-27 + +### Added + +- **`DeviceProvider.Features()`** — returns `gputypes.Features` bitfield of optional device capabilities. Enables consumers (g3d, gg) to query features like `FeatureRayQuery` without importing wgpu directly. Returns 0 if implementation does not track features (backward compatible). Matches Rust wgpu `device.features()` pattern. + +### Changed + +- **deps:** gputypes v0.5.2 → v0.6.0 (ray tracing types) + ## [0.28.0] - 2026-08-13 ### Added diff --git a/README.md b/README.md index d27e7b5..32296a7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ go get github.com/gogpu/gpucontext ## Features -- **DeviceProvider** — Interface for injecting GPU device and queue (typed, zero `any`) +- **DeviceProvider** — Interface for injecting GPU device, queue, and feature queries (typed, zero `any`) - **WindowProvider** — Window geometry, DPI scale factor, and redraw requests - **PlatformProvider** — Clipboard, cursor, dark mode, and accessibility preferences - **CursorShape** — 12 standard cursor shapes (arrow, pointer, text, resize, etc.) diff --git a/ROADMAP.md b/ROADMAP.md index e6e957b..f836a1c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,21 +4,39 @@ `gpucontext` is the shared foundation for the [gogpu](https://github.com/gogpu) ecosystem, providing interfaces and utilities for GPU resource sharing without circular dependencies. -## Current: v0.18.0 - -- SubpixelLayout on PlatformProvider (ADR-024, LCD/ClearType auto-detection) -- AdapterInfo on DeviceProvider (ADR-020, render mode auto-selection) -- WindowChrome.SetFullscreen / IsFullscreen (ADR-018, runtime fullscreen toggle) -- CursorMode (Locked/Confined/Normal) for mouse grab / pointer lock -- PointerEvent.DeltaX/DeltaY for relative mouse movement -- WindowChrome interface for frameless window support +## Current: v0.29.0 + +- `DeviceProvider.Features()` — query device capabilities (FeatureRayQuery, etc.) +- SurfaceCompositor interface (ADR-067) +- MouseButton/Modifiers stringers +- Key enum redesign (grouped explicit bases, binary-stable) +- DamageSource registration (ADR-065) +- SubpixelLayout on PlatformProvider (ADR-024) +- AdapterInfo on DeviceProvider (ADR-020) +- WindowChrome.SetFullscreen / IsFullscreen (ADR-018) +- CursorMode (Locked/Confined/Normal) for mouse grab - WindowProvider, PlatformProvider, DeviceProvider, TextureUpdater, EventSource -- Texture interfaces (multi-touch, pressure, radius) -- W3C Pointer Events Level 3, Scroll events, Gesture events -- IME support for CJK input ## Released +### v0.29.0 (2026-08-27) +- `DeviceProvider.Features()` — gputypes.Features bitfield for capability queries + +### v0.28.0 (2026-08-13) +- MouseButton.String(), Modifiers.String() + +### v0.27.0 (2026-08-10) +- SurfaceCompositor interface (ADR-067) + +### v0.26.0 (2026-08-10) +- Key enum redesign (grouped explicit bases) + +### v0.24.0 (2026-07-21) +- DamageSource registration (ADR-065) + +### v0.18.0 (2026-05-09) +- SubpixelLayout on PlatformProvider + ### v0.12.0 (2026-04-09) - CursorMode + PointerEvent DeltaX/DeltaY for mouse grab (gogpu#173) diff --git a/device_provider.go b/device_provider.go index 27f07bb..fe67daa 100644 --- a/device_provider.go +++ b/device_provider.go @@ -52,4 +52,10 @@ type DeviceProvider interface { // prefer CPU rasterizer over GPU shader interpreter. // Returns AdapterTypeUnknown if adapter info is not available. AdapterInfo() AdapterInfo + + // Features returns the set of optional features supported by this device. + // Consumers (e.g., g3d) can query capabilities like FeatureRayQuery + // without importing wgpu. Returns 0 if the implementation does not + // track features (backward compatible — treat as no optional features). + Features() gputypes.Features } diff --git a/go.mod b/go.mod index 275cc20..32ee990 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gogpu/gpucontext go 1.25 -require github.com/gogpu/gputypes v0.5.2 +require github.com/gogpu/gputypes v0.6.0 diff --git a/go.sum b/go.sum index 762a744..fac6f2e 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -github.com/gogpu/gputypes v0.5.2 h1:3sbKI0+XW36Ekd3d4QhkbpdY7gbgMVgp8Q4+ZNdGhtE= -github.com/gogpu/gputypes v0.5.2/go.mod h1:cnXrDMwTpWTvJLW1Vreop3PcT6a2YP/i3s91rPaOavw= +github.com/gogpu/gputypes v0.6.0 h1:nfjx0ek0jU97ziHmukJgUJZBzlTlls9hsnEeqIEZUxM= +github.com/gogpu/gputypes v0.6.0/go.mod h1:cnXrDMwTpWTvJLW1Vreop3PcT6a2YP/i3s91rPaOavw=