Jonah Williams b934c49920 [Impeller] Recycle descriptor sets. (flutter/engine#48343)
Like command pools, descriptor pools can be reset on a background thread and reused to improve CPU efficiency. Unlike command pools, we create one per render pass, so the existing management of the lifecycle is handled via the Tracked objects and we need only adapt the easier parts of the command pool reset.

To make the caching more effective, we change descriptor pool allocation to round up to NPOT. this is so if we have a frame with varying numbers of draws : 33, 42, 16, 45, we still end up recycling and reusing the descriptor pool (its just a bit of extra memory).

Fixes https://github.com/flutter/flutter/issues/134968
2023-11-28 18:06:05 +00:00
..