WIP: Experimental FidelityFX Xbox GPU compatibility — Wave64 emulation and NVIDIA support #32
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/33"
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 ivall/xcl. Originally posted by ElHombreAlex on 2026-11-22T12:02:34Z.
Overview
This experimental branch documents five iterations of Xbox Series GPU compatibility research, focused on running the authentic Xbox FidelityFX upscaler through XCL on an NVIDIA RTX 4060 Ti.
The work builds upon XCL's existing infrastructure and explores proprietary Xbox pipeline deserialization, RDNA2 shader recompilation, Wave64 compatibility, and GPU resource translation.
Key achievements
ffxDispatchrecording of 26 console compute dispatches.Verification
reports/.Known limitations
This is experimental work, not a complete or verified FSR4 implementation.
The full GPU workload does not yet complete successfully.
Execution currently fails at compute dispatch 14, where a suspected structural Wave64 rendezvous desynchronization leads to degraded execution and eventual GPU device failure.
The next investigation should identify the first divergent rendezvous site and validate cross-half data movement, particularly DPP operations.
No final output frame has been verified.
Project status
This PR is intended to share research and implementation progress, not to request immediate merging.
The branch requires further validation, cleanup, conflict resolution, and review before it can be considered production-ready.
No game binaries or proprietary Xbox DLLs are intended to be included.
Thanks to the original XCL author for the substantial foundation that made this investigation possible.
Imported from ivall/xcl. Originally posted by grahamster2 on 2026-11-22T20:56:06Z.
Tested on an RTX 3080 (D3D12 wave range 32..32, driver 610.88) and a Radeon RDNA2 iGPU (wave 32..64, no mesh shaders), with this branch merged onto current
mainplus #41 for adapter selection. The merge conflicts inreal.rs/device_x.rswere only the adapter selection and the R9G9B9E5 additions, and I kept both sides.cargo test --workspace --release --no-fail-fast,XCL_SAMPLE_RPFset to a retailshaders.rpf:wave64_compute_rendezvous_on_32_lane_wavesretail_mesh_pipelines_through_the_hookmain; the rendezvous coversMode::Computeonly)main)No device removal or TDR.
The rendezvous test fails on current
mainbecauserlaisn't hooked any more. It fails withmem[32]: 40, expected 8. The generated HLSL showsballotdispatching toballot_x64, butrladoesn't dispatch torla_x64. The hook is aPRELUDE.replace("uint rla(uint v, uint l) {\n if (xcl_logical_wave64)", ..)(emit.rs,split_w64prelude), andmainchangedrlain507c441(uint w;first, plus the pixel-mode quad reads), so the pattern silently stops matching.v_readfirstlanein the high native wave then doesWaveReadLaneAt(v, 8)within its own 32 lanes and reads lane 40, which is exactly the 40 above. On your branch's base the pattern still matches, which is why it passes there.Suggested fix: anchor on the signature only, and fail loudly if either hook doesn't apply:
With it, the test passes on the RTX 3080 in all three variants (default,
XCL_TEST_W64_RENDEZVOUS=first,=lds). Pointed at the iGPU, its native[WaveSize(64)]run matches the rendezvous form. Note that theldsvariant passes even without the fix: the stored value there is the LDS round-trip, so it doesn't observereadfirstlane. Given the "suspected structural rendezvous desynchronization" at dispatch 14, it may be worth checking that the FSR4 runs were made with both hooks in place.Two smaller things in that test:
EnumAdapterByGpuPreference(0, ..)whilenative_okcomes fromrunner::wave64_supported(). On a machine whose first adapter has no wave64 (like this one), the native comparison never runs, and withXCL_ADAPTERthe two can be different GPUs. Taking the device from the runner (orgpu::adapterfrom #41) would fix both. That also overlaps withb8881cf: this branch and #41 both addXCL_ADAPTER, #41 with the number / name-substring forms and the test bench wiring. I'm happy to adapt #41 to whatever you need.C:\Users\alexa\AppData\Local\Temp\fsr4_bisect\(the error is ignored, but an env var orstd::env::temp_dir()would be safer).Imported from ivall/xcl. Originally posted by Foniass on 2026-11-22T22:47:07Z.
Tested on RTX 5070 Ti only (Blackwell, driver 32.0.16.2114, D3D12 wave range 32..32, mesh tier 1). The RDNA2 iGPU on this machine is disabled, so it wasn't tested. I ran the PR head
8e592ffas it is, because it conflicts with currentmaininreal.rs/device_x.rs, and compared it with its basee511b94.cargo test --workspace --release --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*set. Hardware details are in #42.e511b94(base)8e592ffwave64_compute_rendezvous_on_32_lane_wavesreally runs on Blackwell and is not skipped:rendezvous form: 4 console waves (8 native), active 8..=40, all stores = 8: OK. The native cross-check is skipped, since there is no wave64 adapter here.gpu_ready()(no wave64) on the base and on the PR.ffx_official_console_dlls.rsneedXCL_SAMPLE_FFX. Without it they return immediately (0.00 s), so their pass says nothing on this machine.rlahook (emit.rs:3498) still expectsuint rla(uint v, uint l) {\n if (xcl_logical_wave64). Currentmain'srlastarts withuint w;, so after a rebase the hook won't apply, as described above. That part I checked in the source, not on the GPU.deserialized_fs_dxil_driver_acceptancewithXCL_FFX_BISECT_EMPTY=1reads a hard-codedC:\Users\alexa\...\fsr4_bisect\empty.cso(ffx_official_console_dlls.rs:863).Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T13:57:16Z.
Thank you for this research – it is what got FSR4 going. Since
mainmoved a lot (#67 brought the wave64 form on 32-lane GPUs, #41 adapter selection, the VFS drive fix), I rebuilt the FSR part on currentmaininstead of merging the branch:fdeacf0.DeserializeComputePipelineStateXstaysE_NOTIMPL, and FSR4 then callsCreateComputePipelineStatewith theACCC/FSPXblob, which carries the real thread geometry andCOMPUTE_PGM_RSRC2(entry 0) next to the RDNA2 code (entry 6) – so no(256,1,1)guess is needed. All 29 pipelines translate and compile.v_dot4*were shift-and-multiply emulations; as SM 6.4dot4add_i8packed/dot4add_u8packedthe biggest went 1.55 → 1.23 MB DXIL, DXC 604 → 74 s, and the AMD driver accepts it.fsr4_console_upscaler_creates_a_context_probewithXCL_PROBE_FSR_EXECUTE=1).Closing this PR as superseded – the reports in it are referenced in HANDOFF. If you can, a run of that probe on your RTX 4060 Ti (
XCL_CONSOLE_LISTS=1 XCL_PROBE_FSR=1 XCL_PROBE_FSR_DISPATCH=1 XCL_PROBE_FSR_EXECUTE=1,XCL_SAMPLE_DLLS= the game's DLLs) would tell whether the 32-lane path now gets through dispatch 14.Imported from ivall/xcl. Originally posted by ElHombreAlex on 2026-11-23T15:19:07Z.
<html>
Thanks for the update and for building upon the research! I ran the requested NVIDIA validation against upstream
mainat484dd57.Hardware: RTX 4060 Ti, NVIDIA driver 610.88, D3D12 wave-lane range 32..32. XCL's preflight correctly detects the GPU and selects the split-Wave64 path. The adapter was explicitly selected using
XCL_ADAPTER.The upstream worktree was left unmodified throughout testing.
1. FSR4 probe — context initialization
With
XCL_SAMPLE_DLLSpointing to the officially distributed GDK-Samples 4.1.2 FidelityFX DLLs, the upstream probe returns:ffxCreateContext: code 0x1D3D12 tracing confirms that no device methods are called before this failure, so this occurs before GPU initialization.
The available kit DLLs expect a different descriptor chain from the one used by the upstream probe:
CreateBackendXboxDesc:0x02000002CreateContextDescUpscaleVersion:0x0001000BRequested FSR version:
0x01001002(4.1.2)Using this descriptor chain through the loader allows initialization to progress.
This appears to be a difference between the kit DLLs available locally and the game-pack DLLs used for your successful RX 9070 validation.
2. FSR4 probe — resource creation
With the corrected descriptor chain, the DLL proceeds to create GPU resources through XCL, including four console descriptor heaps.
Initialization then fails while creating its fourth internal texture:
Dimensions: 1920 × 1080
Format:
R9G9B9E5_SHAREDEXP(DXGI 67)Flags:
ALLOW_UNORDERED_ACCESS(0x4)Relevant log output:
This matches the RGBE UAV resource-creation limitation identified during the earlier PR #33 investigation.
The experimental branch includes a workaround using
R32_TYPELESSstorage,R32_UINTviews and complementary shader-side 9-9-9-E5 packing/unpacking. That workaround was validated through resource initialization, but not through a successfully completed FSR4 frame.The underlying typed-UAV format limitation is not NVIDIA-specific. I have not independently tested these kit DLLs on AMD hardware.
3. NVIDIA GPU regression results
The unmodified upstream
Result | Count -- | -- Total | 271 Passed | 253 Failed | 0 Ignored | 18 Duration | 11.55 sgpu::test suite completed successfully on the RTX 4060 Ti:The passing tests include:
Split-Wave64 cross-half operations and lane-local masks.
Cross-half synchronization under divergent wave execution.
Inactive-lane zeroing for
ds_swizzleandds_bpermute.Mesh split-wave execution.
Upper-lane handling and Wave64 pixel-shader reductions.
This confirms that the upstream split-Wave64 implementation passes its applicable regression tests on real NVIDIA hardware.
Conclusion
Confirmed on the RTX 4060 Ti: D3D12 device initialization, correct split-Wave64 selection and successful execution of the upstream GPU regression suite.
Not yet verified: the complete FSR4 workload (29 pipelines, 20 dispatches and output readback). The available kit DLLs fail during context/resource initialization before reaching that stage.
Therefore, I cannot yet confirm whether the previous dispatch-14 failure is resolved by the new upstream implementation.
Thanks again for the work on XCL and for incorporating the earlier research. I'm happy to help with further NVIDIA hardware testing or validation if needed!
</html>Pull request closed