Improve Radeon rendering and support writable placed textures #453

Open
github-bot wants to merge 2 commits from github-bot/gh-453 into a-publier AGit
Owner

@⁠Enjoythis2026 on GitHub · 2026-11-27 02:37 UTC · original
Enjoythis2026:rx6950xt-rendering → a-publier · +995 −189 · 15 files · 2 commits · open

This branch contains the Radeon rendering and command-list changes tested on an RX 6950 XT. It also integrates the warm-up, texture conversion and command preparation fixes adapted from avatarmanz/VIctory-7900XTX PRs #333, #335 and #351.

Placed SRVs and UAVs share a backing texture. The GPU regression test writes through the UAV and checks all 4,096 pixels on readback. The descriptor suite passed all 47 tests.

On the RX 6950 XT, an early gameplay run logged 159.7 ms/frame (6.3 FPS). After the combined changes, the tester reports gameplay averaging close to 19 FPS (about 53 ms/frame). These observations were taken in different runs and scenes.

With the Series S profile at 1080p, the final placed-texture change measured 65.52 ms/frame over 2,220 frames, compared with 65.27-66.16 ms/frame before that change. Intermittent black or white skin remains under investigation.

**@⁠Enjoythis2026** on GitHub · 2026-11-27 02:37 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/453) `Enjoythis2026:rx6950xt-rendering` → `a-publier` · +995 −189 · 15 files · 2 commits · open This branch contains the Radeon rendering and command-list changes tested on an RX 6950 XT. It also integrates the warm-up, texture conversion and command preparation fixes adapted from avatarmanz/VIctory-7900XTX PRs #333, #335 and #351. Placed SRVs and UAVs share a backing texture. The GPU regression test writes through the UAV and checks all 4,096 pixels on readback. The descriptor suite passed all 47 tests. On the RX 6950 XT, an early gameplay run logged 159.7 ms/frame (6.3 FPS). After the combined changes, the tester reports gameplay averaging close to 19 FPS (about 53 ms/frame). These observations were taken in different runs and scenes. With the Series S profile at 1080p, the final placed-texture change measured 65.52 ms/frame over 2,220 frames, compared with 65.27-66.16 ms/frame before that change. Intermittent black or white skin remains under investigation.
Resolve placed SRVs and UAVs to shared backing, cache placement lookups, and cover GPU writes with a readback test. Include the tested warm-up, texture conversion, and command preparation changes adapted from avatarmanz/VIctory-7900XTX PRs #333, #335 and #351.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:45:54 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-27 03:55 UTC · original

Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At 5427454: cargo test --release -p victory-gpu --lib 397 passed, 0 failed, 34 ignored; victory-formats 43 passed, 0 failed, 5 ignored. Not yet run in the game here; I'll try it on this card.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 03:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/453#issuecomment-7209381297) Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `5427454`: `cargo test --release -p victory-gpu --lib` 397 passed, 0 failed, 34 ignored; `victory-formats` 43 passed, 0 failed, 5 ignored. Not yet run in the game here; I'll try it on this card. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠gw1337x on GitHub · 2026-11-27 04:28 UTC · original

Ran in the title on RDNA 3: RX 7800 XT 16 GB (driver 32.0.32015.7029), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26200 (Memory Integrity off). Diagnostics builds of 5427454 and its base 4eb6cfd, same boot, the PR's new switches left at their defaults.

Settings: scripts/play.ps1 settings plus VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1, Series X profile, ray tracing off. Method: 270 s hands-off from a Chapter I boat save; fps is the layer's 1 s figure from the window title, every second; "steady" from 205 s (about 3,900 draws a frame); "loads" are the cutscenes and scene loads at 60-190 s.

Run Build steady fps seconds < 15 fps in loads seconds < 10 fps in loads
1 4eb6cfd 28.0 12 3
2 5427454 29.0 24 9
3 4eb6cfd 29.0 12 3
4 5427454 28.0 7 1
5 4eb6cfd 28.0 9 3
6 5427454 28.0 8 2

Runs 1-3 were among other builds, 4-6 back to back. At 240 s the frame is 34.4-34.5 ms with the card running 31.8 ms in both builds.

No measurable change on this card in this scene, and no problems: no device loss, peak commit 33.5-34.1 GB (PR) against 33.5-33.7 GB (base), and in the 240 s screenshot the boat, water and characters look the same as the base (I compared that one frame, not every shot). Run 2's extra dips did not repeat in runs 4 and 6.

**@⁠gw1337x** on GitHub · 2026-11-27 04:28 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/453#issuecomment-7209832848) Ran in the title on RDNA 3: RX 7800 XT 16 GB (driver 32.0.32015.7029), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26200 (Memory Integrity off). Diagnostics builds of `5427454` and its base `4eb6cfd`, same boot, the PR's new switches left at their defaults. Settings: `scripts/play.ps1` settings plus `VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1`, Series X profile, ray tracing off. Method: 270 s hands-off from a Chapter I boat save; fps is the layer's 1 s figure from the window title, every second; "steady" from 205 s (about 3,900 draws a frame); "loads" are the cutscenes and scene loads at 60-190 s. | Run | Build | steady fps | seconds < 15 fps in loads | seconds < 10 fps in loads | |---|---|---|---|---| | 1 | `4eb6cfd` | 28.0 | 12 | 3 | | 2 | `5427454` | 29.0 | 24 | 9 | | 3 | `4eb6cfd` | 29.0 | 12 | 3 | | 4 | `5427454` | 28.0 | 7 | 1 | | 5 | `4eb6cfd` | 28.0 | 9 | 3 | | 6 | `5427454` | 28.0 | 8 | 2 | Runs 1-3 were among other builds, 4-6 back to back. At 240 s the frame is 34.4-34.5 ms with the card running 31.8 ms in both builds. No measurable change on this card in this scene, and no problems: no device loss, peak commit 33.5-34.1 GB (PR) against 33.5-33.7 GB (base), and in the 240 s screenshot the boat, water and characters look the same as the base (I compared that one frame, not every shot). Run 2's extra dips did not repeat in runs 4 and 6.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-27 05:15 UTC · original

A follow-up review, by reading and one brute-force test; no bugs found that I could prove.

  • victory-formats copy paths (RowRuns, walk_rows, copy_body_pair, walk_scanned): I compared each element copied out of tiled memory and back against Layout::offset(). That is 1,750 cases: 6 tiling modes plus linear, elements of 1 to 16 bytes, odd sizes, full mip chains, 2D arrays and 3D volumes. All match. Adding the row and depth parts of the address instead of OR-ing them is equivalent, since their bits don't overlap.
  • Writable placed textures: the SRV and UAV reach the same object and host copy through texture_at. A UAV-flagged texture never gets a host copy that starts at a later mip, and readable() asks UNORDERED_ACCESS / SHADER_RESOURCE per path. The texture_at cache compares the whole raw description, and PLACED_TEXTURES entries are never removed, so it can't go stale.
  • The new compare modes: the buffer sizes cover the largest index written, and the states stay valid (COMMON, decaying after each submission). VICTORY_SYNC_TRANSLATE and VICTORY_CLOSED_PLAN keep lists alive and snapshots cleared as the existing paths do.
  • Behaviour changes worth stating in the description: old-format warm-done.txt records are now ignored, so pipelines are made again. A depth target smaller than the color target is dropped, and draws that need it are skipped.

The brute-force test (review_brute_detile_matches_offsets) is available if you want it in the PR.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 05:15 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/453#issuecomment-7210479111) A follow-up review, by reading and one brute-force test; no bugs found that I could prove. - **`victory-formats` copy paths** (`RowRuns`, `walk_rows`, `copy_body_pair`, `walk_scanned`): I compared each element copied out of tiled memory and back against `Layout::offset()`. That is 1,750 cases: 6 tiling modes plus linear, elements of 1 to 16 bytes, odd sizes, full mip chains, 2D arrays and 3D volumes. All match. Adding the row and depth parts of the address instead of OR-ing them is equivalent, since their bits don't overlap. - **Writable placed textures:** the SRV and UAV reach the same object and host copy through `texture_at`. A UAV-flagged texture never gets a host copy that starts at a later mip, and `readable()` asks `UNORDERED_ACCESS` / `SHADER_RESOURCE` per path. The `texture_at` cache compares the whole raw description, and `PLACED_TEXTURES` entries are never removed, so it can't go stale. - **The new compare modes:** the buffer sizes cover the largest index written, and the states stay valid (COMMON, decaying after each submission). `VICTORY_SYNC_TRANSLATE` and `VICTORY_CLOSED_PLAN` keep lists alive and snapshots cleared as the existing paths do. - **Behaviour changes worth stating in the description:** old-format `warm-done.txt` records are now ignored, so pipelines are made again. A depth target smaller than the color target is dropped, and draws that need it are skipped. The brute-force test (`review_brute_detile_matches_offsets`) is available if you want it in the PR. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-27 12:32 UTC · original

Tested on an RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Windows 11 26300, Rust 1.98.1. PR head 5427454 vs base 4eb6cfd. victory-gpu lib tests in a dev build and a diag build (--profile diag --features diagnostics), --test-threads=1. Release exe for translate.

  • CI clippy fails. cargo clippy --workspace --all-targets --locked -- -D warnings fails with default features and with --all-features. 4eb6cfd passes both. There are 3 lints:

    • crates/victory-gpu/src/port_descriptors.rs:569: unnecessary_sort_by on v.sort_by(|a, b| b.1.cmp(&a.1))
    • apps/victory/src/warm.rs:95 and :140: needless_borrow on &fingerprint, which is already a &str
    • With those 3 lines fixed, both configs pass.
  • The new readback test needs the fix. I put placed_texture_uav_writes_reach_the_readable_resource onto 4eb6cfd alone, without its two defer_until_use asserts, since that function is not on the base. It fails 3/3 on the card and on WARP: make() returns no view for the writable placed UAV. On the PR head it passes 3/3 on the card and on WARP.

  • Whole victory-gpu lib on the card:

    • diag: base 444 passed, 1 failed, 34 ignored; PR 446 passed, 1 failed, 34 ignored.
    • dev: base 396/0/34; PR 397/0/34.
    • The only per-test differences are the PR's two new tests. The diag failure is timeline::report::tests::real_waits_are_recorded_with_who_ended_them on both sides.
  • New switches: the diag suite was run once each with:

    • VICTORY_LANE_COMPARE
    • VICTORY_COMPARE_BYTES, alone and with VICTORY_COPY_REFERENCE
    • VICTORY_LOCAL_FLAGS
    • VICTORY_DIRECT_FETCH_KIB=64
    • VICTORY_CLOSED_PLAN
    • VICTORY_FENCE_CHECKPOINTS, then with VICTORY_FENCE_CHECKPOINT_LISTS, then also with VICTORY_FENCE_CHECKPOINT_PRELUDES
    • VICTORY_SYNC_TRANSLATE, alone and with VICTORY_THIN=1

    Every run gave the same per-test results as the default run. None of the new switches are documented in the PR, and neither are the two other diag-only ones it adds (VICTORY_PROFILE_OCCLUDED, VICTORY_TITLE_FRAME_SAMPLES).

  • Translated shaders: victory translate --validate --list over the whole archive gives 0 of 25,889 programs changed. Checked with the default wave and with VICTORY_HOST_WAVE=32.

  • victory-formats: the two new texture tests also pass on 4eb6cfd. They guard against regressions; they do not fix a failing case.

  • warm: a pipeline that is refused is now tried again on every victory warm run, after the untried ones. Each attempt adds a refused line to warm-done.txt, so the file grows while a pipeline keeps being refused.

  • Nit: the comment at crates/victory-gpu/src/resource.rs:1756 reads 4–6 GiB. The base has an en dash there, and it got garbled by an encoding error.

Not tested: in the title on this card. The lib tests do not show how much of each switch's code path they reach.

**@⁠adrianmjim** on GitHub · 2026-11-27 12:32 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/453#issuecomment-7218355823) Tested on an RX 7900 XT (RDNA 3), driver 32.0.32029.2010, Windows 11 26300, Rust 1.98.1. PR head `5427454` vs base `4eb6cfd`. victory-gpu lib tests in a dev build and a diag build (`--profile diag --features diagnostics`), `--test-threads=1`. Release exe for translate. - **CI clippy fails.** `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with default features and with `--all-features`. `4eb6cfd` passes both. There are 3 lints: - `crates/victory-gpu/src/port_descriptors.rs:569`: `unnecessary_sort_by` on `v.sort_by(|a, b| b.1.cmp(&a.1))` - `apps/victory/src/warm.rs:95` and `:140`: `needless_borrow` on `&fingerprint`, which is already a `&str` - With those 3 lines fixed, both configs pass. - **The new readback test needs the fix.** I put `placed_texture_uav_writes_reach_the_readable_resource` onto `4eb6cfd` alone, without its two `defer_until_use` asserts, since that function is not on the base. It fails 3/3 on the card and on WARP: `make()` returns no view for the writable placed UAV. On the PR head it passes 3/3 on the card and on WARP. - **Whole victory-gpu lib on the card:** - diag: base 444 passed, 1 failed, 34 ignored; PR 446 passed, 1 failed, 34 ignored. - dev: base 396/0/34; PR 397/0/34. - The only per-test differences are the PR's two new tests. The diag failure is `timeline::report::tests::real_waits_are_recorded_with_who_ended_them` on both sides. - **New switches:** the diag suite was run once each with: - `VICTORY_LANE_COMPARE` - `VICTORY_COMPARE_BYTES`, alone and with `VICTORY_COPY_REFERENCE` - `VICTORY_LOCAL_FLAGS` - `VICTORY_DIRECT_FETCH_KIB=64` - `VICTORY_CLOSED_PLAN` - `VICTORY_FENCE_CHECKPOINTS`, then with `VICTORY_FENCE_CHECKPOINT_LISTS`, then also with `VICTORY_FENCE_CHECKPOINT_PRELUDES` - `VICTORY_SYNC_TRANSLATE`, alone and with `VICTORY_THIN=1` Every run gave the same per-test results as the default run. None of the new switches are documented in the PR, and neither are the two other diag-only ones it adds (`VICTORY_PROFILE_OCCLUDED`, `VICTORY_TITLE_FRAME_SAMPLES`). - **Translated shaders:** `victory translate --validate --list` over the whole archive gives 0 of 25,889 programs changed. Checked with the default wave and with `VICTORY_HOST_WAVE=32`. - **victory-formats:** the two new texture tests also pass on `4eb6cfd`. They guard against regressions; they do not fix a failing case. - **warm:** a pipeline that is refused is now tried again on every `victory warm` run, after the untried ones. Each attempt adds a `refused` line to `warm-done.txt`, so the file grows while a pipeline keeps being refused. - **Nit:** the comment at `crates/victory-gpu/src/resource.rs:1756` reads `4–6 GiB`. The base has an en dash there, and it got garbled by an encoding error. Not tested: in the title on this card. The lib tests do not show how much of each switch's code path they reach.
This pull request can be merged automatically.
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/453/head:github-bot/gh-453'
git switch 'github-bot/gh-453'

Merge

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