Files
metal2vulkan/docs
Anees Iqbal 6ef13920d0 Shadow causes for a walk: why a private truth's first copy in moved, and a log of each shadow made
The 780M's glass composites copy large Private IOSurface planes in each command buffer: walk 9286
counted 41.07 M texels first copied in per composite, 37.70 M of them over images an earlier
command buffer left standing, yet only 3 copies in a composite were decided against a standing
(2 skipped) of 84 shadow copies. No count said where the rest were decided, nor why each shadow
over those planes takes no image over the bytes.

- WorkCounts::shadow_texels_unskipped_*: every encoder's first copy in of a Private (or
  Memoryless) buffer's bytes, an IOSurface plane's among them, that moved its texels, by where it
  was decided (shadow_standing::Unskipped): unstanding (its shadow never stands: untracked, a
  heap's, the caller's memory, its VkBuffer handed out, writes dropped), between_instances (a held
  render pass's copies between its instances, inline_splits, which no submission decides),
  after_encoder_writes, recorded_whole (predicated laying, no new VkCommandBuffer),
  command_buffer (at submission: its command buffer reaches unnamed memory or an earlier encoder
  wrote the truth or image), let_go (at submission: the standing let go). With
  shadow_texels_skipped_by_standing they sum to shadow_texels_first_copied_in_private_buffers +
  _private_surfaces. And, but for unstanding, by what the standing held then (shadow_standing::
  LetGo, Standings::let_go): stood, never_stood, unnamed_since, truth_written, image_written; for
  those decided as the encoder records them, by the batches submitted so far.
- METAL2VULKAN_LOG_SHADOWS (default-off diagnostic, shadow_log.rs): one line per shadow a device
  makes of a texture over a buffer's bytes: the call (new_texture_with_iosurface_plane for a
  plane's), format, size, levels, usage, the buffer's storage mode, length and object ID, the
  texels' offset and row pitch, and the reason its shadowed-texture notice gives (announced once
  a device). Two textures over the same bytes name the same object ID and offset.
- Standings::stands is folded into let_go; submit.rs's gate answers where it was decided.
- Tests: shadow_standing_device checks both sums in every leg, and the first read's copy in is
  let_go/never_stood, the read after another queue's fill let_go/truth_written, a read after its
  own command buffer's fill command_buffer, a read once the VkBuffer was handed out unstanding.
- Docs: shadow_standing.rs, WorkCounts, docs/API.md (the log), env_vars REGISTRY; the artifact
  test's note on the variables the runtime reads. api_signatures blessed.

No behaviour changes: counts and a default-off log only. RUNTIME_VERSION not bumped (main's).

Verified: cargo fmt; builds and tests run as potluck jobs after this commit.
(cherry picked from commit a82491daf4a24ad57845c6e0f62bd53946dc22f8)
2026-11-08 12:18:18 -08:00
..