Skip to content

v0.28.2: Surface.ActualExtent + Vulkan swapchain extent logging#184

Merged
kolkov merged 1 commit into
mainfrom
release/v0.28.2
May 17, 2026
Merged

v0.28.2: Surface.ActualExtent + Vulkan swapchain extent logging#184
kolkov merged 1 commit into
mainfrom
release/v0.28.2

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented May 17, 2026

Summary

Root cause of X11 HiDPI quarter-screen (gg#327): Vulkan silently clamped extent, MSAA textures used unclamped dimensions.

Test plan

  • go build ./... — Windows, Linux, macOS
  • GOOS=js GOARCH=wasm go build . — WASM
  • go test ./... — all pass
  • golangci-lint run --timeout=5m — 0 issues (Windows, Linux, macOS)
  • gofmt -l . — clean

…HIDPI-001)

Vulkan swapchain silently clamped extent to driver capabilities range.
On X11 HiDPI, requested 1600x1200 clamped to 800x600 — MSAA textures
used unclamped dimensions → quarter-screen rendering.

Fix: three-level enterprise approach:
1. Diagnostic logging after vkGetPhysicalDeviceSurfaceCapabilitiesKHR
   (Debug) + warn when extent differs from requested (Warn)
2. Store actual extent on Swapchain struct (was declared but never set)
3. Surface.ActualExtent() on HAL interface + all 8 backends + public API

Rust wgpu reference: does NOT clamp (native.rs:189-197), trusts driver.
We keep defensive clamp but propagate actual extent for callers.

Closes wgpu#183.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
surface_native.go 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 39af36b into main May 17, 2026
10 of 11 checks passed
@kolkov kolkov deleted the release/v0.28.2 branch May 17, 2026 12:52
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.

Vulkan: no logging of swapchain extent after capabilities clamping — HiDPI quarter-screen root cause

1 participant