Struct PhysicalDeviceFeatures

Source
pub struct PhysicalDeviceFeatures { /* private fields */ }
Available on vulkan only.
Expand description

Features supported by a vk::PhysicalDevice and its extensions.

This is used in two phases:

  • When enumerating adapters, this represents the features offered by the adapter. Instance::expose_adapter calls vkGetPhysicalDeviceFeatures2 (or vkGetPhysicalDeviceFeatures if that is not available) to collect this information about the VkPhysicalDevice represented by the wgpu_hal::ExposedAdapter.

  • When opening a device, this represents the features we would like to enable. At wgpu_hal::Device construction time, PhysicalDeviceFeatures::from_extensions_and_requested_features constructs an value of this type indicating which Vulkan features to enable, based on the wgpu_types::Features requested.

Implementations§

Source§

impl PhysicalDeviceFeatures

Source

pub fn add_to_device_create<'a>( &'a mut self, info: DeviceCreateInfo<'a>, ) -> DeviceCreateInfo<'a>

Add the members of self into info.enabled_features and its p_next chain.

Trait Implementations§

Source§

impl Debug for PhysicalDeviceFeatures

Source§

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

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

impl Default for PhysicalDeviceFeatures

Source§

fn default() -> PhysicalDeviceFeatures

Returns the “default value” for a type. 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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,