PhysicalDeviceIdentity::recommended_max_working_set_size: the M3 Max's measured heap beside Metal's working set

The field's doc said what a discrete or unified-memory GPU's heap is without a measurement. It now
gives the one measured: the M3 Max's DEVICE_LOCAL heap under MoltenVK 1.4.2 is 68,719,476,736
bytes (the host's 64 GiB), where Metal's recommendedMaxWorkingSetSize on the same machine is
55,662,788,608 (the value capabilities.rs's maxBufferLength doc already cites).

Verified: every_listed_identity_is_read_with_no_device_made_and_is_its_device_s_own printed the
identity on m3-max (job m3-max-8142, cfg m2v_gpu): recommended_max_working_set_size
Some(68719476736). Doc text only.

(cherry picked from commit dd298c4f23537878640e037cfabaf69c8cae6f7b)
This commit is contained in:
Anees Iqbal committed 2026-11-08 04:05:26 -08:00
1 parent eb9ae5b139
commit ff59770ed3
1 file changed
+5 -4
@@ -121,10 +121,11 @@ pub struct PhysicalDeviceIdentity {
/// `recommendedMaxWorkingSetSize`, which it is not: Metal's is its estimate of the memory the
/// GPU can use without hurting its performance, and this is the heap's whole size, fixed for
/// the physical device, with nothing taken off for the system or for other processes' use
/// (what `VK_EXT_memory_budget` would report) and no device made to read it. On a discrete
/// GPU the heap is its own memory; on one of unified memory, the share of the host's memory
/// its driver reports. No device property answers it. `None` only where the driver reports
/// no `DEVICE_LOCAL` heap, which Vulkan requires one of.
/// (what `VK_EXT_memory_budget` would report) and no device made to read it. On an Apple M3
/// Max of 64 GiB (macOS 27.0.1, MoltenVK 1.4.2) it is 68,719,476,736, the host's whole
/// memory, where Metal's `recommendedMaxWorkingSetSize` is 55,662,788,608. No device
/// property answers it. `None` only where the driver reports no `DEVICE_LOCAL` heap, which
/// Vulkan requires one of.
pub recommended_max_working_set_size: Option<u64>,
}