GPU: a shared-exponent HDR render target gets an RGBA16F stand-in #3925
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3925"
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?
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-12-01T03:27:08Z.
Summary
Depends on: #3877 (contains its commits until that lands).
DXGI_FORMAT_R9G9B9E5_SHAREDEXP (format 67) has no render-target or typed-UAV support on NVIDIA: GTA VI's 1920x1080 HDR scene target (flags: RT|UAV) fails
CreateCommittedResourcewith E_INVALIDARG, and every frame it backs stays empty.stand_in_formatgets a second entry: 67 → 10 (R16G16B16A16_FLOAT), which covers the shared-exponent range and more, and supports both uses. The support check still gates the substitution, so a host that does support 67 keeps it.Issue #904 documents both this format and 115 among the refused target formats.
Test plan
cargo test -p victory-gpu resource::tests— 23 passed, including the new 67 assertions.no host texturerefusals; the loading screens render full-frame (the 115+67 stand-ins together fix the diagonal-half-black loading art).AI-assisted change.
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T12:42:38Z.
Compared the stacked base and
ee84179bwith guest RGB9E5 rows (48 texels, pitch 256). RTX 4090 Laptop selected RGBA16F: RTV and UAV writes gave the expected (4,2,1) and (1,2,8) via the SRV, but uploading to the stand-in yielded zeros and copying back left all four tested guest pixels at the sentinel. WARP retained native RGB9E5 and passed. With the proposed conversion, both adapters passed separate upload and download probes, a two-row subrectangle round trip and the shader readback controls. The Windows SDK packing/decoding comparison matched in all 47,252 cases. Author-branch fix: https://github.com/kotekompotek/VIctory/pull/4.Review also turned up signed black: the initial candidate packed four of eight sign combinations of FP16 zero as 0x88000000, which also decodes to black. The follow-up normalizes these to the SDK's 0x00000000. All eight combinations and the earlier 47,244 cases now match the SDK bit for bit.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T15:32:02Z.
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree, per-worktree CARGO_TARGET_DIR.
Base
63bcca43c6a00a758510398fa43096ce7e4f7df0, headee84179b5998a6367cbc4b1a4dd6be2ffd05b390.git diff --numstat→ descriptor.rs 8/0, descriptor/host.rs 23/9, list.rs 196/30, pipeline/host.rs 10/1, resource.rs 420/1, texture.rs 102/0.Four of the six new tests are CPU-only and their names are new on the base (
git grep -F <name> 63bcca43 -- .returns no match for each):Result, each:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 237 filtered out(the host-desc case took 0.82s, the rest 0.00s).The other two —
resource::tests::a_4444_copy_round_trips_through_the_stand_inandresource::tests::a_4444_render_target_clears_and_reads_back— begin withif crate::host::host().is_none() { return; }(resource.rs:3389 and 3523). On this machine there is no D3D12 device, so they report pass without asserting anything; I am deliberately not counting them.git diff --check "63bcca43..ee84179b"→ no output, exit 0.GPU/driver N/A for the four counted tests. No game data.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.