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§
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 more