d3d12_xs: R9G9B9E5 UAV textures stored as RGBA16F on hosts without typed UAV (FidelityFX on NVIDIA/Intel) #55
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/55"
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 omonkeyz/xbox-emulator. Originally posted by QuentinDanblon on 2026-11-21T21:38:23Z.
Library / area: d3d12_xs (resource creation, views, copies, title-memory mirror)
Exports changed (exports.txt rows): none
Source of the behaviour: D3D12 format support queries on the host. The observation that GTA VI's
amd_fidelityfx_upscaler_xbox.dllcreates a 1920x1080 R9G9B9E5_SHAREDEXP texture with ALLOW_UNORDERED_ACCESS comes from americas-recomp (GPL-2.0, observation only, no code taken).Problem
Console RDNA2 supports typed UAVs on R9G9B9E5. NVIDIA and Intel don't (
D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEWis missing; RTX 5090 Support1 = 0x8013f0). Creating such a texture with the UAV flag returns E_INVALIDARG, so the FidelityFX upscaler failsffxCreateContext. WARP supports the format, which is why tests on WARP don't see this.Change (new
uav_subst.rs)D3D12XboxCreateDeviceon the real device.Not covered (documented in the module)
Tests (on
0fc7295)cargo test -p d3d12_xs: lib 420 pass, 1 fail, integration tests pass. The failure iscentroid_bind … fxc, which also fails on main without this commit.Hardware
hw_ -- --ignored --test-threads=1: 37/37 pass on the RTX 5090 and 37/37 on WARP.The new
hw_rgb9e5_typed_uav_texture_is_substitutedreproduces the host E_INVALIDARG, then:The test skips on WARP because WARP supports the format natively.
Not run in a title.
cargo test -p d3d12_xspasses (except the fxc test that also fails on main)No game or console files and no binaries included
No fake success; anything not possible is left
missingwith a noteImported from omonkeyz/xbox-emulator. Originally posted by QuentinDanblon on 2026-11-22T11:36:48Z.
Rebased onto
51f5319. One conflict inupload.rs(check): main'sstage_timemeasurement is kept, with the host element size of the substituted format. Main's newone_megabyte_detiles_on_one_thread_in_a_few_mstest passesNonefor the extradetile_spanargument.Tests on this base:
cargo test -p d3d12_xs --release --lib hw_ -- --ignored --test-threads=1: 39 of 39 on the RTX 5090, 39 of 39 withTOMBOX_HW_ADAPTER=warp.--lib uav_subst: 10 pass.--lib: 460 pass, 3 fail. Main alone: 450 pass, 2 fail (device_console_fix::tests::console_heap_properties_create_on_pc_through_every_wrapped_pathandxs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs, both also failing here).The third failure is
slot_audit_tests::done_slots_have_real_handlers, and it does not come from a slot change (this PR does not touch the device vtable). The audit names each handler withSymFromAddr, and the release linker folds functions with identical code.device_wrap::dev_stubandconsole_slots_dev2::scarlett_notimplboth only returnE_NOTIMPL, so they share one address and the name that comes back depends on link order. With this branch the fold resolves todev_stubfor Device 31-35, 69, 83, 85, 88 and 89, which the test counts as placeholders. Main's own audit output (TOMBOX_SLOT_AUDIT_OUT) already shows folded names: Device 7 is reported astitle_heap::tests::f_releaseand Device 6 ascl_console_fix::set_name_x. Any change that moves the link order can trip it. A body fordev_stubthat no real handler shares would make the audit independent of folding.Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T13:12:50Z.
Main's history was rewritten, which auto-closed this PR (sorry for the noise). Please restate this without naming a title or the GPL-2.0 project as the source (keep those facts in the PR text), strip the comment lines, and rebase on the current device_wrap.rs. It needs maintainer hardware testing after that. To resubmit:
git fetchthis repo, branch from the currentmain, cherry-pick only your own commits (the old branch is based on the previous history and cannot be merged), and open a new PR.Pull request closed