13 #ifndef RV_VKCommandBuffer_h
14 #define RV_VKCommandBuffer_h
31 class RV_VKCommandPool;
41 RV_VKCommandPool* cmd_pool);
45 "Using VKCommandBuffer that is not recording: "
46 "check that you haven't flushed the buffer");
52 void beginRecording();
61 bool isRecording()
const;
78 for (
auto& callback : myCompletionCallbacks)
84 myCompletionCallbacks.clear();
90 for (
auto& callback : mySubmissionCallbacks)
96 mySubmissionCallbacks.clear();
101 myCompletionCallbacks.append(callback);
106 mySubmissionCallbacks.append(callback);
121 { myLogEntries.append(log); }
154 bool myIsRecording =
false;
180 bool validateUsedResources(
RV_Instance* inst, FILE* out =
nullptr)
const;
190 RV_VKCommandPool* cmd_pool,
191 VkCommandBuffer cmd_buf,
195 , myCmdPool(cmd_pool)
196 , myVkCmdBuf(cmd_buf)
197 , myLevel(info.
level)
198 , myCompleteFence(fence)
203 friend class RV_VKCommandPool;
204 friend class RV_VKQueue;
221 :
myObj(std::move(obj))
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
UT_Array< ResourceInfo > myAccelStructIDs
GLenum GLuint GLenum GLsizei const GLchar * buf
UT_Array< ResourceInfo > myBufferIDs
UT_Array< ResourceInfo > myImageIDs
VkCommandBuffer getVkCmdBuf()
void appendLog(const UT_StringHolder &log)
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
constexpr auto set(type rhs) -> int
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
OIIO_FORCEINLINE T log(const T &v)
UT_Array< ResourceInfo > mySetIDs
UT_Array< UT_StringHolder > myLogEntries
UT_Function< void(RV_Instance *)> Callback
RV_DestroyPtrTask(UT_UniquePtr< T > obj)
class RV_VKCommandPool * myCmdPool