MayaFlux 1.0.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 1201 of file ShaderFoundry.cpp.

1202{
1203 std::vector<vk::Fence> fences;
1204 for (auto fence_id : fence_ids) {
1205 auto it = m_fences.find(fence_id);
1206 if (it != m_fences.end()) {
1207 fences.push_back(it->second.fence);
1208 }
1209 }
1210
1211 if (!fences.empty()) {
1212 if (get_device().waitForFences(static_cast<uint32_t>(fences.size()), fences.data(), VK_TRUE, UINT64_MAX) != vk::Result::eSuccess) {
1214 "Failed to wait for fences");
1215 return;
1216 }
1217 }
1218
1219 for (auto fence_id : fence_ids) {
1220 auto it = m_fences.find(fence_id);
1221 if (it != m_fences.end()) {
1222 it->second.signaled = true;
1223 }
1224 }
1225}
#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: