mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Remove separate presentation/graphics command buffers
Now there is just one primary command buffer where all work is enqueued into. At the end of the frame, the next frame's CPU-side fence is waited on before resetting and beginning its command buffer again for recording. This command buffer must always be in the RECORDING state.
This commit is contained in:
parent
6052abe551
commit
d4b75deaf8
2 changed files with 18 additions and 38 deletions
|
@ -43,14 +43,13 @@ class RendererVK final : public Renderer {
|
|||
|
||||
// Frame-buffering data
|
||||
// Each vector is `frameBufferingCount` in size
|
||||
std::vector<vk::UniqueCommandBuffer> framePresentCommandBuffers = {};
|
||||
std::vector<vk::UniqueSemaphore> swapImageFreeSemaphore = {};
|
||||
std::vector<vk::UniqueSemaphore> renderFinishedSemaphore = {};
|
||||
std::vector<vk::UniqueFence> frameFinishedFences = {};
|
||||
std::vector<std::vector<vk::UniqueFramebuffer>> frameFramebuffers = {};
|
||||
std::vector<vk::UniqueCommandBuffer> frameGraphicsCommandBuffers = {};
|
||||
std::vector<vk::UniqueCommandBuffer> frameCommandBuffers = {};
|
||||
|
||||
const vk::CommandBuffer& getCurrentCommandBuffer() const { return frameGraphicsCommandBuffers[frameBufferingIndex].get(); }
|
||||
const vk::CommandBuffer& getCurrentCommandBuffer() const { return frameCommandBuffers[frameBufferingIndex].get(); }
|
||||
|
||||
// Todo:
|
||||
// Use `{colourBuffer,depthBuffer}Loc` to maintain an std::map-cache of framebuffers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue