pub enum DeviceCapabilityTier {
Limited = 0,
FullWebGpuSupport = 1,
}
Expand description
Device tiers re_renderer
distinguishes.
To reduce complexity, we rarely do fine-grained feature checks, but instead support set of features, each a superset of the next.
Tiers are sorted from lowest to highest. Certain tiers may not be possible on a given machine/setup, but choosing lower tiers is always possible. Tiers may loosely relate to quality settings, but their primary function is an easier way to do bundle feature support checks.
See also global_bindings.wgsl
Variants§
Limited = 0
Limited feature support as provided by WebGL and some OpenGL drivers.
On desktop this happens typically with GLES 2 & OpenGL 3.x, as well as some OpenGL 4.x drivers with lack of key rendering abilities.
In theory this path can also be hit on Vulkan & Metal drivers, but this is exceedingly rare.
FullWebGpuSupport = 1
Full support of WebGPU spec without additional feature requirements.
Expecting to run either in a stable WebGPU implementation. I.e. either natively with Vulkan/Metal or in a browser with WebGPU support.
Implementations§
Source§impl DeviceCapabilityTier
impl DeviceCapabilityTier
Sourcepub fn support_sampling_msaa_texture(&self) -> bool
pub fn support_sampling_msaa_texture(&self) -> bool
Whether the current device tier supports sampling from textures with a sample count higher than 1.
Sourcepub fn support_depth_readback(&self) -> bool
pub fn support_depth_readback(&self) -> bool
Whether the current device tier supports reading back depth textures.
If this returns false, we first have to create a copy of the depth buffer by rendering depth to a different texture.
pub fn support_bgra_textures(&self) -> bool
Sourcepub fn required_downlevel_capabilities(&self) -> DownlevelCapabilities
pub fn required_downlevel_capabilities(&self) -> DownlevelCapabilities
Downlevel features required by the given tier.
Sourcepub fn check_required_downlevel_capabilities(
&self,
downlevel_caps: &DownlevelCapabilities,
) -> Result<(), InsufficientDeviceCapabilities>
pub fn check_required_downlevel_capabilities( &self, downlevel_caps: &DownlevelCapabilities, ) -> Result<(), InsufficientDeviceCapabilities>
Check whether the given downlevel caps are sufficient for this tier.
Trait Implementations§
Source§impl Clone for DeviceCapabilityTier
impl Clone for DeviceCapabilityTier
Source§fn clone(&self) -> DeviceCapabilityTier
fn clone(&self) -> DeviceCapabilityTier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceCapabilityTier
impl Debug for DeviceCapabilityTier
Source§impl Display for DeviceCapabilityTier
impl Display for DeviceCapabilityTier
Source§impl PartialEq for DeviceCapabilityTier
impl PartialEq for DeviceCapabilityTier
impl Copy for DeviceCapabilityTier
impl Eq for DeviceCapabilityTier
impl StructuralPartialEq for DeviceCapabilityTier
Auto Trait Implementations§
impl Freeze for DeviceCapabilityTier
impl RefUnwindSafe for DeviceCapabilityTier
impl Send for DeviceCapabilityTier
impl Sync for DeviceCapabilityTier
impl Unpin for DeviceCapabilityTier
impl UnwindSafe for DeviceCapabilityTier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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