Expand description
Runtime backend selection — re-pointed to the L0 kernel
(facett_core::render::backend) as of CONS-CORE Phase C. The policy
(probe the hardware, then choose) now lives once in facett-core so the map
skins and this graph engine decide identically; graphview re-exports the
types here for back-compat, so every existing facett_graphview::{Backend, GpuProbe, decide} import (the benches, the example, nornir’s draw_graph)
keeps resolving with zero source change.
vello is not GPU-only: the same scene rasterizes on the GPU (vello / the L0
SDF wgpu pipeline) when a usable adapter exists, and on the CPU (vello_cpu,
multithreaded SIMD) when it doesn’t. The caller probes once and renders through
whichever Backend decide returns.
Note one preserved nuance: graphview’s own CPU-force env var was
FACETT_GRAPHVIEW_CPU; the core probe reads FACETT_RENDER_CPU. Both are
honoured by GpuProbe::from_env here via the probe_from_env shim so a
host that set either still forces CPU.
Structs§
- GpuProbe
- What a hardware probe found. The caller fills this (e.g. from a wgpu adapter
enumeration, an env override, or a forced-CPU test flag); the policy — turning
a probe into a pick — lives in
decideso every surface decides identically.
Enums§
- Backend
- The chosen rasterizer.
Functions§
- decide
- THE picker: turn a
GpuProbeinto aBackend. GPU when usable and not forced off and thewgpufeature is compiled in; CPU otherwise. Keeping this pure (probe in, enum out) makes the policy trivially testable. - gpu_
arm_ compiled - Whether the GPU rasterization arm is compiled into this build of
facett-core(i.e. thewgpufeature is on). The single source of truth for “candecideever returnBackend::GpuVello”. Re-pointed skins/engines (e.g.facett-graphview) should key their expectations off THIS, not their own crate’s feature flag — workspace feature-unification can light upfacett-core/wgpuindependently of a downstream crate’s owngpufeature. - probe_
from_ env - Build a
GpuProbefrom a detected-GPU flag, honouring both the coreFACETT_RENDER_CPUoverride and graphview’s historicalFACETT_GRAPHVIEW_CPUoverride (back-compat: hosts that set the old name still force the CPU path).