Files
metal2vulkan/crates/metal2vulkan-runtime/examples/host_ab
Anees Iqbal 658e5ced81 host_ab: the compositor stand-in, passes of 300 draws each binding its own buffer and texture
The encode workload's `draw_compositor` variant draws as a window server's frame draws: render
passes of 300 draws (the first clearing the target, the rest loading it), before each draw another
vertex buffer and offset and another fragment texture bound (as `draw_bind`), and every run of 10
draws drawn by the next of three pipeline states reused every frame: the two textured states
(`quad_vertex` + `textured_fragment`, without and with blending) and a solid one
(`quad_vertex` + `icb_draw_fragment`, blending, which reads no texture), the Scene's new `solid`.
It stands in for the shape a guest compositor's main command buffer takes during a window drag:
a few hundred draws a pass whose buffers and textures change between draws, its pipelines the same
across frames. Per draw: the encoding thread's wall time and the process's CPU time, as every
encode variant.

Verified: the example builds (release) on the M3 and runs its variants; its numbers come with the
commits that measure against it.

(cherry picked from commit 89cd071b0d416127c483900ccbbcabee04dc6fa0)
(cherry picked from commit f4d394f7d12a12f937e455f52ec6b5f3ce7b53f0)
2026-11-03 05:51:18 -08:00
..