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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user