pub struct DeviceCapabilities {
pub ray_tracing: bool,
pub selectable_upscaler: bool,
pub reuses_build_slots: bool,
pub rewrites_draws: bool,
}Expand description
GPU/device capability flags, queried from the backend once it is built. Surfaced so the settings menu can gray out (and make inert) toggles the device cannot honor – e.g. ray-traced reflections on a GPU without hardware ray tracing. Mirrors an RHI-style capability set: a handful of bools held in memory and re-queried each launch, never persisted, so it is always correct for the current device + driver.
Fields§
§ray_tracing: boolHardware ray tracing for the RT-reflections pass: DXR 1.1 on DirectX, the
ray-query device extensions on Vulkan (and not under XeSS), and
MTLDevice::supportsRaytracing on Metal.
selectable_upscaler: boolWhether the upscaler implementation is a choice (FSR3 / DLSS / XeSS) rather than fixed. DirectX and Vulkan offer the selection; Metal always upscales through MetalFX, so the row has nothing to pick.
reuses_build_slots: boolWhether a retired build-time draw slot may be recycled by a runtime clone. Metal’s per-frame RT topology refresh re-admits recycled build-time slots; DirectX / Vulkan key their cull BVH + RT tables to fixed build-time indices and cannot refit, so only the runtime-append region recycles there. Read by the engine’s draw-slot allocator.
rewrites_draws: boolWhether a built draw slot’s material and cull distance may be rewritten
in place (RenderBackend::set_draw_material /
RenderBackend::set_draw_cull_distance). Metal rebuilds its per-object
buffer from the draw list every frame, so a rewritten slot draws with the
new material next frame; DirectX / Vulkan bake per-object material state
at build time and would keep drawing the old one. Read by the editor’s
live draw seam, which sends the edit to a world rebuild instead.
Implementations§
Source§impl DeviceCapabilities
impl DeviceCapabilities
Sourcepub const ALL: DeviceCapabilities
pub const ALL: DeviceCapabilities
Every capability present. The trait default, so a backend that does not report capabilities never wrongly disables a toggle (it keeps the prior behavior: the feature no-ops with a warning on an incapable device).
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeviceCapabilities
Source§impl Debug for DeviceCapabilities
impl Debug for DeviceCapabilities
Source§impl Default for DeviceCapabilities
impl Default for DeviceCapabilities
Source§fn default() -> DeviceCapabilities
fn default() -> DeviceCapabilities
Auto Trait Implementations§
impl Freeze for DeviceCapabilities
impl RefUnwindSafe for DeviceCapabilities
impl Send for DeviceCapabilities
impl Sync for DeviceCapabilities
impl Unpin for DeviceCapabilities
impl UnsafeUnpin for DeviceCapabilities
impl UnwindSafe for DeviceCapabilities
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().