pub struct ComputeCapability {
pub tier: ComputeTier,
pub backend: ComputeBackend,
pub gpu_available: bool,
pub simd_available: bool,
pub max_recommended_particles: u32,
pub max_recommended_bodies: u32,
pub optimal_batch_size: u32,
}Expand description
Detected compute capabilities for the current platform.
Fields§
§tier: ComputeTierCompute tier classification
backend: ComputeBackendUnderlying backend being used
gpu_available: boolWhether GPU compute is available
simd_available: boolWhether SIMD is available
max_recommended_particles: u32Maximum recommended particle count for 60 FPS
max_recommended_bodies: u32Maximum recommended rigid body count for 60 FPS
optimal_batch_size: u32Recommended batch size for physics updates
Implementations§
Source§impl ComputeCapability
impl ComputeCapability
Sourcepub fn from_backend(backend: ComputeBackend) -> Self
pub fn from_backend(backend: ComputeBackend) -> Self
Creates capability info from detected backend.
Sourcepub fn supports_large_scale_physics(&self) -> bool
pub fn supports_large_scale_physics(&self) -> bool
Returns true if the system can handle large-scale physics.
Sourcepub const fn recommended_substeps(&self) -> u32
pub const fn recommended_substeps(&self) -> u32
Returns the recommended physics substep count for stable simulation.
Trait Implementations§
Source§impl Clone for ComputeCapability
impl Clone for ComputeCapability
Source§fn clone(&self) -> ComputeCapability
fn clone(&self) -> ComputeCapability
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputeCapability
impl Debug for ComputeCapability
Auto Trait Implementations§
impl Freeze for ComputeCapability
impl RefUnwindSafe for ComputeCapability
impl Send for ComputeCapability
impl Sync for ComputeCapability
impl Unpin for ComputeCapability
impl UnwindSafe for ComputeCapability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more