#[non_exhaustive]pub struct Capabilities {
pub tier: CapabilityTier,
pub intermediate_format: IntermediateFormat,
pub adapter_name: String,
pub max_texture_dimension_2d: u32,
pub timestamp_queries: bool,
pub backend: String,
pub driver: String,
pub driver_info: String,
pub software_rasterizer: bool,
}Expand description
Adapter facts relevant to rendering decisions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tier: CapabilityTierCompatibility classification.
intermediate_format: IntermediateFormatChosen intermediate format.
adapter_name: StringPlatform adapter name.
max_texture_dimension_2d: u32Maximum 2D texture dimension.
timestamp_queries: boolWhether render-pass GPU timestamp queries were enabled on the device.
backend: StringBackend selected by wgpu.
driver: StringAdapter driver name.
driver_info: StringAdapter driver detail/version when exposed by the platform.
software_rasterizer: boolWhether the adapter rasterizes on the CPU (lavapipe, llvmpipe,
SwiftShader, WARP), where a shader’s cost is paid for every pixel it
is run on whatever branches it skips.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn new(
tier: CapabilityTier,
intermediate_format: IntermediateFormat,
adapter_name: impl Into<String>,
max_texture_dimension_2d: u32,
timestamp_queries: bool,
backend: impl Into<String>,
driver: impl Into<String>,
driver_info: impl Into<String>,
) -> Self
pub fn new( tier: CapabilityTier, intermediate_format: IntermediateFormat, adapter_name: impl Into<String>, max_texture_dimension_2d: u32, timestamp_queries: bool, backend: impl Into<String>, driver: impl Into<String>, driver_info: impl Into<String>, ) -> Self
Creates an explicit capability snapshot for policy simulation and tests.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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