Files
metal2vulkan/docs
Anees Iqbal a00edd042e Measure what extended_range_blits = Canonical costs against Kept
The ledger's extended_range_blits row said "Not measured". It now gives the
cost of Canonical against Kept on two hosts. The consumer will make
Canonical its default only if it costs nothing measurable, and it does cost
something on both hosts.

Method: a scratch release bench, not committed. It opens two devices in one
process whose DevicePolicy differs in extended_range_blits alone, uses
Private BGRA10_XR textures that Metal keeps compressed (ShaderRead only,
allowGPUOptimizedContents) at 256x256 and 2048x2048, and runs one
whole-texture blit per command buffer, the two values interleaved: 20
warm-up blits, then 300 timed. Three processes per host. Kinds: buffer into
texture (Private and Shared buffer), texture into buffer (Private and
Shared), texture into texture.

- RTX 5080 Laptop, NVIDIA 615.71.09: calibrated GPUStartTime/GPUEndTime.
  Run under msi's gpu-locks.sh with SCHED_OTHER.
- M3 Max, MoltenVK 1.4.2: GPU times come from the host clock there, so the
  ledger cites 16 blits per command buffer, per blit.

Evidence the pass ran:
- Shared-texture byte checks: Canonical wrote Metal's encoding in all three
  directions; Kept kept the bytes.
- Work counts: one vkCmdDispatch per blit under Canonical, none under Kept.
- ExtendedRangeBitsKept was announced only under Kept.

Verified: cargo fmt; nextest -p metal2vulkan -E 'test(fast_paths)', 17
passed.

(cherry picked from commit e8eb63b8acd94897718c8e5784e715dbe6e89b9b)
2026-11-02 13:50:17 -08:00
..