Enable sampled texture eviction by default through 10 GB of VRAM #3128
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3128"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T20:09:37Z.
Related to #3035. When the selected D3D12 hardware adapter reports 10 GB or less of dedicated VRAM, sampled texture eviction now defaults on. Capacity is rounded to the nearest GiB as in F1. Unknown capacity and larger cards default off. Shader sample marks are required in every mode.
A saved
VICTORY_SAMPLED_EVICT=0opts out even on a 10 GB card. An explicit launcher override wins over the saved value. The companion F1 control is in #3127. Both PRs target main independently.In one Series X intro comparison at 2560×1440 on an RTX 3080 10 GB with 32 GB RAM, eviction off/on measured 9.4/11.1 rendered FPS and 40.5%/27.6% of frames over 100 ms.
Yuanzer tested this head on an RTX 5060 Ti 8 GB with 32 GB RAM, explicitly switching eviction off → on → on → off in Series X at 2560×1440 with frame generation off. Median FPS was 11 → 14 → 15 → 11. P99 frame time was 145.1 → 80.6 → 73.7 → 102.8 ms. All four runs still logged texture-room and descriptor shortages. The test covers the switch’s performance in this scene. Automatic selection and temporal flicker were outside its scope, and no run reproduced an OOM. Yuanzer’s validation report
A separate RTX 5060 8 GB report confirmed active eviction in both profiles. Series X with DLSS Quality still ran out of memory at command-list close, while Series S with DLSS Balanced reached a menu restart. Both used explicit ON with frame generation off. Reporter’s two logs
Visual validation pending before enabling this default. Eviction was previously disabled after foliage flicker in play. Neither the intro measurements nor the 8 GB timing runs compared foliage over time. A matched OFF/ON run in a foliage-heavy scene with confirmed evictions is still needed. The separate wave64 folding fix does not establish the cause here. Review and related 8 GB reports
The PowerShell launcher now enables shader sample marks. Marks are part of the shader-cache key, so players switching from marks off to on will translate shaders again on first use unless the marks-enabled entries are already cached.
A live D3D12 probe on the RTX 3080 reported 10,539,237,376 dedicated bytes. Five fresh processes confirmed automatic selection, explicit ON/OFF and the marks gate. The VRAM boundary test, 29 launcher tests, PowerShell override checks and changed-file asset policy passed.
Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved.
Created with GPT-6.2 Astra in Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yuanzer on 2026-11-29T20:29:36Z.
8 GB game validation of the sampled-eviction change (AI-assisted local runs):
29ea3922(v2026.11.29.03 base).The reversal held: ON was faster both before and after the OFF runs. The ON logs showed sampled-slot work doing real eviction, including last-pass text such as:
of 29,009 textures shown by a slot shaders pick by index, 29,009 were marked by no shader within its idle time (2,403 MB); let go with them (sampled eviction on), since the start: 11,941 slots picked by index put back to null
Neither run reached OOM or device-removed. Each run still had one no-room texture line and one no-free-descriptor line, so eviction improves the over-budget behavior here but does not make the scene fit.
This is the missing 8 GB result described in the PR: the default-on change is materially faster than OFF on this card. The runs had no crash or device removal. I did not make a temporal flicker comparison, so I am not claiming visual equivalence beyond the absence of a failure. I tested the switch explicitly rather than relying on the remembered settings file.
Runs and readings are from the reporter machine; analysis and wording are AI-assisted.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Smoodie7 on 2026-11-29T20:34:08Z.
Just tested this patch on my setup. No crashes encountered. Looks stable from my testing.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HBF7678 on 2026-11-29T20:58:57Z.
That Didnt Work For me it kept crashing here are logs
victory-nvidia-play-20261129-204947-16024.log
victory-nvidia-play-20261129-204748-6600.log
victory (1)-20261130-021743-4144.crash.log
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T21:00:06Z.
Both RTX 5060 play logs ended with
0x8007000Ewhile recording the host state prelude. The last local VRAM readings were 7,068/6,813 MB and 7,329/6,859 MB (usage/budget). Both headers showVICTORY_SAMPLED_MARKS=1andVICTORY_SAMPLED_EVICT=0, so the runs tracked idle textures with sampled eviction switched off. The frame-zero crash report has a different process ID from either play log.Could you @HBF7678 repeat the same scene on PR head
29ea3922with--set VICTORY_SAMPLED_EVICT=1appended to yourvictory playcommand and attach the new play log? If these runs were already on that head, please mention how you launched it and whether eviction was saved as OFF. That will help distinguish an adapter-default problem from an OOM that persists with eviction active.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HBF7678 on 2026-11-29T21:20:47Z.
Ok so what i did was
setx VICTORY_WAVE_FOLDED 1
setx VICTORY_AMBIENT_SPECULAR 1
setx VICTORY_WATER_LIGHT 0
setx VICTORY_LEVELS_ON_DEMAND 0
setx VICTORY_POOL_SMALL 0
setx VICTORY_TITLE_FPS off
setx VICTORY_TEXBACK_SAME 1
setx VICTORY_TEXTURE_TURN_SPREAD 1
setx VICTORY_CLOSE_LEAN 2
setx VICTORY_CARD_ROOM_FOR_TARGETS_MB 1280
Ran these commands and launched the victory.exe
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T21:21:38Z.
@HBF7678 None of those
setxcommands setsVICTORY_SAMPLED_EVICT. Both logs show it was off. You can test it for one run without changing any more Windows settings.Open PowerShell in the folder containing
victory.exeand the game executable. Run this instead of double-clicking:Try the same scene and attach the new play log, including its first line, whether it finishes or crashes. Please also tell us where you got
victory.exe(release version or PR build). The command tests eviction explicitly. To check why it defaulted off on your 8 GB card, we also need to know whether that executable includes commit29ea3922.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ErRusso on 2026-11-29T21:25:01Z.
Review: COMMENTED
Reviewed against main (
fbe3dc20). The change goes after exactly what two current 8 GB reports show, but I'd hold it until the flicker question is answered.Why it matters: the log in #3205 (5060 Ti 8 GB, DLSS Balanced + FG 3x, v.04) has the card at 7005/7029 MB, texture use 7662 MB against an 80 % line of 5622 MB, ~2.0 GB of index-picked textures no shader sampled within the idle time (unevictable with
VICTORY_SAMPLED_EVICT=0), and DLSS-G switching on/off 51 times in one minute with "out of VRAM (39)". #3280 (3070 8 GB, 16 GB RAM) shows the same at 1.4 GB and proposes this switch.Concerns
VICTORY_SAMPLED_EVICT=0was set on 2026-11-28 because textures it let go flickered on foliage in play. The PR says temporal flicker was outside the test's scope, so defaulting it on for every card up to 10 GB (the largest user group) could bring that back. If the foliage flicker was in fact the wave64 folding fixed in05d1c564, please say so with a run; otherwise a flicker check on a foliage-heavy scene is needed before the default flips.VICTORY_SAMPLED_MARKS=1toplay-foxhound.ps1changes the shader-cache key (VICTORY_SAMPLED_MARKSis inKEYED,shader_cache.rs:86): every script-launcher user re-translates all shaders once. Worth a line in the notes.sampled_eviction_recognises_nominal_ten_gb_cardssits at module level insampled.rsinstead of in the#[cfg(test)] mod teststhere.dedicated_video_memory()uses the host's own adapter and skips software adapters, the play.rs test covers the saved-0 and--set-1 overrides; that part is fine.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T21:26:30Z.
I agree the default should wait for a foliage comparison. The 8 GB timing runs and the RTX 3080 intro did not check temporal flicker. We have no run tying the earlier eviction-related flicker to the wave64 fix. I’ve marked that gap in the description, added the shader-cache note for PowerShell users, and moved the VRAM boundary test into
mod testsin42ca9c82. The relocated test passed in isolation.@Yuanzer, if you can reproduce a foliage-heavy scene on the 8 GB card, could you compare OFF → ON → OFF on the same build with marks enabled, a warm cache, and the same camera position and slow pan? Please note whether leaves disappear or shimmer more with ON, and include the sampled-slot line showing actual evictions in that run. A written observation and counters are enough.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by HBF7678 on 2026-11-29T21:38:49Z.
Still crashing with Series X profile
2026-11-29T21:35:39.660301Z INFO victory_gpu::descriptor::host: slots that showed a texture and were written with another, since the start: 63999 of the same kind elsewhere, 144 of another size, 2407 others, 258450 of another dimension; 64143 of them kept what they showed meanwhile (VICTORY_KEEP_SHOWN); moved ones checked: 0 with the same bytes kept, 0 with other bytes shown neutral (VICTORY_KEEP_SHOWN=checked)
2026-11-29T21:35:39.866537Z ERROR victory_gpu::host: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
2026-11-29T21:35:39.866538Z ERROR victory_gpu::host: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
2026-11-29T21:35:39.866542Z ERROR victory_gpu::host: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
2026-11-29T21:35:39.866537Z ERROR victory_gpu::host: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
VIctory: host GPU failure: a host command list did not close (Not enough memory resources are available to complete this operation. (0x8007000E)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
victory-nvidia-play-20261129-213223-14740.log
Ok with series S profile Balanced no fg (Working good 13-20fps)
victory-nvidia-play-20261129-212738-7792.log
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T21:40:12Z.
@HBF7678 Both new logs confirm eviction was active on your RTX 5060. Series X with DLSS Quality and frame generation off cleared 37,194 sampled slots, yet still ended with
0x8007000Ewhen a host command list closed. Its final local VRAM sample was 7,283 MB against a 6,792 MB budget. Together with your earlier OFF runs, this shows that enabling eviction alone is insufficient to prevent the Series X OOM on this setup.Series S with DLSS Balanced and frame generation off reached the menu restart with 341 MB of local budget headroom at the last sample. That is the working configuration from your report. Both launches explicitly forced eviction on, so automatic selection remains untested here.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by madvillain91 on 2026-11-29T22:25:07Z.
Hardware/OS:
Test settings:
Log Evidence:
Observed Results:
Impact/Notes:
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-29T22:26:28Z.
The attached log confirms
VICTORY_SLOT_EVICT=1. That enables ordinary slot eviction. The header contains neitherVICTORY_SAMPLED_MARKSnorVICTORY_SAMPLED_EVICT, and I found no sampled-slot eviction counters. The texture queue reported “no room, new textures wait” in 21 of 49 samples. That is an admission threshold. The log contains no0x8007000E. It also reports the selected adapter as RTX 4090 with 8,017 MB, which differs from the stated 3070 Ti model.@madvillain91 I’d keep the other knobs fixed. This change frees idle texture copies under pressure. Road detail and skin rendering depend on other parts of the renderer. For the open foliage question, could you test the same leafy scene on PR head
42ca9c82, with--set VICTORY_SAMPLED_MARKS=1on every launch and--set VICTORY_SAMPLED_EVICT=0, then=1, then=0? Use the same slow camera pan and note whether leaves disappear or shimmer more with ON. Please include the ON log’s “slots picked by index put back to null” count and mention any adapter-name override used alongside the reported MFG unlocker. The counter confirms the scene actually exercised the change.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-11-30T22:06:46Z.
Data on what the marks themselves cost, relevant to where they should be on by default. The launcher has set
VICTORY_SAMPLED_MARKS=1for every card since84bd61e2.The machine was an RTX 5080 16 GB (resizable BAR) with a Ryzen 7 9800X3D on Windows 11: Series X profile, 2560x1440 output, DLSS Balanced (scene at 0.58 scale), frame generation off. The build was main
e1251c31plus #4332 and #4206.The scene was the same save every run, with the player standing still on a wooden pier for 90 s. In view: the player character up close (skinned, with hair), a restaurant terrace with people moving about, open water with boats, and a far shore with foliage and the city skyline. The game sends about 8,700 draws a frame: about 7,000 single-draw ExecuteIndirect mesh calls and about 2,000 compute dispatches. VRAM in use is about 9–10.7 of 14.5 GB, so slot eviction has nothing to do here.
The title's card time per frame comes from the card meter, three readings per run. These are translator switches, so each needs its own run:
BVH_MISS,NAN_SCRUB,SAMPLED_MARKSall on)VICTORY_BVH_MISS=0VICTORY_NAN_SCRUB=0VICTORY_SAMPLED_MARKS=0VICTORY_EARLY_DEPTH=1, marks onSo the marks cost about 2.5–3 ms of card time a frame here, on a card where the eviction they feed never has anything to let go. The sweep line still reports about 76,500 slots marked per 30 frames.
What I found about why:
VICTORY_EARLY_DEPTH=1gives it back where the console asks for it, and recovers about 1.3 ms with the marks on.This PR keeps the marks on in every mode. Is there a use for them beyond eviction that needs that on large cards? If not, gating
VICTORY_SAMPLED_MARKSon the same VRAM line as the eviction would save these 2.5–3 ms where eviction never acts. OrVICTORY_EARLY_DEPTH=1alongside them would recover about half of it. These are single runs per row, with each first run recompiling its shaders, which affects the CPU side but not the card meter. I can rerun with anything you'd like compared.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-30T22:07:49Z.
@mstrmoos Yes. On
e4cc8a76, the descriptor upload queue uses recent sample history to prioritise slots (descriptor/host.rs,Due::ordered). When texture room is tight,draw.rsalso consults the marks when admitting first uploads. Both paths can run with sampled eviction OFF. That gives marks a purpose on larger cards, though it doesn’t establish that they pay for themselves on a 16 GB card.Your 5080 result isolates a live GPU cost worth following up. #3128 changes the eviction default only. For the offered rerun, could you force eviction OFF in both arms, warm each shader variant, and alternate marks ON/OFF on the same route? The pier is a good control. A moving segment that streams new textures would also show whether upload prioritisation affects frame-time tails or visible texture pop-in. Keeping early depth fixed would isolate the marks.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-11-30T23:04:45Z.
Rerun as you asked:
VICTORY_SAMPLED_EVICT=0in both arms,VICTORY_EARLY_DEPTHleft at its default, each shader variant warmed by a run of its own first, then marks on and off alternated on the same route.The scene, hardware and build are as before: RTX 5080 16 GB with a 9800X3D, Series X, 1440p, DLSS Balanced. The player stands still on the pier for 90 s, with about 8,700 draws a frame. The build is main
e1251c31plus #4332 and #4206.Not covered: frame-time tails (these logs keep per-second means, not per-frame percentiles), and a moving segment that streams new textures. Our route is standing still, so I can't say anything about pop-in or upload priority while moving. I'd treat my earlier "gate the marks by VRAM" suggestion as withdrawn: the CPU saving suggests they belong on wherever the CPU side matters.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-11-30T23:06:00Z.
Thanks for warming both variants and alternating the runs. On the 16 GB pier scene, marks increased title GPU time by about 3.8 ms on average across the measured readings, while submit-thread preparation was shorter in both marks-on runs. Those stages can overlap, and the frame medians varied, so the timings give us no clear reason to gate marks by VRAM alone. I’m keeping #3128 scoped to the eviction default.
With eviction forced off throughout, the separate question about foliage flicker during active eviction remains open.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-12-01T00:32:10Z.
A correction to my last comment: the CPU half of it doesn't hold.
I said the marks save the submitting thread about 4.5 ms of preparing a frame. On a second look at the same runs, that difference follows the card's load, not the marks:
Our preparing figure is wall time on a thread that shares the processor with the title's own threads. When the card is no longer the limit, those threads run more and preparing stretches with them. The thread's own "worked" figure from the same logs moves less. So the runs don't show the marks doing CPU work, and they don't show the marks saving any either.
The card-side result stands: warm, alternated, eviction off, about 3 ms of the title's card time a frame (29.6 against 25.8 ms on average). On this card-bound build the frame median comes out about even. A clean CPU-side comparison needs a run where the card isn't the limit. I'll add one if I get to it, measured by the thread's working time rather than preparing.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Heldenkrieger01 on 2026-12-01T00:33:15Z.
Correction to my earlier summary: the shorter submit-thread preparation time with marks ON was elapsed wall time under different GPU load. These runs establish no CPU saving or penalty from marks. The upload queue does consult mark history, but that code path alone does not quantify a CPU benefit.
The warmed pier comparison still shows about 3.8 ms more title GPU time with marks ON (29.6 versus 25.8 ms, eviction OFF in both arms), with similar overall frame medians. A CPU-side claim would need the thread’s working time in a scene with GPU headroom.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.