Repository navigation
victory-gpu: ray-tracing arenas count against their own most, not the windows' card room - #971
Conversation
…ost, not the windows' 1024 MB
|
Independent Windows / RTX 5070 Ti 16 GB headless verification of
Not tested: live RT gameplay workload ( AI-assisted test run and summary. |
|
I ran this in the game with ray tracing on, on an 8 GB card: RTX 3070 8 GB (driver 621.24, PCIe 3.0), Ryzen 7 5800X3D, 32 GB, Windows 11 26200. Build: main 63b902f, my local patches, and this PR. Against an earlier ray-tracing session without this PR (same card, 11.3 minutes, no
What differed: the earlier session slowed from minute 8. In this one, usage exceeded the reported budget by minute 2, and DLSS started refusing to record upscales. The arenas line passed 768 MB although What the player saw:
One run, so I'm not crediting or blaming the PR for the frame times. The memory curve and the DLSS warnings differed most between the runs. (Measurements and text prepared with my AI assistants, Claude Code and Codex. No game files.) |
… room, and the arenas line says card against shared memory
|
Thanks @Bj0rnis for the checks and @CuteBooty for the 8 GB run. The run found a real problem, and I pushed two commits for it. Why card use went up with this PR. Before, the arenas counted their bytes against the windows' 1024 MB limit, and that count never went down when an arena was freed. So it acted as a lifetime cap: after enough arenas had come and gone, new ones stopped going to the card. This PR gave the arenas their own count and refunded freed bytes, which removed that accidental cap. But the arenas could then fill the card up to 97% of the budget, which leaves no room for the textures and DLSS. That matches your log: usage over budget from about minute 2, then DLSS refusing to record. What the new commits change:
About Tested here: Not tested on an 8 GB card. @CuteBooty, if you can rerun your session on |
|
Test data from an RTX 5070 12 GB, in case it helps judge this one. Setup: RTX 5070 12 GB (driver 621.40), i9-14900F, 32 GB, Windows 11. Series X, 2560x1440, DLSS Quality (model K), frame generation 2x, What I ran: not this branch as is. I ported only the counter part (by-address copies counted against their own most, not the windows' card room) onto a local branch behind a switch, so I could A/B it inside one build. Treat it as a test of the idea, not of your exact diff.
(An earlier own-room run gave 7.7 fps and the same 529 / 960 MB split, but a compile was running on the PC during it, so I only count its memory figures.) Reading: on a 12 GB card the arena counter is not what sends these copies off the card; it showed 529–657 of 4096 MB. By reading So on 12 GB this change alone looks like a loss; on a card with more room it may well be the win you measured. The per-frame timings I quote come from the log line in #1468. Run summaries: https://gist.github.com/tupacfan04/0dbd2a5d33dd78e208d4914306dd175b (the full play logs of these runs have rotated out; I can attach fresh ones on request). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X5CFykxe6G44cMPrmExrcw
by_addressin shadow.rs added every ray-tracing arena's length toWINDOW_CARD_BYTES, including arenas that spilled to PC memory, so the arenas used up the windows' card cap (window_card_most) and later windows went to shared memory. Its localUSEDcounter was also never decremented when an arena was dropped or when the card buffer could not be made.Arenas now count in their own
ARENA_CARD_BYTES(held to the same 4 GiB / VICTORY_MEMORY_CARD_MB most as before), aCardremembers whether its arena is on the card or spilled, and drop subtracts from the right counter. The HUD and live-span totals include both counters. Unit testarenas_do_not_use_the_windows_roomis added.Tested on RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11, ray tracing on (VICTORY_RT_NATIVE=1): several runs including 7-minute ones with no regressions. This branch type-checks for x86_64-pc-windows-msvc with and without victory-gpu/diagnostics; the unit test was not run here (Windows-only crate).