d3d12x: implement console command allocator, queue, and command list slots #1274
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1274
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1274"
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?
@rdj415 on GitHub · 2026-11-24 14:05 UTC · original
rdj415:d3d12x-console-vtable-slots→main· +502 −16 · 3 files · 6 commits · openWhat is in it
Merged
upstream/main(06c9f55) intod3d12x-console-vtable-slotsatf3d1c40, resolving conflicts incrates/xcl/src/hle/d3d12x/list_x.rsandcrates/xcl/src/hle/d3d12x/real.rswhile preserving both the PR's console slots/tests andupstream/main's(129, 127)DispatchMeshmapping, occlusion tracking, and sampler-heap tests:#9(real.rs):SetAllocationCallbackX(callback, context)validatesthisand logs/returnsS_OKon valid allocators (E_INVALIDARGon null).#29older /#31newer (real.rs,device_x.rs): widenedqueue_dispatch/QUEUE_SLOTSto 5 arguments afterthisand wired slot 29 (31 underQUEUE_SHIFTED) todevice_x::update_page_mappings_xfor 64 KiB VA page-pool mapping/unmapping and parameter validation.real.rs,list_x.rs,device_x.rs):#124/#126RSSetShadingRateand#125/#127RSSetShadingRateImage: clamp base shading rate / combiners, queryD3D12_FEATURE_DATA_D3D12_OPTIONS6VSR caps (variable_shading_rate_caps) andID3D12GraphicsCommandList5support, track state inBindings, and restore acrossKickoffX.#131FlushGpuCacheRangeXand#132FlushShaderCacheRangeX: emit global UAV barriers when flags and size are non-zero.#73/#75,#99/#101,#140/#142state/hint slots recorded in command-list bindings andNEWER_LIST_SLOTS.Tested
All checks run on commit
f3d1c40(Windows 11, NVIDIA GeForce RTX 5060 Ti, 0 compiler warnings):./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --skip fuzz_validate_and_gpu:xcl --lib1198 passed; 0 failed; 26 ignored; 4 filtered out, plus all workspace test binaries passed (0failures:bcpack_parity1,console_dlls_e2e13,console_shaders3 / 4 ignored,d3d12_mesh_stream3,d3d12_resource_and_sync3,disasm_e2e7,e2e2 / 1 filtered out,gpu_compute_e2e4,gpu_pso_e2e7,heap_probe0 / 4 ignored,launcher_e2e6,low_va1,pls_quota1,predication_e2e1,rpf_e2e2,shaders_e2e6,sparse_reinit1,texture_states1,xg_oracle6 / 12 ignored).XCL_ADAPTER=warp cargo test -p xcl --lib -- --test-threads=4:1202 passed; 0 failed; 26 ignored.cargo build --release -p xcl: clean build (0warnings).Regression run
Head (
f3d1c40,cargo build --release -p xcl):Main (
06c9f55,upstream/mainancestor):Not tested
test_title_runs_and_game_folder_is_untouched(proprietary test-title fixture) andfuzz_validate_and_gpu(0x8007000Epre-existing on local RTX 5060 Ti driver) were skipped in./scripts/test.ps1.XCL_SAMPLE_RPF,XCL_SAMPLE_DLLS,XCL_SAMPLE_TTPF,XCL_SAMPLE_BCPACK,XCL_SAMPLE_BK2,XCL_SAMPLE_BVH4,XCL_SAMPLE_AWC,XCL_SAMPLE_XG,XCL_SAMPLE_DXC) were skipped because sample env vars are unset.no wave64).AI use
Merge conflict resolution, verification, and PR description updated with Gemini 4 Hydrogen.
06c9f55) into d3d12x-console-vtable-slots f3d1c4008d@DavidM1911 on GitHub · 2026-11-24 14:08 UTC · original
Heads-up: this currently conflicts with
mainincrates/xcl/src/hle/d3d12x/list_x.rs(main moved under it — e.g. the copy-scratch/allocator changes). Needs a rebase before it can merge; the diff itself is large (~576 lines) so a split may also help review.@futurepro62 on GitHub · 2026-11-24 14:17 UTC · original · edited 2026-11-24 14:31 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
839f4bc(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 757 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.update_page_mappings_x_maps_unmaps_and_validates,shading_rate_and_combiner_sanitization,console_list_state_slots_track_and_reset,queue_slot_31_on_newer_layout_dispatches_update_page_mappings,allocator_slot_9_registers_and_clears_callback,newer_list_slots_cover_shifted_console_methods.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 757 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@rdj415 on GitHub · 2026-11-24 14:46 UTC · original
resolved the conflict in list_x.rs (
839f4bc) and updated the PR description with the smoke logs. thanks for running the full test suite @futurepro62! @DavidM1911 let me know if you still want me to split this into two PRs or if it's good to review as-is.@Royalflamejlh on GitHub · 2026-11-24 15:17 UTC · original
Linux (Wine + vkd3d-proton) + NVIDIA test of
839f4bconmain930e8b4+ #684, 2 runs of 140 s each way of a retail title: all eightd3d12_xs.dllstubs these runs call (about 9,500 calls a run) were gone with it, and the runs were otherwise the same, ending at the title's watchdog near 131 s as without it.Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch,
VKD3D_CONFIG=ignore_shared_fence. RTX 4070 12 GB (driver 615.71.09, 32-lane waves), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled tox86_64-pc-windows-gnu(rustc 1.98.0), DXC 1.9.2609.5,XCL_NETWORK=0,XCL_PSO_PRELOAD=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s throughXCL_PRESS_AT.839f4bcmerged ontomain930e8b4+ #684 (e56dbc3) without conflicts; #684 is there becausemainalone faults incopy_frombefore this point.Tested
930e8b4+ #684, run 1 / 2839f4bc, run 1 / 2d3d12_xs.dllslotsgame+0x23cf683UpdatePageMappingsXwarnings0x89240009)The eight slots were allocator #9 (2323 calls in the second run), queue #31 (339), and list #75 (2210), #101 (10), #126 (2209), #131 (9), #132 (5) and #142 (2397). With the change the log has, once each:
A third run with it (75 s, frames kept) showed the same loading picture at 65 s as a run of
mainat the same second. These runs do not reach the world, so they do not show what the shading rate does to a rendered scene.The failed DirectStorage requests come in bursts from 78 s and their count differs from run to run on
maintoo (3 to 2032 in five 100 s runs of67a3735+ #684 here; #549 is about them). I do not put the 2140 down to this change.Read
list_x.rs:2815andreal.rs:5105: onmainonly the older layout's #124 and #125 reached the PC list (real.rs:843). This title uses the newer layout, so its about 2,200RSSetShadingRatecalls a run reach the driver for the first time with this change. That is the one part of the diff that changes what is drawn; the cache flushes add 14 global UAV barriers a run (list_x.rs:2735).device_x.rs:643:GPU_PAGE_MAPPINGSis filled at:706and pruned at:675, and read only by the test helper at:768.ALLOC_CALLBACKS(real.rs:4989) and the three list fields set atlist_x.rs:2830,:2835and:2840are likewise written and never read outside the tests. Is a reader planned? As it stands these five slots answerS_OKand keep state nothing uses, which is about half of the 576 lines.real.rs:957: #1109 gives allocator #9 a handler too, one that logs the callback and stores nothing. Only one of the two is needed.Not tested: past 140 s and the world (this 12 GB card is full from 76 s); a card without variable rate shading; the preload of #690 on; the rest of the test suite; AMD and Intel.
AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the runs with
XCL_PRESS_AT, compared the logs and frames and wrote this report.@rdj415 on GitHub · 2026-11-24 18:24 UTC · original · edited 2026-11-24 18:35 UTC
@Royalflamejlh Thanks for the thorough review and the Wine + vkd3d-proton comparison!
Addressed the feedback in
ce54621and mergedupstream/main(9e3831e) in15fab80:crates/xcl/src/hle/d3d12x/device_x.rs: droppedGPU_PAGE_MAPPINGSand the test-onlygpu_page_mapping_for_testhelper while keepingRegisterPagePoolX/UnregisterPagePoolXpool tracking and full descriptor / 64 KiB pool-range validation (S_OK/E_INVALIDARG) inupdate_page_mappings_x.crates/xcl/src/hle/d3d12x/list_x.rs: droppedpipeline_flag,quad_sample_mask, andclear_batch_hintfromBindings;set_pipeline_flag_x(#73/#75),set_clear_batch_hint_x(#99/#101), andset_quad_sample_mask_x(#140/#142) are now plain no-op stubs without lockingLISTS.crates/xcl/src/hle/d3d12x/real.rs: droppedALLOC_CALLBACKSand its cleanup fromalloc_release.#9(#1109):alloc_set_allocation_callback_xis now reduced to the same minimalE_INVALIDARG/S_OK+ log-once stub (Kind::CommandAllocator => vec![(9, alloc_set_allocation_callback_x as usize)]). Happy to drop allocator#9from this PR altogether if#1109is going to land first—let me know your preference.upstream/main(9e3831e) cleanly in15fab80(keeping bothupdate_page_mappings_x_maps_unmaps_and_validatesandallocation_info_of_several_is_padded_to_the_largest_alignmentindevice_x.rs), re-rancargo test -p xcl --lib -- --nocapture(733 passed, 0 failed, 21 ignored; 2 wave64 tests skipped on RTX 5060 Ti), and updated the PR description with paired 60 sscripts/smoke.ps1runs.xapu/MSOpusDecoder).@humsterbumster on GitHub · 2026-11-24 22:59 UTC · original · edited 2026-11-24 23:01 UTC
Linux (Wine + vkd3d-proton) + NVIDIA test of
15fab80(current head) on its base9e3831e, two runs each way of a retail title: the sevend3d12_xs.dllslots these runs call are gone with it, and the runs are otherwise unchanged — menus at 30 fps, then the title's own exit atgame+0x22106e0at 10.1–11.8 s.Setup: Ubuntu 24.04.2 LTS, kernel 7.3.5-arch1-1; Wine 11.0 (Proton Experimental 11.0-20261014) with the vkd3d-proton it ships, DXVK
dxgi,WINEDLLOVERRIDES=d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b,VKD3D_CONFIG=ignore_shared_fence. NVIDIA GeForce RTX 5090 (32,607 MiB, waves of 32 lanes), driver 620.73.04. Release, cross-compiled tox86_64-pc-windows-gnu(rustc 1.100.0), DXC 1.9.2609.5,XCL_NETWORK=0,XCL_RUN_SECONDS=900,XCL_ACTIVITY=1; no otherXCL_*knobs. Retail title 1.0.2.1 (930.048.020-vb_sub_story, TitleID 7952987a), Series X, no input sent. Each build: two runs, cold then warm, one data directory each.Tested
9e3831e(base), run 1 / 215fab80(this PR), run 1 / 2d3d12_xs.dllslots0x80000003)game+0x22106e0, 10.1 s / 11.7 sgame+0x22106e0, 10.1 s / 11.6 s0x89240032)The seven slots are allocator #9 (17 calls a run), list #75 (16), #126 (16), #142 (16), #131 (6), #132 (5) and queue #31 (1).
called_stubsinreport.jsonlists all seven without the change and is empty with it. Plainmain689f2dbruns the same way as the base: 133 / 120 frames presented, 7 slots, same exit site at 10.2 s / 11.8 s.Read
0x80000003atgame+0x22106e0(rcx=0,rsi=0, vtablegame+0x61ecde0; on the stackgame+0x247f991,game+0x78d57e0,game+0x2499f0d,game+0x4f4221d,game+0xfa00e2,game+0x18981). Its own Backtrace crash reporter then runs for ~4 s — its upload is refused byXCL_NETWORK=0— and the process ends with the same status. Same site in all six runs.+0x2215c35reporter exit in #746/#232, and the exception there is a0xc0000005null write, here an int3. Whether the two are the same reporter family is not established by these runs.0x89240032(E_ZLIB_DATA, 64 KiB reads fromshaders.rpf) in every run, with and without the change.WINEDEBUG=err,warn) logged no vkd3d-proton assertion: its 48,749 lines hold 11err:and 12warn:lines, the restfixme:, and the crash is the same.Not tested: the six tests this pull request adds; any run past the exit; the world; Windows, AMD and Intel; Series S mode; the rest of the suite.
AI use: pi (Qwen3.8-27B) built both trees, ran the six runs and read the logs and
report.json; the numbers above are from those logs.@thiagocalile on GitHub · 2026-11-25 16:45 UTC · original
Independent test report for head
f3d1c4008d86913d7125d02b3908b9335715fc77on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- list_x --test-threads=4: 36 passed, 0 failed, 0 ignored (0skipped).Regression run (
scripts/smoke.ps1 -Seconds 60, release builds,XCL_ADAPTER=radeon)main(06c9f55):PR
#1274(f3d1c40):Not tested: full workspace test suite on this head, NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window.
AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
@oni-swr on GitHub · 2026-11-25 17:27 UTC · original
AMD run on
f3d1c400(PR head, merges cleanly intomain68a284a; I tested the head as it is, not the merge).Machine: AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0
x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug build, clean checkout, noXCL_SAMPLE_*.Tested
cargo test -p xcl --lib d3d12x: 223 passed, 0 failed, 2 ignored.cargo test --workspace --no-fail-fast -- --test-threads=4: 1269 passed, 2 failed, 46 ignored, 7SKIPPEDlines (f16 and f32 conversion per-lane forms refused, and one test with no heap windows).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU0x7fffffff) fails the same way onmain68a284a, so it is not this PR's.hle::kernelx::tests::fine_timer_makes_short_sleeps_shortfailed in the parallel run and passed when I reran it alone on this head and onmain; it looks like a timing flake under load.Not tested
scripts/smoke.ps1pair, so the PR'sxcl-smokeregression run is not covered here.AI use: Claude Code (Claude Sonnet 5.5) ran the commands and wrote this report for oni-swr.
@DavidM1911 on GitHub · 2026-11-26 04:41 UTC · original
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.github-bot referenced this pull request2026-11-26 16:21:43 +00:00
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.