pub struct RunnerCaps {
pub per_sample_shading: bool,
pub depth_readback: bool,
}Expand description
Adapter-derived capabilities the Runner adapts its pipelines to.
Defaults to everything supported — correct for native Vulkan/Metal/DX
adapters. Hosts that can land on GL or browser adapters should derive
the real values with RunnerCaps::from_adapter and build the runner
via Runner::with_caps.
Fields§
§per_sample_shading: boolWhether the adapter supports per-sample MSAA shading
(DownlevelFlags::MULTISAMPLED_SHADING). When false, every
pipeline (stock and later-registered custom) has
@interpolate(perspective, sample) rewritten to
@interpolate(perspective) before WGSL compilation. The shader
then interpolates at pixel centre instead of per MSAA sample —
MSAA coverage still works at sample_count > 1; only the
per-sub-sample brightness pass is skipped, slightly thickening
the AA band on curved SDF edges.
depth_readback: boolWhether the backend can read a scene depth attachment back for
Scene3D label occlusion. Must be false on GL backends
(WebGL2): naga’s GLSL target can’t textureLoad depth textures
(so building the resolve pipeline panics the device), and GLES 3.0
can’t create multisampled depth textures at all. When false,
occlusion still works — the capture re-renders the scene’s meshes
with a fragment stage that packs depth into an RGBA8 colour target
instead of resolving the depth attachment. Costs one extra
mesh-only pass per camera-pose change on those backends.
Implementations§
Source§impl RunnerCaps
impl RunnerCaps
Sourcepub fn from_adapter(adapter: &Adapter) -> Self
pub fn from_adapter(adapter: &Adapter) -> Self
Derive the caps from the adapter the host actually got.
GL is treated as unsupported across the board regardless of the
reported downlevel flags: Chrome’s SwiftShader WebGL2 fallback
reports MULTISAMPLED_SHADING through wgpu, but the GLSL ES
target still rejects the sample interpolation qualifier (and can
never textureLoad a depth texture). WebGPU/native keep trusting
the adapter flags.
Trait Implementations§
Source§impl Clone for RunnerCaps
impl Clone for RunnerCaps
Source§fn clone(&self) -> RunnerCaps
fn clone(&self) -> RunnerCaps
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 RunnerCaps
Source§impl Debug for RunnerCaps
impl Debug for RunnerCaps
Auto Trait Implementations§
impl Freeze for RunnerCaps
impl RefUnwindSafe for RunnerCaps
impl Send for RunnerCaps
impl Sync for RunnerCaps
impl Unpin for RunnerCaps
impl UnsafeUnpin for RunnerCaps
impl UnwindSafe for RunnerCaps
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<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.