Files
reims-vgpu/docs
Anees Iqbal a8a54ad6fc 🐎 Keep heap colour textures compressed where Metal does
exact_policy forced HeapCompressionPolicy::Uncompressed on every device. On the
Iris Xe (ANV, the one driver whose compressed images may keep their texels
apart from their bytes) that gave a guest's Private heap render targets an
uncompressed image and cost them the driver's fast clear: a guest's clear of a
2048x2048 RGBA8Unorm render target in a Private heap took 146.9 us of GPU time
against 28.6 us now (25.8 to 28.7 us for one in memory of its own), and a copy
of it 294.1 us against 148.2. The platform now takes the runtime's default,
Compressed. REIMS_VGPU_EXACT=all still takes the uncompressed form
(exact_answers()); no other name does.

What the guest sees change, on the Iris Xe alone:
- heapTextureSizeAndAlignWithDescriptor: answers the compressed image for a
  colour texture Metal keeps losslessly compressed (allowGPUOptimizedContents,
  no ShaderWrite, PixelFormatView or ShaderAtomic usage, 16 texels or more a
  side) whose image is 64 KiB or more: its alignment moves from 0x1000 to
  0x10000, its size kept (0x1020000 bytes for that 2048x2048 render target).
  A smaller one keeps the uncompressed image a 4 KiB alignment holds, and its
  answer (0x4080 at 0x1000 for a 64x64 BGRA8Unorm texture). The x86 Macs
  answer 4096 (UHD 630) to 65536 (Radeon Pro 5300M).
- Such a texture in a Private heap is the driver's compressed image, so a
  write through a buffer or texture over its bytes may leave its texels as they
  were. Metal's compressed texture shows no such write as written either: an
  M3 Max reads opaque magenta in drawn content a buffer fill over its bytes
  covered. Heaps over the guest's pages (Shared heaps, the bundle's slabs) take
  an image over the pages under either form.

heap-texture-compressed moves from DIES to the relayed precision kinds, with
that M3 measurement as its reason: Metal's own answer there is not one value,
so a strict run no longer dies where the Iris keeps Metal's compression.
Other drivers keep the optimal image they took before under either policy.

Cold boots of macOS 26.7.2 and 14.8.9 on the Iris (desktop, Finder, Launchpad,
Mission Control, Safari, Maps) logged no fatal line, and their apps made no
such texture: only the guest microbench that measured the clears did.
2026-11-13 10:36:40 -08:00
..