goldy 0.2.0

Fondaco Machine GPU runtime for Rust (Vulkan, DX12, Metal)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Host-side waits run on the submission worker before GPU work.

use anyhow::Result;
use windows::Win32::Graphics::Direct3D12::ID3D12Fence;

/// A wait the submission worker performs on the CPU before `ExecuteCommandLists`.
#[derive(Clone)]
pub(super) enum HostWait {
    Fence { fence: ID3D12Fence, value: u64 },
}

impl HostWait {
    pub(super) fn wait(&self) -> Result<()> {
        match self {
            HostWait::Fence { fence, value } => super::utils::wait_for_fence(fence, *value),
        }
    }
}