Files
metal2vulkan/docs
Anees Iqbal b3d844f9fb RUNTIME 2261: a commit returns while its batch waits for a held VkQueue; kept draws carry only into passes of the same sample positions and layer count; the lavapipe and AMD lane failures
Runtime fixes, each with a test that fails before:
- A command buffer's queue slot lives apart from its state lock (d159e7a2f1, 78d5a44df2).
  commit() handed its slot over under the command buffer's state lock, which the scheduler
  thread held across vkQueueSubmit; that submit waited for a VkQueue someone else held (a
  compositor sharing the queue), so the program's commit waited as long as the queue was held
  (gdb, m3-max-28123: the lane's checked-commit tests ended in SendError after 60 s). Test:
  tests::scheduler_wakes::a_commit_returns_while_the_thread_submits_its_batch_to_a_held_vk_queue
  (lavapipe, fails before in 20 s: m3-max-28149).
- A render encoder at custom sample positions carries no kept draw (1da568fc43): a kept draw's
  VkPipeline has the positions baked in, and carry_ends never compared the ending pass's, so a draw
  kept from a pass at custom positions was carried into a later pass of the same shape at the
  default ones (runtime_lane::sample_positions on the XTX and the 780M, draw_again.rs:1320).
- A kept draw carries only into a pass of the same renderTargetArrayLength (430fad72b8): the
  layered passes' kept draws were carried across layer counts (runtime_lane::layered_passes, both
  tests, on lavapipe and AMD). The debug check that caught both now names the parts that differ
  and whether the draw was rebound or carried (8bfeebe929, 3973769b86, 9da59ae9e3).

Test fixes (the expectation follows the runtime's documented behaviour):
- runtime_lane::degrade_notices::dispatches_degrade_once_per_kind expects a split where the device
  splits the ragged grid (1b58b69953's partial-threadgroups variant runs it whole elsewhere).
- handed_objects x2 and host_memory: a held import's deallocator runs once its command buffer
  completed, posted to the free thread (41b5430f6a) or not, as Metal's may run after the waiters.
- queue_order's host-step order test commits B once A's gate was taken (b46459080d: a batch whose
  host step has not taken its gate gives way, the order the x86 Macs keep).
- The two dispatches past 2^32 threads compile only under m2v_gpu: a CPU device runs each past the
  watchdog's 20.2 s (docs/VALIDATION.md).
- The held-wakes tests begin once the device's own checks answered.

Verified: lavapipe suite at 430fad72b8 6019/6020 (m3-max-28179; the one failure the runtime-sources
pin this landing re-pins). The XTX and 780M legs (m3-max-28177, 28178) run after the landing.
2026-11-13 21:59:11 -08:00
..