Skip to main content

PhysicalDeviceFeatures

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 get_core(&self) -> 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() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for PhysicalDeviceFeatures

§

impl Freeze for PhysicalDeviceFeatures
where *mut c_void: Freeze, PhantomData<&'static ()>: Freeze,

§

impl Move for PhysicalDeviceFeatures

§

impl RefUnwindSafe for PhysicalDeviceFeatures

§

impl Send for PhysicalDeviceFeatures
where PhysicalDeviceDescriptorIndexingFeatures<'static>: Send, PhysicalDeviceTimelineSemaphoreFeatures<'static>: Send, PhysicalDeviceImageRobustnessFeatures<'static>: Send, PhysicalDeviceRobustness2FeaturesEXT<'static>: Send, PhysicalDeviceMultiviewFeatures<'static>: Send, PhysicalDeviceSamplerYcbcrConversionFeatures<'static>: Send, PhysicalDeviceTextureCompressionASTCHDRFeatures<'static>: Send, PhysicalDeviceShaderFloat16Int8Features<'static>: Send, PhysicalDevice16BitStorageFeatures<'static>: Send, PhysicalDeviceAccelerationStructureFeaturesKHR<'static>: Send, PhysicalDeviceBufferDeviceAddressFeatures<'static>: Send, PhysicalDeviceRayQueryFeaturesKHR<'static>: Send, PhysicalDeviceRayTracingPipelineFeaturesKHR<'static>: Send, FeaturesEXT: Send, PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures<'static>: Send, PhysicalDeviceRayTracingPositionFetchFeaturesKHR<'static>: Send, PhysicalDeviceShaderAtomicInt64Features<'static>: Send, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT<'static>: Send, PhysicalDeviceShaderAtomicFloatFeaturesEXT<'static>: Send, PhysicalDeviceSubgroupSizeControlFeatures<'static>: Send, PhysicalDeviceMaintenance4Features<'static>: Send, PhysicalDeviceMeshShaderFeaturesEXT<'static>: Send, PhysicalDeviceShaderIntegerDotProductFeatures<'static>: Send, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR<'static>: Send, PhysicalDevicePortabilitySubsetFeaturesKHR<'static>: Send, PhysicalDeviceCooperativeMatrixFeaturesKHR<'static>: Send, PhysicalDeviceVulkanMemoryModelFeatures<'static>: Send, PhysicalDeviceShaderDrawParametersFeatures<'static>: Send,

§

impl Sync for PhysicalDeviceFeatures
where PhysicalDeviceDescriptorIndexingFeatures<'static>: Sync, PhysicalDeviceTimelineSemaphoreFeatures<'static>: Sync, PhysicalDeviceImageRobustnessFeatures<'static>: Sync, PhysicalDeviceRobustness2FeaturesEXT<'static>: Sync, PhysicalDeviceMultiviewFeatures<'static>: Sync, PhysicalDeviceSamplerYcbcrConversionFeatures<'static>: Sync, PhysicalDeviceTextureCompressionASTCHDRFeatures<'static>: Sync, PhysicalDeviceShaderFloat16Int8Features<'static>: Sync, PhysicalDevice16BitStorageFeatures<'static>: Sync, PhysicalDeviceAccelerationStructureFeaturesKHR<'static>: Sync, PhysicalDeviceBufferDeviceAddressFeatures<'static>: Sync, PhysicalDeviceRayQueryFeaturesKHR<'static>: Sync, PhysicalDeviceRayTracingPipelineFeaturesKHR<'static>: Sync, FeaturesEXT: Sync, PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures<'static>: Sync, PhysicalDeviceRayTracingPositionFetchFeaturesKHR<'static>: Sync, PhysicalDeviceShaderAtomicInt64Features<'static>: Sync, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT<'static>: Sync, PhysicalDeviceShaderAtomicFloatFeaturesEXT<'static>: Sync, PhysicalDeviceSubgroupSizeControlFeatures<'static>: Sync, PhysicalDeviceMaintenance4Features<'static>: Sync, PhysicalDeviceMeshShaderFeaturesEXT<'static>: Sync, PhysicalDeviceShaderIntegerDotProductFeatures<'static>: Sync, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR<'static>: Sync, PhysicalDevicePortabilitySubsetFeaturesKHR<'static>: Sync, PhysicalDeviceCooperativeMatrixFeaturesKHR<'static>: Sync, PhysicalDeviceVulkanMemoryModelFeatures<'static>: Sync, PhysicalDeviceShaderDrawParametersFeatures<'static>: Sync,

§

impl Unpin for PhysicalDeviceFeatures
where *mut c_void: Unpin, &'static (): Unpin,

§

impl UnsafeUnpin for PhysicalDeviceFeatures

§

impl UnwindSafe for PhysicalDeviceFeatures
where *mut c_void: UnwindSafe, &'static (): UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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,