The debug layer reported ~16 resource-state errors a second in the world on main (run light21) and with the queue order (light19), four kinds: Depth twins, and 16-bit depth textures with twins (COPY_SOURCE, UNORDERED_ ACCESS and COMMON against DEPTH_WRITE): a list's prelude swapped each texture's real state for the one the list leaves before recording the twin copies it owed, so those copies moved the textures from the wrong states. The prelude now records the copies from the real states, then the list's moves from them, and only then stores the states the list leaves. The title's 174 MB GPU heap, bound as a vertex buffer while in UNORDERED_ ACCESS, and barriers on it disagreeing with the state an earlier vertex binding promoted it to: our only transitions on a title buffer's copy were the indirect clamp's, UAV to INDIRECT_ARGUMENT and back to UAV. The clamp now reads the title's records through a root view and writes the clamped ones into an argument buffer of the list's own, which the execution reads; only that buffer is transitioned (common, unordered access, indirect argument, common). Title buffers' copies are never transitioned: common between submissions, promoted by every use, ordered by unordered-access barriers (the shortcut is in indirect.rs). The clamp no longer writes the copy of the title's memory; the capture's read-back reads the clamped records from the list's buffer. Tests: a transition log (every barrier built on the test thread) replayed in GPU order by the debug layer's rule: twin::tests::prelude_copies_start_ from_the_real_states (fails on the old order: "before COPY_SOURCE, the resource is in COMMON", run light21's message) and indirect::tests:: argument_buffers_move_from_their_current_states (two lists in either order; the title's copy untouched); the clamp tests now also check the whole title copy is as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
315cea185d
·
2026-11-25 15:41:46 +01:00
History