MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ wait_for_fences()

void MayaFlux::Portal::Graphics::ShaderFoundry::wait_for_fences ( const std::vector< FenceID > &  fence_ids)

Wait for multiple fences to be signaled.

Parameters
fence_idsVector of fence IDs to wait on

Definition at line 965 of file ShaderFoundry.cpp.

966{
967 std::vector<vk::Fence> fences;
968 for (auto fence_id : fence_ids) {
969 auto it = m_fences.find(fence_id);
970 if (it != m_fences.end()) {
971 fences.push_back(it->second.fence);
972 }
973 }
974
975 if (!fences.empty()) {
976 if (get_device().waitForFences(static_cast<uint32_t>(fences.size()), fences.data(), VK_TRUE, UINT64_MAX) != vk::Result::eSuccess) {
978 "Failed to wait for fences");
979 return;
980 }
981 }
982
983 for (auto fence_id : fence_ids) {
984 auto it = m_fences.find(fence_id);
985 if (it != m_fences.end()) {
986 it->second.signaled = true;
987 }
988 }
989}
#define MF_ERROR(comp, ctx,...)
vk::Device get_device() const
Get logical device handle.
std::unordered_map< FenceID, FenceState > m_fences
@ ShaderCompilation
Shader compilation tasks (Portal::Graphics::ShaderCompiler)
@ Portal
High-level user-facing API layer.

References get_device(), m_fences, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Journal::ShaderCompilation.

+ Here is the call graph for this function: