|
Toast Engine
|
Classes | |
| struct | SharedFamilies |
| For eConcurrent create infos with count entries since one family repeats. More... | |
Public Types | |
| using | Ticket = uint64_t |
| Timeline value so completing one completes every earlier one. | |
Public Member Functions | |
| AsyncCompute (const vk::raii::Device &device, uint32_t queue_family_index, vk::Queue queue, std::mutex *queue_mutex) | |
| AsyncCompute (const AsyncCompute &)=delete | |
| auto | operator= (const AsyncCompute &) -> AsyncCompute &=delete |
| AsyncCompute (AsyncCompute &&)=delete | |
| auto | operator= (AsyncCompute &&) -> AsyncCompute &=delete |
| auto | submit (const std::function< void(vk::CommandBuffer)> &record, std::string_view debug_name={}) -> Ticket |
| auto | isComplete (Ticket ticket) const -> bool |
| auto | wait (Ticket ticket, uint64_t timeout_ns=std::numeric_limits< uint64_t >::max()) const -> bool |
| auto | completedTicket () const -> Ticket |
| auto | lastSubmittedTicket () const -> Ticket |
| auto | queueFamilyIndex () const noexcept -> uint32_t |
| auto | timeline () const noexcept -> vk::Semaphore |
| Never wait on it from a frame submit or the frame couples to async work again. | |
| auto | sharedFamilies (uint32_t graphics_family) const noexcept -> SharedFamilies |
Static Public Attributes | |
| static constexpr Ticket | k_no_ticket = 0 |
| renderer::AsyncCompute::AsyncCompute | ( | const vk::raii::Device & | device, |
| uint32_t | queue_family_index, | ||
| vk::Queue | queue, | ||
| std::mutex * | queue_mutex ) |
| queue_mutex | non null when another subsystem submits to the same VkQueue |
| auto renderer::AsyncCompute::submit | ( | const std::function< void(vk::CommandBuffer)> & | record, |
| std::string_view | debug_name = {} ) -> Ticket |
Thread safe and records outside the lock so threads record in parallel An exception from record propagates and no ticket is handed out
| auto renderer::AsyncCompute::wait | ( | Ticket | ticket, |
| uint64_t | timeout_ns = std::numeric_limits<uint64_t>::max() ) const -> bool |