A vertex or fragment texture or sampler bind forgot the encoder's kept draw, so a draw after one
took every step: the compositor shape (a buffer and a texture bound before each draw) never
reached the bind tail.
Now:
- Texture and sampler binds keep the kept draw (log_keeping), as buffer binds do; the next draw
compares the tables' stamps.
- BindingPlan::rebind_draw_slots_into (was rebind_draw_buffers_into) takes buffer, texture and
sampler slots. A texture or sampler slot decides none of the commands. It answers Ok(false)
for a texture buffer's texel range and a YCbCr texture's planes.
- binding::rebind_into writes a changed texture's or sampler's image descriptor as bind_into
does (image_descriptor, through the encoder's memo, its samplers kept for retaining). It
answers Ok(false) for a changed texel buffer, YCbCr image or argument sampler.
- The draw rebound brings in texture and sampler slots and stops where every step would differ:
- a memoryless texture its functions use (the full path fails the command buffer there);
- runtime samplers' address modes other than the kept draw's;
- a changed shape (a sampler of other addressing, which the pipeline's specialization
reads, takes every step);
- a plan that samples or writes a color attachment's texture;
- an extended-range shadow.
It retains the new samplers and notes whether its uses read an image (Kept::reads_images).
- Docs: rebound.rs, WorkCounts::draws_rebound, docs/API.md, api_signatures.tsv.
Check: tests::draw_again::draws_after_texture_and_sampler_changes_rebind_what_every_step_binds
(tob_sample). It covers another texture each draw, another sampler of the same shape, both,
and samplers of other addressing. It checks rebound counts (0 for the last), commands, state
commands, noted uses and pixels against every step, with the debug cross-check on every second
hit. It fails without the change (0 rebounds). The buffer test's slot-of-another-class case is
now more slots than a draw rebound takes (samplers 0 to 8). Passes on the M3 (MoltenVK) with
the draw_again tests; clippy clean, plain and with --cfg m2v_gpu.
(cherry picked from commit ecf97956b214836a1309affe539aff8454239e97)
(cherry picked from commit 8472edf4c0ae174c3dab7bc667cecfa6874aa942)