The new runtime leaves texture and sampler indices to its consumer. The backend now gives
each object the index the stream names where the runtime takes it: a descriptor's or a
view's resource index, else the index of the ID the program saw of the object (its first
gpuResourceID record, read ahead by the player and handed over before the call that makes
it). Otherwise it gives the lowest index of the object's class that no live object holds
and the program did not reserve, as Metal's pool hands out a sampler state's ID. A reserved
index (reserveResourceIndicesForResourceType:indices:indexCount:) is taken only where the
stream names it. Where the runtime refuses a named index (an object of the play holds it, or
it lies outside the class), the object takes the lowest free one and the report counts it on
the backend's "indices named" line. Released objects give their index back.
Before this, a play of a recorded stream on the new runtime reported tens of objects whose
gpuResourceID differed from the recording's.
Tests: unit tests of the index bookkeeping (Indices), and rt_replay device tests: sampler
states made and released past the class's 3,999 indices reuse the released ones; a reserved
index is taken only where named; a state takes the ID the program saw. docs/REPLAY-STREAM.md
says how the new runtime's backend places textures and sampler states.
The same change, on an older base, passed clippy, the replay unit tests and the four rt_replay
device tests on lavapipe (m3-max-45671, m3-max-45775). The rebased tree's check follows.