A piece bound by command count, or by whole commands, still lets one command
hold unbounded work: the sample's largest executed command draws 161,820
indices, times its 2,074 regions about 2.5 times the old piece work in one
draw. Where an executed command's draw in a rate-mapped pass would alone hold
more than the piece work, it is now drawn as consecutive ranges of its indices,
each a draw of its own that a piece may begin before. That draws what Metal's
one draw does only for an indexed list (points, lines, triangles: Metal never
restarts a list) cut at primitive ends, of one instance, whose pipeline reads no
[[primitive_id]] and writes no memory; every command of the sample is such a
draw. Ranges are sized by the most region draws a draw of the execution made so
far (the most a plan holds before any), an even count of primitives so 16-bit
ranges keep 4-byte offsets. Any other draw rides whole: FAST-PATHS' known gaps
now name them, with the encoder's own draws, as able to pass amdgpu's job
timeout and NVIDIA's context-switch timeout.
PIECE_WORK halves to 2^26, so a piece of cut draws holds under 2^27: about
56 ms of Iris Xe at a trivial vertex function, 35x under 2 s.
WorkCounts::rate_map_index_ranges counts the ranges past the first; the
signature table gains it and the four piece counters. A runtime device test
draws eight commands of a twice-drawn blended triangle grid through 32-bit and
offset 16-bit indices over a falling map, and checks the execution cut under a
small piece work against the uncut execution and the encoder's own draws, byte
for byte, with pieces and ranges counted.
Unverified at this commit: the compile check and device runs are next.