MayaFlux 0.2.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 946 of file ShaderFoundry.cpp.

947{
948 std::vector<vk::Fence> fences;
949 for (auto fence_id : fence_ids) {
950 auto it = m_fences.find(fence_id);
951 if (it != m_fences.end()) {
952 fences.push_back(it->second.fence);
953 }
954 }
955
956 if (!fences.empty()) {
957 if (get_device().waitForFences(static_cast<uint32_t>(fences.size()), fences.data(), VK_TRUE, UINT64_MAX) != vk::Result::eSuccess) {
959 "Failed to wait for fences");
960 return;
961 }
962 }
963
964 for (auto fence_id : fence_ids) {
965 auto it = m_fences.find(fence_id);
966 if (it != m_fences.end()) {
967 it->second.signaled = true;
968 }
969 }
970}
#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: