From 57221195fefa23dbc8042b33f127e65892554426 Mon Sep 17 00:00:00 2001 From: Andrey Kolkov Date: Sun, 23 Aug 2026 12:56:05 +0300 Subject: [PATCH 1/3] chore: prepare release v0.31.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CHANGELOG: add v0.31.6 entry (PR #312 copy usage tracking, docs updates) - AGENTS.md: update version v0.30.22 → v0.31.6 and all dep versions - README.md: goffi v0.6.1 → v0.6.3 - ARCHITECTURE.md: update all dep versions to current - .gitignore: add .backup-investigation/ --- .gitignore | 5 ++++- AGENTS.md | 2 +- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- docs/ARCHITECTURE.md | 10 +++++----- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c417cf54..922ef395 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,7 @@ __debug_bin* # Private dev docs docs/dev/ -tmp/ \ No newline at end of file +tmp/ + +# Investigation backups +.backup-investigation/ \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 8ee35535..0e72f364 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -65,7 +65,7 @@ wgpu (public API — Device, Queue, Buffer, Texture, Pipeline...) ## Current Version -v0.30.22 | Go 1.25+ | Dependencies: naga v0.17.15, gpucontext v0.21.1, gputypes v0.5.1, goffi v0.6.1, webgpu v0.5.3 +v0.31.6 | Go 1.25+ | Dependencies: naga v0.18.0, gpucontext v0.28.0, gputypes v0.5.2, goffi v0.6.3, webgpu v0.5.5 ## Build & Test diff --git a/CHANGELOG.md b/CHANGELOG.md index 2802cef7..b178902c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ 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.6] - 2026-08-23 + +### Added + +- **core:** Atomic copy usage tracking for all 4 copy commands (#312, @besmpl) + - `CopyBufferToBuffer`, `CopyBufferToTexture`, `CopyTextureToBuffer`, `CopyTextureToTexture` — preflight validates ALL endpoints before committing any scope mutation + - `ReplaceUsage` on `BufferUsageScope` / `TextureUsageScope` for post-preflight unconditional commit + - `RecordTextureUsage` / `ReplaceTextureUsage` on `CoreCommandEncoder` + - `explicitTextureTransitions` map for barrier-aware scope resolution + - Released buffer check in `CopyBufferToBuffer` (was silently returning) + - 1,100+ LOC tests: atomicity invariants, refcount lifecycle, guard branches + +### Fixed + +- **docs:** Update stale dependency versions in AGENTS.md, README.md, ARCHITECTURE.md + ## [0.31.5] - 2026-08-18 ### Added diff --git a/README.md b/README.md index 46cbd4f5..79ae2aa0 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ CGO_ENABLED=0 go build > **Note:** wgpu uses Pure Go FFI via [goffi](https://github.com/go-webgpu/goffi). Both `CGO_ENABLED=0` (default, zero C compiler dependency) and `CGO_ENABLED=1` (for race detector or coexistence with CGO libraries) are supported. The unreleased Android/arm64 Vulkan implementation is documented separately in -[Android Vulkan preview](docs/ANDROID.md). It consumes canonical goffi v0.6.1 +[Android Vulkan preview](docs/ANDROID.md). It consumes canonical goffi v0.6.3 and is not yet a released support claim; the optional Rust path temporarily pins the exact merged WebGPU Android source until that dependency is released. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 2e48dc46..b5e1b8e0 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -334,10 +334,10 @@ gogpu (app framework) / gg (2D graphics) ``` External dependencies: -- `github.com/gogpu/naga` v0.17.15 — shader compiler (WGSL → SPIR-V / MSL / GLSL / HLSL / DXIL), Pure Go -- `github.com/gogpu/gputypes` v0.5.1 — shared WebGPU type definitions -- `github.com/gogpu/gpucontext` v0.21.1 — shared interfaces (DeviceProvider, PlatformProvider) -- `github.com/go-webgpu/goffi` v0.6.2 — Pure Go FFI for Vulkan/Metal/DX12 symbol loading (Android Bionic support) -- `github.com/go-webgpu/webgpu` v0.5.4 — Rust FFI backend (wgpu-native v29, Android surface, timestamp period) +- `github.com/gogpu/naga` v0.18.0 — shader compiler (WGSL → SPIR-V / MSL / GLSL / HLSL / DXIL), Pure Go +- `github.com/gogpu/gputypes` v0.5.2 — shared WebGPU type definitions +- `github.com/gogpu/gpucontext` v0.28.0 — shared interfaces (DeviceProvider, PlatformProvider) +- `github.com/go-webgpu/goffi` v0.6.3 — Pure Go FFI for Vulkan/Metal/DX12 symbol loading (Android Bionic support) +- `github.com/go-webgpu/webgpu` v0.5.5 — Rust FFI backend (wgpu-native v29, Android surface, timestamp period) - `github.com/gogpu/galloc` v0.1.0 — O(1) offset allocator (planned integration for memory sub-allocation) - `golang.org/x/sys` v0.47.0 — platform syscall definitions From a76711e4f45a5393c45ab7950a4de1e99948cdf8 Mon Sep 17 00:00:00 2001 From: Andrey Kolkov Date: Sun, 23 Aug 2026 13:04:38 +0300 Subject: [PATCH 2/3] fix: exclude nolintlint for browser convert files (CI lint blind spot) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI lint runs on ubuntu (GOOS=linux) — browser files with //go:build js,wasm are invisible. nolintlint flags //nolint:goconst as unused because goconst never runs on these files in CI. Same root cause as Metal lint blind spot (v0.31.3). Widened exclusion to cover all convert_*.go browser files. --- .golangci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 87bf666a..d38b620c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -184,9 +184,10 @@ linters: # Browser backend enum-to-string conversions: repeated string literals # in switch/default are intentional for readability (each function is # a self-contained WebGPU spec mapping). - - path: internal/browser/convert_enums\.go + - path: internal/browser/convert_.*\.go linters: - goconst + - nolintlint # DX12 COM bindings - Windows API naming conventions preserved # D3D12_* types match the Windows SDK headers exactly for documentation cross-reference From c1d9e29e718d29d865774d1628bd51418dc0450b Mon Sep 17 00:00:00 2001 From: Andrey Kolkov Date: Sun, 23 Aug 2026 13:18:06 +0300 Subject: [PATCH 3/3] fix: complete cross-platform lint exclusions (browser + rust backends) Extend golangci-lint exclusions for all platform-specific files invisible to CI lint runner (ubuntu, GOOS=linux). Known upstream bug (golangci/golangci-lint#3833). Browser (internal/browser/): revive var-naming (ref_ avoids Ref() collision), gocritic, nestif (JS interop nesting). Rust (*_rust.go): nolintlint for invisible //nolint directives. Browser mapped_range: nolintlint for //nolint:gosec. Verified: 0 issues on all 4 targets (Windows, Linux, macOS, WASM). --- .golangci.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d38b620c..5ccc5219 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -175,19 +175,36 @@ linters: linters: - errcheck + # Rust FFI backend (//go:build rust): invisible to CI lint (GOOS=linux). + # nolint directives appear "unused" because suppressed linters never run. + - path: .*_rust\.go + linters: + - nolintlint + + # Browser-only mapped range (//go:build js && wasm): same CI blind spot. + - path: mapped_range_browser\.go + linters: + - nolintlint + # Internal utilities - path: internal/.*\.go linters: - gocyclo - cyclop - # Browser backend enum-to-string conversions: repeated string literals - # in switch/default are intentional for readability (each function is - # a self-contained WebGPU spec mapping). - - path: internal/browser/convert_.*\.go + # Browser backend (//go:build js && wasm): invisible to CI lint runner + # (ubuntu, GOOS=linux). nolintlint false positives (golangci-lint#3833). + # revive var-naming: ref_ field intentionally underscore-suffixed to avoid + # collision with Ref() method (Go disallows same-name field + method). + # gocritic/nestif: browser JS interop has unavoidable nesting (DOM-style + # null checks on js.Value chains). + - path: internal/browser/.*\.go linters: - goconst - nolintlint + - revive + - gocritic + - nestif # DX12 COM bindings - Windows API naming conventions preserved # D3D12_* types match the Windows SDK headers exactly for documentation cross-reference