diff --git a/.gitignore b/.gitignore index c417cf5..922ef39 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/.golangci.yml b/.golangci.yml index 87bf666..5ccc521 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -175,18 +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_enums\.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 diff --git a/AGENTS.md b/AGENTS.md index 8ee3553..0e72f36 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 2802cef..b178902 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 46cbd4f..79ae2aa 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 2e48dc4..b5e1b8e 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