18#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_SUBMITSCHEDULER
19#define INCLUDED_RENDERER_BACKEND_VULKAN_SUBMITSCHEDULER
23#include <glad/vulkan.h>
39class CRingCommandContext;
A helper class to batch VkQueueSubmit calls and track VkCommandBuffer usages properly.
Definition: SubmitScheduler.h:47
bool AcquireNextImage(CSwapChain &swapChain)
Definition: SubmitScheduler.cpp:94
std::vector< VkCommandBuffer > m_SubmittedCommandBuffers
Definition: SubmitScheduler.h:105
VkSemaphore m_NextSubmitSignalSemaphore
Definition: SubmitScheduler.h:103
CSubmitScheduler(CDevice *device, const uint32_t queueFamilyIndex, VkQueue queue)
Definition: SubmitScheduler.cpp:37
bool m_DebugWaitIdleBeforePresent
Definition: SubmitScheduler.h:111
uint32_t GetFrameID() const
Definition: SubmitScheduler.h:63
VkSemaphore m_NextWaitSemaphore
Definition: SubmitScheduler.h:101
VkQueue m_Queue
Definition: SubmitScheduler.h:69
void Present(CSwapChain &swapChain)
Definition: SubmitScheduler.cpp:110
std::unique_ptr< CRingCommandContext > m_AcquireCommandContext
Definition: SubmitScheduler.h:107
uint32_t m_FenceIndex
Definition: SubmitScheduler.h:78
SubmitHandle m_CurrentHandle
Definition: SubmitScheduler.h:82
SubmitHandle Submit(VkCommandBuffer commandBuffer)
Definition: SubmitScheduler.cpp:127
VkPipelineStageFlags m_NextWaitDstStageMask
Definition: SubmitScheduler.h:102
void Flush()
Definition: SubmitScheduler.cpp:152
static constexpr SubmitHandle INVALID_SUBMIT_HANDLE
Definition: SubmitScheduler.h:50
std::array< FrameObject, NUMBER_OF_FRAMES_IN_FLIGHT > m_FrameObjects
Definition: SubmitScheduler.h:99
void WaitUntilFree(const SubmitHandle handle)
Definition: SubmitScheduler.cpp:133
CDevice * m_Device
Definition: SubmitScheduler.h:68
uint32_t m_FrameID
Definition: SubmitScheduler.h:81
bool m_DebugWaitIdleBeforeAcquire
Definition: SubmitScheduler.h:110
~CSubmitScheduler()
Definition: SubmitScheduler.cpp:76
bool m_DebugWaitIdleAfterPresent
Definition: SubmitScheduler.h:112
std::vector< Fence > m_Fences
Definition: SubmitScheduler.h:77
uint32_t SubmitHandle
Definition: SubmitScheduler.h:49
std::queue< SubmittedHandle > m_SubmittedHandles
Definition: SubmitScheduler.h:88
std::unique_ptr< CRingCommandContext > m_PresentCommandContext
Definition: SubmitScheduler.h:108
Definition: SwapChain.h:44
Backend
Definition: Backend.h:28
Definition: VideoMode.h:29
Definition: SubmitScheduler.h:72
VkFence value
Definition: SubmitScheduler.h:73
SubmitHandle lastUsedHandle
Definition: SubmitScheduler.h:74
bool inUse
Definition: SubmitScheduler.h:75
Definition: SubmitScheduler.h:93
VkSemaphore submitDone
Definition: SubmitScheduler.h:97
VkSemaphore acquireImageSemaphore
Definition: SubmitScheduler.h:95
Definition: SubmitScheduler.h:84
SubmitHandle value
Definition: SubmitScheduler.h:85
uint32_t fenceIndex
Definition: SubmitScheduler.h:86
unsigned int uint32_t
Definition: wposix_types.h:53