mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Add getCurrentCommandBuffer
for all frame workloads
Rather than allocating new command buffers for each small task, schedule all work onto the frame's main command buffer to be dispatched at display-time. Fixes all layout transition and synchronization issues.
This commit is contained in:
parent
cb8c53e0b8
commit
52ddaae221
2 changed files with 19 additions and 55 deletions
|
@ -50,6 +50,8 @@ class RendererVK final : public Renderer {
|
|||
std::vector<std::vector<vk::UniqueFramebuffer>> frameFramebuffers = {};
|
||||
std::vector<vk::UniqueCommandBuffer> frameGraphicsCommandBuffers = {};
|
||||
|
||||
const vk::CommandBuffer& getCurrentCommandBuffer() const { return frameGraphicsCommandBuffers[frameBufferingIndex].get(); }
|
||||
|
||||
// Todo:
|
||||
// Use `{colourBuffer,depthBuffer}Loc` to maintain an std::map-cache of framebuffers
|
||||
struct Texture {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue