Files
metal2vulkan/crates
Anees Iqbal 9703e4d09e rt test: a release counts as waiting until the reaper or the block-maker thread has done it
Round K's 2080 leg (m3-max-81680) failed the harness's churn_all_day: from
the 100th iteration to the 200th, textures 0 -> 4, attachment_views 0 -> 3,
blocks 8 -> 9, exports 0 -> 1, plane_stand_ins 0 -> 1, and nothing live at
the device's drop. Round K's 5080 leg (m3-max-81692) failed it the other
way, a whole iteration's set read at the 100th and gone at the 200th. The
row's settled read waits for no release waiting, no command buffer live and
two reads 20 ms apart that agree. Gauges::releases_waiting stops counting an
object once the block-maker thread hands it to the reaper thread, before
the reaper frees it, and never counts an imported or exported block given
back, which the block-maker thread frees. A reaper busy with another job or
a look at the pipeline cache, or a block-maker thread busy with a free or a
make, leaves the read settled with the objects still counted.

New device tests, tests/releases_done.rs:
- every_device_counts_a_view_the_reaper_has_not_freed_as_a_release_waiting:
  with the reaper held in its look at the pipeline cache (Caches::look_hold),
  a texture view dropped with nothing in flight and nothing waiting is still
  counted in textures, and is to count as one release waiting; let go, both
  fall together.
- every_device_counts_an_import_the_block_maker_has_not_freed_as_a_release_waiting:
  with the block-maker thread parked before its first work
  (MakerTest::Park), a host import given back is still counted in imports
  and its release has not run, and it is to count as one release waiting;
  let go, the release runs and both fall together. A device that imports
  no host memory says so.

Expected red: today each reads no release waiting while the object is
still counted.
2026-12-02 21:06:55 -08:00
..