Skip to content

Vulkan: Don't recreate the swapchain over a pre-transform we chose ourselves - #22453

Merged
hrydgard merged 1 commit into
masterfrom
vulkan-suboptimal-transform
Oct 8, 2026
Merged

hrydgard merged 1 commit into
masterfrom
vulkan-suboptimal-transform

Conversation

@hrydgard

@hrydgard hrydgard commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Split out by Claude from a larger branch of Android fixes.

InitSwapchain deliberately refuses the 270 degree pre-transform. The driver then reports VK_SUBOPTIMAL_KHR on every present, which we counted towards recreating the swapchain - and the new one got the same treatment, so in reverse landscape we rebuilt it every single frame.

Remember that the mismatch is ours and stop treating SUBOPTIMAL as a reason to recreate when it is. Any other cause still counts.

…rselves

InitSwapchain deliberately refuses the 270 degree pre-transform. The driver
then reports VK_SUBOPTIMAL_KHR on every present, which we counted towards
recreating the swapchain - and the new one got the same treatment, so in
reverse landscape we rebuilt it every single frame.

Remember that the mismatch is ours and stop treating SUBOPTIMAL as a reason
to recreate when it is. Any other cause still counts.

Split out of the Android rotation work, where it was found: it's a
platform-independent Vulkan fix and stands on its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01152igCdjTNhT29qvphPyPC
@hrydgard hrydgard added this to the v1.21 milestone Oct 8, 2026
@hrydgard
hrydgard merged commit 8d0cb09 into master Oct 8, 2026
27 checks passed
@hrydgard
hrydgard deleted the vulkan-suboptimal-transform branch October 8, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant