Textures flash black on a small PC: 98,064 slots "found unmapped and made null" in one 13-minute run. Is keeping the last view (with a grace period) wanted? #1284
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1284
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@FluffyCyanNova on GitHub · 2026-11-26 10:11 UTC · original
Machine: RTX 3060 12 GB, Core i3-12100F (4 cores), 32 GB RAM, game on an HDD, Series S profile (
--console series-s), 1280x720. Fork9376fd60+ our ports, 13.4 min in the world.Symptom: surfaces such as door and window frames show their texture, go black, then come back. Faces are black in some frames. It is the same family as the black faces reported in fork #1211 and #1246.
What the log says (one run):
Where it comes from (our reading of the code): in
draw.rs, when a texture picked by index has no mapped memory,texture_slot_gone("Streamed out") hands the slot todescriptor/host.rs, which makes the slot's view null so thatlet_go_idlecan free the host copy. The sampler then reads a zero texture until the title maps the memory again (black in the colour G-buffer; normals stay fine). Nothing keeps the last good view.What we tried / plan: a local, off-by-default switch
VICTORY_KEEP_GONE=1that keeps the slot's last view while its memory is away, about 25 lines. Our next run (the same scene, one change) will measure the count of made-null slots, the black frames and VRAM use. We will post the result here. We have not run it yet, so we have no evidence that it helps.What we found already exists, none of which does this: fork #1246 (looked-at and fresh slots in turns), #1031 and #1210 (resident mips), #1097 (placeholder fast path), upstream #2597/#2598 (a different path: giving up a texture nulls the dynamic slots of earlier lists).
Questions
@HLVM04 on GitHub · 2026-11-26 10:27 UTC · original
For Q2: we found two other paths that give the same G-buffer picture (colour black, normals fine). Both are on an RTX 5070 Ti, Series S profile, fork main plus open PRs. Both fixes are local changes of ours, not PRs.
VICTORY_TEXTURE_NO_WAIT=1, a refresh that lands while the title remaps the texture's pages reads title memory through the kernel. For a partly mapped texture that read fails, so the staging buffer stays empty. A texture picked by index gets no later refresh, so its host copy is uploaded as all zeros and stays that way. The hero's skin colour and normal textures (BC7 sRGB / BC5) hit this. Our fallback reads through the partly-mapped copy path instead when the kernel read fails on a never-filled staging buffer. With it the neck was lit in 4 of 4 runs, against 1 of 4 before. That was scored on the base-colour G-buffer target only (details in #923).Rule::Startindescriptor/host.rs. It treated any placed view written within 4 KiB of an older view's start as replacing it. The title packs tiny tint palettes (256 B to 4 KiB) a few hundred bytes apart, so each new palette view made its neighbours stale, and their host views went null for good. Capping the head block at the texture's own size lit the face in 2 of 2 runs. It did not fix every black part.Both leave a texture black for good rather than flickering, so they fit "black and stays black" better than your "black, then comes back". We did not count "found unmapped and made null" slots in those runs, so we can't give the low-count comparison directly.