MayaFlux 0.3.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 961 of file ShaderFoundry.cpp.

962{
963 std::vector<vk::Fence> fences;
964 for (auto fence_id : fence_ids) {
965 auto it = m_fences.find(fence_id);
966 if (it != m_fences.end()) {
967 fences.push_back(it->second.fence);
968 }
969 }
970
971 if (!fences.empty()) {
972 if (get_device().waitForFences(static_cast<uint32_t>(fences.size()), fences.data(), VK_TRUE, UINT64_MAX) != vk::Result::eSuccess) {
974 "Failed to wait for fences");
975 return;
976 }
977 }
978
979 for (auto fence_id : fence_ids) {
980 auto it = m_fences.find(fence_id);
981 if (it != m_fences.end()) {
982 it->second.signaled = true;
983 }
984 }
985}
#define MF_ERROR(comp, ctx,...)
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: