pub struct PhysicalDevice {
pub handle: PhysicalDevice,
/* private fields */
}
Fields§
§handle: PhysicalDevice
Implementations§
Source§impl PhysicalDevice
impl PhysicalDevice
Sourcepub unsafe fn gpu_from_raw(
&self,
raw_device: Device,
families: &[(&QueueFamily, &[QueuePriority])],
requested_features: Features,
) -> Result<Gpu<Backend>, CreationError>
pub unsafe fn gpu_from_raw( &self, raw_device: Device, families: &[(&QueueFamily, &[QueuePriority])], requested_features: Features, ) -> Result<Gpu<Backend>, CreationError>
§Safety
raw_device
must be created from self
(or from the inner raw handle)
raw_device
must be created with requested_features
pub fn enabled_extensions( &self, requested_features: Features, ) -> Result<Vec<&'static CStr>, CreationError>
Trait Implementations§
Source§impl Debug for PhysicalDevice
impl Debug for PhysicalDevice
Source§impl PhysicalDevice<Backend> for PhysicalDevice
impl PhysicalDevice<Backend> for PhysicalDevice
Source§unsafe fn open(
&self,
families: &[(&QueueFamily, &[QueuePriority])],
requested_features: Features,
) -> Result<Gpu<Backend>, CreationError>
unsafe fn open( &self, families: &[(&QueueFamily, &[QueuePriority])], requested_features: Features, ) -> Result<Gpu<Backend>, CreationError>
Create a new logical device with the requested features.
If
requested_features
is empty, then only
the core features are supported. Read moreSource§fn format_properties(&self, format: Option<Format>) -> Properties
fn format_properties(&self, format: Option<Format>) -> Properties
Fetch details for a particular format.
Source§fn image_format_properties(
&self,
format: Format,
dimensions: u8,
tiling: Tiling,
usage: Usage,
view_caps: ViewCapabilities,
) -> Option<FormatProperties>
fn image_format_properties( &self, format: Format, dimensions: u8, tiling: Tiling, usage: Usage, view_caps: ViewCapabilities, ) -> Option<FormatProperties>
Fetch details for a particular image format.
Source§fn memory_properties(&self) -> MemoryProperties
fn memory_properties(&self) -> MemoryProperties
Fetch details for the memory regions provided by the device.
Source§fn external_buffer_properties(
&self,
usage: Usage,
sparse: SparseFlags,
external_memory_type: ExternalMemoryType,
) -> ExternalMemoryProperties
fn external_buffer_properties( &self, usage: Usage, sparse: SparseFlags, external_memory_type: ExternalMemoryType, ) -> ExternalMemoryProperties
Get external buffer properties. The parameters specify how the buffer is going to used. Read more
Source§fn external_image_properties(
&self,
format: Format,
dimensions: u8,
tiling: Tiling,
usage: Usage,
view_caps: ViewCapabilities,
external_memory_type: ExternalMemoryType,
) -> Result<ExternalMemoryProperties, ExternalImagePropertiesError>
fn external_image_properties( &self, format: Format, dimensions: u8, tiling: Tiling, usage: Usage, view_caps: ViewCapabilities, external_memory_type: ExternalMemoryType, ) -> Result<ExternalMemoryProperties, ExternalImagePropertiesError>
Get external image properties. The parameters specify how the image is going to used. Read more
Source§fn features(&self) -> Features
fn features(&self) -> Features
Returns the features of this
PhysicalDevice
. This usually depends on the graphics API being
used, as well as the actual platform underneath.Source§fn properties(&self) -> PhysicalDeviceProperties
fn properties(&self) -> PhysicalDeviceProperties
Returns the properties of this
PhysicalDevice
. Similarly to Features
, theySource§fn is_valid_cache(&self, cache: &[u8]) -> bool
fn is_valid_cache(&self, cache: &[u8]) -> bool
Check cache compatibility with the
PhysicalDevice
.Source§unsafe fn enumerate_displays(&self) -> Vec<Display<Backend>>
unsafe fn enumerate_displays(&self) -> Vec<Display<Backend>>
Enumerate active displays surface from display.
Please notice that, even if a system has displays attached, they could be not returned because they are managed by some other components.
This function only return the display that are available to be managed by the current application.
Since, generally, while compositor are running they take the control of every display connected, it could be better to run the application directly from the tty to avoid the return of an empty list. Read more
Source§unsafe fn enumerate_compatible_planes(
&self,
display: &Display<Backend>,
) -> Vec<Plane>
unsafe fn enumerate_compatible_planes( &self, display: &Display<Backend>, ) -> Vec<Plane>
Enumerate compatibles planes with the provided display. Read more
Source§unsafe fn create_display_mode(
&self,
display: &Display<Backend>,
resolution: (u32, u32),
refresh_rate: u32,
) -> Result<DisplayMode<Backend>, DisplayModeError>
unsafe fn create_display_mode( &self, display: &Display<Backend>, resolution: (u32, u32), refresh_rate: u32, ) -> Result<DisplayMode<Backend>, DisplayModeError>
Create a new display mode from a display, a resolution, a refresh_rate and the plane index.
If the builtin display modes does not satisfy the requirements, this function will try to create a new one. Read more
Source§unsafe fn create_display_plane<'a>(
&self,
display_mode: &'a DisplayMode<Backend>,
plane: &'a Plane,
) -> Result<DisplayPlane<'a, Backend>, OutOfMemory>
unsafe fn create_display_plane<'a>( &self, display_mode: &'a DisplayMode<Backend>, plane: &'a Plane, ) -> Result<DisplayPlane<'a, Backend>, OutOfMemory>
Create a display plane from a display, a resolution, a refresh_rate and a plane.
If the builtin display modes does not satisfy the requirements, this function will try to create a new one. Read more
Auto Trait Implementations§
impl Freeze for PhysicalDevice
impl RefUnwindSafe for PhysicalDevice
impl Send for PhysicalDevice
impl Sync for PhysicalDevice
impl Unpin for PhysicalDevice
impl UnwindSafe for PhysicalDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more