D3D12.X: reuse the pipeline lookup when binding a stand-in #1708
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!1708
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1708"
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?
@CallMeBrado on GitHub · 2026-11-24 19:31 UTC · original
CallMeBrado:perf-reuse-pipeline-on-bind→main· +27 −2 · 1 files · 1 commits · openA title can bind the same completed pipeline thousands of times. Each bind used to look up its stand-in twice. A compute bind with the default wait policy also locked the job, demand and completion state even when the worker had already published the real pipeline.
What is in it
Bind using the entry from the first lookup. A waiting caller checks the published pipeline pointer after recording first use. A zero pointer still takes the existing wait and failure paths. The new test lets a worker finish before binding and checks that the bind returns its pipeline without requesting a priority boost.
Tested
cargo build --locked --workspace --jobs 6andcargo test --locked --workspace --no-fail-fast --jobs 6 -- --test-threads=4 --show-outputpassed. 859 reported passed, 0 failed, 42 ignored. The following tests reported a skip on this machine.gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64)gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)test_title_draws_with_a_root_signature_under_the_debug_layer(no xgameruntime.dll)I timed
resolve_for_bindin release against 256 already-built stand-ins, with the default wait policy. Each caller cycled through the handles 500,000 times. The numbers are median elapsed time divided by total binds over seven runs per revision, alternating run order.Reproduce the bind benchmark
The harness uses synthetic pipeline handles and does no GPU work. To run it with Cargo, save it as
crates/xcl/examples/bind_cost.rsin a local checkout, leaveXCL_PSO_WAIT_MSunset and runcargo run --release -p xcl --example bind_cost -- 1 compute. The first argument is the caller count and the second iscomputeorgraphics. The output is nanoseconds per bind.Regression run
The retail title, 60 seconds per build, separate empty XCL profiles and shader caches,
XCL_DXC_THREADS=3.main
PR
Not tested
Gameplay frame times, world loading and other GPU vendors. Optional retail sample variables were unset for the workspace suite. The benchmark measures CPU bind resolution.
AI use
OpenAI Codex (GPT-6) wrote the change, test and benchmark, ran the checks and drafted this PR.
@DavidM1911 on GitHub · 2026-11-24 22:09 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.@JJAutoCompare on GitHub · 2026-11-25 04:25 UTC · original
PR #1708 verification
Clean detached head
35ec9ebfae008778d7fef2cd8e5a05379e4797aaon STOR-WINLAB. Windows 11 Enterprise Evaluation (build 26200), AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386,x86_64-pc-windows-msvc). Unoptimized dev/test profiles, with debug info and incremental compilation disabled.Tested
cargo build --workspaceandcargo test --workspace --no-runboth exited 0 outside the Arc mutex. Cargo prepared 19 test executables.cargo test -p xcl --lib hle::d3d12x::pso_async::used_tests -- --test-threads=1outside the mutex withXCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1yielded 6 passed, 0 failed, 0 ignored, and 0 explicit skips.crates/xcl/src/hle/d3d12x/pso_async.rs. Its new test uses synthetic handles to check that binding a completed compute stand-in returns the real pipeline, leaves the demand flag clear, and returns the real handle on release. It also checks the unbounded wait path. Existing tests exercised the wait budget, demand signaling, and preload behavior.cargo test --workspace --no-fail-fast -- --test-threads=4once insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Cargo exited 101. All 20 result lines (19 executables plus doc-tests) sum to 841 passed, 18 failed, and 42 ignored. The new unit test passed in this run too.Workspace failures and skips
CreateComputePipelineStatefailures (0x80070057) and four assertion failures in FMA, mip sampling, VALU, and wave reductions. The e2e title failed theRSSetDepthBiasXdynamic depth-bias check (blue pixel instead of green).SKIPPEDlines report two wave64 cases, one tiled-resource tier requirement, one unavailable heap-window case, and two missing D3D12 debug-layer cases. Cargo includes these early returns in the pass count. Sample-backed cases also returned early with the sample variables unset.Not tested
Matched
mainrun, retail-title smoke, bind performance, or other adapters.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1708-suite.logand published.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.