Skip to content

fix(vulkan): align swapchain FinalLayout with Rust wgpu/Dawn (ADR-059) - #304

Merged
kolkov merged 1 commit into
mainfrom
release/v0.30.37
Aug 7, 2026
Merged

fix(vulkan): align swapchain FinalLayout with Rust wgpu/Dawn (ADR-059)#304
kolkov merged 1 commit into
mainfrom
release/v0.30.37

Conversation

@kolkov

@kolkov kolkov commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Swapchain render passes now use COLOR_ATTACHMENT_OPTIMAL instead of PRESENT_SRC_KHR as FinalLayout
  • Explicit barrier COLOR_ATTACHMENT_OPTIMAL → PRESENT_SRC_KHR in ensurePresentLayout() before present
  • Eliminated synchronous vkWaitForFences GPU stall — deferred command pool reset to acquireNextImage()
  • Matches Rust wgpu (device.rs:119-120) and Dawn (RenderPassCache.cpp:173-174)

Test plan

  • go build ./... — Windows, Linux, macOS, WASM
  • go test -count=1 ./... — 18 packages, 0 failures
  • golangci-lint run — 0 issues
  • Ecosystem build (gg, gogpu, ui, g3d) — all pass
  • Ecosystem tests — all pass (0 regressions)
  • Visual: Asahi Linux Vulkan TBDR — needs @porjo test

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).
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov merged commit 46c6b77 into main Aug 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant