Skip to content

D3D12.X: size two-pass indirect buffers from GPU feedback and finer buckets - #2816

Open
coolpersonnn wants to merge 2 commits into
xcl-dev:nvidia-devfrom
coolpersonnn:ws2/two-pass-feedback-sizing
Open

coolpersonnn wants to merge 2 commits into
xcl-dev:nvidia-devfrom
coolpersonnn:ws2/two-pass-feedback-sizing

Conversation

@coolpersonnn

@coolpersonnn coolpersonnn commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Size two-pass indirect mesh record buffers from async GPU group-count feedback and 256 KiB half-step buckets instead of worst-case static over-allocation.

Stacked on #2815; only the top commit belongs here.
Part of #2688

What is in it

  • crates/xcl/src/hle/d3d12x/alloc_pool.rs: poll poll_two_pass_feedback() during allocator reclaim/trim so completed GPU feedback counters update before new indirect draws size their buffers.
  • crates/xcl/src/hle/d3d12x/bind.rs:
    • Switch SCRATCH_BLOCK and RECORD_MIN to 256 << 10 (256 KiB) with finer half-step record_buffer_bytes buckets.
    • Eliminate cold-start clamping in indirect_record_need_hint so first-seen indirect PSOs keep full worst-case capacity rather than dropping initial geometry.
    • Track a 16-window FEEDBACK_HISTORY (ever_nonzero) in IndirectFeedbackSlot so active frustum-culled PSOs stay warm while truly unused PSOs decay down to 256 KiB (RECORD_MIN), and stop readback/feedback polling cleanly on FenceState::Removed (u64::MAX / q.Signal failure).
    • Add 2-dword header readback (FEEDBACK_HEADER_U32S = 2) reporting exact TP_INDIRECT_CLAMPED and TP_INDIRECT_GROUPS_DROPPED diagnostics, wire feedback into defer_execute_indirect, bound oversized buffer reuse to [need .. need * 2] in ensure_res_buffer, and add 4 unit/GPU tests (including matching gpu_two_pass_pooled_scratch_respects_remaining_budget WARP adapter expectations).
    • Diff size note (+757/-79 across the commit: 514 runtime lines via alloc_pool.rs +2 and bind.rs +465/-47, plus 322 test lines +290/-32): kept in one commit because the 256 KiB half-step buckets, IndirectFeedback readback/header clamp counters, HLSL scaling wiring, and removal/fence guards form one cohesive feedback-sizing change that would otherwise break git bisect across partial states.

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 5090 (driver 32.0.16.2101, 32187 MiB VRAM, wave32 / split wave64), WARP (software renderer), AMD Ryzen 9 9950X3D, Windows 11 Pro (10.0.26300), rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.8.2502.11.
  • Targeted suite on clean 862b1ed1:
    • cargo test --offline --locked -p xcl --lib -- hle::d3d12x::bind hle::d3d12x::alloc_pool --test-threads=4 (NVIDIA + WARP): 72 passed; 0 failed (1 opt-in SKIPPED: hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)).
    • With XCL_HEAP_WINDOWS=1: two_pass_binds_set_the_shared_view_heap 1 passed; 0 failed.
  • Clean workspace release build + test suite (cargo build --offline --locked --release --workspace && cargo test --offline --locked --release --workspace --no-fail-fast -- --test-threads=4) on RTX 5090:
    • 862b1ed1 (this PR): total_passed=1823, total_failed=13, total_ignored=48, skips=27 (xcl lib: 1696 passed; 7 failed; 28 ignored).
    • Baseline nvidia-dev (eae01502): total_passed=1812, total_failed=13, total_ignored=48, skips=27 (xcl lib: 1685 passed; 7 failed; 28 ignored).
    • Zero new failures: all 13 failures match pre-existing RTX 5090 baseline (fuzz_validate_and_gpu_{0,1,2,3}, gpu_compute_thread_limits_leave_the_lanes_past_them_out, texture_upload::{pieces_hold_the_texels_of_their_levels, gpu_parts_of_a_texture_go_up_and_the_rest_stays}, console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly, async_compute_pso_registers_real_pso_and_not_standin, split_compute_prefers_the_offline_whole_pipeline x2, two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs x2).
    • 27 SKIPPED GPU tests on RTX 5090: no wave64 (20), wave32, per-lane form: refused (3), no heap windows (2), cannot disable the driver cache (1), plus opt-in XCL_HEAP_WINDOWS=1 skip above (1).
  • 60 s retail startup smoke (scripts/smoke.ps1, title: a93b40d7, RTX 5090, XCL_PREPARE=0): 862b1ed1 produced 1666 frames (PresentX 1666), 0 device removals, 0 crashes, 16149 MB peak commit vs nvidia-dev eae01502 (1628 frames, 15793 MB peak commit) and main b49be183 (1654 frames, 16446 MB peak commit).

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5090
title: a93b40d7
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16446 MB
xcl-smoke v1
commit: 862b1ed1e7993ee0cab3ef19e33796a97b18c569
gpu: NVIDIA GeForce RTX 5090
title: a93b40d7
seconds: 60
exit: 0x0
frames shown: 1666 (PresentX 1666)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16149 MB

Not tested

AI use

  • T3 Code / Antigravity (gemini-pro-orchestrator-neon) and Codex (GPT-6.2 Sol) wrote and reviewed the feedback-sizing fixes, tests, and PR description; all builds, tests, and smoke runs were executed directly on local hardware.

@jeremiahmvze

Copy link
Copy Markdown

Test note from porting this onto another nvidia-dev-based branch (the code applied cleanly after #2815): the new feedback tests are not safe to run in parallel.

  • cargo test -p xcl --lib bind:: -- --test-threads=1: 40 passed.
  • With 4 test threads, 1 to 3 of these fail on each run:
    • indirect_feedback_waits_for_submit_before_copyback
    • indirect_feedback_copyback_grows_on_clamp_and_decays_over_windows
    • gpu_scale_args_reports_uncapped_group_count_feedback (a panic on the FEEDBACK lock)

They all use the process-wide FEEDBACK / FEEDBACK_ACTIVE statics, so one test's entries and on/off state leak into another's. Holding one shared test mutex (or resetting FEEDBACK under a guard) in each of these tests should fix it.

Caveat: this was on our port, not on f163cdc0 itself, and on an RTX 4090. The runtime path isn't affected; it's only the tests.

@DarkPanda69

DarkPanda69 commented Nov 26, 2026 •

Copy link
Copy Markdown

Update for head 862b1ed (with the lock_warp_tests change): applies on nvidia-dev eae0150 again. bind + alloc_pool at --test-threads=4: RX 9070 XT 6 of 6 runs and RTX 3060 4 of 4 runs 72 passed, 0 failed.

Update for head ebd9a37: the flake didn't show up. Tested at the PR head (base still af2cecc; the diff no longer applies on the newer nvidia-dev). hle::d3d12x::bind + alloc_pool at --test-threads=4: RX 9070 XT (XCL_ADAPTER=Radeon) 6 of 6 runs 49 passed, 0 failed; RTX 3060 4 of 4 the same; one thread 3 of 3. At f163cdc it failed in 1 of 6 and 1 of 4 runs, so with a rate that low this is only weak evidence the race is gone; on #2817 the change is clearer (4 of 6 runs failed before, 0 of 6 now).


AMD run (listed as untested), with an RTX 3060 in the same PC. Two of the new tests fail now and then on both cards when the tests run in parallel.

Tested: head f163cdc applied on its base nvidia-dev af2cecc, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, card picked with XCL_ADAPTER.
cargo test -p xcl --lib -- hle::d3d12x::bind hle::d3d12x::alloc_pool --test-threads=4, repeated:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: 1 of 6 runs failed (47 passed, 2 failed); the others 49 passed, 0 failed.
  • NVIDIA RTX 3060, driver 32.0.16.1088: 1 of 4 runs failed, same two tests.
  • gpu_scale_args_reports_uncapped_group_count_feedback and gpu_two_pass_pooled_scratch_respects_remaining_budget pass by name on both cards.

The two are indirect_feedback_waits_for_submit_before_copyback (bind.rs, assertion failed: !fb.dirty && !fb.copy_in_flight) and indirect_feedback_copyback_grows_on_clamp_and_decays_over_windows, which then panics on the poisoned FEEDBACK mutex. They fail more often on #2817, and the details are in my comment there. On one thread, #2817 passed 10 of 10 runs.

As on #2817, XCL_ADAPTER=radeon (lowercase) skips gpu_scale_args_reports_uncapped_group_count_feedback on this card with no D3D12 hardware adapter, because the name match is case-sensitive; Radeon runs it.

Not tested: a title run, release, XCL_HEAP_WINDOWS=1, Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

@ettehn

ettehn commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Confirmed the parallel test failure on the exact head f163cdc0290ff3079e8a507f74ee11f24a4edad2 and checked a test-only fix. RTX 5070 Ti Laptop (12 GB, 621.24), Windows 11 x64 build 26200, Rust 1.97.1 MSVC, DXC 1.8.2502.11.

  • Stock bind::tests: 41 reported passed on one thread, including the default heap-window capability skip. In eight fresh runs at four threads, 3 aborted: indirect_feedback_waits_for_submit_before_copyback first asserted !fb.dirty && !fb.copy_in_flight, then the other feedback tests hit the poisoned mutex.
  • Local test-only change: take the existing lock_warp_tests() at the start of indirect_feedback_copyback_grows_on_clamp_and_decays_over_windows and gpu_scale_args_reports_uncapped_group_count_feedback; the submit-order test already takes it. With those two guards plus the separate fixture below, the four-thread bind suite passed 16/16 fresh runs (42 reported passed, 0 failed, 0 ignored each, including one default capability skip). The skipped two_pass_binds_set_the_shared_view_heap also passed separately with XCL_HEAP_WINDOWS=1, with no skip.
  • Native two-queue fixture: a gate held the producer queue while poll_two_pass_feedback scheduled the readback on a second DIRECT queue. Its copy fence stayed pending until the producer was released. After release, the existing clamped, zero-count and disabled cases read back encoded values 501, 1, and 0. The focused run passed 1/0/0 with no capability skips.

Base command: cargo test --locked --offline -p xcl --lib -j 2 hle::d3d12x::bind::tests -- --test-threads=1 --nocapture; repeats used the same harness with --test-threads=4. Synthetic tests only. OpenAI Codex (6.2sol) assisted with verification.

@Aniseto

Aniseto commented Nov 26, 2026

Copy link
Copy Markdown

Ran the two-pass indirect feedback tests at f163cdc serially on a second Blackwell desktop part after the thread reported parallel-only flakes on this exact head:

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders, 16 GB), driver 32.0.16.2124
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::alloc_pool -- --test-threads=1: 8 passed, 0 failed, 0 ignored (1647 filtered out, exit 0)
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::bind -- --test-threads=1: 41 passed, 0 failed, 0 ignored (1614 filtered out, exit 0)
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::bind::tests::gpu_scale_args_reports_uncapped_group_count_feedback -- --exact --nocapture: 1 passed, 0 failed, 0 ignored (1654 filtered out, exit 0)

What this adds
The author listed an RTX 5090 32 GB (driver 621.01, DXC 1.8.2502.11) and ettehn reported an RTX 5070 Ti Laptop 12 GB (driver 621.24, rustc 1.97). This adds a desktop 5070 Ti 16 GB on driver 32.0.16.2124 with rustc 1.100.0 and DXC 1.9.2609.5. I used --test-threads=1 because the thread reports parallel-only flakes on this head. Both feedback unit tests and the real-adapter gpu_scale_args_reports_uncapped_group_count_feedback test pass here; the latter logged 1 indirect clamped, so the clamp-growth path was exercised on hardware. An earlier --test-threads=4 run of the same filters also passed, but two GPU tests were skipped there because I used a lowercase adapter selector; the serial run above used the exact case and executed them.

Not tested
Native wave64 (this part only has 32-lane waves), AMD and Intel GPUs, WARP, XCL_HEAP_WINDOWS=1 (two_pass_binds_set_the_shared_view_heap was SKIPPED for that reason), the full workspace suite, a paired smoke run, release profile, Wine, a retail title, game data. I did not repeat the author's timing benchmark.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

@GodlyBDS

Copy link
Copy Markdown

@coolpersonnn I reproduced a second fence-ordering case on exact nvidia-dev PR head f163cdc0290ff3079e8a507f74ee11f24a4edad2. Feedback readback keeps its own pending_fences alongside #2815's two-pass buffer retention marks. Both receive submit notifications after the allocator bookkeeping lock is released.

The focused fixture delivers q0=15, q1=2, then delayed q0=10 through two_pass_submitted and schedules the readback on a third queue. The original code generates waits for 10 and 2. With the maximum retained per queue, it waits for 15 and 2. With q0 complete at 13, the original mark therefore permits the readback and clear before the newer producer is confirmed complete.

Results on Windows 10 19045, RTX 3090 Ti host, driver 621.40, rustc 1.98.1 MSVC. The test uses a WARP allocation and synthetic fence values. It inspects the actual scheduled wait list, without executing the copy.

  • Head + test only: 0 passed, 1 failed, 0 ignored, 0 skips. Observed Some(10).
  • Head + test + per-queue maximum: 1 passed, 0 failed, 0 ignored, 0 skips.

cargo test --offline --locked --jobs 4 -p xcl --lib feedback_copy_waits_for_the_newest_submit_on_each_other_queue -- --test-threads=1 --nocapture

The result establishes the stale readback dependency. Its effects on observed clamp counts, scene completeness, and device removal remain unmeasured. Codex (OpenAI GPT-6 family) wrote and executed the fixture and minimal correction.

Focused patch
diff --git a/crates/xcl/src/hle/d3d12x/bind.rs b/crates/xcl/src/hle/d3d12x/bind.rs
index 7f2a8e8d..4e46301d 100644
--- a/crates/xcl/src/hle/d3d12x/bind.rs
+++ b/crates/xcl/src/hle/d3d12x/bind.rs
@@ -1268,8 +1268,11 @@ fn mark_indirect_feedback_used(dev_key: usize, fb_slot: u32, cap: u32, queue: us
             fb.dirty = true;
             if let Some((f, v)) = fence {
                 if let Some(m) = fb.pending_fences.iter_mut().find(|(q, ..)| *q == queue) {
-                    m.1 = f.clone();
-                    m.2 = v;
+                    // The submit bookkeeping lock is released before these notifications.
+                    if v > m.2 {
+                        m.1 = f.clone();
+                        m.2 = v;
+                    }
                 } else {
                     fb.pending_fences.push((queue, f.clone(), v));
                 }
@@ -4949,6 +4952,41 @@ void ms(uint3 g : SV_GroupID) { o.Store((v * 16u + g.x) * 4u, rec.Load(g.x * 4u)
         }
     }
 
+    #[test]
+    fn feedback_copy_waits_for_the_newest_submit_on_each_other_queue() {
+        let _warp_guard = lock_warp_tests();
+        let Some(dev) = warp_device_for_test() else { return };
+        let dev_key = dev.as_raw() as usize;
+        let ids = Box::new([0u8; 4]);
+        let list = ids.as_ptr() as *mut c_void;
+        let q0 = (ids.as_ptr() as usize + 1) as *mut c_void;
+        let q1 = (ids.as_ptr() as usize + 2) as *mut c_void;
+        let copy_queue = ids.as_ptr() as usize + 3;
+        let (f0, _) = make_test_fence(13);
+        let (f1, _) = make_test_fence(1);
+
+        let (target0, target1) = unsafe {
+            reset(list, 0, 0);
+            let (_, slot, _) = prepare_indirect_feedback(&dev, 0x7700_0003).unwrap();
+            with(list, |s| s.fb_uses.push((dev_key, slot, 64)));
+            track_two_pass_list(list as usize);
+            two_pass_submitted(q0, Some(&f0), 15, &[list]);
+            two_pass_submitted(q1, Some(&f1), 2, &[list]);
+            two_pass_submitted(q0, Some(&f0), 10, &[list]);
+
+            let mut feedback = FEEDBACK.lock().unwrap().as_mut().unwrap().remove(&dev_key).unwrap();
+            let (_, _, _, waits) = feedback.schedule_copy(copy_queue).unwrap();
+            let target = |fence: &ID3D12Fence| {
+                waits.iter().find(|(f, _)| f.as_raw() == fence.as_raw()).map(|(_, value)| *value)
+            };
+            untrack_two_pass_list(list as usize);
+            forget(list);
+            (target(&f0), target(&f1))
+        };
+        assert_eq!(target1, Some(2));
+        assert_eq!(target0, Some(15), "copy and clear must wait for the newer producer");
+    }
+
     #[test]
     fn indirect_feedback_waits_for_submit_before_copyback() {
         let _warp_guard = lock_warp_tests();

@coolpersonnn
coolpersonnn force-pushed the ws2/two-pass-feedback-sizing branch from f163cdc to ebd9a37 Compare November 26, 2026 16:35
@Aniseto

Aniseto commented Nov 26, 2026

Copy link
Copy Markdown

Re-ran the two-pass feedback tests at ebd9a37 after the head moved from f163cdc; this is a new response in the same thread, not an edit of my earlier report:

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders, 16 GB), driver 32.0.16.2124
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::alloc_pool -- --test-threads=1: 8 passed, 0 failed, 0 ignored (1647 filtered out, exit 0)
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::bind -- --test-threads=1: 41 passed, 0 failed, 0 ignored (1614 filtered out, exit 0); two_pass_binds_set_the_shared_view_heap SKIPPED (opt-in XCL_HEAP_WINDOWS=1)
  • XCL_ADAPTER=NVIDIA cargo test -p xcl --lib hle::d3d12x::bind::tests::gpu_scale_args_reports_uncapped_group_count_feedback -- --exact --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored (1654 filtered out, exit 0)

What this adds
Since my earlier report at f163cdc the head changed by 79 lines in bind.rs and 2 in README. The counts on this host are unchanged (8/41/1 and the same single skip), and the GPU feedback test was re-executed on the real adapter at this head. This is my second report in the thread and a new response, as required for a changed head.

Not tested
XCL_HEAP_WINDOWS=1, the full workspace suite, a paired smoke run, a real stalled sparse queue, release profile, AMD and Intel GPUs, native wave64, Wine, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

@pvfreis

pvfreis commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

By reading only, not run, at ebd9a37b:

A two-pass ExecuteIndirect can draw fewer groups than at the base, and the draw is counted as run. The base asked for INDIRECT_RECORDS (32 MiB) of records every time. Here indirect_record_need_hint (bind.rs:1034-1040, used at :1788) asks for 4 MiB on a pipeline with no feedback yet, 256 KiB when its recent windows had zero groups, and otherwise twice the largest count of the last four windows. SCALE_ARGS_HLSL still cuts each command to what fits (:1451). For the 47,632 B record of the sizing test that is 704 groups a command at the base, and 88 (cold) or 5 (after zeros) here, unless the list already holds a larger buffer. The hint grows only from the readback of a submit that was already cut (apply_window, :1069; polled per submit, alloc_pool.rs:295, :342), and for a pipeline with history readbacks are at least 250 ms apart (:1201). Until then the groups past the cap are not drawn. The draw is counted under DRAWS (:1824), not DRAWS_SKIPPED; only indirect clamped shows it, as a count of windows, not of groups. The PR's test asserts the cut (case A: 500 groups, 16 drawn). #2688 asks that a saving does not come from skipping work the title asked for, so the indirect clamped count of the world runs belongs next to the skip counts. throny's stack runs on #2817 logged 53 and 189 (there #2817's shrink can clamp too).

AI use: Claude Code; Claude Opus 5.5 wrote it, Claude Fable 5.2 rechecked it

Reclaim retired and reset two-pass record, batch, and argument scratch
buffers when their recording's submit queue fences pass, without waiting
for the owning command allocator to reset. Guard fence polling against
device removal (`u64::MAX` / `FenceState::Removed`) so in-flight buffers
are never returned to the reuse pool on a lost device, keep closed command
lists' buffers intact across idle trims for Reset-less replay, and track
upstream `batch_buf` allocations through the same submit fences.

Part of xcl-dev#2688

Assisted-by: T3 Code / Antigravity (Gemini Pro Orchestrator Neon)
Assisted-by: Codex (GPT-6.2 Sol)
…uckets

Add 256 KiB half-step record buffer buckets and async GPU group-count
feedback for two-pass ExecuteIndirect draws (including deferred batch
mode), eliminate cold-start clamping so initial indirect draws keep
full capacity, keep active frustum-culled PSOs warm over a 16-window
history while dropping unused PSOs to 256 KiB, report exact clamped
command and dropped group counts, guard feedback readback against
device removal (`u64::MAX` / `q.Signal`), and bound reuse growth in
`ensure_res_buffer`.

Part of xcl-dev#2688

Assisted-by: T3 Code / Antigravity (Gemini Pro Orchestrator Neon)
Assisted-by: Codex (GPT-6.2 Sol)
@Decodere

Copy link
Copy Markdown
Contributor

Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2816 updated head 862b1ed1e7993ee0cab3ef19e33796a97b18c569 (2 commits on merge-base nvidia-dev eae015021c639866ab061cdff2e9daf8ba9daac5; stacked on exact parent PR #2815 42532264a221ac975b745b01097bf751e0e56712). Measurements and targeted GPU/unit test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0, default flags, no input)

Targeted RTX 4060 release unit & GPU tests (862b1ed1)

  • cargo test --release -p xcl --lib gpu_scale_args_reports_uncapped_group_count_feedback -- --nocapture: 1 passed, 0 failed, 0 ignored (0.24 s, executed on RTX 4060, 0 SKIPPED).
  • cargo test --release -p xcl --lib indirect_feedback_copyback_grows_on_clamp_and_decays_over_windows -- --nocapture: 1 passed, 0 failed, 0 ignored (0.03 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib indirect_feedback_waits_for_submit_before_copyback -- --nocapture: 1 passed, 0 failed, 0 ignored (0.03 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib indirect_feedback_ignores_readback_after_device_removal -- --nocapture: 1 passed, 0 failed, 0 ignored (0.02 s, 0 SKIPPED).
  • cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4 (3 consecutive parallel passes — confirming the lock_warp_tests fix for the earlier --test-threads=4 indirect_feedback_* race): 64 passed, 0 failed, 0 ignored on all 3 passes (0.30 s / 0.30 s / 0.31 s; 1 opt-in SKIPPED notice per run: two_pass_binds_set_the_shared_view_heap skipped without XCL_HEAP_WINDOWS=1).
  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4 (3 consecutive parallel passes): 8 passed, 0 failed, 0 ignored on all 3 passes (0.21 s / 0.20 s / 0.20 s, 0 SKIPPED).

Paired 60 s RTX 4060 smoke (eae01502 / #2815 42532264 vs #2816 862b1ed1)

All three runs completed cleanly at steady 60/2 s pacing with 0 device removals and 0 crashes (862b1ed1 xcl.log: 6,180 / 6,118 MB peak/end local VRAM, 4,811 MB end non-local VRAM, 19,148 translated draws / 1,024 dispatches with 0 skipped; note 0 two-pass buffer/draw log lines fired during this 60 s menu smoke, so single-run commit differences should not be attributed to two-pass feedback sizing).

Merge-base nvidia-dev (eae01502):

xcl-smoke v1
commit: eae015021c639866ab061cdff2e9daf8ba9daac5
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1551 (PresentX 1551)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15926 MB

Exact parent PR #2815 (42532264):

xcl-smoke v1
commit: 42532264a221ac975b745b01097bf751e0e56712
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1557 (PresentX 1557)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15436 MB

PR #2816 head (862b1ed1):

xcl-smoke v1
commit: 862b1ed1e7993ee0cab3ef19e33796a97b18c569
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1591 (PresentX 1591)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14994 MB

Limits of coverage

  • Full workspace test suite was not run on 862b1ed1 (only the 4 targeted tests individually, 3 parallel --test-threads=4 passes each of bind:: and alloc_pool::, release build, and stacked 60 s smokes); two_pass_binds_set_the_shared_view_heap skipped without opt-in XCL_HEAP_WINDOWS=1.
  • The 60 s no-input menu/intro smoke did not exercise heavy in-world indirect two-pass draw streams (0 two-pass log lines); GPU feedback writeback, clamping, and window decay were verified via gpu_scale_args_reports_uncapped_group_count_feedback and the 3 indirect_feedback_* tests above.
  • Single discrete NVIDIA 8 GB GPU (RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.

AI use

Ran the targeted release GPU/unit tests (including 3× --test-threads=4 concurrency checks), release build, and stacked quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly from cargo test, xcl.log, and scripts/smoke.ps1 outputs.

@pvfreis

pvfreis commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Follow-up, by reading only, not run, at 862b1ed1: addressed. A pipeline with no feedback yet now asks for the full indirect_record_need again, as at the base (indirect_record_need_hint, None), and the summary line now reports the clamped commands and the groups they dropped (TP_INDIRECT_CLAMPED / TP_INDIRECT_GROUPS_DROPPED, added in SCALE_ARGS_HLSL to the feedback header and read back in consume_completed). What remains: a pipeline whose windows were all zero still asks for RECORD_MIN (256 KiB) until its first non-zero readback, and one with history for twice the largest count of its last 16 windows; cuts from either now show in the groups-dropped total.

AI use: Claude Code; Claude Opus 5.5 wrote it, Claude Fable 5.2 rechecked it; checked by a person before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants