D3D12.X: slice direct mesh draws within the record cap #2902
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2902"
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?
Imported from ivall/xcl. Originally posted by coolpersonnn on 2026-11-26T22:18:30Z.
Stacked on #2817. This PR adds the top commit,
96dfa767.Part of #2688. Direct two-pass mesh draws that fit the normal record limit can lose groups if the cap allows only a smaller buffer. Record those draws in slices while keeping the console group IDs used to generate geometry.
What is in it
Tested
32.0.16.2101, Radeon integrated graphics with driver32.0.21045.29003, Rust1.100.0, and DXC1.8.2502.11.gpu_mesh_mode_two_passesregression on the lab version passed on each adapter with both shader backends exercised and zero GPU skips.XCL_TWO_PASS_MB=256recorded 126 direct mesh groups dropped on controlad352c36and zero on patched lab build001e9abf. The patched run still recorded 4,687 allocation refusals. Both runs stopped presenting during world load.a2c10b4aand verified the top patch withgit range-diffandgit diff --check.96dfa767, RTX 5090 plus WARP.cargo test --offline --locked -j 4 -p xcl --lib -- gpu_mesh_mode_two_passes later_queue_completion_during_sleep_reclaims_before_wait_deadline --test-threads=1 --nocapturereported 2 passed, 0 failed, 0 ignored, and zero GPU skips.Regression run
Not tested
AI use
gpt-6.2-sol) wrote the slicing change and regression coverage, ran the GPU and title checks, and rebased the patch.Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T00:40:24Z.
RTX 5070 direct mesh slice verification
The focused tests on clean PR #2902 head
96dfa767b927190f0d57eba22f9dba56c995deafpassed on Windows. The mesh fixture ran with the 12 GB RTX 5070 selected and strict mesh capability required. Both the HLSL-generated shader and the direct DXIL shader produced the group-1 geometry from the unsliced draw when writing record 0 of a one-group slice. The fixture compares the vertex and primitive counts, active vertex records and primitive indices. The unsliced draw also checks triangle pixels and the unmapped background. Run logThe command was
cargo test --locked --offline -p xcl --lib -- gpu_mesh_mode_two_passes later_queue_completion_during_sleep_reclaims_before_wait_deadline --test-threads=1 --nocapture, withXCL_ADAPTER=RTX 5070,XCL_REQUIRE_GPU=mesh, and a fresh writable DXIL cache. It reported 2 passed, 0 failed, 0 ignored and no explicit skip markers in 1.10 s. The second test explicitly creates a WARP device and uses simulated fence completions.This verifies the group-base math on a discrete GPU with less memory than the original RTX 5090 host. The mesh fixture supplies the slice base directly. It does not drive the allocator into a low-memory state, measure a retail world load, or exercise indirect mesh slicing.
AI use: OpenAI Codex selected and ran the existing tests, checked the fixture and prepared this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T11:03:10Z.
Tested
Clean
96dfa767b927190f0d57eba22f9dba56c995deafon Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC. A standalone synthetic boundary probe linked against the exact-head XCL library built usingcargo build --offline --locked -j 2 -p xcl --lib --message-format=json. Ran the pinned probe asboundary-gpu.exe --test-threads=1 --nocapturewithXCL_ADAPTER=A770under the shared Arc mutex. The runtime identified the Arc A770, PCI 8086:56a0.Both HLSL and direct DXIL matched every active record, checking counts and group IDs for workloads of 13, 14, 15, 28 and 29 groups at a 14-record cap. The 29-group case split 14+14+1 and returned 87 vertices and 29 primitives. One test passed, zero failed, ignored, or skipped. Executable SHA-256 matched before, during, and after the locked run.
Not tested
The probe supplies the IO group base and invokes the runner once per slice. Production allocator-driven
DispatchMeshstaging under pressure, indirect slicing, the full suite, and retail smoke were outside this run.AI use
T3 Code / Codex (
gpt-6.2-sol) prepared the synthetic boundary probe and ran and reproduced its Arc readback.Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-27T12:21:06Z.
Tested PR #2902 (
96dfa767) on Windows 11 with a180 sopen-world smoke run (lockhart) and thed3d12_mesh_streamintegration tests against basea5e2d851.Environment
32.0.16.2140)nvidia-devDXIL cache (XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=1,XCL_TEXTURE_LEVEL_PAGES=1,XCL_PREPARE_GRAPHICS=0,XCL_DRED=1), Series S (lockhart) profile.Integration tests (
d3d12_mesh_stream)Ran
cargo test --locked -p xcl --test d3d12_mesh_stream -- --nocaptureon both#2902(96dfa767) anda5e2d851:96dfa767: 2 passed; 1 failedmalformed_and_truncated_pipeline_streams_do_not_panic_or_crash— okconcurrent_mesh_stream_refusals_across_five_threads_survive— okconsole_ms_in_as_slot_and_ms_with_as_are_refused_cleanly— FAILED (expected AS-slot refusal in translation_errors: ["MS: no NGG hardware variant"])a5e2d851: 2 passed; 1 failed — identical failure onconsole_ms_in_as_slot_and_ms_with_as_are_refused_cleanly, so that failure is pre-existing ona5e2d851.180 sOpen-World Smoke Run (lockhart, delayedXCL_PRESS_AT=78..134)exit: 0x0,0crashes,0device removals1836frames (PresentX 1836), entrytimer: finestat72.51 s, heavy world draws began at176.63 s(1095draws,5089dispatches in 2 s)25001 MB, local VRAM7662 MB, non-local4248 MB, target pages3729 MB(pools 3776 MB), sparse pools2560 MB(2250 MBmapped)Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T00:11:31Z.
Independent Windows/NVIDIA check of #2902 head
96dfa767against its exact parenta2c10b4a. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35, 12 GiB), DXC 1.8.2502.11.cargo test --offline --locked -p xcl --lib gpu_mesh_mode_two_passes -- --nocapturepassed 1/1 on the PR head. The fixture checks both HLSL and direct DXIL slice offsets and record contents.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocaptureproduced 1,842 passed, 10 failed, 48 ignored, 26 explicit GPU skip notices on each clean revision. The ten failed instances, including the repeated integration-test binaries, had identical names on parent and head. They cover shader cache, compute thread limits, texture upload, mesh-stream refusal, async compute, split compute, and driver cache; none is a new failure in this head. GPU skips are included in Cargo's pass counts and are not claimed as coverage.I checked the production direct-draw path: each slice binds a distinct compute IO group offset, writes its records from zero, then draws the matching record range after a UAV barrier. The current implementation still leaves draws beyond the normal record limit and indirect mesh draws unsliced, as the PR states. This check did not run the required paired title smoke, so it is additional test evidence, not a merge-readiness verdict.
AI use: Codex (GPT-6.2 Sol) reviewed the path, ran both revisions, and drafted this report.