[pr-fix][rendering] Preserve list texture updates after a late upload-ahead completion #104
Loading…
Reference in a new issue
No description provided.
Delete branch "tyr0nsur/Darner:codex/preserve-pending-ahead-texture-upload"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
What it changes
The COPY worker can publish completion after an ordinary draw list has timed out in
listed()and taken over its staging buffer. On currentmain, the worker then clears a newer pending refresh. The next list skips the upload and the GPU keeps the previous texture bytes.Set the uploaded and clean flags and remember the hash only while the staging buffer is still one-shot. Check this under the refresh lock so completion and a newer refresh cannot clear each other's work. The worker still publishes its fence result, wakes waiters, and runs its descriptor callbacks.
How it was tested
1a5286a78daawith the regression test andcc3a00d15092based onbd0de0cec244with the fix, on Windows 11 build 26300, RTX 4060 8 GB, driver 621.40, Rust 1.98.1.DARNER_ADAPTER=RTX 4060,DARNER_UPLOAD_AHEAD=1, andDARNER_PRELUDE_UPLOADS=1, rancargo --config 'profile.test.debug=0' test --locked -p darner-gpu --lib texture::ahead::tests::late_completion_keeps_a_newer_list_refresh -- --exact --ignored --test-threads=1 --nocapture. The test uses a real COPY fence and delays CPU completion. The BC7 mip read back as0x1bonmain(expected0xb7). On the fix, all 65,536 bytes matched in three runs of the committed revision.cc3a00d15092, with 81 ignored. Rancargo --config 'profile.test.debug=0' test --locked -p darner-gpu --libwith these arguments in order:-- --test-threads=1 --skip watch::: 1,646 passed.watch:: -- --test-threads=1 --skip watch::tests::ask_once_by_res_splits_reservations_without_refusals: 87 passed.watch::tests::ask_once_by_res_splits_reservations_without_refusals -- --exact --test-threads=1: 1 passed.ask_once_by_res_splits_reservations_without_refusalswith a journal entry for the plain allocation. The same test also failed in a combined GPU-library run on unmodified1a5286a78daa. A separate grouped watch run on unmodifiedbd0de0cec244passed 88/88.cargo clippy --workspace --all-targets --locked -- -D warningsandcargo clippy --workspace --all-targets --all-features --locked -- -D warningspassed.cargo run --locked --quiet --package xtask -- policychecked 553 files and the staged check passed.Checklist
main.docs/asset-policy.md.Checked for overlap
main. #93 covers waits on the single host relay queue. If #50 is rebased onto this fix, use itsuploads.copied()inside the guard infinish(), alongside the held hash update.