[−][src]Trait gfx_hal::adapter::PhysicalDevice
Represents a physical device (such as a GPU) capable of supporting the given backend.
Required methods
unsafe fn open(
&self,
families: &[(&B::QueueFamily, &[QueuePriority])],
requested_features: Features
) -> Result<Gpu<B>, CreationError>
&self,
families: &[(&B::QueueFamily, &[QueuePriority])],
requested_features: Features
) -> Result<Gpu<B>, CreationError>
Create a new logical device with the requested features. If requested_features
is
empty (e.g. through Features::empty()
) then only the core features are supported.
Errors
- Returns
TooManyObjects
if the implementation can't create a new logical device. - Returns
MissingFeature
if the implementation does not support a requested feature.
Examples
use gfx_hal::{adapter::PhysicalDevice, Features}; let gpu = physical_device.open(&[(&family, &[1.0; 1])], Features::empty());
fn format_properties(&self, format: Option<Format>) -> Properties
Fetch details for a particular format.
fn image_format_properties(
&self,
format: Format,
dimensions: u8,
tiling: Tiling,
usage: Usage,
view_caps: ViewCapabilities
) -> Option<FormatProperties>
&self,
format: Format,
dimensions: u8,
tiling: Tiling,
usage: Usage,
view_caps: ViewCapabilities
) -> Option<FormatProperties>
Fetch details for a particular image format.
fn memory_properties(&self) -> MemoryProperties
Fetch details for the memory regions provided by the device.
fn features(&self) -> Features
Returns the features of this Device
. This usually depends on the graphics API being
used.
fn limits(&self) -> Limits
Returns the resource limits of this Device
.
Provided methods
fn is_valid_cache(&self, _cache: &[u8]) -> bool
Check cache compatibility with the Device
.