Merge pull request 'perf(window): hoist invariant per-frame Vulkan info structs to members' (#78) from claude/issue-43 into master
This commit is contained in:
commit
fa35d86021
2 changed files with 68 additions and 47 deletions
|
|
@ -266,6 +266,16 @@ export namespace Crafter {
|
|||
std::thread thread;
|
||||
VkCommandBuffer drawCmdBuffers[numFrames];
|
||||
VkSubmitInfo submitInfo;
|
||||
// Per-frame Vulkan info structs whose contents are almost entirely
|
||||
// invariant. Initialised once in the constructor; Render() patches only
|
||||
// the few fields that change each frame (the two barriers' image and
|
||||
// the acquire barrier's oldLayout). presentInfo.pImageIndices and
|
||||
// pSwapchains point at the currentBuffer/swapChain members, so they
|
||||
// track value changes (including swapchain recreation) automatically.
|
||||
VkCommandBufferBeginInfo cmdBufInfo;
|
||||
VkImageMemoryBarrier acquireBarrier;
|
||||
VkImageMemoryBarrier presentBarrier;
|
||||
VkPresentInfoKHR presentInfo;
|
||||
Semaphores semaphores;
|
||||
std::uint32_t currentBuffer = 0;
|
||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue