Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::VKImmediateCmdContext Struct Reference

#include <vkResources.h>

Public Types

using FlushCallback = std::function< void(VkCommandBuffer cmd, QueueType queue, U32 queueIndex)>
 

Public Member Functions

 VKImmediateCmdContext (VKDevice &context, QueueType type)
 
 ~VKImmediateCmdContext ()
 
void flushCommandBuffer (FlushCallback &&function, const char *scopeName)
 

Static Public Attributes

static constexpr U8 BUFFER_COUNT = 4u
 

Private Attributes

VKDevice_context
 
const QueueType _type
 
const U32 _queueIndex
 
VkCommandPool _commandPool
 
Mutex _submitLock
 
std::array< VkFence, BUFFER_COUNT_bufferFences
 
std::array< VkCommandBuffer, BUFFER_COUNT_commandBuffers
 
U64 _wrapCounter { 0u }
 
U8 _bufferIndex { 0u }
 

Detailed Description

Definition at line 147 of file vkResources.h.

Member Typedef Documentation

◆ FlushCallback

using Divide::VKImmediateCmdContext::FlushCallback = std::function<void( VkCommandBuffer cmd, QueueType queue, U32 queueIndex )>

Definition at line 151 of file vkResources.h.

Constructor & Destructor Documentation

◆ VKImmediateCmdContext()

Divide::VKImmediateCmdContext::VKImmediateCmdContext ( VKDevice context,
QueueType  type 
)
explicit

Definition at line 431 of file VKWrapper.cpp.

◆ ~VKImmediateCmdContext()

Divide::VKImmediateCmdContext::~VKImmediateCmdContext ( )

Definition at line 449 of file VKWrapper.cpp.

Member Function Documentation

◆ flushCommandBuffer()

void Divide::VKImmediateCmdContext::flushCommandBuffer ( FlushCallback &&  function,
const char *  scopeName 
)

Definition at line 459 of file VKWrapper.cpp.

Member Data Documentation

◆ _bufferFences

std::array<VkFence, BUFFER_COUNT> Divide::VKImmediateCmdContext::_bufferFences
private

Definition at line 167 of file vkResources.h.

◆ _bufferIndex

U8 Divide::VKImmediateCmdContext::_bufferIndex { 0u }
private

Definition at line 170 of file vkResources.h.

◆ _commandBuffers

std::array<VkCommandBuffer, BUFFER_COUNT> Divide::VKImmediateCmdContext::_commandBuffers
private

Definition at line 168 of file vkResources.h.

◆ _commandPool

VkCommandPool Divide::VKImmediateCmdContext::_commandPool
private

Definition at line 163 of file vkResources.h.

◆ _context

VKDevice& Divide::VKImmediateCmdContext::_context
private

Definition at line 159 of file vkResources.h.

◆ _queueIndex

const U32 Divide::VKImmediateCmdContext::_queueIndex
private

Definition at line 161 of file vkResources.h.

◆ _submitLock

Mutex Divide::VKImmediateCmdContext::_submitLock
private

Definition at line 164 of file vkResources.h.

◆ _type

const QueueType Divide::VKImmediateCmdContext::_type
private

Definition at line 160 of file vkResources.h.

◆ _wrapCounter

U64 Divide::VKImmediateCmdContext::_wrapCounter { 0u }
private

Definition at line 169 of file vkResources.h.

◆ BUFFER_COUNT

constexpr U8 Divide::VKImmediateCmdContext::BUFFER_COUNT = 4u
staticconstexpr

Definition at line 149 of file vkResources.h.


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