impl DynFence for all fences

This commit is contained in:
Andreas Reich 2024-07-21 11:59:03 +02:00
parent 3faed2bf52
commit 1d19a205a5
6 changed files with 10 additions and 1 deletions

View File

@ -525,6 +525,8 @@ pub struct Fence {
raw: d3d12::Fence,
}
impl crate::DynFence for Fence {}
unsafe impl Send for Fence {}
unsafe impl Sync for Fence {}

View File

@ -46,6 +46,7 @@ impl crate::DynBindGroup for Resource {}
impl crate::DynBuffer for Resource {}
impl crate::DynCommandBuffer for Resource {}
impl crate::DynComputePipeline for Resource {}
impl crate::DynFence for Resource {}
impl crate::DynPipelineLayout for Resource {}
impl crate::DynQuerySet for Resource {}
impl crate::DynRenderPipeline for Resource {}

View File

@ -693,6 +693,8 @@ pub struct Fence {
pending: Vec<(crate::FenceValue, glow::Fence)>,
}
impl crate::DynFence for Fence {}
#[cfg(any(
not(target_arch = "wasm32"),
all(

View File

@ -433,7 +433,7 @@ pub trait Api: Clone + fmt::Debug + Sized {
/// before a lower-valued operation, then waiting for the fence to reach the
/// lower value could return before the lower-valued operation has actually
/// finished.
type Fence: fmt::Debug + WasmNotSendSync;
type Fence: DynFence + fmt::Debug;
type BindGroupLayout: fmt::Debug + WasmNotSendSync;
type BindGroup: DynBindGroup;

View File

@ -811,6 +811,8 @@ pub struct Fence {
pending_command_buffers: Vec<(crate::FenceValue, metal::CommandBuffer)>,
}
impl crate::DynFence for Fence {}
unsafe impl Send for Fence {}
unsafe impl Sync for Fence {}

View File

@ -901,6 +901,8 @@ pub enum Fence {
},
}
impl crate::DynFence for Fence {}
impl Fence {
/// Return the highest [`FenceValue`] among the signalled fences in `active`.
///