Repository navigation
D3D12.X: fix async compute PSO tracking, initial PSO binding, DrawIndexedX, and KickoffX MRT restore - #102
Merged
ivall merged 1 commit intoNov 23, 2026
Conversation
…xedX, and KickoffX MRT restore
This was referenced Nov 23, 2026
Collaborator
|
Merged. It conflicted with #99 in |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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(hle/dstorage: fix queue error reset, event handle duplication, close/release races, and pointer validation #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.