In builds with debug assertions every second draw again (and rebound draw) takes every step and
checks it against what the draw again would have done. The check boxed itself (Again::Check's
Box<Checked>) and cloned what it compared: the drawn areas and coverage, the pass's reads and the
instance's gathered uses (HeldReads, HeldGathered: copied lists), the noted uses, the pass's
input and extended sets, and of a rebound draw its commands, set-0 writes, offsets, push bytes,
vertex buffers, uses and resident keys. Those allocations count in the frame lanes' draw
allocations, which CI runs with debug assertions: runtime_lane::frame_costs'
a_frame_s_draws_and_pass_ends_allocate_within_their_bounds measured 22.30 allocations a draw on
the M3 (bound 20) once draws rebind.
Each part is now compared by a digest of its Debug form, streamed into a hasher through a
fmt::Write adapter (draw_again::digest), which copies nothing. The encoder's held state is taken
only for a plain draw again (Expected::Plain; a rebound draw's check compares what it worked out,
Expected::Rebound). Checked is no longer boxed: the draw path hands draw_again an
Option<Checked> on its stack, which kept_again takes as before. pass_start_reads::held and
shadows::gathered lend their lists rather than copy them; binding::Info and NotedApart print
their Vulkan values raw (ash's types print nothing without its debug feature). Release builds
are unchanged. No bound changed.
Measured on the M3 Max (MoltenVK 1.4.2), with debug assertions: that lane's draws make 18.21
allocations a draw (was 22.30; bound 20); a pass end 15.67, a pass open 5.00. Negative control:
with binding::rebind_into's image descriptors left as they were (the rebind's texture path
broken), tests::draw_again::draws_after_texture_and_sampler_changes_rebind_what_every_step_binds
fails with "a draw rebound worked out other set-0 writes than its every step".
Verified there, --cfg m2v_gpu, on a tree that also held the next commit's change: the runtime's
whole suite, 1545 of 1546 (the one failure, tests::scheduler_wakes::
commits_with_idle_gaps_lose_no_wake, passed 10 of 10 reruns); the validation crate's runtime
lanes listed in the last commit, 288 of 288. Clippy over the workspace, plain and
--cfg m2v_gpu; release builds check clean.
(cherry picked from commit 1b8e52fe2f58f01df507d4f9b345dcb901c16ca2)
(cherry picked from commit 838786566146858e00b579ebc78240353fa87061)