Three ways a texture can stay black after its card copy is released (found by reading, reproduced in synthetic WARP tests; not proven for any play report) #3241

Open
opened 2026-11-29 20:57:22 +00:00 by CuteBooty · 1 comment
CuteBooty commented 2026-11-29 20:57:22 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by CuteBooty on 2026-11-29T20:57:22Z.


Three code paths on main 829188e96 where a texture can sample black (or the grey stand-in) after the layer lets go of its card copy, which it does in the idle sweep and with VICTORY_SLOT_EVICT=1. They were found by reading the source and each was reproduced in a small synthetic test on a software device (WARP), with a hardware-free harness. I have not shown that any of them causes a specific black-texture report from play. Please read this as "three real ways to get black, frequency in play unknown".

1. A slot published empty until the copy is remade

crates/victory-gpu/src/descriptor/host.rs, the slot mirror around lines 5440-5530 (waiting, later, neutral_for). A view of a texture whose host copy was let go is treated like a new texture: the slot is made "later" and waits for the copy to be recreated. For a waiting 2D or array slot, c9c53541c now shows a 1x1 grey stand-in; other kinds stay null. A draw that samples the slot before the remake gets black or grey.

Synthetic test: after forcing the detach, a shader that reads the slot through a computed heap index sampled transparent black for all 64 test pixels.

Fix idea: remake the host copy (upload, wait on a private fence) before publishing the slot, so the slot is never visible empty.

2. A partial update wipes the texels around the patch

crates/victory-gpu/src/list.rs, copy_texture_region (about lines 1570-1595). When the copy is the first write to a remade host texture and its staging is gone, texture::zeros clears the whole texture, then the patch is written. Nothing restores the surroundings from title memory.

Synthetic test: an 11-texel copy into an evicted 64-texel texture changed the 11 texels and left the other 53 at zero instead of the earlier pattern.

Fix idea: when the texture is a remade generation, upload its title contents first so the partial copy lands on the real background.

3. A failed view is cached as null

crates/victory-gpu/src/descriptor/host.rs, same function, lines 5521-5536. self.made.set(index, key) and self.quick_is(index, key) record the key even when make_twinned returned None. A later mirror of the same slot and record sees the key as done and skips creating the view, so one failure can last.

Synthetic test: with one injected allocation failure, the record stayed cached through another mirror, even after the texture was recreated separately, and all 64 pixels sampled black.

Fix idea: do not record the key when the view failed; retry it, limited to once per frame per texture so a persistent failure does not spin.

What is and is not known

  • Found by reading, and each reproduced in synthetic tests only. Nothing here was seen in a game run as the cause of black.
  • We have a patch behind a switch (default off) with these three fixes. In one synthetic test a remake costs about 0.4-1.5 ms for ordinary sizes and 6-8 ms for 16 MB textures, and each remake waits for the card, so many at once can hitch. Not measured in play.
  • #2412 (partial readback) is a different path (texture to buffer) and does not touch path 2.
  • Harder eviction (739f8339f, over-budget slot eviction on 8 GB cards) would make all three more frequent; that is a guess from the code.

By description only (black textures, some on 8 GB cards); I have not tied any of them to these paths: #1333, #1833, #1030, and the 8 GB eviction reports #1644 and #2778.

Hardware: RTX 3070 8 GB, Ryzen 7 5800X3D, 32 GB, Windows 11 26200, driver 621.24.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6684056874 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3241). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-29T20:57:22Z. --- Three code paths on main `829188e96` where a texture can sample black (or the grey stand-in) after the layer lets go of its card copy, which it does in the idle sweep and with `VICTORY_SLOT_EVICT=1`. They were found by reading the source and each was reproduced in a small synthetic test on a software device (WARP), with a hardware-free harness. **I have not shown that any of them causes a specific black-texture report from play.** Please read this as "three real ways to get black, frequency in play unknown". ## 1. A slot published empty until the copy is remade `crates/victory-gpu/src/descriptor/host.rs`, the slot mirror around lines 5440-5530 (`waiting`, `later`, `neutral_for`). A view of a texture whose host copy was let go is treated like a new texture: the slot is made "later" and waits for the copy to be recreated. For a waiting 2D or array slot, c9c53541c now shows a 1x1 grey stand-in; other kinds stay null. A draw that samples the slot before the remake gets black or grey. Synthetic test: after forcing the detach, a shader that reads the slot through a computed heap index sampled transparent black for all 64 test pixels. Fix idea: remake the host copy (upload, wait on a private fence) before publishing the slot, so the slot is never visible empty. ## 2. A partial update wipes the texels around the patch `crates/victory-gpu/src/list.rs`, `copy_texture_region` (about lines 1570-1595). When the copy is the first write to a remade host texture and its staging is gone, `texture::zeros` clears the whole texture, then the patch is written. Nothing restores the surroundings from title memory. Synthetic test: an 11-texel copy into an evicted 64-texel texture changed the 11 texels and left the other 53 at zero instead of the earlier pattern. Fix idea: when the texture is a remade generation, upload its title contents first so the partial copy lands on the real background. ## 3. A failed view is cached as null `crates/victory-gpu/src/descriptor/host.rs`, same function, lines 5521-5536. `self.made.set(index, key)` and `self.quick_is(index, key)` record the key even when `make_twinned` returned `None`. A later mirror of the same slot and record sees the key as done and skips creating the view, so one failure can last. Synthetic test: with one injected allocation failure, the record stayed cached through another mirror, even after the texture was recreated separately, and all 64 pixels sampled black. Fix idea: do not record the key when the view failed; retry it, limited to once per frame per texture so a persistent failure does not spin. ## What is and is not known - Found by reading, and each reproduced in synthetic tests only. Nothing here was seen in a game run as the cause of black. - We have a patch behind a switch (default off) with these three fixes. In one synthetic test a remake costs about 0.4-1.5 ms for ordinary sizes and 6-8 ms for 16 MB textures, and each remake waits for the card, so many at once can hitch. Not measured in play. - #2412 (partial readback) is a different path (texture to buffer) and does not touch path 2. - Harder eviction (`739f8339f`, over-budget slot eviction on 8 GB cards) would make all three more frequent; that is a guess from the code. ## Possibly related reports By description only (black textures, some on 8 GB cards); I have not tied any of them to these paths: #1333, #1833, #1030, and the 8 GB eviction reports #1644 and #2778. Hardware: RTX 3070 8 GB, Ryzen 7 5800X3D, 32 GB, Windows 11 26200, driver 621.24.
github-actions[bot] commented 2026-11-29 20:57:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T20:57:30Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262490303 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3241#issuecomment-7262490303). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:57:30Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
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
trustno1-coder/VIctory-NVIDIA#3241
No description provided.