Keep cached texture mip uploads retryable until submission #105

Closed
opened 2026-11-27 01:33:08 +00:00 by TaynanGT · 1 comment
TaynanGT commented 2026-11-27 01:33:08 +00:00 (Migrated from github.com)
Contributor

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:33:08Z.


The opt-in VICTORY_TEXTURE_STORE path consumes a cache hit while recording and updates HostTexture::prefilled before submission. If the open list is reset, those recorded copies are discarded. The next upload has no cache hit to retry, and views can still expose the missing mips. Upload recording · Prefill publication · View creation

Synthetic regression

Use a texture with a cached upper mip and distinct data in a lower mip. Record the first upload, reset that list without submitting, and record again. The upper mip should stay hidden during the abandoned recording and become available with the retry that actually uploads it. Compare the upper-mip readback with the original bytes.

Found during review of #37. Verified in the source at cc9ed86.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:6638092085 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/issues/105). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:33:08Z. --- The opt-in `VICTORY_TEXTURE_STORE` path consumes a cache hit while recording and updates `HostTexture::prefilled` before submission. If the open list is reset, those recorded copies are discarded. The next upload has no cache hit to retry, and views can still expose the missing mips. [Upload recording](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/texture.rs#L925-L935) · [Prefill publication](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/texture.rs#L1040-L1064) · [View creation](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/descriptor/host.rs#L4710-L4715) **Synthetic regression** Use a texture with a cached upper mip and distinct data in a lower mip. Record the first upload, reset that list without submitting, and record again. The upper mip should stay hidden during the abandoned recording and become available with the retry that actually uploads it. Compare the upper-mip readback with the original bytes. Found during [review of #37](https://github.com/TaynanGT/Vice-Tay/pull/37#discussion_r4711638191). Verified in the source at `cc9ed86`.
TaynanGT commented 2026-11-27 01:36:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:36:09Z.


Draft #113 uses the same cancellation pattern as the on-demand mip code. The cache claim survives recording, returns to the texture when the list is reset, and publishes on submission. The draft also schedules existing descriptor slots to be rebuilt after the fence. Its synthetic test resets the D3D12 list and reads the mip back after resubmission. Windows CI is running.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7207423621 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/issues/105#issuecomment-7207423621). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:36:09Z. --- Draft #113 uses the same cancellation pattern as the on-demand mip code. The cache claim survives recording, returns to the texture when the list is reset, and publishes on submission. The draft also schedules existing descriptor slots to be rebuilt after the fence. Its synthetic test resets the D3D12 list and reads the mip back after resubmission. Windows CI is running.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay#105
No description provided.