Files
metal2vulkan/docs
Anees Iqbal b8257d9c10 Runtime images whose parts no copy writes start at zero, never as their memory lies
What:
- Device::storage_over_buffer: a surface depth or stencil texture's
  shadow whose copies leave an aspect out starts ZeroUnpatterned in every
  storage mode (Metal reads 0 there); a tiled texture of more than one
  level starts Start::Zero, as a new texture of its storage mode does.
  Before, both went through new_image, which starts a Private image held.
- surface_depth.rs pass_image (the twin and an X32_Stencil8 view's
  private image) starts ZeroUnpatterned: no copy writes its stencil.
- Docs: storage_over_buffer's comment, surface_depth.rs module docs and
  FAST-PATHS.md's tiled later levels gap say what they now read.

Why: a Private image's memory may hold a released texture's texels, of
another process sharing the device (a recycled image). A kernel reads the
shadow's stencil through an X32_Stencil8 view, blits and samples read a
tiled texture's kept later levels, and a pass's DontCare stencil load the
driver leaves reads the twin's.

Verified: tests/unwritten_parts.rs (previous commit) fails without this
and passes with it; runs follow.
2026-11-12 23:06:41 -08:00
..