%% why the end timestamp came back stale, and the fix. flowchart TB subgraph after["After: the resolve waits for completion"] B1["write timestamp 0"] --> B2["render encoder:
draws"] --> B3["write timestamp 1"] --> B4["commit"] B4 --> B5["queue waits on the
progress event"] --> B6["new command buffer:
resolve 0..1"] end subgraph before["Before: one command buffer"] A1["write timestamp 0"] --> A2["render encoder:
draws"] --> A3["write timestamp 1
(queued behind the draws)"] --> A4["barrier encoder"] --> A5["resolve 0..1"] A5 -. "reads entry 1 before
the write lands:
last frame's value" .-> A3 end