pub struct Adapter { /* private fields */ }Implementations§
Source§impl Adapter
impl Adapter
pub fn is_surface_supported(&self, surface: &Surface) -> bool
pub fn get_info(&self) -> AdapterInfo
pub fn features(&self) -> Features
pub fn limits(&self) -> Limits
pub fn downlevel_capabilities(&self) -> DownlevelCapabilities
pub fn get_presentation_timestamp(&self) -> PresentationTimestamp
pub fn cooperative_matrix_properties(&self) -> Vec<CooperativeMatrixProperties>
pub fn ray_tracing_invocation_reorder_mode( &self, ) -> RayTracingInvocationReorderMode
pub fn get_texture_format_features( &self, format: TextureFormat, ) -> TextureFormatFeatures
Sourcepub unsafe fn create_device_and_queue_from_hal(
self: &Arc<Self>,
hal_device: DynOpenDevice,
desc: &DeviceDescriptor<'_>,
) -> Result<(Arc<Device>, Arc<Queue>), RequestDeviceError>
pub unsafe fn create_device_and_queue_from_hal( self: &Arc<Self>, hal_device: DynOpenDevice, desc: &DeviceDescriptor<'_>, ) -> Result<(Arc<Device>, Arc<Queue>), RequestDeviceError>
§Safety
hal_devicemust be created from this adapter.descmust be a subset ofhal_devicefeatures and limits.
Sourcepub fn validate_device_descriptor(
&self,
desc: &mut DeviceDescriptor<'_>,
) -> Result<(), RequestDeviceError>
pub fn validate_device_descriptor( &self, desc: &mut DeviceDescriptor<'_>, ) -> Result<(), RequestDeviceError>
Validate a device descriptor.
This validates the provided device descriptor as if it were passed to
Self::request_device. If InstanceFlags::STRICT_WEBGPU_COMPLIANCE is active,
the requested extensions in the descriptor will be filtered to remove wgpu
extensions, except for those that are included in [limits::EXEMPT_FEATURES].
This may be useful when it is necessary to obtain the device itself from a raw hal
API, but the rest of the request_device validation is still desired.
pub fn request_device( self: &Arc<Self>, desc: &DeviceDescriptor<'_>, ) -> Result<(Arc<Device>, Arc<Queue>), RequestDeviceError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Adapter
impl !RefUnwindSafe for Adapter
impl !UnwindSafe for Adapter
impl Forget for Adapter
impl Move for Adapter
impl Send for Adapter
impl Sync for Adapter
impl Unpin for Adapter
impl UnsafeUnpin for Adapterwhere
*const dyn DynAdapter is !null: UnsafeUnpin,
PhantomData<dyn DynAdapter>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
PhantomData<CooperativeMatrixProperties>: UnsafeUnpin,
*const ArcInner<Instance> is !null: UnsafeUnpin,
PhantomData<ArcInner<Instance>>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
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