pub fn execute<H>(
ctx: &mut <H as Hal>::Context,
surface: &mut <H as Hal>::Texture,
recording: &Recording,
images: &[&<H as Hal>::Texture],
) -> Result<(), Error>Expand description
Draw a recording into a texture this crate did not create.
Context::draw covers the case where the target came from
Context::create_surface, and that is the ordinary one. This is the other:
a swapchain hands out its own images, and drawing into one means naming a
texture the caller got from somewhere else. Without this the presentation
path re-exported above reached a swapchain and then had nothing to draw into
its images with, which is a window a caller can open and not fill.
Render every pass of a recording, layers first, root into the surface.
images are the caller’s own textures, addressed by the slot a paint named.
Layer targets are allocated per call and released before returning. Pooling them was assumed to be worth doing and is not: creating and destroying a 512x512 target measures 0.6 microseconds against 53 for the submission that draws into it, so a pool would save under two percent of what a pass costs and would owe an invalidation rule in exchange.