Nebula
Loading...
Searching...
No Matches
Vulkan::VkScheduler Class Reference

#include <vkscheduler.h>

Public Types

enum  CommandPass {
  OnBeginFrame , OnEndFrame , OnBeginPass , OnNextSubpass ,
  OnEndPass , OnMainTransferSubmitted , OnMainDrawSubmitted , OnMainComputeSubmitted ,
  OnBeginTransferThread , OnBeginDrawThread , OnBeginComputeThread , OnTransferThreadsSubmitted ,
  OnDrawThreadsSubmitted , OnComputeThreadsSubmitted , OnHandleTransferFences , OnHandleDrawFences ,
  OnHandleComputeFences , OnHandleSparseFences , OnHandleFences , OnBindGraphicsPipeline ,
  OnBindComputePipeline , NumCommandPasses
}
 

Public Member Functions

 VkScheduler ()
 constructor
 
virtual ~VkScheduler ()
 destructor
 
void PushImageLayoutTransition (CoreGraphicsQueueType queue, CoreGraphics::BarrierStage left, CoreGraphics::BarrierStage right, VkImageMemoryBarrier barrier)
 push image layout change
 
void PushImageOwnershipChange (CoreGraphicsQueueType queue, CoreGraphics::BarrierStage left, CoreGraphics::BarrierStage right, VkImageMemoryBarrier barrier)
 push transition image ownership transition
 
void PushImageColorClear (const VkImage &image, const CoreGraphicsQueueType queue, VkImageLayout layout, VkClearColorValue clearValue, VkImageSubresourceRange subres)
 push image color clear
 
void PushImageDepthStencilClear (const VkImage &image, const CoreGraphicsQueueType queue, VkImageLayout layout, VkClearDepthStencilValue clearValue, VkImageSubresourceRange subres)
 push image depth stencil clear
 
void PushImageUpdate (const VkImage &img, const VkImageCreateInfo &info, uint32_t mip, uint32_t face, VkDeviceSize size, uint32_t *data)
 setup staging image update for later execution
 
void ExecuteCommandPass (const CommandPass &pass)
 execute stacked commands
 
void SetDevice (const VkDevice dev)
 set device to be used by this scheduler
 
void Begin ()
 begin new cycle for all queues
 
void EndTransfers ()
 end cycle for transfers
 
void EndDraws ()
 end cycle for draws
 
void EndComputes ()
 end cycle for computes
 
void Discard ()
 discard scheduler
 

Private Member Functions

 __DeclareSingleton (VkScheduler)
 
void PushCommand (const VkDeferredCommand &cmd, const CommandPass &pass)
 push command to sheduler
 

Private Attributes

bool putTransferFenceThisFrame
 
bool putSparseFenceThisFrame
 
bool putComputeFenceThisFrame
 
bool putDrawFenceThisFrame
 
VkDevice dev
 
Util::FixedArray< Util::Array< VkDeferredCommand > > commands
 
Util::Dictionary< VkFence, Util::Array< VkDeferredCommand > > transferFenceCommands
 
Util::Dictionary< VkFence, Util::Array< VkDeferredCommand > > drawFenceCommands
 
Util::Dictionary< VkFence, Util::Array< VkDeferredCommand > > computeFenceCommands
 
Util::Dictionary< VkFence, Util::Array< VkDeferredCommand > > sparseFenceCommands
 

Friends

class VkUtilities
 
void BindDescriptorsGraphics (const VkDescriptorSet *descriptors, uint32_t baseSet, uint32_t setCount, const uint32_t *offsets, uint32_t offsetCount, bool shared)
 
void BindDescriptorsCompute (const VkDescriptorSet *descriptors, uint32_t baseSet, uint32_t setCount, const uint32_t *offsets, uint32_t offsetCount)
 
void EndDrawThreads ()
 
void EndDrawSubpass ()
 

Member Enumeration Documentation

◆ CommandPass

Enumerator
OnBeginFrame 
OnEndFrame 
OnBeginPass 
OnNextSubpass 
OnEndPass 
OnMainTransferSubmitted 
OnMainDrawSubmitted 
OnMainComputeSubmitted 
OnBeginTransferThread 
OnBeginDrawThread 
OnBeginComputeThread 
OnTransferThreadsSubmitted 
OnDrawThreadsSubmitted 
OnComputeThreadsSubmitted 
OnHandleTransferFences 
OnHandleDrawFences 
OnHandleComputeFences 
OnHandleSparseFences 
OnHandleFences 
OnBindGraphicsPipeline 
OnBindComputePipeline 
NumCommandPasses 

Constructor & Destructor Documentation

◆ VkScheduler()

Vulkan::VkScheduler::VkScheduler ( )

constructor

◆ ~VkScheduler()

