MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / input_matches_write

Function input_matches_write

native/shared/src/renderer/graph.rs:252–264  ·  view source on GitHub ↗

A read-of-output match: SceneColor reads from HdrColor, SceneDepth reads from Depth, etc. The synthetic copy-to-sample node that Phase 2b introduces is the one that actually produces the sampled snapshot; for scheduling purposes we treat them as the same resource.

(input: &PassInput, output: &PassOutput)

Source from the content-addressed store, hash-verified

250/// the sampled snapshot; for scheduling purposes we treat them as
251/// the same resource.
252fn input_matches_write(input: &PassInput, output: &PassOutput) -> bool {
253 match (input, output) {
254 (PassInput::SceneColor, PassOutput::HdrColor) => true,
255 (PassInput::SceneDepth, PassOutput::Depth) => true,
256 (PassInput::Shadow(i), PassOutput::Shadow(j)) => i == j,
257 (PassInput::Transient(i), PassOutput::Transient(j)) => i == j,
258 // EnvCubemap, MotionVectors, Impulse are produced outside
259 // the render graph for now (env is loaded at startup; motion
260 // vectors are written as a G-buffer target but not individually
261 // tracked). No-op match.
262 _ => false,
263 }
264}
265
266// =====================================================================
267// Tests

Callers 1

scheduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected