gfx_backend_vulkan

Struct PhysicalDevice

Source
pub struct PhysicalDevice {
    pub handle: PhysicalDevice,
    /* private fields */
}

Fields§

§handle: PhysicalDevice

Implementations§

Source§

impl PhysicalDevice

Source

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

Source

pub fn enabled_extensions( &self, requested_features: Features, ) -> Result<Vec<&'static CStr>, CreationError>

Trait Implementations§

Source§

impl Debug for PhysicalDevice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PhysicalDevice<Backend> for PhysicalDevice

Source§

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 more
Source§

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>

Fetch details for a particular image format.
Source§

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

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>

Get external image properties. The parameters specify how the image is going to used. Read more
Source§

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

Returns the properties of this PhysicalDevice. Similarly to Features, they
Source§

fn is_valid_cache(&self, cache: &[u8]) -> bool

Check cache compatibility with the PhysicalDevice.
Source§

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>

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>

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>

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.