Integrate AMD paging, BVH, texture and frame generation fixes #83

Manually merged
github merged 20 commits from github-bot/gh-83 into main 2026-12-01 20:58:45 +00:00 AGit
Owner

@⁠lucalocastro on GitHub · 2026-12-01 17:38 UTC · original
lucalocastro:integration/amd-graphics-correctness → main · +6026 −391 · 45 files · 20 commits · merged 2026-12-01 20:55 UTC

Summary

This PR integrates #31, #38, #43, #44, #45, #47, #63, #67, #68, #75 and #80 on main at 37bb30f. The source commits retain their original authors and cherry-pick references.

  • Use the same cadence and budget for both sources of RAM-to-VRAM candidates. Record pass time and quick CPU-triggered demotions. Add opt-in adaptive budgeting, BVH shader page samples and pressure-gated texture block draining.
  • Normalize an unreachable triangle to the software miss result. Keep the global UAV barrier before hardware traversal and qualify the hardware path with mixed nodes and a GPU write followed by traversal.
  • Translate title subresources for copies, readback and resolve. Protect GPU-written levels against deferred uploads and synchronize compatible placed views that appear before or after a copy. The per-level overwrite guard and placed-view copying are opt-in because #47 has a reported visual regression.
  • Use the separate HUD plane with host FSR. Latch generation failures and continue with render-only presentation. If the AMD proxy cannot be disabled or drained, recreate the presenter with a native swap chain. Add optional Present timing and counters.
  • Cache a native graphics pipeline variant for each combination of color formats, depth format, sample count and topology. Each draw uses the state bound on its command list. Switching back to a previous target reuses its pipeline.
  • Translate a fixed NGG procedural triangle with literal connectivity (0, 1, 2) for direct three-vertex draws under VICTORY_NATIVE_GRAPHICS=1. Other primitive programs continue through the existing refusal path.
  • Add an experimental shader pass that eliminates repeated raw SRV loads across blocks when the first load dominates the second and every path between them preserves memory. Compare VICTORY_SHADER_OPT=63 (default) with 191 on the same capture.
  • Add victory replay compare-xbox CAPTURE REFERENCE --out REPORT to diagnostics builds. Compare each recorded present with an aligned Xbox SDR PNG. The offline report shows RGB differences and the Victory command list, command index and pipeline for observed changes at selected output pixels. It reports whether the instrumented replay reproduced the recorded RGB output.

Validation

  • Workspace cargo check --locked --workspace --lib --bins --tests passed with and without diagnostics on Windows.
  • Targeted tests passed for resource growth, deferred uploads, placed aliases before and after a GPU copy, frame-generation error injection, residency budgeting, the software BVH reference, BC7 and resolution.
  • The combined Mesa patch passes git apply --check against the pinned mesa-26.3.1 tag.
  • The complete Windows library suite stops in descriptor tests with the same four failures and access violation reproduced on 37bb30f. The existing guard_runs benchmark also prevents an all-targets check because it calls the crate-private ir::build.
  • A Windows D3D12 readback test drew the synthetic NGG triangle across RGBA8 and R8 targets and checked all 16 pixel positions per draw. It verified reuse after switching back to RGBA8, a descriptor rewrite after binding, and rejection of an incompatible draw. The p4_gfx harness translated both stages of the synthetic triangle and rejected its culled variant.
  • All 13 optimizer tests and 12 native graphics translation tests passed. A GPU raw-buffer load test also passed with VICTORY_SHADER_OPT=191.
  • The full Windows shader-library run encountered failures in the lane-mask and resource-size tests and an access violation in the_record_count_of_a_structured_buffer_read_by_index. Three failing tests and the access violation also reproduce individually on the previous PR revision (2039e43).
  • Replay validation on Windows passed 28 GPU-library replay tests, two CLI replay tests and the recorder/replayer integration test. In a two-present synthetic D3D12 capture, the report found 0 then 500 differing pixels and traced sampled differences to list 1, command 2 (a clear). A later same-value clear was correctly excluded. Browser checks covered selecting a traced pixel and requesting an arbitrary coordinate.

Remaining runtime checks

  • A gameplay comparison requires matched Xbox reference PNGs and a Victory recording from the same scene, build and display mode.
  • On patched RADV/Wine, validate the hardware BVH probe, check image correctness during sustained texture streaming (#47), and measure 4K60 display pacing.
  • Reproduce #23 on this revision and time the dependency between TLAS construction and traversal before narrowing the global barrier.
  • Measure NGG shader coverage on a title capture. Compare GPU time for the three most expensive shaders and overall frame time with raw SRV reuse enabled and disabled on the same replay.

Integration and verification were done with OpenAI Codex.

**@⁠lucalocastro** on GitHub · 2026-12-01 17:38 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/83) `lucalocastro:integration/amd-graphics-correctness` → `main` · +6026 −391 · 45 files · 20 commits · merged 2026-12-01 20:55 UTC ## Summary This PR integrates #31, #38, #43, #44, #45, #47, #63, #67, #68, #75 and #80 on main at `37bb30f`. The source commits retain their original authors and cherry-pick references. - Use the same cadence and budget for both sources of RAM-to-VRAM candidates. Record pass time and quick CPU-triggered demotions. Add opt-in adaptive budgeting, BVH shader page samples and pressure-gated texture block draining. - Normalize an unreachable triangle to the software miss result. Keep the global UAV barrier before hardware traversal and qualify the hardware path with mixed nodes and a GPU write followed by traversal. - Translate title subresources for copies, readback and resolve. Protect GPU-written levels against deferred uploads and synchronize compatible placed views that appear before or after a copy. The per-level overwrite guard and placed-view copying are opt-in because #47 has a reported visual regression. - Use the separate HUD plane with host FSR. Latch generation failures and continue with render-only presentation. If the AMD proxy cannot be disabled or drained, recreate the presenter with a native swap chain. Add optional Present timing and counters. - Cache a native graphics pipeline variant for each combination of color formats, depth format, sample count and topology. Each draw uses the state bound on its command list. Switching back to a previous target reuses its pipeline. - Translate a fixed NGG procedural triangle with literal connectivity (0, 1, 2) for direct three-vertex draws under `VICTORY_NATIVE_GRAPHICS=1`. Other primitive programs continue through the existing refusal path. - Add an experimental shader pass that eliminates repeated raw SRV loads across blocks when the first load dominates the second and every path between them preserves memory. Compare `VICTORY_SHADER_OPT=63` (default) with `191` on the same capture. - Add `victory replay compare-xbox CAPTURE REFERENCE --out REPORT` to diagnostics builds. Compare each recorded present with an aligned Xbox SDR PNG. The offline report shows RGB differences and the Victory command list, command index and pipeline for observed changes at selected output pixels. It reports whether the instrumented replay reproduced the recorded RGB output. ## Validation - Workspace `cargo check --locked --workspace --lib --bins --tests` passed with and without diagnostics on Windows. - Targeted tests passed for resource growth, deferred uploads, placed aliases before and after a GPU copy, frame-generation error injection, residency budgeting, the software BVH reference, BC7 and resolution. - The combined Mesa patch passes `git apply --check` against the pinned `mesa-26.3.1` tag. - The complete Windows library suite stops in descriptor tests with the same four failures and access violation reproduced on `37bb30f`. The existing `guard_runs` benchmark also prevents an all-targets check because it calls the crate-private `ir::build`. - A Windows D3D12 readback test drew the synthetic NGG triangle across RGBA8 and R8 targets and checked all 16 pixel positions per draw. It verified reuse after switching back to RGBA8, a descriptor rewrite after binding, and rejection of an incompatible draw. The `p4_gfx` harness translated both stages of the synthetic triangle and rejected its culled variant. - All 13 optimizer tests and 12 native graphics translation tests passed. A GPU raw-buffer load test also passed with `VICTORY_SHADER_OPT=191`. - The full Windows shader-library run encountered failures in the lane-mask and resource-size tests and an access violation in `the_record_count_of_a_structured_buffer_read_by_index`. Three failing tests and the access violation also reproduce individually on the previous PR revision (`2039e43`). - Replay validation on Windows passed 28 GPU-library replay tests, two CLI replay tests and the recorder/replayer integration test. In a two-present synthetic D3D12 capture, the report found 0 then 500 differing pixels and traced sampled differences to list 1, command 2 (a clear). A later same-value clear was correctly excluded. Browser checks covered selecting a traced pixel and requesting an arbitrary coordinate. ## Remaining runtime checks - A gameplay comparison requires matched Xbox reference PNGs and a Victory recording from the same scene, build and display mode. - On patched RADV/Wine, validate the hardware BVH probe, check image correctness during sustained texture streaming (#47), and measure 4K60 display pacing. - Reproduce #23 on this revision and time the dependency between TLAS construction and traversal before narrowing the global barrier. - Measure NGG shader coverage on a title capture. Compare GPU time for the three most expensive shaders and overall frame time with raw SRV reuse enabled and disabled on the same replay. Integration and verification were done with OpenAI Codex.
Pool pages are made with raw GEM calls that RADV's allocation tracker never
saw, so VK_EXT_memory_budget treated the title's own pages as another
process's memory: the budget shrank by every MB the page mover put on the
card, and the reported use was low by as much. On an RX 9070 XT with 2.9 GB
of title pages on the card the budget read 9,698 MB instead of ~12.6 GB.

