Skip to content

cube: Recreate suboptimal swapchains - #1245

Open
candux wants to merge 1 commit into
KhronosGroup:mainfrom
candux:fix/vkcube-wayland-scanout-feedback
Open

cube: Recreate suboptimal swapchains#1245
candux wants to merge 1 commit into
KhronosGroup:mainfrom
candux:fix/vkcube-wayland-scanout-feedback

Conversation

@candux

@candux candux commented Aug 12, 2026

Copy link
Copy Markdown

A swapchain can become suboptimal without its extent changing. Wayland WSI uses this result when DMA-BUF feedback changes, for example when the compositor starts preferring scanout-capable buffers.

Remember a suboptimal acquire until its image has been presented, then try recreating the swapchain. If the replacement remains suboptimal, keep using it instead of recreating every frame. A clean frame re-arms the retry for later surface changes.

Tested on KWin. Before this change, vkcube could use direct scanout only after a resize forced swapchain recreation. With this change, it switches to scanout-capable buffers without requiring a resize.

A swapchain can become suboptimal without its extent changing. Wayland
WSI uses this result when DMA-BUF feedback changes, for example when the
compositor starts preferring scanout-capable buffers.

Remember a suboptimal acquire until its image has been presented, then
try recreating the swapchain. If the replacement remains suboptimal,
keep using it instead of recreating every frame. A clean frame re-arms
the retry for later surface changes.

Tested on KWin. Before this change, vkcube could use direct scanout
only after a resize forced swapchain recreation. With this change, it
switches to scanout-capable buffers without requiring a resize.
@ci-tester-lunarg

Copy link
Copy Markdown

Author candux not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

Author candux not on autobuild list. Waiting for curator authorization before starting CI build.

@CLAassistant

CLAassistant commented Aug 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

3 participants