Builds shapes and remembers the last few, by generation, so it can judge
the one the GPU actually uses against new transforms. A shape the main
thread could not swap in (it threw) is never the one judged, because a
check names the generation in use. Lives in the shape worker (or on the
main thread when there is none); requests are handled one at a time.
Refits shape currentGeneration (the one in use) to input's
transforms, and builds a new one as generation if its cost passed
ratio times its as-built cost, or if that shape isn't known.
Builds shapes and remembers the last few, by generation, so it can judge the one the GPU actually uses against new transforms. A shape the main thread could not swap in (it threw) is never the one judged, because a check names the generation in use. Lives in the shape worker (or on the main thread when there is none); requests are handled one at a time.