13 #ifndef RV_VKCommandBuffer_h
14 #define RV_VKCommandBuffer_h
32 class RV_VKCommandPool;
42 RV_VKCommandPool* cmd_pool);
46 "Using VKCommandBuffer that is not recording: "
47 "check that you haven't flushed the buffer");
53 void beginRecording();
62 bool isRecording()
const;
79 for (
auto& callback : myCompletionCallbacks)
85 myCompletionCallbacks.clear();
91 for (
auto& callback : mySubmissionCallbacks)
97 mySubmissionCallbacks.clear();
102 myCompletionCallbacks.append(callback);
107 mySubmissionCallbacks.append(callback);
122 { myLogEntries.append(log); }
155 bool myIsRecording =
false;
181 bool validateUsedResources(
RV_Instance* inst, FILE* out =
nullptr)
const;
191 RV_VKCommandPool* cmd_pool,
192 VkCommandBuffer cmd_buf,
196 , myCmdPool(cmd_pool)
197 , myVkCmdBuf(cmd_buf)
198 , myLevel(info.
level)
199 , myCompleteFence(fence)
204 friend class RV_VKCommandPool;
205 friend class RV_VKQueue;
212 template<
typename,
typename =
void>
217 template <
typename T>
219 std::void_t<decltype(std::declval<T>().destroy(
220 std::declval<RV_Instance*>()))>>
231 if constexpr (has_destroy_func<T>)
237 myObj->destroy(inst);
243 :
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,...)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
constexpr bool has_destroy_func
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
void operator()(RV_Instance *inst)
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