13 #ifndef RV_VKCommandBuffer_h
14 #define RV_VKCommandBuffer_h
29 class RV_VKCommandPool;
37 RV_VKCommandPool* cmd_pool);
41 "Using VKCommandBuffer that is not recording: "
42 "check that you haven't flushed the buffer");
48 void beginRecording();
57 bool isRecording()
const;
74 for (
auto& callback : myCompletionCallbacks)
80 myCompletionCallbacks.clear();
86 for (
auto& callback : mySubmissionCallbacks)
92 mySubmissionCallbacks.clear();
97 myCompletionCallbacks.append(callback);
102 mySubmissionCallbacks.append(callback);
135 bool myIsRecording =
false;
152 RV_VKCommandPool* cmd_pool,
153 VkCommandBuffer cmd_buf,
157 , myCmdPool(cmd_pool)
158 , myVkCmdBuf(cmd_buf)
159 , myLevel(info.
level)
160 , myCompleteFence(fence)
165 friend class RV_VKCommandPool;
166 friend class RV_VKQueue;
183 :
myObj(std::move(obj))
VkCommandBuffer getVkCmdBuf()
void handleSubmissionCallbacks(RV_Instance *inst)
RV_VKCommandBuffer::Callback RVmakeDestroyPtrTask(UT_UniquePtr< T > obj)
VkFlags VkPipelineStageFlags
RV_VKCommandBuffer(RV_Instance *inst, RV_VKCommandPool *cmd_pool, VkCommandBuffer cmd_buf, const VkCommandBufferAllocateInfo &info, VkFence fence)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
#define UT_ASSERT_MSG(ZZ,...)
void operator()(RV_Instance *)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
UT_Array< VkPipelineStageFlags > myWaitStages
UT_Array< VkSemaphore > mySignalSems
std::function< T > UT_Function
Handle to the main interface of Vulkan.
void addCompletionCallback(const Callback &callback)
void handleCompletionCallbacks(RV_Instance *inst)
RV_VKPipelineStateInfo myPipeState
UT_Array< VkPipelineStageFlags > mySignalStages
void addSubmissionCallback(const Callback &callback)
UT_Array< Callback > mySubmissionCallbacks
VkCommandBuffer myVkCmdBuf
LeafData & operator=(const LeafData &)=delete
RV_VKCommandPool * getCmdPool()
UT_Array< VkSemaphore > myWaitSems
UT_Array< Callback > myCompletionCallbacks
UT_Function< void(RV_Instance *)> Callback
RV_DestroyPtrTask(UT_UniquePtr< T > obj)
class RV_VKCommandPool * myCmdPool