Files
metal2vulkan/docs
Anees Iqbal a96e93f4da runtime_lane under sync validation: the layer's false positives become narrow claims, and the tests' own races are taken out
Under METAL2VULKAN_LANE_VALIDATION=sync on lavapipe the runtime lane failed 31 tests on
the layer's hazard reports. At def64b1999 it failed 34: these 31, plus write_routes and two
frame_costs tests, all since fixed in the runtime (write_routes in 14c0b28928 and 952755253f).
None of the 31 is a missing barrier. Each is one of:
- the layer taking a shader's storage buffer as written over its descriptor's whole range;
- the layer reading no indirect draw's counts;
- a difference the runtime already announces;
- a test program's own race, which Metal leaves unordered too.

Claims (runtime_lane::apart_writes, runtime_lane::stage_races; docs/VALIDATION.md's table):
- NotedWrites notes every write a test places in a buffer: a dispatch's, a draw's, a fill's, a
  bounded draw's or a patch draw's, by command buffer. The layer's hazard reports are held
  apart, each distinct one once with its count, so a claim reads every report.
- LAYER-APART-WRITES, widened from dispatches to draws and fills: a write after write between
  noted writes, each one Vulkan command's, no two of which share a byte.
- LAYER-IDLE-DRAW: the index bounds pass's two vkCmdDrawIndexedIndirect of one bounded draw,
  reported as recorded, one such draw noted per command buffer, on a device that announced
  indirect-index-bounds-pass. At most one of the two draws.
- LAYER-IDLE-CHUNK: an emulated patch draw's vkCmdDrawIndirect chunk draws, reported as
  recorded, the patch draws of each command buffer noted apart, on a device that announced
  emulated-tessellation-draws. The tests keep each patch draw below 2^30 triangles and the scan
  writes vertexCount 0 past them, so at most one chunk of a draw draws.
- LAYER-STAGE-RACE: a later draw's vertex stage against an earlier draw's fragment stage of one
  pass, on a buffer the test names, reported as recorded, of the kind whose notice the device
  announced (in-place-vertex-reads, fragments-before-geometry).
- Each form has unit tests of the shapes that pass and of those that must fail.

Tests:
- draw_bases, index_fetches, index_pools: bounded draws noted (idle draw).
- int_attributes, normalized_vertex_fetch, memoryless_uses, render_executions,
  render_gpu_executions, predication: their writes noted apart.
- argument_buffers moves to NotedWrites.
- patches, patch_indices, render_executions' indexed patch commands: patch draws noted (idle
  chunk on the emulation, apart draws on a device with tessellationShader).
  answer_as_plain_metal gives each draw that runs a marks buffer of its own: Metal orders no
  draw's vertex writes after another's in a pass.
- pass_start_reads: the stage-race claim.
- helper_select: a texture memory barrier between its draws, whose storage image the layer
  takes whole.

Verified on lavapipe (CPU ICD), the same sync command at base and tip (whole runtime lane,
--success-output immediate, claim lines printed):
- base 13e0a9b60b, m3-max-21616: 2019 run, 32 failed. That is the 31 above, plus depth_executions,
  a regression from RV 2124 fixed on its own branch.
- tip, m3-max-21631: 2032 run, 1 failed (depth_executions). 31 tests passed with claim lines.
- clippy (every feature, --cfg m2v_gpu, --cfg m2v_cpu_icd) and rustdoc clean, m3-max-21617.
2026-11-12 09:20:56 -08:00
..