Texture alias: test that a direct R32 to R9G9B9E5 copy reads back the same bits as the copy through a buffer #1826
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!1826
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1826"
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?
@101Leafy on GitHub · 2026-11-29 00:32 UTC · original
101Leafy:nv/alias-copy-test→main· +292 −17 · 11 files · 4 commits · merged 2026-11-29 08:16 UTCThere is no test yet that a copy straight across between the R32 and R9G9B9E5 alias formats leaves the same bits as the copy through a buffer. A wrong answer here would show up only as off colors in a title.
The new test fills a texture with words that are all different. The first few sit at the edges of the shared exponent format. It copies the texture straight across and through a buffer in both directions. Then it reads every level and layer back. It also covers a texture the host writes as a render target or with a shader.
Off by default: it is a test only and changes nothing at run time.
7f594f0136to3e047fef00@upipibi on GitHub · 2026-11-29 02:36 UTC · original
Test report for #1826, tested at head
7f594f01merged--no-ffonto maind585f883. The PR has since been restacked to3e047fef; its test commit is the same patch. Synthetic tests only: no title run, no game files.Setup: RTX 3070, driver 616.56, Windows 11 (10.0.26100), rustc 1.98.1. WARP runs use
VICTORY_D3D12_WARP=1with
--features diagnostics.texture::alias_copy_tests::a_direct_alias_copy_keeps_every_bit: 3/3 pass on hardware, 3/3 on WARP.The test reaches the device. It makes the textures and buffers on the host device and copies and reads them back on
the card. I added a temporary print (not committed) of the adapter
host()chose:Negative control: the PR changes only test code, and the test does not call
texture::alias(it is named onlyin a doc comment), so there is no fix to revert. Instead I skipped the straight-across copy, so the destination
keeps what it was created with. The test fails on hardware and on WARP at the first texel that differs:
straight across, (DXGI_FORMAT(42), D3D12_RESOURCE_FLAGS(4)) to (DXGI_FORMAT(67), D3D12_RESOURCE_FLAGS(0)), part 0 texel 1.So its checks catch a copy that does not keep the bits.
What it covers is the D3D12 runtime and driver: a direct R32_UINT/SINT and R9G9B9E5_SHAREDEXP copy gives the same
bits as a copy through a buffer, in both directions, on every level and layer. That holds on the RTX 3070 and on WARP.
It does not run victory's own alias path. A test that calls
texture::aliaswithVICTORY_ALIAS_DIRECT=1(#1730)would cover that code.
cargo test -p victory-gpu --lib --lockedd585f883--features diagnosticsNot tested: the effect in a title.
Tested with the help of Claude Code (Claude Opus 5.5).