Pages now count as CPU-visible VRAM on the card and GTT off it, from their
creation, through each placement, to their release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 6efe8d873a)
The lazy::moving() guard is released before the kick that makes the kernel
migrate a pass's pages. Under the guard every title thread that touched any
lazy page for the first time (lazy::materialize) waited out the whole
migration, up to the kick's one-second wait, once per pass.

Passes run every 400 ms (was 1 s) and move up to 32 MiB (was 8 MiB), about
80 MiB/s against the 4 GB the title may hold on the card:
VICTORY_PAGE_PASS_MS and VICTORY_PAGE_MOVE_MB (1000 and 8: the old pace).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 55488abd40)
Texture pieces take the tightest free range in a block (an exact fit ends
the look) instead of the lowest that fits, so big ranges stay whole for big
textures and blocks can empty (foxhound b90bb90). Pieces resting before
reuse are no longer counted as room by texture_room().

resource::room's two lines are switches, defaults unchanged:
VICTORY_TEXTURE_ROOM_CAP_PERCENT (92) and VICTORY_TEXTURE_ROOM_PERCENT (86).
VICTORY_VRAM_BUDGET_MB replaces the system's budget, above or below it;
above it only with the title's cgroup protected (dmem.low), or the kernel
may move the game's own buffers out.

The texture-blocks line counts textures the card had no room for that were
placed in free space of blocks already made, and those that found none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 992cc1171f)
(cherry picked from commit 79e9a57c79)
(cherry picked from commit 8b6e7df79b)
(cherry picked from commit 5c2d1e93b3)
The terrain tessellation's own shader stores its mesh records as
(n, 0, 0, 0), the console's DISPATCH_MESH_X layout. Both clamps (one
execution and the batched pass) took y and z at most 1, so a record
with a zero there ran no groups: those draws ran empty and the sand
was shaded black. A record with a nonzero count now runs as (n, 1, 1),
as a direct mesh dispatch always has; (0, y, z) stays empty.

From ReVIctory f165475 (also in VKtory)

