D3D12.X: fix async compute PSO tracking, initial PSO binding, DrawIndexedX, and KickoffX MRT restore #102
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!102
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/102/head"
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?
@raylitebull on GitHub · 2026-11-23 11:13 UTC · original
raylitebull:fix/d3d12x-async-compute-and-bind→main· +757 −38 · 6 files · 1 commits · merged 2026-11-23 11:25 UTCSummary
Fixes 4 D3D12.X command-list binding and async compute PSO bugs in
crates/xcl/src/hle/d3d12x/{real.rs, bind.rs, device_x.rs, list_x.rs, console_list.rs}:Async compute PSO registration & failure handling (
real.rs,bind.rs,console_list.rs):dev_create_compute_psoregistered the stand-in PSOSinTRANSLATED_COMPUTEon cache miss, whiletranslated_compute_psonever registered the real compiled PSOR(unliketranslated_graphics_pso). As a result:bind::execute_indirectresolvedS -> R, sawis_translated_compute(R) == false, and skippedbind_abicompletely.build_computefailed (real == 0),Sremained inTRANSLATED_COMPUTEsobind::dispatchbound XCL's ABI root signature + 6 UAVs onto stand-inS(which uses the title's root signature).note_translated_compute(hr, ppv)intotranslated_compute_pso(matchingtranslated_graphics_pso), removed stand-in registration, and resolvedpso_async::resolve_waitbeforeis_translated_computeso completed async compute PSOs bind the ABI cleanly and failed builds skip safely.Initial PSO & root-arg state tracking on
CreateCommandList,Reset, andClearState(bind.rs,device_x.rs,list_x.rs,real.rs):bind::reset(list, allocator, initial_pso)now setss.pso = initial_psoand clears stale compute/graphics root layouts & arguments.bind::clear_state(list, pso)wired intoreal::cl_clear_state, resolvedpsoviapso_async::resolve_for_bindindevice_x::create_listandreal::cl_reset, and calledbind::forget(this)on final command-listRelease.DrawIndexedX(#81) routing throughbind.rs(list_x.rs):list_x::draw_indexed_xthroughsuper::bind::draw_indexed_instanced(this, count, 1, 0, 0, 0)instead of invoking raw PCDrawIndexedInstanceddirectly, ensuring translated console graphics pipelines bind the XCL ABI root signature and user SGPRs onDrawIndexedX.KickoffXMRT render-target restoration forRTsSingleHandleToDescriptorRange != 0(list_x.rs):D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8) inRenderTargetswhensingle != 0, sorestore_bindingspassesrt.num_targetsinstead of hardcoding1and dropping MRTs 1..N.Testing
bind::tests::reset_and_clear_state_track_initial_pso_and_clear_root_argsbind::tests::async_compute_pso_success_and_failure_in_dispatch_and_execute_indirectbind::tests::create_list_reset_and_clear_state_track_initial_pso_on_d3d12list_x::tests::draw_indexed_x_routes_through_bind_and_restores_index_bufferlist_x::tests::kickoff_x_render_targets_preserve_mrt_count_for_single_descriptor_rangegpu_compute_e2e::async_compute_pso_registers_real_pso_and_not_standin(cold-cache DXC + real D3D12 compute dispatch)32.0.32015.2008(D3D12 GPU tests verified on AMD only).origin/main(60599a9):cargo build --workspaceandcargo test --workspace -- --test-threads=4pass with 0 failures and 0 new warnings.@ivall on GitHub · 2026-11-23 11:25 UTC · original
Merged. It conflicted with #99 in
list_x.rstests (both appended tests at the end of the module); resolved keeping both. Merged together with #95–#102 and checked on Windows 11 with an RX 9070:cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; XDefiant (title screen, a scripted A reaches its "Xbox network unavailable" dialog), Unicorn Overlord and Minecraft run. Thanks!