Second machine: RX 9070 XT + Ryzen 7 9800X3D, measured on rx9070xt (where a world frame goes) #269
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/Belobug--VIctory-Belobug-AMD#269
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?
@thejacte on GitHub · 2026-11-26 15:27 UTC · original
These are measurements from a second machine on
rx9070xt. I wanted to know where a world frame's time goes before writing more code, so I don't work on what you are already working on. Everything is from the diagnostics build, which logs all of these numbers.Machine: RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 9800X3D, 64 GB, Windows 11. Resolution: __ (fill in).
Build:
rx9070xtat81ebb7b,--profile diag --features diagnostics, pipelines made ahead withvictory warm --used. Runs used my size-handle switch (VICTORY_SIZE_OWN_HANDLE=1, in my pull request) so that AMD's compiler makes every compute pipeline.Scene: the same place of the same save each run, about 5 minutes in the world. The numbers are medians over the frame-rate lines with more than 3,000 draws (loading left out).
Modes
play.ps1-SafeVICTORY_CARD_BUFFERS_MIN_KB=64-RayTracing-Safehere.VICTORY_CARD_BUFFERS_MIN_KB=64: the first run looked ~4 ms faster, but over four runs (45, 50, 45, 52 ms) it is inside the noise against default. I can't say it helps on this card.Where a default frame goes (about 45-52 ms)
The submitting thread prepares for 38-40 ms of it, and the card waits for it. The card's clock line: about 60 % busy, ~17-20 ms a frame with nothing of ours queued, ~15 ms of that while the submitting thread was working. The submitting thread waited 0.0 ms for the card, and settles 0.0 ms.
Of the preparing: ~15 ms refreshing host copies of title memory, ~5 ms copies in the card's memory, ~3.5 ms write-watch askings, ~2 ms putting title bytes under flights' writes, ~3 ms copies and fills. The rest is spread out.
Refreshes (I added timing inside
Batch::refresh_front, locally): ~16 calls a frame and ~5,900 spans, 12.6 ms wall. 1.1 ms of that is gathering and 10.5 ms is on the threads. On the threads (summed): ~1,030 buffer updates 35 ms (67 MB copied, ~400 of them copy nothing), ~290 textures 3.5 ms, sifting 3.9 ms.wide_threads()gives 4 helpers on this 16-thread CPU, so 5 threads in all.The guards' lock (I counted it locally by the line that takes it). The contended waits add up to ~72 ms a frame over all threads, but the lock is held only ~8 ms a frame:
guard()making blocks read-only again: ~12 ms waiting, ~4.4 ms held;publish: ~6 ms waiting.So the title's threads queue behind each other and behind the refreshes for every write fault.
VICTORY_STORE_BESIDEandVICTORY_COPY_BESIDElook written for exactly this. I haven't tried them yet. Have you measured them?Copying back: 12-16 ms a frame, on its own thread.
Pipelines: about 130 draws a frame are dropped in default mode, mostly the ray-tracing structure builder, which is off. Before the size-handle switch, AMD's compiler crashed on 25 compute pipelines here (details in that pull request).
Memory
Over one 5-minute session, private memory grew from ~11 GB to ~36 GB. Near the end Windows had only ~0.4 GB left to commit on this 64 GB machine (it started with ~20 GB). Longer sessions here may hit the commit limit before anything else. This matches "Memory, 40-46 GB private" in findings.md.
What I tried that did not help
take_allalready splits runs over 1 MB). Not done.avatarmanz's renderer patches on this machine
rx9070xtwas branched from avatarmanz/VIctory-7900XTX before its five renderer patches (VICTORY_PORT_CONSTANTS,_DESCRIPTORS,_CBV,_GUARD,_JOURNAL, all off by default). I merged avatarmanzmain(c9c932c) intorx9070xtlocally. There were two conflicts, both where the 9070 XT fixes meet: the magenta filter inambient.rs(both kept) and the compiler-crash guard inpipeline/make.rs(the guard kept, their timing span added). Shaders were translated and pipelines warmed both ways. Then four runs, all five patches on against all off, alternated, default mode withCARD_BUFFERS_MIN_KB=64:rx9070xtbefore it.warmwithVICTORY_PORT_CBV=1reported 1,320 of 3,469 pipelines "without a host pipeline". Run again, all 3,469 were made and none were marked bad, and samples run one at a time all built. It looks like a counting quirk with 10 workers, but I haven't pinned it down.#215 on this machine
I ran #215 (
91a914e, onmainat4f62c2a, without #178/#179) with both switches on (VICTORY_LATE_SIGNALS=1,VICTORY_EARLY_PLAN=1) against all off (VICTORY_EARLY_FILLS=0). Two runs each, alternated, same place, its own cache folder. One more run before them only made pipelines.mainalone, the gain shows here without #178/#179. The 90th percentile is mixed: one "on" run was worse and one better.DXGI_ERROR_DEVICE_HUNG. One driver compiler crash in run 2 was caught, and that pipeline left out.main, the world was black for about the first 1.5 minutes of the first runs, while ~700 pipelines were made (~600 draws a frame dropped). Once they were made, the picture was normal.rx9070xton this machine is ~50 ms a frame. There the submitting thread waits ~0 ms for the card (VICTORY_ASYNC_SUBMIT), and the time goes to preparing itself. So I don't know whether #215's idea would help onrx9070xt; onmainit does.Questions
mainorrx9070xt?inplace.rs): is a heap opened on title memory meant to replace host copies for big buffers one day? It would remove most of the refreshes, guards and write faults above. I can runVICTORY_INPLACE_PROBEon this card if that helps.VICTORY_STORE_BESIDE=1/VICTORY_COPY_BESIDE=1next, and report?I can share any of the full log lines privately (they hold title addresses, so they don't go into the issue).
@luisaugustz on GitHub · 2026-11-26 16:57 UTC · original
A third data point, same card and driver, slower CPU.
Machine: RX 9070 XT 16 GB (Adrenalin 26.11.2, driver 32.0.32029.2010), Ryzen 7 5800X, 32 GB, Windows 11. Captured frames are 1920x1080.
Build:
rx9070xtat81ebb7bdplus #252, #235, #231 and avatarmanz4fd34fd, diagnostics.play.ps1default (not-Safe) switches,VICTORY_SIZE_OWN_HANDLE=1, alsoVICTORY_HAIR=1andVICTORY_TEXTURE_BACK=1.Method: median of the last 100 frame-rate lines with more than 3,000 draws in each run. These are opening-story scenes driven by scripted keys, not your save or your spot, so compare with care. One run per row.
VICTORY_PANEL=1VICTORY_BVH_BUILDER=1+VICTORY_BVH_QUARANTINE=1VICTORY_BVH_BUILDER=1, no quarantine,VICTORY_AMBIENT=0+0x23cf683, write to 0). We have seen the same address in earlier runs onmainbuilds without this stack, so I do not blame ray tracing for it.I have not tried
VICTORY_STORE_BESIDEorVICTORY_COPY_BESIDE.@luisaugustz on GitHub · 2026-11-26 17:50 UTC · original
Correction to my comment above. I wrote that the quarantine run ended in an access violation in the title's own code and that I did not blame ray tracing for it. I had not searched that log properly: it has about 950
no shared buffer ... (0x8007000E)out-of-memory warnings before the crash. So that run ran out of memory with the builder on, and the access violation at+0x23cf683came after that.Two later builder runs without quarantine also failed with the same out-of-memory warnings, after roughly 26 to 28 minutes on 32 GB / 16 GB.
VICTORY_MEMORY_CARD_MB=2048did not prevent it in one run. The earliermainruns with the same crash address have no such warnings, so the address alone does not identify a cause.