perf(window): hoist invariant per-frame Vulkan info structs to members #78
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!78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/issue-43"
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
Window::Render()reconstructedcmdBufInfo, theVkImageSubresourceRange, bothVkImageMemoryBarrierstructs, andVkPresentInfoKHRon the stack every frame, although only the barriers'image(and the acquire barrier'soldLayout) ever vary between frames.This hoists those invariants to members initialised once in the constructor. Each frame now patches only
acquireBarrier.image/oldLayoutandpresentBarrier.image.presentInfo.pImageIndices/pSwapchainspoint at thecurrentBuffer/swapChainmembers, so they track value changes (including swapchain recreation) automatically.renderComplete != VK_NULL_HANDLEcheck was dead (the semaphore is created once at construction and never cleared), so it is removed; the wait semaphore is wired intopresentInfoin the constructor.VkSubmitInfowas already a member initialised once, so it was left as-is.Testing
crafter-build test— 3 passed (MouseScroll, BLASBuildOptions, PushConstantRewrite).HelloWindowandHelloUIagainst the headless compositor with full Vulkan validation layers enabled: no layout/barrier (VUID) errors across the acquire → barrier → multi-pass → present → barrier loop. Screenshot below confirms correct rendering.Screenshots
Resolves #43