Repository navigation
Conversation
…jobs immediately Track `frame: Option<u64>` and `frame_since: Option<Instant>` on `PcCalls` so monotonic frame advances (`frame > prev`) record `frame_since = Some(now)` and clamp call start timestamps in `end()` and `holds()` (while advancing frame in `begin()` too, reading `present::presents()` under `PC_CALLS.lock()`). A long PC call that started on frame N and ends after frame N+1 is presented no longer charges pre-frame-N+1 duration into frame N+1's `PC_CALL_HOLDS_AFTER` budget, stale lower frame numbers never rewind `frame` or clear `spent`, and calls stuck >= 250 ms after a frame still hold the title. Also drop unstarted orphaned `Job` closures immediately in `released()` (outside `PENDING`, `done`, and `job` locks via `drop_unstarted_job`), waking any concurrent waiter when taking an unstarted job, and mirror that cleanup in the `preload()` and normal worker orphan checks so captured COM objects and shader bytecode are not pinned until workers drain deep queues. Assisted-by: Google Antigravity (Gemini 4 Neon)
|
I tested the cancellation boundary at I’d qualify “any unstarted All four fixture cases passed. I used inert job results and did not run a driver compile. I used Codex GPT-6.2 Sol for the fixture and a separate GPT-6.2 Sol agent at high reasoning to verify the source and results. I reviewed and approved this comment before posting. |
|
Rerun on the new head
First run, on The e2e title runs with Tested: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed. Not tested: a release build, a title, AMD / Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
99bb282 to
5b97e22
Compare
|
Thanks Rebased onto
AI use: rebased, tested, and drafted with Google Antigravity (Gemini 4 Neon). |
|
Independent parallel test rerun on rebased head Tested
Not tested The parent, a retail title, GPU behavior and the full workspace suite. AI use OpenAI Codex (GPT-6.2 Sol) ran the checks, verified the logs and wrote this report. |
…#2296, xcl-dev#2297, xcl-dev#2320, xcl-dev#2323, xcl-dev#2329, xcl-dev#2333 Integrates shader heap-base addresses (xcl-dev#1803), fenced superseded texture unmaps (xcl-dev#2270), cross-queue VRAM heap reclamation fencing (xcl-dev#2275, using create_raw_fence under Wine), PcCall frame clamping and orphan PSO drop (xcl-dev#2296), PSO pointer guards (xcl-dev#2297), KickoffX idle spare list switching (xcl-dev#2320, preserving UnadoptGuard), console-list descriptor heap binding (xcl-dev#2323), ClearUnorderedAccessView PC handles (xcl-dev#2329), and dispatch_chain PSO retention (xcl-dev#2333).
What is in it
Follow-up to #1782 and #2178 fixing two lifetime/timing bugs in
crates/xcl/src/hle/d3d12x/pso_async.rs:PcCallsacross monotonic frame boundaries:PcCallsnow tracksframe: Option<u64>andframe_since: Option<Instant>, recordingframe_since = Some(now)on monotonic frame advances (frame > previnbegin(),end(), andholds(), withpc_call()readingpresent::presents()underPC_CALLS.lock()likeheld_by_pc_call()andPcCall::drop()) and clamping call start times viasince.max(frame_since). A long PC call that began on frameNand finishes after frameN+1is presented no longer charges its pre-frame-N+1duration into frameN+1'sPC_CALL_HOLDS_AFTER(250 ms) budget, stale lower frame numbers never rewindframeor clearspent, and a call genuinely stuck>= 250 msafter a frame still holds the title.Jobclosures: Addeddrop_unstarted_job(&Pending)and call it fromreleased()(after releasingPENDINGandp.donelocks) as well as thepreload()andenqueue()workerp.orphanchecks. Whenreleased()claimsp.jobbefore a worker takes it, the unstartedJobclosure (with its captured COM objects and shader bytecode buffers) is cancelled and dropped immediately outside all locks rather than staying pinned until background workers drain deep queues, and*p.done = true+p.cv.notify_all()wakes any concurrent waiter (a worker that already passed thep.orphancheck and claimsp.jobfirst still runs and discards its result once incomplete()).(Rebased onto
origin/main06c9f550to adapt cleanly to #2080'sWorkqueue /enqueue()extraction inpso_async.rs, callingdrop_unstarted_job(&p)inenqueue()'s orphan branch.)Tested
cargo test --release -p xcl --lib hle::d3d12x::pso_async::used_tests:: -- --test-threads=1 --nocapture):10 passed, 2 failed— both new tests failed (pre-frame duration leaked into frame 8's budgetandnormal queued job was not dropped immediately on released()).cargo test --release -p xcl --lib hle::d3d12x::pso_async::used_tests:: -- --test-threads=4 --nocapture:12 passed, 0 failed, 0 ignored(0.61 s), including:pc_call_crossing_frame_boundary_does_not_charge_prior_frame_time: verifies pre-frame duration does not leak on eitherholds()orend()after a frame advance, calls genuinely stuck>= PC_CALL_HOLDS_AFTERafter the frame advance still hold the title, and stale lower frame numbers never rewindframeor wipe the newer frame'sspentbudget.released_queued_pipeline_drops_job_immediately_before_workers_drain: saturates both the normal worker pool and thepreloadworker pool behind gates, callsreleased()on queued pipelines carrying aDropFlag, and asserts both jobs drop immediately while workers are still blocked and never execute.used_testswith a test-onlyWORKER_SATURATION_LOCKsoa_released_queued_pipeline_is_not_built_by_normal_workersand the new saturation test never race under--test-threads=4.cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocaptureon NVIDIA GeForce RTX 4060):23test binaries,1267 passed, 0 failed, 46 ignored(28pre-existing hardware/debug-layerSKIPPED:21no wave64on 32-lane GPU,3wave32 per-lanerefused,2missing D3D12 debug layer,1driver cache toggle,1no heap windows;0skipped inpso_async).Regression run
Paired 60 s
scripts/smoke.ps1runs on the same RTX 4060 host againstorigin/main(06c9f5505f63f10c5ec49ef932d75b2c28177324) and PR head (5b97e22b2e77b2ba3e65d8a3396c0f7a9eaf04af):Baseline (
origin/main):PR head:
Not tested
d3d12SDKLayers.dllis not installed on this host).AI use
Implemented and verified with Google Antigravity (Gemini 4 Neon).