D3D12.X: strip Xbox root signature flags for PC and honor FORCE_MEMORY_BASED_ABI #3244
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3244"
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 Kalmarv on 2026-11-28T23:56:00Z.
Strip Xbox-only root-signature flags (
0x0300_0000) when passing consoleRTS0blobs to PCID3D12Device::CreateRootSignatureand handleFORCE_MEMORY_BASED_ABI(0x0100_0000) inconsole_list::layout_from_blob.Console root signatures can carry two Xbox-only
RTS0flags above PC D3D12's flag bits:FORCE_MEMORY_BASED_ABI(0x0100_0000, which forces all root parameters out of inline SGPRs into memory) andALLOW_NON_UNIFORM_RESOURCES(0x0200_0000). Passing those bits verbatim causes PCCreateRootSignatureto fail and fall back to an empty root signature, breaking anyCreateCommandSignatureor draw/dispatch that references root parameters; meanwhilelayout_from_blobstill packed inline SGPRs whenFORCE_MEMORY_BASED_ABIwas set.What is in it
crates/xcl/src/hle/d3d12x/console_list.rs: addFORCE_MEMORY_BASED_ABI(0x0100_0000) /XBOX_ROOT_SIGNATURE_FLAGS(0x0300_0000) andpc_root_signature_blob(which clears0x0300_0000in theRTS0chunk and recomputes the DXBC retail MD5 container hash); spill all root parameters into memory inlayout_from_blobwhenFORCE_MEMORY_BASED_ABIis set; add unit testforce_memory_based_abi_spills_all_parameters_and_strips_xbox_flags.crates/xcl/src/hle/d3d12x/real.rs: passpc_root_signature_blobto PCCreateRootSignatureindev_create_root_signaturewhile keeping the original console blob forconsole_list::note_root_signature; add WARP testroot_signature_tests::dev_create_root_signature_strips_xbox_flags_and_keeps_parametersverifying raw PCCreateRootSignaturerejects0x0300_0000, the hooked call succeeds with root parameter 0 intact forCreateCommandSignature, andlayout_ofrecords all parameters spilled.Tested
rustc 1.99.0 (b940084d7 2026-09-28), DXC 1.9 (XCL_DXC_DIR), debug for tests and release forxcl-smoke.cargo test -p xcl --lib -- force_memory_based_abi_spills_all_parameters_and_strips_xbox_flags dev_create_root_signature_strips_xbox_flags_and_keeps_parameters --nocapture): 2 passed, 0 failed, 0 skipped (both fail before the fix).cargo test --workspace -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip uma_driver::tests::): 2588 passed, 0 failed, 49 ignored.SKIPPEDGPU tests on this adapter (26 total): 21no wave64(RTX 5070 Ti is wave32), 3 wave32 per-lane#1426f16/cvt-f16 refusals, 2no heap windows(opt-inXCL_HEAP_WINDOWS=1).ea3b5e4d) 150 s regression run below (0device removals,0crashes,1901frames vs1695onmain,32269 MBpeak commit vs31546 MBonmain).Regression run
Not tested
0x0100_0000/0x0200_0000set (theea3b5e4dsmoke is a regression check only; root-signature flag stripping andFORCE_MEMORY_BASED_ABIspilling are covered by the unit and WARP device tests).uma_driver::tests::(skipped locally due to pre-existing0x7C10003exit on NVIDIA) andtest_title_runs_and_game_folder_is_untouched.AI use