Skip to main content

MAX_UNSEEN_FRAMES

Constant MAX_UNSEEN_FRAMES 

Source
pub const MAX_UNSEEN_FRAMES: u64 = 120;
Expand description

How many consecutive frames a program id may go unseen (absent from every frame’s live key set — see ShaderEffects::mark_seen) before its compiled pipeline, offscreen target(s), and any recorded compile failure are reaped (ShaderEffects::reap) rather than living until surface teardown. ~120 frames is roughly 1-2s at a 60-120Hz refresh rate: generous enough that a shader drawn intermittently (every-other-frame, or through a brief scene-diff hiccup) is never mistaken for vanished, short enough that navigating away from a shader-showcase screen reclaims its GPU state promptly instead of leaking for the rest of the session.