D3D12.X: console list #31 SetPredication gets its placement delta and survives kickoffs #1349
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!1349
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1349"
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?
@emirduran707 on GitHub · 2026-11-24 15:08 UTC · original
emirduran707:d3d12x-console-set-predication→main· +161 −1 · 2 files · 2 commits · openConsole command lists'
SetPredication(#31) went straight to the PC's #55 (console_remap); no XCL code ran on it. That broke two things.place_at_title_addressrecordsbuffer_delta), and every other PC method that takes a buffer offset adds it: ResolveQueryData, CopyBufferRegion, CopyTextureRegion, ExecuteIndirect. A title that resolves an occlusion query intobufatoff, then predicates onbufatoff(the pair in Microsoft's predication sample), had the result written atoff + deltabut the predicate read atoff.What is in it (two commits)
D3D12.X: list #31 SetPredication adds the buffer's placement delta:set_predication_xinlist_x.rs, installed at slot 31 inreal.rs;set_predication_x_adds_the_buffer_deltaandtitle_slot_31_runs_set_predication_x.D3D12.X: KickoffX and mid-list splits keep #31 SetPredication:restore_bindingson direct and compute lists. The last of #31 and #85 wins; #85's copy into its own buffer switches #31's predicate off first;set_predication_x_is_restored_after_a_pc_reset.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on96ecec1(rebased ontomain1a0bbe3): 1251 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmain1a0bbe3on this GPU (seeds 722 and 1599).(buffer, 528, 1). With the changes they pass.Regression run
main:
this PR:
Not tested
AI use
main1a0bbe3(a conflict in the test modules at the end ofcrates/xcl/src/hle/d3d12x/real.rs; both kept) and reran the suite and smoke runs above.🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 15:14 UTC · original · edited 2026-11-24 15:19 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
6337e42(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 754 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.set_predication_x_adds_the_buffer_delta,set_predication_x_is_restored_after_a_pc_reset,title_slot_31_runs_set_predication_x.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 754 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 16:17 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (One run showed a single flaky failure / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@thehollowedone on GitHub · 2026-11-25 09:16 UTC · original
Independent Windows check on 6337e42. RTX 3080 Ti (621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC 1.8.2502.11.
The clean
cargo build --workspace --offline --locked -j 4passed.cargo test --workspace --offline --locked --no-fail-fast -j 4 -- --nocapture --test-threads=4finished with 754 passed, 0 failed, 41 ignored. Cargo's pass count includes two native wave64 runtime skips. The three stock #31 tests passed.A scratch fixture called the #31 implementation with an injected 8-byte placement delta on a real D3D12 direct list. Offset 0 would have read a nonzero value, while translated offset 8 read zero. GPU readback showed the conditional copies were suppressed both before and after
KickoffX. A marker observed after a fence and before the final submission confirmed that kickoff actually submitted the first segment. The null-predicate and nonzero controls both copied successfully. Removing only the binding replay made the copy after kickoff execute and failed the readback assertion. The focused test filter waslocal_native_predication_survives_kickoff_with_placement_offset. It passed with the D3D12 debug layer enabled and no skips.This probes the #31 implementation and real kickoff, with slot mapping covered by the stock test. No guest ABI call, mid-list wait split or retail smoke was run. AI use: Codex (GPT-6, exact variant unspecified) wrote the fixture, ran the checks and drafted this report.
@thehollowedone on GitHub · 2026-11-26 04:03 UTC · original
Finding after comparing this PR with current
main(b49be18): #1349 tracks nativeSetPredicationthrough console slot #31, but the deferred path added by #2118 currently restores only descriptor heaps. A predicate stored inBindingstherefore is not reapplied to a deferred segment by #1349 alone.The newer
restore_bindingschange in #2611 should carry it when both changes are integrated, but the existing #1349 tests cover KickoffX and mid-list reset, not a pending deferred draw or dispatch. A focused regression could set #31, defer anExecuteIndirectwith a pending pipeline, and verify the predicate and adjusted offset are restored before replay; the same check would cover #2118's deferred dispatch path.I did not find another open PR for the native #31 tracking. AI-assisted.
@DavidM1911 on GitHub · 2026-11-26 04:53 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@emirduran707 on GitHub · 2026-11-26 09:21 UTC · original
Thanks for checking against
mainb49be18and flagging the#2118/#2611interaction @thehollowedone!Confirmed:
#1349stores the translated native#31predicate inBindingsand reapplies it onKickoffXand mid-list splits, while#2118's deferred compute path currently only restores descriptor heaps and#2611is extending that path to fullrestore_bindings. Keeping#1349focused on slot#31+KickoffX/ mid-list splits avoids conflicting with#2611while both are open; if#2611merges first, I will rebase#1349onto it and add a deferred-replay regression covering#31predication (and if#1349merges first,#2611'srestore_bindingswill carry it automatically).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.