(cherry picked from commit 7674eac1e7)
(cherry picked from commit 01ce51003d)
Unplaced descriptor heaps (e.g. console amd_fidelityfx_upscaler_xbox.dll on Series S) allocate from PortHeap above 0x20_0000_0000, outside the GPU's 3.5 GiB direct REACH. Previously draw::plan_tables skipped binding them with a warning, causing FSR4 upscaling passes to read/write nothing and leaving the 3D scene black while 2D UI rendered.

Fall back to self.beside(...) when the table is outside REACH and lies in-bounds of a bound descriptor heap, matching the existing cpu_ask path.

(cherry picked from commit f84c592cb3)
The title lays its interface out one to one on a 3840x2160 canvas: at a
2560x1440 output the HUD and menus are half again too large and overlap
(at 1920x1080 twice). VICTORY_UI_PLANE=3840x2160 gives it the interface
plane it has on Series S, drawn at that size and composed over the scene,
through the settings' defaults (+0x5b37a20), with the back buffer pool
(+0x247ad4a) sized for two buffers of the output and two planes (112 MiB
at 2560x1440, which Series S's 82 MiB does not hold). Off without the
switch; every site is compared byte for byte first.

Refs #24.

(cherry picked from commit b2ab26bd65)
With VICTORY_FSR_4K, run.rs skips apply_asked (which would also apply
VICTORY_OUTPUT over FSR's 4K output), so VICTORY_UI_PLANE made no plane.
The plane's sites move into push_ui_plane and the write loop into
write_all, which apply_asked uses as before; apply_ui_plane(base, size,
output) applies the plane alone, and the FSR path calls it with
3840x2160 (pool 144 MiB). apply_asked behaves as before.

Suggested in the pull request's discussion.

Co-authored-by: coil111 <[email protected]>
(cherry picked from commit d5a9832995)
Each BC7 entry of the BCPack table file has two width bytes, then 32
words. BCPack.dll takes all 32 as the entry's indices, pixel 0 first. In
entries 1-254 that first word holds the widths again, and parse() took it
for a repeat: it skipped the word and read 31, so every index of those
entries landed one pixel early, and so did every block predicted from
them, directly or through the history. Entry 0, whose first word is not
the widths, was already read with all 32. Checked against BCPack.dll by
trustno1-coder/VIctory-NVIDIA f9de61c5 and ubiquitarianism/leonida
b589e0fe: 2,101,646 of the title's 2,866,176 BC7 blocks differed before,
none after. Every BC7 texture DirectStorage serves goes through this.

parse() now reads 32 words for every entry. On by default;
VICTORY_BC7_DICTIONARY=0 restores the old reading (read once).

Tests (victory-formats, native x86_64-unknown-linux-gnu): 52 passed,
7 ignored, with and without VICTORY_BC7_DICTIONARY=0. New
bc7_dictionary_entries_read_as_bcpack_dll_reads_them parses the shipped
table both ways: entry 0 unchanged (2, 1, 0, ...); in every other entry
pixel 0 holds the widths word, the old indices sit one pixel later, the
last of them in set 1's slot 0; endpoints and control words unchanged.

bc7_dictionary_indices_line_up asserted that a set with 0 index bits holds
nothing. With 32 words, 233 of the 254 entries put their last word in set
1's slot 0, and no entry gives set 1 any bits. That slot never reaches a
block: the decoder skips a set with 0 bits, and add_index drops a
reference index of 0 bits. The test now asserts that instead (slot 0
dropped by add_index, slots 1-15 empty); its anchor check is unchanged
and passes (pixel 0 is the widths, 3 or 4, inside the anchor range).
Not checked here against BCPack.dll: reference_chunks (ignored) does that
with VICTORY_BCPACK_TABLES and VICTORY_BCPACK_CASES.

Ported from BrayanOfficiel/VIctory-linux 8a79f3b5 (where the new reading
is the default and VICTORY_BC7_SKIP_WIDTHS=1 the old one), after
trustno1-coder/VIctory-NVIDIA f9de61c5.

Co-authored-by: BrayanOfficiel <[email protected]>
Co-Authored-By: Claude <[email protected]>
(cherry picked from commit 9268924282)
With VICTORY_FSR_4K and VICTORY_FIDELITYFX_FRAMEGEN=1 the presenter's swap
chain is AMD's frame generation proxy (amd_fidelityfx_framegeneration_dx12.dll
from the FidelityFX SDK v2.4.0, its built-in 3.x provider; ./setup.sh fsr4
fetches it). The title asks for no frame generation: each host upscale hands
its depth, motion vectors and constants to the next present
(Recording::frame_generation_inputs), which prepares the generator in its own
list. The depth and motion copies are held with that list until it has run,
and a generator is only replaced after the presents that name it have
settled. Without the switch, or when the proxy is refused, the plain swap
chain is made as before.

When the title presents its interface on a plane of its own, the plane is
copied each frame into a texture of ours, the F3 panel is drawn into it, and
the proxy composes it over every real and generated frame (premultiplied,
double buffered). Interpolated with the scene, the HUD shook against the
world and the healthbar covered the panel. With one plane the interface stays
in the scene and is interpolated with it.

The panel's badge shows FG:OFF / FG:IDLE / FG:ON instead of the fixed FG:OFF.

RX 9070 XT, Ryzen 7 9800X3D, Gentoo, Wine 11.22, Series X, FSR 4
performance to 3840x2160 (1920x1080 render): proxy 3.1.7, generator 3.1.6;
frame pacing visibly smooth; with the interface plane (VICTORY_UI_PLANE, #63)
the HUD and panel stay still and the panel sits over the HUD.

(cherry picked from commit 5cd020b3e4)
A list recorded before a copy into a title texture and submitted after it
still uploaded that texture from title memory at its submission, over what
the copy had written. Title memory never gets a GPU copy's bytes (on the
console the copy writes that memory). People's baked decorations (BC3
256x256, nine levels, encoded on the GPU and copied in level by level) got
whatever the memory held before: graphical glitches (nicknamed "confetti")
on faces, necks and shirts, which can stay for the whole session.

Each list now notes the subresources its copies and resolves write, on the
host copy itself (two atomics, no table or lock). Once that list is
submitted, the uploads of lists submitted after it leave those levels out;
the other levels still come from title memory (a texture streamed bigger has
its small levels copied on the card and its large ones read into memory).
The record-time shortcut that asks for no upload at all applies once every
level from the view's first is copied into. VICTORY_KEEP_GPU_WRITTEN=0 turns
it off.

Tests: texture::gpu_written_tests (the level bits) and
resource::tests::what_the_host_copied_in_is_kept_from_an_upload_asked_for_earlier
(the race on the host GPU through the title's own list and queue calls; it
fails without the fix).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 1eac33230c)
The title's decoration bake copies its result (a character's make-up,
stubble, tattoos, the prints and numbers on its clothes) into a
block-compressed texture and samples it through a view placed at the same
address, often in another block format: a BC3 texture written, a BC7 view
sampled. On the console those are the same bytes. Here the view gets a
texture of its own (resource::texture_at), filled from title memory, which
the host's copy never reaches: zeros, or whatever lay in that memory
before, where the bake's result belongs, for as long as the view lives.
alias_of does not cover it: it pairs views only with textures the host
renders to or writes with shaders, of the same levels.

With VICTORY_PLACED_COPIED=1:
- each copy into a title texture (CopyTextureRegion, CopyResource) is made
  into the textures of the views placed over it that are laid out alike
  (resource::placed_twins: the same dimension, size and layers, elements
  or blocks of the same size, no more levels; a 9-level BC7 view over an
  11-level BC3 texture is one). The level written goes through a buffer
  (texture::twin_copy), since the host copies between two block formats in
  no other way. The first time for a view, a whole copy, or when either
  host copy changed since, every level goes, the view's texture made whole
  first (want_level 0);
- such a view's texture then counts as written by the host
  (texture::host_written_view; not entered by address), so upload_from
  sends nothing from title memory over it, the idle sweep leaves it, and
  want_level does not make it again from title memory;
- the slots that show it are made again once the copy has run, when its
  host copy is a new one (levels_changed_after).
Without the switch nothing changes: placed_twins is empty.

Off by default because it has not run on this tree's own path. On ours
(a fork with unified-memory changes; Radeon 8060S, Proton Experimental,
RADV 26.3.1) the log showed 128 copies going into views placed before the
copy in one session, mostly 1024x1024 BC3 sRGB textures of 11 levels under
9-level views, and the clothing prints, jersey numbers and lettering that
had been missing in every run came back, together with two other new
switches, so not isolated to this one.

Not covered: a view placed after the last copy into the texture under it
still fills from title memory (VIctory-NVIDIA's seed_later; not ported).
An upload of the view asked for by a list recorded before the copy and
submitted after it can still land over it: the race PR #47 closes for the
written texture itself; with #47 in, twin_copy should note its writes the
same way (note_gpu_written).

Tests: resource::tests::a_view_is_a_twin_of_the_texture_under_it_where_they_are_laid_out_alike;
resource::tests::placed_copied_card (ignored; needs the card): a one-level
BC7 sRGB view placed over a two-level BC7 texture before a title list
copies into it; read back, the view holds the copied blocks with the
switch and not without. victory-gpu --lib (diagnostics, Proton
Experimental, Radeon 8060S): 309 passed with the switch off and on; the
11 failures and the crash in descriptor::tests::views_die_with_their_resource
are the same on 37bb30f96 unchanged.

A hand port of trustno1-coder/VIctory-NVIDIA e530c003 (the placed views'
half; aventureroestelar-source, from ScarlettPort, on by default there)
and of 523485ba's concern (the twin's own level), by way of our fork's
095c3b1b9. There the copy goes from the title's source straight into the
view's texture; here through a buffer, as alias does.

Co-authored-by: aventureroestelar-source <[email protected]>
Co-authored-by: mikey <[email protected]>
Co-Authored-By: Claude <[email protected]>
(cherry picked from commit 4c78099e6d)
The sweep already picks texture blocks to empty (block_fates, WaitedOut) and stops placing pieces in them, but it only lets go of idle copies, so a block that still holds textures in use never empties while the world streams (#21: 8 emptying, none returned). With VICTORY_POOL_MOVE=1 (off by default) the sweep, once a second, lets go of the host copies of textures the title fills that lie in such a block, up to VICTORY_POOL_MOVE_MB (128) a second, the way want_level replaces a copy (REPLACED, grown), and makes their slots due so the texture pass makes them anew in another block. After crbns/victory-tapin's drain_moves, reimplemented on this tree's sweep.

RX 9070 XT, 2560x1440, RT on, ~3 min driving each: blocks given back 1 -> 17, refilled for want of room 5 -> 0, 8,371 textures / 1,076 MB moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DJe9WTewVmLUUPkT6dTccK
(cherry picked from commit a65502e027)
Coordinate page budgets and collect migration and presentation timing. Validate mixed BVH nodes, preserve GPU-written texture levels in submission order, and keep presentation running after FidelityFX failures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 17:43:08 +00:00
Author
Owner

@⁠lucalocastro on GitHub · 2026-12-01 18:57 UTC · original

Would anyone with an Xbox Series X be willing to test this PR in-game and try the new visual comparison? The replay tool has been tested with synthetic frames. A comparison from the game would help us check how it behaves on a real scene.

Gameplay test. Please play for a few minutes on the PR build (eb51227) using the Series X profile. Let us know whether the game reaches gameplay and whether you see missing textures, flickering materials, or lighting differences. If something looks different from main, the steps to reproduce it, your GPU, output resolution, and whether ray tracing was on would help. A clean run is worth reporting too.

Xbox comparison. Pick a static screen you can reproduce on both systems, such as a settings menu with the same item selected. Use the same game version, language, output resolution, and SDR mode. Save an 8-bit PNG from the console at its original size. On a diagnostics build of this PR, record one Victory present at the same screen with VICTORY_RECORD, then run:

victory replay compare-xbox capture-1 xbox-reference.png --out comparison

Please open comparison/index.html and let us know whether the highlighted differences match what you saw. If you can, attach the generated comparison/ folder as a ZIP so the report images and links work, and paste or attach comparison/frame-1/commands.txt. The raw Victory capture can stay on your machine.

Thanks for helping test this on real hardware.

**@⁠lucalocastro** on GitHub · 2026-12-01 18:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/83#issuecomment-7321891271) Would anyone with an Xbox Series X be willing to test this PR in-game and try the new visual comparison? The replay tool has been tested with synthetic frames. A comparison from the game would help us check how it behaves on a real scene. **Gameplay test.** Please play for a few minutes on the PR build (`eb51227`) using the Series X profile. Let us know whether the game reaches gameplay and whether you see missing textures, flickering materials, or lighting differences. If something looks different from `main`, the steps to reproduce it, your GPU, output resolution, and whether ray tracing was on would help. A clean run is worth reporting too. **Xbox comparison.** Pick a static screen you can reproduce on both systems, such as a settings menu with the same item selected. Use the same game version, language, output resolution, and SDR mode. Save an 8-bit PNG from the console at its original size. On a diagnostics build of this PR, record one Victory present at the same screen with `VICTORY_RECORD`, then run: ```sh victory replay compare-xbox capture-1 xbox-reference.png --out comparison ``` Please open `comparison/index.html` and let us know whether the highlighted differences match what you saw. If you can, attach the generated `comparison/` folder as a ZIP so the report images and links work, and paste or attach `comparison/frame-1/commands.txt`. The raw Victory capture can stay on your machine. Thanks for helping test this on real hardware.
github manually merged commit 80de7ff234 into main 2026-12-01 20:58:45 +00:00
Author
Owner

@⁠Widget9337 on GitHub · 2026-12-01 20:54 UTC · original

Tested this on an RX 9070 XT (Ryzen 9 7950X3D, CachyOS, kernel 7.2) with the patched Mesa from this branch, proton-cachyos-slr, Series X profile, PC FSR 4 Quality (1280x720 → 1920x1080), ray tracing on, 30 fps cap, fullscreen through gamescope. Your remaining-checks list asks for in-game runs, so here's one.

The default paging pace caused uneven frame pacing here. Running in the open world, the character visibly "surged". The 5 s averages looked fine (28.4 fps), but the residency log showed each pass taking 22–55 ms (last pass … us). With the new defaults (a pass every 400 ms, up to 32 MiB) that's longer than a whole 33 ms frame, about 2.5 times a second. Compared with the same scene before this PR: 30,682 pages moved up vs 13,589, 11,849 "down cold" vs 0, and 12.1 s spent moving vs 3.4 s.

Putting main's pace back fixed it:

VICTORY_PAGE_PASS_MS=1000
VICTORY_PAGE_MOVE_MB=8
PR defaults 1000 ms / 8 MiB
fps (median, in game) 28.4 30.0 (on the cap)
GPU wait (median) 11.5 ms 0.2 ms
Pass length 22–55 ms, every 400 ms 8–25 ms, once a second
HUD hitches — 0

I haven't tried VICTORY_PAGE_ADAPTIVE=1 with the PR defaults. Maybe the defaults should stay at main's values until adaptive budgeting is proven?

Other notes from running it:

  • #58 isn't in here, so VICTORY_FSR_4K always outputs 4K. I merged #58 on top. Two small conflicts in run.rs (both sides kept) and the README.
  • With #58, the FSR path's apply_ui_plane(…, (3840, 2160)) sizes the back buffer pool for a 4K output. I changed it to take fsr_4k::requested_output(). The pool check then logs Differs, which is harmless because #58's prepare_output already patched it. VICTORY_UI_PLANE=3840x2160 at 1080p output works: the menus fit, 2 planes are presented, and the pool is 96 MiB.
  • #75 turns the RT ambient stand-in off by default. On this card, shadows flicker without it, so I set VICTORY_AMBIENT_RT=0.7,1.5 (the old default band) by hand. That might be worth a line in the README.
  • I put #43's runtime barrier on a local switch and ran with it off, because in my earlier #43-only test GPU wait went from 6.7 to 12.4 ms per frame with no visible change.
  • All 94,356 pipelines were re-prepared on first launch (about 10 min). No errors, no GPU resets, no pipelines built during play.
  • Under this branch the game process shows up as main instead of victory.exe, which caught out my pgrep -x victory.exe checks.
  • Black and flickering textures (#69) are unchanged.
**@⁠Widget9337** on GitHub · 2026-12-01 20:54 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/83#issuecomment-7325451583) Tested this on an RX 9070 XT (Ryzen 9 7950X3D, CachyOS, kernel 7.2) with the patched Mesa from this branch, `proton-cachyos-slr`, Series X profile, PC FSR 4 Quality (1280x720 → 1920x1080), ray tracing on, 30 fps cap, fullscreen through gamescope. Your remaining-checks list asks for in-game runs, so here's one. **The default paging pace caused uneven frame pacing here.** Running in the open world, the character visibly "surged". The 5 s averages looked fine (28.4 fps), but the residency log showed each pass taking **22–55 ms** (`last pass … us`). With the new defaults (a pass every 400 ms, up to 32 MiB) that's longer than a whole 33 ms frame, about 2.5 times a second. Compared with the same scene before this PR: 30,682 pages moved up vs 13,589, 11,849 "down cold" vs 0, and 12.1 s spent moving vs 3.4 s. Putting `main`'s pace back fixed it: ``` VICTORY_PAGE_PASS_MS=1000 VICTORY_PAGE_MOVE_MB=8 ``` | | PR defaults | 1000 ms / 8 MiB | |---|---|---| | fps (median, in game) | 28.4 | 30.0 (on the cap) | | GPU wait (median) | 11.5 ms | 0.2 ms | | Pass length | 22–55 ms, every 400 ms | 8–25 ms, once a second | | HUD hitches | — | 0 | I haven't tried `VICTORY_PAGE_ADAPTIVE=1` with the PR defaults. Maybe the defaults should stay at `main`'s values until adaptive budgeting is proven? **Other notes from running it:** - **#58 isn't in here,** so `VICTORY_FSR_4K` always outputs 4K. I merged #58 on top. Two small conflicts in `run.rs` (both sides kept) and the README. - With #58, the FSR path's `apply_ui_plane(…, (3840, 2160))` sizes the back buffer pool for a 4K output. I changed it to take `fsr_4k::requested_output()`. The pool check then logs `Differs`, which is harmless because #58's `prepare_output` already patched it. `VICTORY_UI_PLANE=3840x2160` at 1080p output works: the menus fit, 2 planes are presented, and the pool is 96 MiB. - **#75 turns the RT ambient stand-in off by default.** On this card, shadows flicker without it, so I set `VICTORY_AMBIENT_RT=0.7,1.5` (the old default band) by hand. That might be worth a line in the README. - I put #43's runtime barrier on a local switch and ran with it off, because in my earlier #43-only test GPU wait went from 6.7 to 12.4 ms per frame with no visible change. - All 94,356 pipelines were re-prepared on first launch (about 10 min). No errors, no GPU resets, no pipelines built during play. - Under this branch the game process shows up as `main` instead of `victory.exe`, which caught out my `pgrep -x victory.exe` checks. - Black and flickering textures (#69) are unchanged.
This discussion has been locked. Commenting is limited to contributors.
No description provided.