Prepare time on an 8-thread CPU: per-frame benchmark, A/B of the renderer ports, #55 merged for RDNA 4 #380

Open
github-bot wants to merge 19 commits from github-bot/gh-380 into main AGit
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-26 21:09 UTC · original
GiovanniFadanelli:perf/prepare-time → main · +1027 −61 · 19 files · 19 commits · open

Summary

Measurements of the CPU prepare time (the submitting thread) on a second machine: Ryzen 7 9800X3D with SMT off (8 logical CPUs), RX 9070 XT 16 GB (RDNA 4), 31 GB, Windows 11, Series X profile, play.ps1 settings, diagnostics build. Upstream's figures are from a 24-thread i9-12900K, so this checks them on a smaller CPU and adds the tooling to measure per frame.

No defaults change. The result is a recommended pair of existing switches, measured as a whole:

baseline VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1 change
frame median 55.6 ms (54.4..58.8) 48.6 ms (47.5..50.6) −12.6 %
prepare median 46.7 ms (45.4..49.1) 41.5 ms (40.9..42.7) −11.2 %
copy-back 30.3 ms 24.2 ms −20 %

4 runs per arm, interleaved, same build, warm caches, the same scripted scene (the first mission's intro), window 90-190 s, frames with ≥ 100 draws. Values are the mean (min..max) of the runs' medians. The baseline's run-to-run spread is ~8 %, so differences under ~5 % are read as noise.

Full report with every number: docs/prepare-time.md.

What is in the branch

  1. #55 merged (tightfall's RDNA 4 compiler fix). Without it the AMD compiler crashed this card in the world (amdxc64.dll, read of 0x8) and size_tests crashed the shader suite. Its record counts collided with main's view addresses in the slot table; they now follow them (SLOT_COUNTS_AT = (VIEW_ADDRESSES + SLOT_STRIDES_COUNT * 8) / 4, SLOT_STRIDES_BYTES grows to match). view_addresses_follow_the_strides adapted: red before ("left: [305419776, 66, 3735928559, ...]"), green after. If #55 is merged on its own first, this merge commit drops out.
  2. Benchmark tooling (diagnostics builds, off unless asked for):
    • VICTORY_FRAME_CSV=<file>: one line per present (frame ms, prepare ms, copies, texture refreshes, copy-back, write-tracker lock waits, draws). Running totals beside the existing per-line counters (tally), including the fetch_sub that replaces threads' summed time. Test: a_line_holds_what_each_counter_grew_by.
    • A diagnostics line for refreshes run on several threads: wall vs threads' time, spans, host copies.
    • scripts/bench.ps1 (one run: scripted keys, stops only the processes it started, by id), bench-parts.ps1 (the 5 s counters averaged over world blocks), bench-ab.ps1 (per-arm summary).
  3. VICTORY_TITLE_DIR: the package folder when the executable is kept outside the dump (the dump is then only read).
  4. Tests for the two recommended switches, #[ignore]d because each switch is read once per process. Without the switch they are red, with it green:
    • port::tests::the_constants_heap_is_used_in_place_with_the_switch: "the title's constants heap is not used in place (a host copy is tracked)"
    • watch::port7_tests::an_asking_notes_its_pages_under_the_shared_lock_with_the_switch: "the asking took the journal alone to note its pages (not shared)"

The history also holds VICTORY_REFRESH_PIECE_KB and its revert (see below). They are kept rather than squashed so the record is honest.

A/B of the renderer ports on this machine (n=4 per arm)

switch frame prepare mechanism
PORT_JOURNAL −3.5 % −6.0 % end-of-submission wait for heap records 10.0 → 5.1 ms keep
PORT_CONSTANTS −8.9 % −3.4 % under-flights 4.4 → 1.5, card copies 4.5 → 1.8, planning 3.3 → 0.5, copy-back 30.8 → 24.4 ms keep
PORT_GUARD +1.4 % +1.9 % lock waits 41.6 → 12.7 ms (−70 %), but off the critical path not here
PORT_DESCRIPTORS −1.1 % −0.9 % records 19.6 → 17.3 ms noise

Measured and not worth it

  • VICTORY_REFRESH_PIECE_KB (mine: long refresh spans cut into pieces): 4 of 4 runs crashed in the title (write to 0x0) within 46 s, against 0 of 8 for the other arms. Pieces of one span put several threads in one host copy at once; before, every span of a flush was its own copy (3,424 spans in 3,424 copies). Reverted.
  • Smaller thread pools for 8 CPUs: one screening run, no change.

Not tested

VICTORY_PORT_CBV (it needs its own translate and warm run), the Series S profile with FidelityFX, other scenes, longer sessions, other CPUs or GPUs. No on-CPU sampler was available. Attribution is from the runtime's own counters and one VICTORY_TIMELINE trace. Avenue 5 of the work (guard rest against protection changes) is still being measured and will be added here.

Suites: cargo test -p victory-gpu --release --lib 382 passed, 0 failed, 36 ignored. cargo test -p victory-shader --release --lib 302 passed, 0 failed (no more access violation in size_tests).

🤖 Generated with Claude Code

**@⁠GiovanniFadanelli** on GitHub · 2026-11-26 21:09 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380) `GiovanniFadanelli:perf/prepare-time` → `main` · +1027 −61 · 19 files · 19 commits · open ## Summary Measurements of the CPU prepare time (the submitting thread) on a second machine: **Ryzen 7 9800X3D with SMT off (8 logical CPUs), RX 9070 XT 16 GB (RDNA 4), 31 GB, Windows 11**, Series X profile, `play.ps1` settings, diagnostics build. Upstream's figures are from a 24-thread i9-12900K, so this checks them on a smaller CPU and adds the tooling to measure per frame. **No defaults change.** The result is a recommended pair of existing switches, measured as a whole: | | baseline | `VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1` | change | |---|---|---|---| | frame median | 55.6 ms (54.4..58.8) | **48.6 ms (47.5..50.6)** | **−12.6 %** | | prepare median | 46.7 ms (45.4..49.1) | **41.5 ms (40.9..42.7)** | **−11.2 %** | | copy-back | 30.3 ms | 24.2 ms | −20 % | 4 runs per arm, interleaved, same build, warm caches, the same scripted scene (the first mission's intro), window 90-190 s, frames with ≥ 100 draws. Values are the mean (min..max) of the runs' medians. The baseline's run-to-run spread is ~8 %, so differences under ~5 % are read as noise. Full report with every number: `docs/prepare-time.md`. ## What is in the branch 1. **#55 merged** (tightfall's RDNA 4 compiler fix). Without it the AMD compiler crashed this card in the world (`amdxc64.dll`, read of 0x8) and `size_tests` crashed the shader suite. Its record counts collided with main's view addresses in the slot table; they now follow them (`SLOT_COUNTS_AT = (VIEW_ADDRESSES + SLOT_STRIDES_COUNT * 8) / 4`, `SLOT_STRIDES_BYTES` grows to match). `view_addresses_follow_the_strides` adapted: red before ("left: [305419776, 66, 3735928559, ...]"), green after. **If #55 is merged on its own first, this merge commit drops out.** 2. **Benchmark tooling** (diagnostics builds, off unless asked for): - `VICTORY_FRAME_CSV=<file>`: one line per present (frame ms, prepare ms, copies, texture refreshes, copy-back, write-tracker lock waits, draws). Running totals beside the existing per-line counters (`tally`), including the `fetch_sub` that replaces threads' summed time. Test: `a_line_holds_what_each_counter_grew_by`. - A diagnostics line for refreshes run on several threads: wall vs threads' time, spans, host copies. - `scripts/bench.ps1` (one run: scripted keys, stops only the processes it started, by id), `bench-parts.ps1` (the 5 s counters averaged over world blocks), `bench-ab.ps1` (per-arm summary). 3. **`VICTORY_TITLE_DIR`**: the package folder when the executable is kept outside the dump (the dump is then only read). 4. **Tests for the two recommended switches**, `#[ignore]`d because each switch is read once per process. Without the switch they are red, with it green: - `port::tests::the_constants_heap_is_used_in_place_with_the_switch`: "the title's constants heap is not used in place (a host copy is tracked)" - `watch::port7_tests::an_asking_notes_its_pages_under_the_shared_lock_with_the_switch`: "the asking took the journal alone to note its pages (not shared)" The history also holds `VICTORY_REFRESH_PIECE_KB` and its revert (see below). They are kept rather than squashed so the record is honest. ## A/B of the renderer ports on this machine (n=4 per arm) | switch | frame | prepare | mechanism | | |---|---|---|---|---| | `PORT_JOURNAL` | −3.5 % | **−6.0 %** | end-of-submission wait for heap records 10.0 → 5.1 ms | keep | | `PORT_CONSTANTS` | **−8.9 %** | −3.4 % | under-flights 4.4 → 1.5, card copies 4.5 → 1.8, planning 3.3 → 0.5, copy-back 30.8 → 24.4 ms | keep | | `PORT_GUARD` | +1.4 % | +1.9 % | lock waits 41.6 → 12.7 ms (−70 %), but off the critical path | not here | | `PORT_DESCRIPTORS` | −1.1 % | −0.9 % | records 19.6 → 17.3 ms | noise | ## Measured and not worth it - `VICTORY_REFRESH_PIECE_KB` (mine: long refresh spans cut into pieces): **4 of 4 runs crashed** in the title (write to 0x0) within 46 s, against 0 of 8 for the other arms. Pieces of one span put several threads in one host copy at once; before, every span of a flush was its own copy (3,424 spans in 3,424 copies). Reverted. - Smaller thread pools for 8 CPUs: one screening run, no change. ## Not tested `VICTORY_PORT_CBV` (it needs its own translate and warm run), the Series S profile with FidelityFX, other scenes, longer sessions, other CPUs or GPUs. No on-CPU sampler was available. Attribution is from the runtime's own counters and one `VICTORY_TIMELINE` trace. Avenue 5 of the work (guard rest against protection changes) is still being measured and will be added here. Suites: `cargo test -p victory-gpu --release --lib` 382 passed, 0 failed, 36 ignored. `cargo test -p victory-shader --release --lib` 302 passed, 0 failed (no more access violation in `size_tests`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The AMD driver's compiler (amdxc64.dll, RDNA 4) faults reading 0x8 inside
CreateComputePipelineState on raw buffers' size queries of views picked from
the heap or a descriptor table (bvh_skinning, CS_RaytracingResolve, ...).
The host's table by heap slot (SLOT_STRIDES) gets a second half with each
buffer view's record count as the console's descriptor holds it, and shaders
read it there. VICTORY_SLOT_COUNTS=0: queried as before. After Belobug 1503444b.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	crates/victory-gpu/src/descriptor/host.rs
#	crates/victory-shader/src/emit/mod.rs
#	crates/victory-shader/src/emit/shader.rs
The flushes take the threads' summed time back off PREPARING (fetch_sub);
TOTAL_PREPARING now follows, so VICTORY_FRAME_CSV's copy_ms is wall time.
New diagnostics line: refreshes on several threads, wall vs threads' time
asking nothing_new and updating, spans and host copies. bench.ps1 waits for
its child before reading the log; bench-parts.ps1 averages world blocks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A flush's one big span (about 17 MB, mostly unchanged) was updated by one
thread while the others waited: the flushes' longest updates summed 5.0 of
their 11.7 ms a frame (run probe2, journal and constants on). With the
switch, spans longer than the piece (a power of two, at least 64 KiB, a
guard block) are cut on its multiples in both multi-thread flush paths.

Test: long_refresh_spans_are_cut_on_piece_boundaries_covering_every_byte
(red against a stub that left spans whole: "long spans were not cut on
the piece's boundaries"). New diagnostics: each flush's longest update and
largest span.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This reverts commit 1c7ec4976a.
With #55 merged the record counts follow the view addresses in the slot
table (SLOT_COUNTS_AT), so the table no longer ends with the last address.
Red before: "left: [305419776, 66, 3735928559, ...]" (the counts' filler).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- port: the_constants_heap_is_used_in_place_with_the_switch. Without
  VICTORY_PORT_CONSTANTS: "the title's constants heap is not used in place
  (a host copy is tracked)"; with it: passes.
- watch: an_asking_notes_its_pages_under_the_shared_lock_with_the_switch.
  Without VICTORY_PORT_JOURNAL: "the asking took the journal alone to note
  its pages (not shared)"; with it: passes, the written page told.
Both #[ignore]d: the switches are read once per process, off by default.

docs/prepare-time.md ranks all seven avenues of the mission: kernel calls
(316 write-watch askings, 0 VirtualQuery a frame, 7 % of prepare), page
faults (5,638 a frame), list-call translation (beside the submitting
thread). bench-parts.ps1 reads those counters. No warnings without
diagnostics.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:13:30 +00:00
VICTORY_GUARD_REST=10000 on top of journal + constants, 4 runs each (ab3):
frame 48.6 -> 48.6 ms (-0.2 %), prepare 41.1 -> 41.4 ms; blocks made
read-only 627 -> 587, guard faults 291 -> 281. Dropped. The log's "moves"
are copy_mapped's kernel reads, not remaps; the label is fixed. Journal +
constants measured again: 48.6 ms, as in ab2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Under Wine 11.22, RADV and vkd3d-proton (RX 7900 XT) the port was reported
to draw the HUD over a black world (PR #380); on Windows it draws the world
(RX 9070 XT, alone and with port 7). One rule for both halves of the port,
victory_gpu's and xmem's (constants_switch, exported for victory-hle); a
warning when it is left off.

Test the_constants_port_stays_off_under_wine_unless_asked_for_there: red
against the old rule ("on under Wine without VICTORY_PORT_CONSTANTS_WINE=1"),
green after. Windows check run: port 1 engaged, frame 47.9 ms, copy-back
23.8 ms, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 21:20 UTC · original · edited 2026-11-26 22:14 UTC

I’m seeing a visual issue worth checking alongside the PORT_CONSTANTS results. On an RX 7900 XT with Wine 11.22, RADV 26.3.1 and vkd3d-proton GE build cae8353e (reported version 3.2.0), I loaded a waterfront save with the constants heap in place. The HUD came up over a black world, including at 155 s. The in-place indirect path was active and reached 5,536 executions per frame. I tested PORT_CONSTANTS alone on our AMD branch. The journal-plus-constants pair on your Windows build is a different configuration. I have a same-binary port-off control queued. AMD run details

**@⁠UwUCammie** on GitHub · 2026-11-26 21:20 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7203634097) · edited 2026-11-26 22:14 UTC I’m seeing a visual issue worth checking alongside the `PORT_CONSTANTS` results. On an RX 7900 XT with Wine 11.22, RADV 26.3.1 and vkd3d-proton GE build `cae8353e` (reported version 3.2.0), I loaded a waterfront save with the constants heap in place. The HUD came up over a black world, including at 155 s. The in-place indirect path was active and reached 5,536 executions per frame. I tested `PORT_CONSTANTS` alone on our AMD branch. The journal-plus-constants pair on your Windows build is a different configuration. I have a same-binary port-off control queued. [AMD run details](https://github.com/UwUCammie/victory-amd/commit/2b2dc020)
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-26 21:30 UTC · original

Two updates (also in docs/prepare-time.md):

@⁠UwUCammie, picture check. Thanks for flagging it. I re-ran base and journal + constants once each on this Windows build (RX 9070 XT) and saved frames in the world. With the pair on, the world draws as it does in base: frame 3000 shows the lit street with the credits, frame 3400 the car's interior. That covers only the intro cutscene. It doesn't rule out your case: Wine/RADV/vkd3d-proton, constants without journal, and a waterfront save are all different, and I couldn't test them here. Your same-binary port-off control will tell more. Until then, read the result as "faster and the picture holds on Windows in this scene", not as a general recommendation.

Avenue 5 (kernel and OS calls), measured. On this machine, per frame: 316 GetWriteWatch askings (2.8 ms over all threads, about 9 µs each), 0 VirtualQuery, 759 blocks made read-only (4.4 ms of VirtualProtect), and 378 guard faults. The log's "moves" counter is copy_mapped's kernel read of title memory, not remapping. I tried VICTORY_GUARD_REST=10000 on top of journal + constants (4 interleaved runs each):

journal + constants + GUARD_REST=10000
frame median 48.6 (48.2..49.5) 48.6 (47.8..49.7)
prepare median 41.1 (40.5..41.5) 41.4 (40.7..42.3)
blocks re-protected 627 587
guard faults 291 281

That's noise, so I dropped it. The journal + constants arm repeated its earlier 48.6 ms in this separate batch.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-26 21:30 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7203792192) Two updates (also in `docs/prepare-time.md`): **@⁠UwUCammie, picture check.** Thanks for flagging it. I re-ran base and journal + constants once each on this Windows build (RX 9070 XT) and saved frames in the world. With the pair on, the world draws as it does in base: frame 3000 shows the lit street with the credits, frame 3400 the car's interior. That covers only the intro cutscene. It doesn't rule out your case: Wine/RADV/vkd3d-proton, constants without journal, and a waterfront save are all different, and I couldn't test them here. Your same-binary port-off control will tell more. Until then, read the result as "faster and the picture holds on Windows in this scene", not as a general recommendation. **Avenue 5 (kernel and OS calls), measured.** On this machine, per frame: 316 `GetWriteWatch` askings (2.8 ms over all threads, about 9 µs each), 0 `VirtualQuery`, 759 blocks made read-only (4.4 ms of `VirtualProtect`), and 378 guard faults. The log's "moves" counter is `copy_mapped`'s kernel read of title memory, not remapping. I tried `VICTORY_GUARD_REST=10000` on top of journal + constants (4 interleaved runs each): | | journal + constants | + `GUARD_REST=10000` | |---|---|---| | frame median | 48.6 (48.2..49.5) | 48.6 (47.8..49.7) | | prepare median | 41.1 (40.5..41.5) | 41.4 (40.7..42.3) | | blocks re-protected | 627 | 587 | | guard faults | 291 | 281 | That's noise, so I dropped it. The journal + constants arm repeated its earlier 48.6 ms in this separate batch.
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-26 21:31 UTC · original

Scope of the recommendation, so nobody turns on something that hasn't been checked:

Platform Switches Status
Windows VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1 measured twice (48.6 ms in both batches, against 55.6 ms baseline), world drawn in the intro
Wine / Proton VICTORY_PORT_JOURNAL=1 alone PORT_CONSTANTS is reported above to draw a black world there; I have no Wine setup to check either way. Journal alone measured prepare −6.0 %, frame −3.5 % on Windows

I'll treat UwUCammie's same-binary port-off control as the deciding run for constants under Wine. docs/prepare-time.md says the same.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-26 21:31 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7203811949) **Scope of the recommendation**, so nobody turns on something that hasn't been checked: | Platform | Switches | Status | |---|---|---| | Windows | `VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1` | measured twice (48.6 ms in both batches, against 55.6 ms baseline), world drawn in the intro | | Wine / Proton | `VICTORY_PORT_JOURNAL=1` alone | `PORT_CONSTANTS` is reported above to draw a black world there; I have no Wine setup to check either way. Journal alone measured prepare −6.0 %, frame −3.5 % on Windows | I'll treat UwUCammie's same-binary port-off control as the deciding run for constants under Wine. `docs/prepare-time.md` says the same.
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-26 21:36 UTC · original

One more check toward the black-world report: I ran VICTORY_PORT_CONSTANTS=1 alone, which is the configuration that was reported, on Windows (RX 9070 XT), with frames saved in the world. The world draws: frame 2600 shows the street with the police officer, and the frame median is 48.4 ms. So on Windows this switch doesn't black out the world, either alone or with journal. What's left points to Wine/RADV/vkd3d-proton, or to that waterfront save, and I can't run either here. The Windows / Wine split in my previous comment stands.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-26 21:36 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7203886026) One more check toward the black-world report: I ran `VICTORY_PORT_CONSTANTS=1` **alone**, which is the configuration that was reported, on Windows (RX 9070 XT), with frames saved in the world. The world draws: frame 2600 shows the street with the police officer, and the frame median is 48.4 ms. So on Windows this switch doesn't black out the world, either alone or with journal. What's left points to Wine/RADV/vkd3d-proton, or to that waterfront save, and I can't run either here. The Windows / Wine split in my previous comment stands.
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-26 21:45 UTC · original

Wine guard added (9aa4d94). Instead of leaving the black-world risk to the docs, the code now refuses it: VICTORY_PORT_CONSTANTS=1 stays off under Wine, detected by ntdll's wine_get_version, unless VICTORY_PORT_CONSTANTS_WINE=1 is also set. A warning says so in the log. One rule, constants_switch, serves both halves of port #1 (the GPU side and xmem).

  • Test port::tests::the_constants_port_stays_off_under_wine_unless_asked_for_there: red against the old rule ("on under Wine without VICTORY_PORT_CONSTANTS_WINE=1"), green after. The GPU suite passes (383), and so does the HLE suite (155).
  • On Windows nothing changes. A check run on the new build showed port 1's log lines, frame 47.9 ms, prepare 40.3 ms, copy-back 23.8 ms.

So the recommended VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1 is safe to set everywhere: on Wine it acts as journal alone until someone opts in. @⁠UwUCammie, your port-off control can still run with VICTORY_PORT_CONSTANTS_WINE=1.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-26 21:45 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7204024755) **Wine guard added (9aa4d94).** Instead of leaving the black-world risk to the docs, the code now refuses it: `VICTORY_PORT_CONSTANTS=1` stays **off under Wine**, detected by ntdll's `wine_get_version`, unless `VICTORY_PORT_CONSTANTS_WINE=1` is also set. A warning says so in the log. One rule, `constants_switch`, serves both halves of port #1 (the GPU side and xmem). - Test `port::tests::the_constants_port_stays_off_under_wine_unless_asked_for_there`: red against the old rule ("on under Wine without VICTORY_PORT_CONSTANTS_WINE=1"), green after. The GPU suite passes (383), and so does the HLE suite (155). - On Windows nothing changes. A check run on the new build showed port 1's log lines, frame 47.9 ms, prepare 40.3 ms, copy-back 23.8 ms. So the recommended `VICTORY_PORT_JOURNAL=1 VICTORY_PORT_CONSTANTS=1` is safe to set everywhere: on Wine it acts as journal alone until someone opts in. @⁠UwUCammie, your port-off control can still run with `VICTORY_PORT_CONSTANTS_WINE=1`.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 21:48 UTC · original

@⁠GiovanniFadanelli The port-off control finished. With VICTORY_PORT_CONSTANTS=0, the character, porch and waterfront were visible at 125, 135, 145 and 155 seconds. With PORT_CONSTANTS=1 and indirect ordering off, the same four captures had a HUD over a black world. The same executable loaded copies of the same save with the same starting caches and timed inputs. Both runs finished, and neither overlapped another GPU client. The stock run recorded zero in-place indirect draws, against a peak of 5,536 per frame with constants on.

I’d keep constants off for this Wine/RADV configuration. The journal was off in both runs. Your Windows result and the combined journal-plus-constants setting under Wine are separate cases. Comparison and capture method

**@⁠UwUCammie** on GitHub · 2026-11-26 21:48 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7204074053) @⁠GiovanniFadanelli The port-off control finished. With `VICTORY_PORT_CONSTANTS=0`, the character, porch and waterfront were visible at 125, 135, 145 and 155 seconds. With `PORT_CONSTANTS=1` and indirect ordering off, the same four captures had a HUD over a black world. The same executable loaded copies of the same save with the same starting caches and timed inputs. Both runs finished, and neither overlapped another GPU client. The stock run recorded zero in-place indirect draws, against a peak of 5,536 per frame with constants on. I’d keep constants off for this Wine/RADV configuration. The journal was off in both runs. Your Windows result and the combined journal-plus-constants setting under Wine are separate cases. [Comparison and capture method](https://github.com/UwUCammie/victory-amd/commit/2dd26fa2)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 21:58 UTC · original

I can now reproduce a buffer read mismatch without the game on the RX 7900 XT. Under Wine 11.22 / vkd3d-proton / RADV 26.3.1, the reserved-section heap opens and the buffer is placed. A GPU copy from that buffer then reads back different bytes from the pattern the CPU wrote through the original two views. The first assertion fails before the test reaches the GPU-write direction. I’ve added an opt-in test for the selected adapter so the same case can be run on Windows. Standalone test and command

**@⁠UwUCammie** on GitHub · 2026-11-26 21:58 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7204233517) I can now reproduce a buffer read mismatch without the game on the RX 7900 XT. Under Wine 11.22 / vkd3d-proton / RADV 26.3.1, the reserved-section heap opens and the buffer is placed. A GPU copy from that buffer then reads back different bytes from the pattern the CPU wrote through the original two views. The first assertion fails before the test reaches the GPU-write direction. I’ve added an opt-in test for the selected adapter so the same case can be run on Windows. [Standalone test and command](https://github.com/jtrudeau1530/VIctory-7900XTX/pull/23)
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 22:23 UTC · original

I narrowed the buffer mismatch down to the CPU/GPU boundary. A second CPU mapping matched all 320 KiB that the CPU wrote. The GPU read zeros over that whole range. It could read back its own 256-byte write, but neither CPU mapping saw it. Filling every page before the import made no difference. I got the same result with GE cae8353e and upstream 71cae091 on the 7900 XT, with descriptor_heap enabled. The updated fixture runs on the renderer’s preferred adapter if someone can compare native Windows. Test and results

**@⁠UwUCammie** on GitHub · 2026-11-26 22:23 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7204641455) I narrowed the buffer mismatch down to the CPU/GPU boundary. A second CPU mapping matched all 320 KiB that the CPU wrote. The GPU read zeros over that whole range. It could read back its own 256-byte write, but neither CPU mapping saw it. Filling every page before the import made no difference. I got the same result with GE `cae8353e` and upstream `71cae091` on the 7900 XT, with `descriptor_heap` enabled. The updated fixture runs on the renderer’s preferred adapter if someone can compare native Windows. [Test and results](https://github.com/jtrudeau1530/VIctory-7900XTX/pull/23)
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-27 02:40 UTC · original

@⁠UwUCammie I ran your fixture on native Windows at af245c3 with your command (debug build). Both preferred_adapter_reserved_section_round_trip and preferred_adapter_prefilled_reserved_section_round_trip pass:

  • on the RX 9070 XT (driver 32.0.32029.2010), both through the default high-performance pick and with VICTORY_D3D12_ADAPTER=RX 9070 XT;
  • on the 9800X3D's integrated Radeon Graphics (driver 32.0.21045.29003), with VICTORY_D3D12_ADAPTER=AMD Radeon(TM) Graphics.

The GPU reads the CPU's bytes across both views, and its own 256-byte write shows up in the original view, in the second mapping and on the GPU. That matches the game on Windows, where the world draws with constants on, and it points to the shared memory under Wine/vkd3d-proton/RADV. The Wine guard in 9aa4d94 stays as it is.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-27 02:40 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7208330647) @⁠UwUCammie I ran your fixture on native Windows at af245c3 with your command (debug build). Both `preferred_adapter_reserved_section_round_trip` and `preferred_adapter_prefilled_reserved_section_round_trip` pass: - on the RX 9070 XT (driver 32.0.32029.2010), both through the default high-performance pick and with `VICTORY_D3D12_ADAPTER=RX 9070 XT`; - on the 9800X3D's integrated Radeon Graphics (driver 32.0.21045.29003), with `VICTORY_D3D12_ADAPTER=AMD Radeon(TM) Graphics`. The GPU reads the CPU's bytes across both views, and its own 256-byte write shows up in the original view, in the second mapping and on the GPU. That matches the game on Windows, where the world draws with constants on, and it points to the shared memory under Wine/vkd3d-proton/RADV. The Wine guard in 9aa4d94 stays as it is.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 02:41 UTC · original

Thanks for running both fixtures on both adapters. I’ve added your native Windows passes to the notes for the RX 7900 XT Wine test so the two results stay together. The tested Windows configurations share bytes in both directions, while the two vkd3d-proton builds here on RADV still saw separate CPU and GPU backing. I’ve queued the placed-memory route from #420 on this 7900 XT as a separate test.

**@⁠UwUCammie** on GitHub · 2026-11-27 02:41 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/380#issuecomment-7208351281) Thanks for running both fixtures on both adapters. I’ve added your native Windows passes to the notes for the RX 7900 XT Wine test so the two results stay together. The tested Windows configurations share bytes in both directions, while the two vkd3d-proton builds here on RADV still saw separate CPU and GPU backing. I’ve queued the placed-memory route from #420 on this 7900 XT as a separate test.
UwUCammie's same-binary control on the PR showed the black world only
with VICTORY_PORT_CONSTANTS=1 under Wine 11.22 / RADV 26.3.1 /
vkd3d-proton, and their standalone fixture showed the GPU reading zeros
from an opened heap whose bytes a second CPU mapping saw. The same fixture
(af245c3) passes on native Windows here on the RX 9070 XT and on the
integrated Radeon Graphics. The scope table now says confirmed, and the
Wine guard stays the default.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/380/head:github-bot/gh-380'
git switch 'github-bot/gh-380'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-380'
git switch 'github-bot/gh-380'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-380'
git switch 'github-bot/gh-380'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-380'
git switch 'main'
git merge --squash 'github-bot/gh-380'
git switch 'main'
git merge --ff-only 'github-bot/gh-380'
git switch 'main'
git merge 'github-bot/gh-380'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.