Files
metal2vulkan/docs
Anees Iqbal 758ed9348b The fan-out probe counts each draw's flagged triangles
A flagged draw drawn in parts draws its triangles from the first the
probe flagged to the last region by region
(rate_map_parted_region_triangles), but nothing said how many of those
are flagged themselves: the probe kept only the first and the last.
That density decides whether drawing blocks of flagged triangles apart
would cut the region-by-region triangles.

The probe's geometry stage now adds one, for a flagged triangle, into
the word its PrimitiveId picks of a fifth set of PROBE_COUNT_WORDS after
the flag (PROBE_SETS = 5, PROBE_DRAW_WORDS = 1 + PROBE_SETS *
PROBE_COUNT_WORDS, the only place the word count is stated). The
runtime sums that set (Probed::flagged_triangles) and counts it at the
probe: WorkCounts::rate_map_flagged_triangles. The pieces lane prints
it beside the parted draws' region-by-region triangles and checks it
is non-zero exactly where draws were flagged, and no more than those
triangles.

Tests: the probe's link test counts two atomic adds (the copies', the
flagged count's); the probe words' unit test sums the fifth set; the
fan-out device test checks its four flagged triangles.

The probe's GPU time, verified on lavapipe (LP_NUM_THREADS=1, as CI)
by the fan-out device test (rate_mapped_fan_out::a_host_step_fans_out_
the_commands_the_probe_does_not_flag, one probe of 8 draws, 4 flagged),
release runtime binaries under --cfg m2v_cpu_icd at 44eda17f1d (before)
and this change on that base (after, 44665e1bce), taking turns on msi,
rate_map_probe_gpu_nanos:
before 20.63, 3.44, 2.43 ms; after 16.36, 2.60, 1.79 ms (the first
round of each cold). No growth past the noise: each round's after is
below its before.

Also, from the landed device-local replay scratch (RUNTIME 2220): its
resident root table now lies at a multiple of 32 bytes, which fixes the
internal refusal (RootTable::resident_fields, a moved resident set)
that the old scratch could meet where the upload alignment is 16
(RADV, lavapipe), read from the code, not observed; the compute replay's
scratch (gpu_execute.rs) is upload_aligned to 32 with its table at
slots * SLOT_TABLE_BYTES + PARAMS_BYTES, a multiple of 32, so it has
none.
2026-11-13 08:01:34 -08:00
..