Files
metal2vulkan/docs
Anees Iqbal 80bd8ca764 rt: pooled blocks are 16 MiB of Shared memory and 64 MiB of Private
A pooled block's length is now per memory class, MemoryClass::block_len: 16 MiB Shared and
64 MiB Private on every device. It replaces the one 256 MiB BLOCK_LEN. take_block gives a
pooled block up to the class's length and a dedicated one past it. Textures are placed in
texture blocks up to the Private length. The harness and the replay player's places take
blocks of the class's length.

Why: a driver may hold the device's other calls for the whole of a block's
vkAllocateMemory, and the hold grows with the bytes, so the length sets how long one hold
lasts. On an RTX 3090 (NVIDIA's Linux driver, probe at 70d7cae48e, jobs 44050 and 44053
with the RTX 2080), a pipeline creation beside a Shared block's making took 40-45 ms at
256 MiB and 6-8 ms at 16 MiB (3-4 ms settled). 16 MiB is the largest piece a guest's
allocator takes. Private holds less: 3.4-4.6 ms beside a 64 MiB block, at most 1 ms more
than beside a 32 MiB one. At 64 MiB, a texture or a Managed buffer's device copy of 32 MiB
takes a pooled block.

Tests: every_device_pools_16_mib_shared_and_64_mib_private_blocks covers the lengths, the
dedicated block past each, and a 32 MiB texture placed in a texture block. The memory,
command, places, spill and upload tests use the class's length. The memory test reads a
Private block back a Shared block's length at a time. API table re-blessed (the BLOCK_LEN
const goes, MemoryClass::block_len comes).
2026-11-17 20:51:54 -08:00
..