The encoder trail names each execution's GPU form, and its line reads the form's scratch while pending

The 3090 hang's rerun (its trail line, read in place) named a pass whose two executions of
indirect commands, both through ranges a buffer holds, carried no host-step note: commit recorded
them for good in their merged GPU form (render/executions/gpu.rs), where the trail noted nothing,
so the line could not tell what the GPU read.

encoder_trail.rs:
- GpuForm: an execution's GPU form, its shape (recorded at commit or by its host step, merged or a
  draw per command, indexed, primitive type, the commands its preprocess runs over and from where,
  and the range buffer's offset), with its scratch region, layout and the command buffer's status
  words.
- Named: a part's (and a batch's) trail text with the GPU forms its executions took; the line's
  front batch is described with each form's scratch read now: the range the GPU copied, the
  merged draw's two VkDrawIndirectCommands, the commands whose arguments draw, their vertices or
  indices times instances and the most of them (its index entry where indexed), and the status
  words. The last-completed batch keeps its text alone.
- Step carries forms through a host step; commit's recording of each segment runs under a Step of
  its own (CommandBuffer::noting_forms), whose forms alone it keeps, joined to the part that holds
  the segment (State::trail_forms).

upload.rs: Upload::glimpse, volatile u32 reads of a region of the host-coherent chunk mapping,
read-only, no lock, no wait. completion.rs: the line's names are taken under the pending lock and
formatted (and the scratch read) after it. Off, nothing changes: no note is made.

Test: tests::trail_gpu_forms (device): four CPU-written triangle commands through a range buffer
of [1, 2], recorded at commit merged; after completion the form reads the range 1+2, the merged
draws [2147483646 x 0; 48 x 1 from vertex 2^31], 2 drawing arguments (7x2, 12x3), the most
command 2's, no fault.
This commit is contained in:
Anees Iqbal committed 2026-11-12 23:03:44 -08:00
1 parent 5009abbc40
commit bbf86acd0e
12 files changed
+568 -73

No files matched your search

+12 -5
View File
@@ -1914,11 +1914,18 @@ that step drew: each range it read from a buffer (its location and length as the
and the commands it ran), its draws, their vertices or indices times their instances summed, the
draw of the most of those (its primitive type, count and instances), the route each draw took
(plain, a rate-mapped pass's probe, fanned out, or region by region), the executions it recorded in
their GPU form, and the kept chunks it ran again, whose draws it did not read. Once no work of the
device advanced for 2 s while some was pending, it logs one line for each `VkQueue` whose oldest
batch is pending (id name `metal2vulkan-encoder-trail`, `Info` severity): that batch's encoders,
the last batch the queue completed, with how long before, and the device's pipeline pool's makings
waiting and under way; once a stall. A
their GPU form, and the kept chunks it ran again, whose draws it did not read. An execution of render
commands recorded in its GPU form, at the commit or by a host step, is named by its shape (merged
into one draw or a draw per command, indexed or not, its primitive type, the commands its
preprocess runs over and where its range comes from). Once no work of the device advanced for 2 s
while some was pending, it logs one line for each `VkQueue` whose oldest batch is pending (id name
`metal2vulkan-encoder-trail`, `Info` severity): that batch's encoders, with each GPU form's scratch
read while its work is pending (the range the GPU copied, the merged draw's two indirect draws,
the commands whose arguments draw, their vertices or indices times instances and the most of them,
and the command buffer's execution status words: only reads of host-visible memory already mapped,
taking no lock and waiting for nothing, each word as it stood when read), the last batch the queue
completed, with how long before, and the device's pipeline pool's makings waiting and under way;
once a stall. A
submission a host step makes and waits for itself (a rasterization-rate map's fan-out probe, a
predicated loop's check run again) signals no timeline: once it ran for 2 s, one line names it,
the encoder whose step made it and the states its commands named. The stall probe and the