Files
metal2vulkan/docs
Anees Iqbal 1d9ceb87c8 rt: the compute encoder's use_heap keeps the heap's block for its command buffer, and the new-runtime player plays useHeap
Metal's useHeap: names a heap the encoder's work may reach. rt had no such call, so the player
skipped and counted each one. ComputeCommandEncoder::use_heap takes the heap's block number (a
HeapRange's block, or the block a placement heap's buffers sit in) and keeps that block in the
command buffer until it retires, exactly as use_resource keeps a buffer's block (keep and the new
keep_block share one list). Metal states no retention for useHeap:, so keeping is the safe
reading. The call declares no access: a kernel that reaches a heap's resources through addresses
outside its slots already orders against every write since the last barrier. A number no handle
names answers Error::NoSuchBlock, as new_buffer's does.

The player's compute encoders now call use_heap with the heap's block, and still skip and count
a useHeap: of a skipped object. REPLAY-STREAM.md's skip list and the rt README say so.

Test: heap::every_device_holds_a_used_heap_until_its_command_buffer_retires takes a Private
block, uses it twice in one encoder (the command buffer holds it once), releases it while the
encoder is open (the command buffer still holds it, and a new use of its number answers
NoSuchBlock), commits, and waits for the block's last holder to go once the command buffer
retires. api_signatures.tsv regenerated (one new method); REFUSALS.md unchanged.
2026-11-18 00:37:03 -08:00
..