Textures picked by index flash black: the sweep lets go of copies needed again moments later (75,053 let go, 19,054 made again in 600 s) #1080
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#1080
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?
@tippythetaidum on GitHub · 2026-11-25 18:40 UTC · original
What is seen
Surfaces that were textured go black for a moment and come back: "normal to begin with, then it flickers black, then goes back to normal". Seen through the prison opening on an RTX 5080 16 GB (Series X profile), with
VICTORY_LEVELS_ON_DEMAND=1and #1031, after the textures that stayed black for good were fixed (#1031). It was also there before that change: the cell door was textured, then black, then textured again in saved frames of one run.What the counters say
resource::let_go_idlelets go of a host copy of a texture the title fills when no list and no slot holds it and nothing has asked for it forvram_idle_msand 4 frames. That's 5 s below 75 % of the card's budget, 2.5 s from 75 %, and 1 s from 85 %. In one 600-second release run, adding up the "since the line before" parts of theVICTORY_CARD_ACCOUNTING=1lines:resource::room) in 89 of 92 lines, at 9.7 to 11.4 GB in use of a 13.0 to 15.2 GB budget, so mostly in the 2.5 s and 1 s steps;At these frame rates 2.5 s is 12 to 15 frames. A texture the camera turns away from for a moment loses its copy. When the title writes a slot with a view of it again, the slot has nothing to show until the copy is made and uploaded again; with
VICTORY_HEAP_WORKER=1the slot shows only once the upload is submitted. That window is the black flash, for textures picked by index. A texture read through a table is made and uploaded before the draw, so it doesn't flash.What I'm trying
VICTORY_TEXTURE_IDLE_MSsets the first step (5,000 unless set), and the two steps above it are a half and a fifth of it, never under a second. A run at 30,000 against the same run at the default, comparing "made again", the card's room and the flashes in saved frames.I'll open a PR with the numbers from the A/B. If someone already works on the sweep, say so and I'll test that instead.
Setup
RTX 5080 16 GB, driver 621.14, Windows 11, Ryzen 7 9800X3D, Series X profile. Release build of
mainca8829fwith #24, #927, #823, #606, #1002, #907, #834, #1007, #1031 and #917. Switches: the frame-rate set,VICTORY_HEAP_WORKER=1,VICTORY_LEVELS_ON_DEMAND=1,VICTORY_CARD_ACCOUNTING=1.AI-assisted (Claude Code, Claude Opus 5.5). Counts and descriptions only, nothing from the game attached.
@tippythetaidum on GitHub · 2026-11-25 19:32 UTC · original
Update after three more 600-second runs, same machine and settings, with
VICTORY_LEVELS_ON_DEMAND=1and #917 (totals of theVICTORY_CARD_ACCOUNTING=1lines' "since the line before" parts):VICTORY_TEXTURE_IDLE_MS=30000Two things came out of it:
let_go_idlecompares the time since the copy was last asked for, but a slot that views a copy holds it without asking. When the title moved a texture to another slot, its copy had often been "idle" for minutes and went at the next sweep. The fix is a clock per texture that the first sweep finding the copy unheld starts, and one finding it held stops; a copy goes only when both times are past the idle time. The change is small and has a test. It is in my test build, but on its own it barely moved the totals (R6).The flashes are rarer in R7 by eye, but not gone. Next I'll catch one: save every frame for a short window, and log which slots show nothing in those frames and why (copy let go, upload not yet submitted, or memory unmapped). Then the fix can target the actual cause. I'll post the result here.
AI-assisted (Claude Code, Claude Opus 5.5). Counts and descriptions only, nothing from the game attached.
@CuteBooty on GitHub · 2026-11-25 19:56 UTC · original
With
VICTORY_ASYNC_SUBMIT=1, in town at 6,000-10,000 draws: the road surface there in one frame and gone in the next, stretched polygons for single frames, exposure jumpingSeen on an RTX 3070 8 GB in Series S during the drive at the end of the first mission, at 200-1,100 ms a frame;
not seen in light scenes (open water, 140 ms) with the same switches. In the same intervals the log shows about
1,200 indirect draws a frame dropped at recording and, in our tree, about 1,600 dynamic descriptor tables refused
for fragmentation, so part of the missing geometry may be ours. The stretched polygons look like vertex data read
after the title had moved on. I have phone video, no captures. Not yet tried with the submit thread off in the same
scene; I will add that.
Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, a diagnostics build of a tree at main
310c6eb6with a number of open PRs picked and ports of fork main's copy queue re-fetch and submit thread. Switches unless the comment says otherwise:VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_ASYNC_SUBMIT=1 VICTORY_BAKE_TEXTURES_MS=0 VICTORY_TEXTURE_DROP_MIPS=1, plus wide card hashing (our tree's form of PRs #1014 / #997). One run per configuration.@tippythetaidum on GitHub · 2026-11-25 20:06 UTC · original
Thanks, useful.
VICTORY_ASYNC_SUBMIT=1has been on in every run of mine, so here's how it looks from this side, to help separate the switch from the drops.RTX 5080 16 GB (driver 621.14, 32-lane waves), Series X profile, release build,
VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_INDIRECT_GATHER=1 VICTORY_ASYNC_SUBMIT=1 VICTORY_LEVELS_ON_DEMAND=1. The last run was 600 s from the opening cutscene through the prison to the counselor scene and the flashback after it, up to 11,830 draws a frame (median 3,480):So with the switch on and no indirect drops or refused tables, this card doesn't show the geometry flashes. That makes your ~1,200 dropped indirect draws and ~1,600 refused tables a likely part of it, though I haven't reached the town drive, so it isn't the same scene. I'll run the same route once with
VICTORY_ASYNC_SUBMIToff and post whether the texture flashes change.AI-assisted (Claude Code, Claude Opus 5.5): run logs, counts and this text.