perf(window): drop dead present-mode queries from swapchain recreate (#45) #79
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Graphics!79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-45"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Removes dead code from the swapchain recreation path that runs on every Wayland drag-resize configure.
CreateSwapchainunconditionally selectedVK_PRESENT_MODE_FIFO_KHR, yet still issued twovkGetPhysicalDeviceSurfacePresentModesKHRcalls and heap-allocated astd::vector<VkPresentModeKHR>to enumerate modes that were never consulted. Deleted both queries, the vector, and theassert; the present mode is now assigned directly.compositeAlphais a surface property that does not change across swapchain recreation, so it is now selected once at construction (and cached on theWindow) instead of being re-derived — with another heap-allocated vector — on every resize configure.Correctness
vkQueueWaitIdle(Device::queue)before swapchain recreation is left intact (required before recreation).compositeAlphaselection logic uses the same priority list, just hoisted to construction wherevulkanSurfacealready exists.Testing
crafter-build test— 3 passed (MouseScroll, BLASBuildOptions, PushConstantRewrite).Crafter.Graphics-Window.cppcompiles clean.Resolves #45