[][src]Struct bedrock::PhysicalDevice

pub struct PhysicalDevice(_, _);

Opaque handle to a physical device object

Platform Dependent Methods: Presentation Support checking functions

Methods

impl PhysicalDevice[src]

Following methods are enabled with [feature = "Implements"]

pub fn parent(&self) -> &Instance[src]

pub fn features(&self) -> VkPhysicalDeviceFeatures[src]

Reports capabilities of a physical device.

pub fn format_properties(&self, format: VkFormat) -> VkFormatProperties[src]

Lists physical device's format capabilities

pub fn image_format_properties(
    &self,
    format: VkFormat,
    itype: VkImageType,
    tiling: VkImageTiling,
    usage: ImageUsage,
    flags: ImageFlags
) -> Result<VkImageFormatProperties>
[src]

Lists physical device's image format capabilities

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_FORMAT_NOT_SUPPORTED

pub fn properties(&self) -> VkPhysicalDeviceProperties[src]

Returns properties of a physical device

pub fn queue_family_properties(&self) -> QueueFamilies[src]

Reports properties of the queues of the specified physical device

pub fn memory_properties(&self) -> MemoryProperties[src]

Reports memory information for the specified physical device

pub fn sparse_image_format_properties(
    &self,
    format: VkFormat,
    itype: VkImageType,
    samples: VkSampleCountFlags,
    usage: ImageUsage,
    tiling: VkImageTiling
) -> Vec<VkSparseImageFormatProperties>
[src]

Retrieve properties of an image format applied to sparse images

impl PhysicalDevice[src]

[feature = "VK_KHR_surface" and feature = "Implements"] Surface functions

pub fn surface_support(
    &self,
    queue_family: u32,
    surface: &Surface
) -> Result<bool>
[src]

Query if presentation is supported

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR

pub fn surface_capabilities(
    &self,
    surface: &Surface
) -> Result<VkSurfaceCapabilitiesKHR>
[src]

Query surface capabilities

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR

pub fn surface_formats(
    &self,
    surface: &Surface
) -> Result<Vec<VkSurfaceFormatKHR>>
[src]

Query color formats supported by surface

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR

pub fn surface_present_modes(
    &self,
    surface: &Surface
) -> Result<Vec<PresentMode>>
[src]

Query supported presentation modes

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_SURFACE_LOST_KHR

impl PhysicalDevice[src]

feature = "VK_KHR_display" functions (required to enable the "Implements" feature)

pub fn display_properties(&self) -> Result<Vec<VkDisplayPropertiesKHR>>[src]

Query information about the available displays

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

pub fn display_plane_properties(
    &self
) -> Result<Vec<VkDisplayPlanePropertiesKHR>>
[src]

Query the plane properties

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

pub fn display_plane_supported_displays(
    &self,
    index: u32
) -> Result<Vec<VkDisplayKHR>>
[src]

Query the list of displays a plane supports

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

pub fn display_mode_properties(
    &self,
    display: VkDisplayKHR
) -> Result<Vec<VkDisplayModePropertiesKHR>>
[src]

Query the set of mode properties supported by the display

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

pub fn new_display_mode(
    &self,
    display: VkDisplayKHR,
    region: Extent2D,
    refresh_rate: u32
) -> Result<VkDisplayModeKHR>
[src]

Create a display mode

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INITIALIZATION_FAILED

pub fn display_plane_capabilities(
    &self,
    mode: VkDisplayModeKHR,
    plane_index: u32
) -> Result<VkDisplayPlaneCapabilitiesKHR>
[src]

Query capabilities of a mode and plane combination

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

Trait Implementations

impl VkHandle for PhysicalDevice[src]

type Handle = VkPhysicalDevice

Auto Trait Implementations

impl !RefUnwindSafe for PhysicalDevice

impl !Send for PhysicalDevice

impl !Sync for PhysicalDevice

impl Unpin for PhysicalDevice

impl !UnwindSafe for PhysicalDevice

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.