13 #ifndef RV_VKCommandBuffer_h
14 #define RV_VKCommandBuffer_h
29 class RV_VKCommandPool;
36 RV_VKCommandPool* cmd_pool);
40 "Using VKCommandBuffer that is not recording: "
41 "check that you haven't flushed the buffer");
47 void beginRecording();
56 bool isRecording()
const;
73 for (
auto& callback : myCompletionCallbacks)
79 myCompletionCallbacks.clear();
85 for (
auto& callback : mySubmissionCallbacks)
91 mySubmissionCallbacks.clear();
96 myCompletionCallbacks.append(callback);
101 mySubmissionCallbacks.append(callback);
127 bool myIsRecording =
false;
144 RV_VKCommandPool* cmd_pool,
145 VkCommandBuffer cmd_buf,
149 , myCmdPool(cmd_pool)
150 , myVkCmdBuf(cmd_buf)
151 , myLevel(info.
level)
152 , myCompleteFence(fence)
157 friend class RV_VKCommandPool;
158 friend class RV_VKQueue;
175 :
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
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