Skip to content

Tags

Tags

v0.34.5

Toggle v0.34.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.34.5 — Vulkan depth-only render passes (gogpu#355)

v0.31.6

Toggle v0.31.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
release: v0.31.6 (gogpu#320)

* chore: prepare release v0.31.6

- CHANGELOG: add v0.31.6 entry (PR gogpu#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/

* fix: exclude nolintlint for browser convert files (CI lint blind spot)

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.

* 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).

v0.31.5

Toggle v0.31.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
docs: CHANGELOG v0.31.5 (gogpu#319)

v0.31.4

Toggle v0.31.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: bump gpucontext v0.28.0 + CHANGELOG v0.31.4 (gogpu#317)

v0.31.3

Toggle v0.31.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(browser): nil descriptor guards for all Device.Create* methods (g…

…ogpu#316)

* fix(browser): nil descriptor guards for all Device.Create* methods (gogpu#315)

Browser WASM shim panicked on nil descriptors in CreateTextureView and
other Create* methods. Native and Rust backends already handle nil
correctly. This aligns browser behavior:

- CreateTextureView/CreateSampler: nil desc → default (WebGPU spec)
- CreateBuffer/Texture/ShaderModule/BindGroupLayout/PipelineLayout/
  BindGroup/RenderPipeline/ComputePipeline: nil desc → error

Reported by @darkliquid — blocks ironwail-go WASM HUD rendering.

* docs: CHANGELOG v0.31.3

* fix(metal): resolve 10 macOS-only lint issues invisible to Linux CI

CI lint runs on ubuntu-latest only — darwin build-tagged files were
never checked. Fixed all 10 issues found by macOS cross-platform lint:

- misspell: honour → honor (US locale per .golangci.yml)
- nolintlint: remove 3 stale //nolint:nestif (nestif excluded for hal/ in config)
- revive: rename max → maxCount (shadows Go 1.21 builtin)
- unconvert: remove unnecessary uintptr(unsafe.Sizeof()) conversion
- unparam: add //nolint:unparam for writeTextureShared (error return for API parity)
- unused: remove dead test helper createMetalTextureCopyTestArray
- whitespace: remove leading newline in applyBindGroup

v0.31.2

Toggle v0.31.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: bump gpucontext v0.27.0 + CHANGELOG v0.31.2 (gogpu#314)

v0.31.1

Toggle v0.31.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: bump gputypes v0.5.2 + CHANGELOG v0.31.1 (gogpu#313)

v0.31.0

Toggle v0.31.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(core): resource tracker + inline present barrier (ADR-060, gogpu…

…#308, gogpu#307) (gogpu#310)

* feat(core): TextureTracker + DeviceTracker foundation (ADR-060, gogpu#308)

TextureTracker mirrors existing BufferTracker pattern (core/track/buffer.go):
- TextureUses flags (10 states, Rust wgpu-types parity)
- SkipBarrier: skip when state unchanged AND all ordered
- TextureUsageScope: per-command-buffer usage collection with conflict detection
- TextureTracker: device-level state tracking with Merge() barrier generation
- DeviceTracker: wrapper with MergeTextureScope and TrackPresentTexture

Removed pendingBufferBarriers/pendingTextureBarriers stubs from
core/command.go (unused for 8 months). Added textureScope to
CommandBufferMutable, DeviceTracker to Device.

1,273 LOC new code (386 tracker + 606 tests + 116 device + 165 device tests).
22 test functions, 174 test cases, 3 benchmarks. Zero lint issues.

Submit-time wiring (queue_native.go) follows in next commit.

* fix(vulkan): barrier submit signals present semaphore (ADR-060, gogpu#308)

ensurePresentLayout now allocates a present semaphore via
allocPresentSemaphore() and signals it from the barrier submit.
present() reordered: ensurePresentLayout runs BEFORE
presentWaitSemaphores so the barrier semaphore is included in
vkQueuePresentKHR's wait list.

This fixes a spec-correctness issue where the barrier relied solely on
implicit queue ordering. The present engine now explicitly waits for
the barrier to complete.

TODOs added for full submit-time inline barrier injection via
DeviceTracker — requires core TextureView → TrackerIndex wiring.

* feat(vulkan): inline present barrier in EndEncoding — zero extra vkQueueSubmit (ADR-060, gogpu#308)

Barrier (COLOR_ATTACHMENT_OPTIMAL → PRESENT_SRC_KHR) injected inside the
user's command buffer before vkEndCommandBuffer. ensurePresentLayout()
returns early (layout already PRESENT_SRC). Zero separate submit.

Multi-submit handled: reverse barrier (PRESENT_SRC → COLOR_ATTACHMENT)
in BeginRenderPass when prior submit transitioned to PRESENT_SRC but
current pass needs COLOR_ATTACHMENT for LoadOp::Load.

Single-submit: 1 vkQueueSubmit (was 2). Fixes FPS regression on Intel.
Multi-submit: forward+reverse barriers inline, ensurePresentLayout as
fallback for edge cases (blit-only paths).

Also: moved maintidx exclusion to .golangci.yml HAL path, removed 10
redundant //nolint:maintidx directives across HAL backends.

* feat(core): multi-CB encoder + textureScope population (gogpu#10, gogpu#11, ADR-060, gogpu#308)

Multi-CB encoder (Rust InnerCommandEncoder parity):
- cbList []hal.CommandBuffer on CoreCommandEncoder
- OpenPass/CloseCB/CloseAndSwap/CloseAndPushFront/CloseIfOpen
- Finish() returns ALL CBs, Submit() flattens via halBufferList()
- 18 tests covering all CB ordering patterns

textureScope population in BeginRenderPass:
- Texture.trackingData wired to real TrackerIndexAllocator
- TextureView.Parent references parent Texture for TrackerIndex
- populateTextureScope() records COLOR_TARGET, DEPTH_STENCIL usage
- Texture.Destroy() frees TrackerIndex
- 12 tests covering allocation, freeing, reuse, scope population

HAL interface unchanged. All backends unchanged.

* feat: submit-time texture barrier injection via DeviceTracker (gogpu#12, ADR-060, gogpu#308)

Submit() now merges each CB's textureScope into DeviceTracker,
generates PendingTransitions, and prepends barrier CB to allBuffers.

Data flow: BeginRenderPass → populateTextureScope → Finish →
Submit → MergeTextureScope → BarrierCBFromTransitions → prepend.

Wiring: public Texture holds coreTexture with TrackerIndex.
SurfaceTexture propagates coreTexture. convertRenderPassDesc
wires core.TextureView.Parent for TrackerIndex access.

18 new tests (6 core + 12 public API). Zero lint issues.

* feat(core): wire BufferTracker + usage conflict validation (gogpu#13, gogpu#14, ADR-060, gogpu#308)

BufferTracker (dormant 8 months) wired to Submit path:
- Buffer.trackingData uses real TrackerIndexAllocator
- bufferScope on CommandBufferMutable, populated for SetVertexBuffer,
  SetIndexBuffer, CopyBufferToBuffer/Texture
- Submit merges buffer+texture scopes, generates combined barrier CB

Usage conflict validation (WebGPU spec):
- populateTextureScope returns error on conflict (COLOR_TARGET + RESOURCE)
- RecordBufferUsage detects write+read conflicts (STORAGE_WRITE + UNIFORM)

15 new tests, 1 updated. Zero lint issues.

* chore: cleanup stale comments and misleading docs (gogpu#15, ADR-060, gogpu#308)

- core/resource.go: remove 'placeholder types' and 'CORE-006 stub' comments
  (types are fully defined with HAL integration, tracking is real)
- interpreter.go: fix wrong 'control flow NOT implemented' comment
  (loops, conditionals, phi, switch all implemented since v0.27.0)
- swapchain.go: update ensurePresentLayout doc to describe it as FALLBACK
  (inline barrier in EndEncoding handles common case)
- pending_writes.go: update comment to reference ADR-060 tracker status

* fix: cache swapchain core.Texture per-surface, not per-frame (gogpu#307, ADR-060, gogpu#308)

GetCurrentTexture() was creating a new core.Texture with a new
TrackerIndex on every frame. Nothing ever released them — leaked
~120K objects/min at 2000 FPS, causing 8GB+ memory growth (gogpu#307)
and FPS drop from growing tracker scope slices.

Fix: cache one core.Texture on Surface (swapchainTexture field).
Created lazily on first GetCurrentTexture, reused across frames.
Destroyed on Unconfigure/Configure/Release/retireDevice.

Rust wgpu creates per-frame too but Arc<Texture> Drop auto-frees.
Our cache is even better — zero per-frame allocation.

* fix: barrier encoder stale submissionIndex + TrackerIndex leak + DiscardEncoding layout (ADR-060)

Three bugs found by enterprise validation (3 parallel agents):

1. recordAndTrackAllBarriers used lastSubmissionIndex.Load() (previous
   submit's index) for barrier encoder Defer. Moved to postSubmit with
   actual subIdx — encoder recycled at correct time.

2. Texture.Release() did not free TrackerIndex from coreTexture — leaked
   for every user-created texture until device destroy. Now releases
   TrackingData on Release.

3. DiscardEncoding did not reset swapchain image layout tracking — stale
   COLOR_ATTACHMENT_OPTIMAL remained after discarded render pass while
   actual GPU layout is UNDEFINED. Now resets to UNDEFINED.

* docs: CHANGELOG for ADR-060 core resource tracker (gogpu#308)

* chore: bump gpucontext v0.26.0 + finalize CHANGELOG v0.31.0

v0.30.37

Toggle v0.30.37's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(vulkan): align swapchain FinalLayout with Rust wgpu/Dawn (ADR-059) (

gogpu#304)

Render passes for swapchain images now use COLOR_ATTACHMENT_OPTIMAL
instead of PRESENT_SRC_KHR as FinalLayout. Explicit barrier to
PRESENT_SRC_KHR in ensurePresentLayout() before present.

Eliminated synchronous vkWaitForFences GPU stall — barrier submit
uses no fence, command pool reset deferred to acquireNextImage()
where acquire fence guarantees completion.

Matches Rust wgpu (device.rs:119-120) and Dawn
(RenderPassCache.cpp:173-174).

v0.30.36

Toggle v0.30.36's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(vulkan): accumulated present semaphores for multi-submit sync (AD…

…R-058) (gogpu#302)

Per-image semaphore pool replaces single present semaphore. Each
queue.Submit() signals a new semaphore from the pool, vkQueuePresentKHR
waits on all accumulated semaphores. Fixes g3d#22 race on TBDR GPUs
(Asahi Linux) where only the first submit was synchronized with present.

Rust wgpu SwapchainPresentSemaphores parity (native.rs:743-843).
Pools grow on demand, recycle after present — zero overhead for the
common single-submit-per-frame case.