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)
| 250 | /// the sampled snapshot; for scheduling purposes we treat them as |
| 251 | /// the same resource. |
| 252 | fn 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 |