Trait gfx::traits::Device [−][src]
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
pub fn get_capabilities(&self) -> &Capabilities
[src]
Returns the capabilities of this Device
.
pub fn pin_submitted_resources(&mut self, &Manager<Self::Resources>)
[src]
Pin everything from this handle manager to live for a frame.
pub fn submit(
&mut self,
&mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>
) -> Result<(), SubmissionError>
[src]
&mut self,
&mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>
) -> Result<(), SubmissionError>
Submits a CommandBuffer
to the GPU for execution.
pub fn fenced_submit(
&mut self,
&mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>,
after: Option<Fence<Self::Resources>>
) -> Result<Fence<Self::Resources>, SubmissionError>
[src]
&mut self,
&mut Self::CommandBuffer,
access: &AccessInfo<Self::Resources>,
after: Option<Fence<Self::Resources>>
) -> Result<Fence<Self::Resources>, SubmissionError>
Submits a CommandBuffer
to the GPU for execution.
returns a fence that is signaled after the GPU has executed all commands
pub fn wait_fence(&mut self, &Fence<Self::Resources>)
[src]
Stalls the current thread until the fence is satisfied
pub fn cleanup(&mut self)
[src]
Cleanup unused resources. This should be called between frames.
Implementations on Foreign Types
impl Device for DummyDevice
[src]
type Resources = DummyResources
type CommandBuffer = DummyCommandBuffer
pub fn get_capabilities(&self) -> &Capabilities
[src]
pub fn pin_submitted_resources(&mut self, &Manager<DummyResources>)
[src]
pub fn submit(
&mut self,
&mut DummyCommandBuffer,
&AccessInfo<<DummyDevice as Device>::Resources>
) -> Result<(), SubmissionError>
[src]
&mut self,
&mut DummyCommandBuffer,
&AccessInfo<<DummyDevice as Device>::Resources>
) -> Result<(), SubmissionError>
pub fn fenced_submit(
&mut self,
&mut <DummyDevice as Device>::CommandBuffer,
&AccessInfo<<DummyDevice as Device>::Resources>,
_after: Option<Fence<<DummyDevice as Device>::Resources>>
) -> Result<Fence<<DummyDevice as Device>::Resources>, SubmissionError>
[src]
&mut self,
&mut <DummyDevice as Device>::CommandBuffer,
&AccessInfo<<DummyDevice as Device>::Resources>,
_after: Option<Fence<<DummyDevice as Device>::Resources>>
) -> Result<Fence<<DummyDevice as Device>::Resources>, SubmissionError>