rt's BlockInfo::zeroed (metal2vulkan dd4193cab3) says a block reads zero as
rt hands it out: the driver zeroed its allocation and no block held a byte at
or past it before. The owner's rule: zero unless the block says zeroed and
these bytes were never handed out. A block's mark of the bytes ever handed out
(Placed) rises past each placement, and only bytes below it are zeroed:
- own() and own_managed(): a Shared or Private buffer in a block of its own
skips rt's zero or the platform's memset where the block is zeroed;
- heap zeroed(): a heap's block of its own likewise;
- in_known(): a Private buffer pinned in a known block skips rt's GPU fill
where none of its bytes is below the block's mark, which every lookup in
the block raises (buffers, heaps and Managed device copies pinned there);
- the Shared take worker zeroes only the first bytes of a carve below its
piece's mark, raised as the carve is carved.
Skipped bytes are counted by class: rt-zero-skipped-private-bytes,
rt-zero-skipped-shared-bytes and pool-take-zero-skipped-bytes. Every byte
still reads zero to the guest; on a device without zeroInitializeDeviceMemory
nothing changes.