v0.28.2: Surface.ActualExtent + Vulkan swapchain extent logging#184
Merged
Conversation
…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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surface.ActualExtent()— HAL interface method on all 8 backends. Returns actual swapchain dimensions after driver clamping.slog.Debugafter capabilities query,slog.Warnwhen extent is clamped (HiDPI root cause).Root cause of X11 HiDPI quarter-screen (gg#327): Vulkan silently clamped extent, MSAA textures used unclamped dimensions.
Test plan
go build ./...— Windows, Linux, macOSGOOS=js GOARCH=wasm go build .— WASMgo test ./...— all passgolangci-lint run --timeout=5m— 0 issues (Windows, Linux, macOS)gofmt -l .— clean