Files
metal2vulkan/docs
Anees Iqbal 647c186ec8 replay: placement heaps laid out for the runtime's sizes and alignments
A stream's heap offsets and heap sizes are the recording device's answers. On another device a
texture can be larger: b2 on an NVIDIA GPU stopped at a heap texture whose image the old runtime
makes 7.47 MB in a 5.9 MB heap. A live program lays its heap out by the device's
heapTextureSizeAndAlignWithDescriptor: and heapBufferSizeAndAlignWithLength:options:, so the player
now does the same: before it plays, it reads every placement in each placement heap ahead, asks the
backend the size and alignment of each (a texture's of its descriptor as its making call and setters
left it), and moves each offset up until the resources below it end and it is aligned, growing the
heap to hold them. Resources at one offset still share it; where every answer fits the stream's
layout, nothing moves. The report says what moved (`relaid HEAPS moved OFFSETS grown BYTES`).

The backend gains heap_size_and_align; the old runtime's answers through its own queries, with the
texture descriptor's making and setters shared with its play of those calls.

Verified: not yet built; a unit test on the keeping backend covers a texture larger than its room
(the buffer above it moves, the heap grows), a texture made again at its offset, a heap where every
answer fits, and the descriptor calls the backend is asked with.
2026-11-17 19:22:14 -08:00
..