Repository navigation
D3D12.X: a skipped ExecuteIndirect inside an occlusion query leaves it visible - #2550
tiagonleal wants to merge 1 commit into
Conversation
…t visible
A draw that XCL drops while an occlusion query is open marks the query so it
resolves as visible (list_x::note_dropped_draw). A skipped ExecuteIndirect did
not, so a title's occlusion query around skipped indirect draws resolved to 0
samples and the title could treat the objects as hidden.
execute_indirect now calls note_dropped_draw for the skips that could have
drawn: a pipeline still being built, a two-pass mesh pipeline, a root-changing
signature with a translated graphics pipeline, and a failed ABI bind of a
graphics pipeline. A Dispatch signature makes no samples and is left out, as
are the console compute skips. graphics_bound marks the two-pass skip too, and
a draw with a stand-in whose build failed (pso_async::is_stand_in) like one
still being built.
Test execute_indirect_skipped_inside_an_occlusion_query_reports_visible
(pending, Dispatch signature, two-pass, root-changing): before the fix it
fails ("a pipeline still being built"); after it passes 5 of 5 alone. The
failed-ABI path and graphics_bound have no test (they need a real list).
cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4, twice: 1420
passed, 4 failed, 46 ignored both times, 25 SKIPPED lines. The failures are
gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, as on main.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Test run on exact head Tested
Regression run (60 s, default settings, a retail title) main: this PR: No crash or device removal; frames 105 % of Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Independent AMD RDNA4 (native wave64) verification of exact PR head Tested
(Compare against Not tested
AI use
|
Eliminate the global sparse STATE lock convoy across synchronous GPU fence waits in sparse::readback_now (triggered on ID3D12Resource::Map readbacks) by pooling per-Map ReadbackJob objects (COPY command allocator + list + persistently-mapped READBACK staging buffer + OS fence event) outside STATE. STATE is now only held briefly to flush pending zero/dirty pages and snapshot mapped spans, to submit/signal on the copy queue, and to copy still-committed non-hole bytes back into host memory after the fence wait completes unlocked. Also adapt three upstream fixes cleanly atop our runtime branch: - #2548: use pso_async::resolve (non-blocking) instead of resolve_for_bind in device_x::create_list, list_x::kickoff_x, and list_x::reset_pc so list creation/reset with a compiling compute PSO never stalls the title thread. - #2549: preserve own_alloc when split() reuses a spare segment whose previous recording held deferred dispatches' allocator. - #2550: add pso_async::is_stand_in and bind::note_skipped_indirect to call list_x::note_dropped_draw on skipped graphics ExecuteIndirect paths (including stand-in / two-pass PSOs) so dropped draws stay tracked consistently. Assisted-by: Antigravity (Gemini 4 Neon High)
…ixes Integrates upstream amd-dev 61121fe/xcl-dev#2569 (DirectStorage ordered completion wakeups) plus open PRs xcl-dev#2577 (skip AMD cache-reference driver blobs on disk, xcl-dev#2512), xcl-dev#2578 (clear LAST_CONTENT on placed texture unmap/remap, xcl-dev#2460), xcl-dev#2579 (mark put-off builds wanted immediately), xcl-dev#2556 (NULL-ppv CreateDescriptorHeap test), xcl-dev#2550 (skipped ExecuteIndirect occlusion query), xcl-dev#2549 (reused spare keeps in-flight deferred allocator, with Wine raw fences and UnadoptGuard), and xcl-dev#2548 (Reset/KickoffX/CreateCommandList do not wait on building compute pipelines). Assisted-by: Antigravity (Gemini 4 Neon)
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
…port upstream xcl-dev#2550) (cherry picked from commit b281526d1017705358eb97cdf83e2c57d97ec007)
A draw that XCL drops while an occlusion query is open marks the query, so ResolveQueryData reports it as visible (
list_x::note_dropped_draw, used bygraphics_bound). An ExecuteIndirect that XCL skips did not do this. A title's occlusion query around skipped indirect draws resolved to 0 samples, and the title could take the objects as hidden. Open PR #1798 lets a draw go on with a stand-in while its graphics pipeline is built, which makes a skipped ExecuteIndirect the usual case during pipeline building; this change does not depend on it, because pipelines that are late, two-pass or without a usable ABI are skipped on main too. No existing PR or issue covers this (searched for "occlusion ExecuteIndirect", "note_dropped_draw", "occlusion query skipped"; #1991 addednote_dropped_drawfor draws only).What is in it
bind.rs:execute_indirectcallsnote_dropped_drawon the skips that could have drawn: a pipeline still being built, a finished two-pass mesh pipeline, a root-changing signature with a translated graphics pipeline, and a failed ABI bind of a graphics pipeline. A signature with a Dispatch argument makes no samples and is left out, and so are the console compute skips.graphics_boundalso marks the two-pass skip, and a draw whose pipeline build failed (a stand-in with no real pipeline) is marked like one still being built.pso_async.rs:is_stand_in(pso), true while the pipeline is being built or after its build failed.list_x.rs: two#[cfg(test)]helpers for the test.execute_indirect_skipped_inside_an_occlusion_query_reports_visible(bind.rs): BeginQuery, ExecuteIndirect, EndQuery on a fake list, for a pipeline still being built (reads visible), the same pipeline with a Dispatch signature (does not), a two-pass pipeline and a root-changing signature (both read visible).Tested
cargo test -p xcl --lib execute_indirect_skipped_inside: 0 passed, 1 failed ("a pipeline still being built"). After the fix, run 5 times: 1 passed each time.cargo build --workspaceandcargo test --workspace --no-fail-fast -j 4 -- --test-threads=4, run twice: 1420 passed, 4 failed, 46 ignored both times (25SKIPPEDlines). The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, which fail the same way onmain.Regression run
60 s each, the same retail title, release builds from clean trees, one after the other.
main(e1d84b7):This PR:
Not tested
execute_indirectand thegraphics_boundchanges have no unit test of their own: they need a real command list and unified memory.AI use
🤖 Generated with Claude Code