D3D12.X: a skipped ExecuteIndirect inside an occlusion query leaves it visible #2550
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!2550
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2550"
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?
@tiagonleal on GitHub · 2026-11-25 22:41 UTC · original
tiagonleal:skipped-indirect-keeps-occlusion-visible→main· +98 −1 · 3 files · 1 commits · openA 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(e1d84b7d):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
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 <[email protected]>@xpatfussy69x on GitHub · 2026-11-25 22:57 UTC · original
Test run on exact head
e033310(e033310cd7b91767391f65080629a79c2664b9f8, on its basee1d84b7, currentmain), clean tree.Tested
cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo)cargo test -p xcl --lib execute_indirect_skipped: 1 passed, 0 failedexecute_indirect_skipped_inside_an_occlusion_query_reports_visible: okRegression run (60 s, default settings, a retail title)
main:
this PR:
No crash or device removal; frames 105 % of
main's, peak commit 100 %.Not tested
AI use
@futurepro62 on GitHub · 2026-11-25 22:52 UTC · original · edited 2026-11-25 23:02 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
e033310(on its basee1d84b7).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::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1412 passed, 0 failed, 44 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,dispatch_chain_native_wave64_builds_whole,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.execute_indirect_skipped_inside_an_occlusion_query_reports_visible.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1423 passed, 0 failed, 46 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 maine1d84b7too, 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,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_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
@DavidM1911 on GitHub · 2026-11-25 23:06 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.Thanks!
— Devin
@emirduran707 on GitHub · 2026-11-25 23:17 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
e033310cd7b91767391f65080629a79c2664b9f8on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1422 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::bind::tests::execute_indirect_skipped_inside_an_occlusion_query_reports_visiblepassed on this GPU.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
main68a284aon this machine:1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@SlopTart on GitHub · 2026-11-26 05:04 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of
execute_indirect_skipped_inside_an_occlusion_query_reports_visible: passed.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.
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 22:41 UTC · original · reviewed
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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.