Vulkan::VkScheduler::~VkScheduler ( )
virtual

destructor

Member Function Documentation

◆ __DeclareSingleton()

Vulkan::VkScheduler::__DeclareSingleton ( VkScheduler )
private

◆ Begin()

void Vulkan::VkScheduler::Begin ( )

begin new cycle for all queues

◆ Discard()

void Vulkan::VkScheduler::Discard ( )

discard scheduler

◆ EndComputes()

void Vulkan::VkScheduler::EndComputes ( )

end cycle for computes

◆ EndDraws()

void Vulkan::VkScheduler::EndDraws ( )

end cycle for draws

◆ EndTransfers()

void Vulkan::VkScheduler::EndTransfers ( )

end cycle for transfers

◆ ExecuteCommandPass()

void Vulkan::VkScheduler::ExecuteCommandPass ( const CommandPass & pass)

execute stacked commands

◆ PushCommand()

void Vulkan::VkScheduler::PushCommand ( const VkDeferredCommand & cmd,
const CommandPass & pass )
private

push command to sheduler

◆ PushImageColorClear()

void Vulkan::VkScheduler::PushImageColorClear ( const VkImage & image,
const CoreGraphicsQueueType queue,
VkImageLayout layout,
VkClearColorValue clearValue,
VkImageSubresourceRange subres )

push image color clear

◆ PushImageDepthStencilClear()

void Vulkan::VkScheduler::PushImageDepthStencilClear ( const VkImage & image,
const CoreGraphicsQueueType queue,
VkImageLayout layout,
VkClearDepthStencilValue clearValue,
VkImageSubresourceRange subres )

push image depth stencil clear

◆ PushImageLayoutTransition()

void Vulkan::VkScheduler::PushImageLayoutTransition ( CoreGraphicsQueueType queue,
CoreGraphics::BarrierStage left,
CoreGraphics::BarrierStage right,
VkImageMemoryBarrier barrier )

push image layout change

◆ PushImageOwnershipChange()

void Vulkan::VkScheduler::PushImageOwnershipChange ( CoreGraphicsQueueType queue,
CoreGraphics::BarrierStage left,
CoreGraphics::BarrierStage right,
VkImageMemoryBarrier barrier )

push transition image ownership transition

◆ PushImageUpdate()

void Vulkan::VkScheduler::PushImageUpdate ( const VkImage & img,
const VkImageCreateInfo & info,
uint32_t mip,
uint32_t face,
VkDeviceSize size,
uint32_t * data )

setup staging image update for later execution

◆ SetDevice()

void Vulkan::VkScheduler::SetDevice ( const VkDevice dev)
inline

set device to be used by this scheduler

Friends And Related Symbol Documentation

◆ BindDescriptorsCompute

void BindDescriptorsCompute ( const VkDescriptorSet * descriptors,
uint32_t baseSet,
uint32_t setCount,
const uint32_t * offsets,
uint32_t offsetCount )
friend

◆ BindDescriptorsGraphics

void BindDescriptorsGraphics ( const VkDescriptorSet * descriptors,
uint32_t baseSet,
uint32_t setCount,
const uint32_t * offsets,
uint32_t offsetCount,
bool shared )
friend

◆ EndDrawSubpass

void EndDrawSubpass ( )
friend

◆ EndDrawThreads

void EndDrawThreads ( )
friend

◆ VkUtilities

friend class VkUtilities
friend

Member Data Documentation

◆ commands

Util::FixedArray<Util::Array<VkDeferredCommand> > Vulkan::VkScheduler::commands
private

◆ computeFenceCommands

Util::Dictionary<VkFence, Util::Array<VkDeferredCommand> > Vulkan::VkScheduler::computeFenceCommands
private

◆ dev

VkDevice Vulkan::VkScheduler::dev
private

◆ drawFenceCommands

Util::Dictionary<VkFence, Util::Array<VkDeferredCommand> > Vulkan::VkScheduler::drawFenceCommands
private

◆ putComputeFenceThisFrame

bool Vulkan::VkScheduler::putComputeFenceThisFrame
private

◆ putDrawFenceThisFrame

bool Vulkan::VkScheduler::putDrawFenceThisFrame
private

◆ putSparseFenceThisFrame

bool Vulkan::VkScheduler::putSparseFenceThisFrame
private

◆ putTransferFenceThisFrame

bool Vulkan::VkScheduler::putTransferFenceThisFrame
private

◆ sparseFenceCommands

Util::Dictionary<VkFence, Util::Array<VkDeferredCommand> > Vulkan::VkScheduler::sparseFenceCommands
private

◆ transferFenceCommands

Util::Dictionary<VkFence, Util::Array<VkDeferredCommand> > Vulkan::VkScheduler::transferFenceCommands
private

The documentation for this class was generated from the following files: