D3D12.X: a freed descriptor range at the cursor serves requests into the tail #1970
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!1970
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1970/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?
@brandostrong on GitHub · 2026-11-25 00:07 UTC · original
brandostrong:cursor-straddle→main· +49 −2 · 1 files · 1 commits · merged 2026-11-25 01:57 UTCThe shared console descriptor heap reported itself full while a contiguous run was free: a freed range ending exactly at the allocation cursor is contiguous with the never-used tail, but
take_rangechecked the freed list and the tail separately and refused requests larger than the freed range — the false-exhaustion shape a public sibling project reported for the same allocator design (Marvisak/VIctory#871; facts only, no code ported). Part of the D3D12.X contract line claimed on #1269.What is in it
crates/xcl/src/hle/d3d12x/console_heap.rs:take_rangetakes a freed range that ends at the cursor whole and bumps the cursor over into the tail;release_globalmerges touching released ranges (merge_release) so first-fit sees whole runs; two unit tests (cursor straddle, release merge)Tested
cargo build --workspace+cargo test --workspace -- --test-threads=4on527e7dd: 988 passed, 0 failed, 45 ignored; 22 SKIPPED, all adapter limits of this wave32 card (the wave64 lowering/comparison GPU tests andheap_window_out_of_memory_falls_back_to_the_switch_form); head646b439is the same code with a shorter comment header, and it builds release cleanSome(8)for exactly the input the old code returnedNonefor (freed 4 at the cursor, 4 of tail, request 8) — it pins the fixed shapeRegression run
main
62265d3:head
646b439(no uncommitted changes):Not tested
AI use
🤖 Generated with Claude Code
@raylitebull on GitHub · 2026-11-25 00:55 UTC · original
Code review on
646b439:take_rangeincrates/xcl/src/hle/d3d12x/console_heap.rscleanly bridges a freed range ending at*nextinto the unused tail (usingu64for the sum check),release_globalearly-returns oncount == 0, andmerge_releasesorts and coalesces adjacent freed ranges so multi-release runs stay contiguous.What is still needed before merge: Independent AMD and NVIDIA verification (currently author RTX 4090 only).
@futurepro62 on GitHub · 2026-11-25 00:57 UTC · original · edited 2026-11-25 01:18 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
646b439(on its base62265d3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 978 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.a_freed_range_at_the_cursor_continues_into_the_never_used_tail,released_ranges_touching_one_another_merge_into_one.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 987 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main7994cd1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@JJAutoCompare on GitHub · 2026-11-25 01:45 UTC · original
PR #1970 verification on STOR-WINLAB
PR head
646b439e195f401cfa0890bedea428d26d7d10d8, fetched fromoriginatrefs/pull/1970/headand confirmed again after the run.origin/mainwas86719eec1e9fc4c36c5fb568ec4951fd47a31b88.git merge-tree --write-tree origin/main HEADexited 0 and returned tree489a13a21ef8eb44e6c33150e4d41c20b0627b23.What is in it
crates/xcl/src/hle/d3d12x/console_heap.rslets a descriptor allocation span a freed range at the cursor and the unused tail. It also coalesces adjacent released ranges. The two new tests exercise these paths.Tested
26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB, driver32.0.101.9175, waves 8–32,DoublePrecisionFloatShaderOps=0. DXC and DXIL1.9.2609.5. Rust1.100.0 (0ef1bc386 2026-11-09). Debug profiles with debug info and incremental compilation disabled.L:\XclTooling\neon-slot-4\source. The worktree was clean before and after testing.cargo build --workspaceandcargo test --workspace --no-runsucceeded outside the GPU lock.cargo test -p xcl --lib a_freed_range_at_the_cursor_continues_into_the_never_used_tail -- --show-outputandcargo test -p xcl --lib released_ranges_touching_one_another_merge_into_one -- --show-outputeach reported 1 passed, 0 failed, 0 ignored, and 0 explicit skips outside the GPU lock.L:/XclTooling/Invoke-ArcTest.ps1with process-local execution policyBypass:cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputexited 101 after all 20 targets reported. Libtest reported 963 passed, 25 failed, 45 ignored. The log contains 25 explicitSKIPPEDentries. Libtest can include skipped cases in its pass count. Those cases provide no coverage for the skipped paths.Failures
CreateComputePipelineStatereturned0x80070057in 20 unit tests:gpu::dxil::fuzz_tests:fuzz_validate_and_gpu_0(seed 2),fuzz_validate_and_gpu_1(506),fuzz_validate_and_gpu_2(1003),fuzz_validate_and_gpu_3(1501).gpu::dxil::ops_tests:doubles_match_cpu,groupshared_barrier_and_atomics_run.gpu::dxil::round_tests:gpu_direct_f32_round_modes_dynamic_and_denormals,gpu_direct_f32_round_modes_static.gpu::recomp::lower_dxil::tests:f64_programs_on_the_gpu.gpu::recomp::tests:gpu_clamp_and_omod_per_instruction,gpu_f64_class_compare,gpu_f64_compares_with_nan,gpu_f64_literal_high_word,gpu_f64_math_random,gpu_f64_roots,gpu_f64_rounding_and_conversions,gpu_float_compares_random,gpu_frexp_f64_exp_and_mant,gpu_ldexp_f64,gpu_rndne_f64.gpu::recomp::tests:gpu_nonfused_mad_and_mac_prevent_fma_contractionreturned infinity in the fused overflow control,gpu_ps_image_sample_offset_implicit_lod_between_mipsgave 25.609375 vs 26 at pixel (0,0),gpu_valu_16_and_64_bitzeroed the value in the lane 0v_add_f16high-half preservation check, andgpu_wave64_ps_whole_wave_reductionsgave[2, 217, 2]vs[2, 216, 2]at pixel 0 on 16-lane waves.e2e::test_title_runs_and_game_folder_is_untouchedfailed the synthetic title'sRSSetDepthBiasX(-1000.5)depth check (#94). The top-right pixel was blue, with green expected.Explicit skips
Not tested
mainand real-titlescripts/smoke.ps1runs on either commit are outside this run. The observed failures have no same-host baseline for attribution.XCL_SAMPLE_RPF,XCL_SAMPLE_TTPF, andXCL_SAMPLE_AWC, and unavailable audio, system XGameRuntime, or heap windows.AI use
T3 Code / Codex (
gpt-6.2-sol) ran the build and tests and drafted this report. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified the counts againstpr1970-suite.logand published this report.@DavidM1911 on GitHub · 2026-11-25 03:09 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!