pub fn execute_layers<H>(
ctx: &mut <H as Hal>::Context,
recording: &Recording,
images: &[&<H as Hal>::Texture],
format: PixelFormat,
) -> Result<Transient<H>, Error>Expand description
Render every pass except the root, returning the layer targets in order.
Split out from execute so that a caller who has to submit the root pass
itself can still get the layers rendered. That is not a hypothetical: the
root is the pass that lands in a presentable image, and presenting one means
submitting it gated on the acquire and present semaphores — which is a
different call from the one that renders offscreen and waits. Without this
split, a frame with layers could be rendered offscreen and never presented.
The returned textures are the caller’s to destroy, and must outlive the submission that samples them.