Trait gfx_core::Device [−][src]
pub trait Device: Sized { type Resources: Resources; type CommandBuffer: Buffer<Self::Resources>; fn get_capabilities(&self) -> &Capabilities; fn pin_submitted_resources(&mut self, _: &Manager<Self::Resources>); fn submit(
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>
) -> SubmissionResult<()>; fn fenced_submit(
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>,
after: Option<Fence<Self::Resources>>
) -> SubmissionResult<Fence<Self::Resources>>; fn wait_fence(&mut self, _: &Fence<Self::Resources>); fn cleanup(&mut self); }
A Device
is responsible for submitting CommandBuffer
s to the GPU.
Associated Types
type Resources: Resources
[src]
Associated Resources
type.
type CommandBuffer: Buffer<Self::Resources>
[src]
Associated CommandBuffer
type. Every Device
type can only work with one CommandBuffer
type.
Required methods
fn get_capabilities(&self) -> &Capabilities
[src]
Returns the capabilities of this Device
.
fn pin_submitted_resources(&mut self, _: &Manager<Self::Resources>)
[src]
Pin everything from this handle manager to live for a frame.
fn submit(
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>
) -> SubmissionResult<()>
[src]
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>
) -> SubmissionResult<()>
Submits a CommandBuffer
to the GPU for execution.
fn fenced_submit(
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>,
after: Option<Fence<Self::Resources>>
) -> SubmissionResult<Fence<Self::Resources>>
[src]
&mut self,
_: &mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>,
after: Option<Fence<Self::Resources>>
) -> SubmissionResult<Fence<Self::Resources>>
Submits a CommandBuffer
to the GPU for execution.
returns a fence that is signaled after the GPU has executed all commands
fn wait_fence(&mut self, _: &Fence<Self::Resources>)
[src]
Stalls the current thread until the fence is satisfied
fn cleanup(&mut self)
[src]
Cleanup unused resources. This should be called between frames.
Implementors
impl Device for DummyDevice
[src]
type Resources = DummyResources
type CommandBuffer = DummyCommandBuffer
fn get_capabilities(&self) -> &Capabilities
[src]
fn pin_submitted_resources(&mut self, _: &Manager<DummyResources>)
[src]
fn submit(
&mut self,
_: &mut DummyCommandBuffer,
_: &AccessInfo<Self::Resources>
) -> SubmissionResult<()>
[src]
&mut self,
_: &mut DummyCommandBuffer,
_: &AccessInfo<Self::Resources>
) -> SubmissionResult<()>
fn fenced_submit(
&mut self,
_: &mut Self::CommandBuffer,
_: &AccessInfo<Self::Resources>,
_after: Option<Fence<Self::Resources>>
) -> SubmissionResult<Fence<Self::Resources>>
[src]
&mut self,
_: &mut Self::CommandBuffer,
_: &AccessInfo<Self::Resources>,
_after: Option<Fence<Self::Resources>>
) -> SubmissionResult<Fence<Self::Resources>>