MayaFlux 0.1.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 845 of file ShaderFoundry.cpp.

846{
847 std::vector<vk::Fence> fences;
848 for (auto fence_id : fence_ids) {
849 auto it = m_fences.find(fence_id);
850 if (it != m_fences.end()) {
851 fences.push_back(it->second.fence);
852 }
853 }
854
855 if (!fences.empty()) {
856 if (get_device().waitForFences(static_cast<uint32_t>(fences.size()), fences.data(), VK_TRUE, UINT64_MAX) != vk::Result::eSuccess) {
858 "Failed to wait for fences");
859 return;
860 }
861 }
862
863 for (auto fence_id : fence_ids) {
864 auto it = m_fences.find(fence_id);
865 if (it != m_fences.end()) {
866 it->second.signaled = true;
867 }
868 }
869}
#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: