Direct R32_UINT/SINT <-> R9G9B9E5_SHAREDEXP alias copies by default #4814
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4814
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4813"
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?
@Andreww2009 on GitHub · 2026-12-01 09:46 UTC · original
Andreww2009:perf/alias-direct-r32-rgb9e5-default→main· +67 −11 · 1 files · 1 commits · openWhat it changes
Enables
VICTORY_ALIAS_DIRECTby default (toggled!instead of opt-inasked_for!) incrates/victory-gpu/src/texture.rssoR32_UINT/R32_SINT<->R9G9B9E5_SHAREDEXPplaced texture aliases (written_as=42 read_as=67) copy directly viaCopyResourceinstead of routing each frame's 20+ render-target aliases through pooled UAV bounce buffers and three resource barriers each. SettingVICTORY_ALIAS_DIRECT=0still restores the bounce path.Adds a hardware D3D12 unit test (
direct_r32_uint_and_r9g9b9e5_sharedexp_copy_closes_cleanly) validating directCopyResourcebetweenR32_TYPELESS(R32_UINT) andR9G9B9E5_SHAREDEXPunderVICTORY_D3D12_DEBUG=1.How it was tested
a545dc12/f5019671(based onorigin/main5fabb46e).written_as=42 read_as=67aliases (e.g.853x480,768x192,2048x512) loggeddirect=falseand ran UAV bounce copies + 3 barriers each.written_as=42 read_as=67aliases logdirect=true; live 90 s run (NS-C4-base) completed with 0 crashes, 00x80070057, and 0 D3D12 Debug Layer errors onalias_layout_tests.cargo testpassed for the crates it touches: yes (VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --lib alias_layout_tests: 2/2 passed;cargo test -p victory-gpu --lib: 1,103/1,103 passed;cargo xtask policy: passed). Note: untouched upstreamorigin/main5fabb46ecurrently has 5 pre-existing Clippy warnings incrates/victory-gpu/src/host/{font,menu,panel}.rs;crates/victory-gpu/src/texture.rshas 0 warnings.Checked for overlap
@cloph-dsp on GitHub · 2026-12-01 13:21 UTC · original
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
One correction first, because it bites anyone running this test: it lives in
texture::alias_layout_tests, nottexture::tests.-- texture::tests::alias_layouts_are_made_again_for_other_textures --exactprintsrunning 0 tests ... 1162 filtered out, which reads like a pass and runs nothing. The working form is below.Base
5fabb46eaf6ed8771321787f8871051abde69b9b, heada545dc12299e254289f77013da91984c4035c41f.git diff --numstat→ crates/victory-gpu/src/texture.rs 67/11.On the base the name is already there at texture.rs (same function, older body), so
git grep -F alias_layouts_are_made_again_for_other_textures 5fabb46e -- .matches — this is a rewrite of an existing test, not a new one. Read that as you will for the "new test" criterion; the body is what the direct alias path changes.git diff --check "5fabb46e..a545dc12"→ no output, exit 0.Result:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1161 filtered out.The test builds
D3D12_RESOURCE_DESCs and the layouts by hand and never opens a device; no title files, GPU/driver N/A. No game data.@Andreww2009 on GitHub · 2026-12-01 14:29 UTC · original
Thanks for verifying the diff and running the layout test, @cloph-dsp!
Note that in addition to updating
texture::alias_layout_tests::alias_layouts_are_made_again_for_other_textures, this commit adds a new hardware D3D12 Debug Layer test in the same module:cargo test --locked -p victory-gpu --lib -- texture::alias_layout_tests::direct_r32_uint_and_r9g9b9e5_sharedexp_copy_closes_cleanly --exact(under
VICTORY_D3D12_DEBUG=1, it creates realR32_TYPELESS/R32_UINTandR9G9B9E5_SHAREDEXPresources and validates that directCopyResourcecloses cleanly with zero debug-layer errors).@Bazovsky on GitHub · 2026-12-01 18:17 UTC · original
Tested on
origin/main(5fabb46e) + this PR (a545dc12) on Windows 11, Ryzen 9 9950X3D (64 GB DDR5), RTX 5090 (2560x1440, DLSS Quality + DLSS FG 2x, Series X build,VICTORY_SUBMISSION_TIMING=1).cargo clippy --workspace --all-targets --all-features --locked(no new warnings) andtexture::alias_layout_tests(2 passed, includingdirect_r32_uint_and_r9g9b9e5_sharedexp_copy_closes_cleanlyon RTX 5090).origin/maincontrol runsmain_1/main_2):[0..10 s]):24.67 / 30.22(27.45avg) ->30.33native FPS[+10 s..end]):33.14 / 33.76(33.45avg,29.45 msmedian) ->33.70native FPS (29.10 msmedian)90.5 / 87.6 ms(89.1 msavg) ->80.9 ms(-9.2%)0D3D12 / device-removed errors.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.