diff --git a/CHANGELOG.md b/CHANGELOG.md index 09ff84c..6a20bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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.31.2] - 2026-08-30 + +### Fixed + +- **docs:** update README and ROADMAP for struct-based `UpdateRegion` API (`image.Rectangle` + `ImageDataLayout`). v0.31.1 shipped with stale documentation showing old 6-parameter signature. + ## [0.31.1] - 2026-08-30 ### Changed diff --git a/README.md b/README.md index a8fb4ae..6c982ab 100644 --- a/README.md +++ b/README.md @@ -232,9 +232,17 @@ type TextureUpdater interface { UpdateData(data []byte) error } +// ImageDataLayout describes the memory layout of pixel data for region uploads. +// Mirrors W3C GPUTexelCopyBufferLayout at the application level. +type ImageDataLayout struct { + BytesPerRow int // 0 = tight packed (w * bytesPerPixel) + RowsPerImage int // 0 = height (for 3D/array textures) + Offset int // byte offset into data +} + // TextureRegionUpdater uploads only a sub-rectangle (partial upload) type TextureRegionUpdater interface { - UpdateRegion(x, y, w, h int, data []byte) error + UpdateRegion(region image.Rectangle, data []byte, layout ImageDataLayout) error } ``` diff --git a/ROADMAP.md b/ROADMAP.md index bfa35ba..046b9f4 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,9 +4,9 @@ `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.31.0 +## Current: v0.31.2 -- `TextureRegionUpdater.UpdateRegion` strided upload (`bytesPerRow`, #484) +- `TextureRegionUpdater.UpdateRegion` struct API (`image.Rectangle` + `ImageDataLayout`, #484) - `DeviceProvider.DownlevelCapabilities()` (ADR-071) - `DeviceProvider.Features()` — query device capabilities (FeatureRayQuery, etc.) - SurfaceCompositor interface (ADR-067) @@ -21,6 +21,12 @@ ## Released +### v0.31.2 (2026-08-30) +- docs: fix README and ROADMAP for struct-based UpdateRegion API + +### v0.31.1 (2026-08-30) +- `TextureRegionUpdater.UpdateRegion` — struct API: `image.Rectangle` + `ImageDataLayout` (#484) + ### v0.31.0 (2026-08-30) - `TextureRegionUpdater.UpdateRegion` — `bytesPerRow` parameter (pre-v1.0, #484)