Repository navigation
D3D12.X: retained binds wait by the graphics and compute PSO budgets - #3579
raylitebull wants to merge 1 commit into
Conversation
resolve_retained_for_emission, which bind.rs resolve_pipeline uses for retained draws and dispatches, waited for a pipeline still being built by XCL_PSO_WAIT_MS alone. XCL_GFX_PSO_WAIT_MS and XCL_CS_PSO_WAIT_MS, which resolve_wait honours, did not apply there: with only those set, a retained bind held the title's thread until its pipeline was built. resolve_wait_pending_budgets applies resolve_wait_budgets' policy to the retained Pending, without looking its title address up again. Nothing changes while the budgets are unset (the default). Ported from amd-dev 4d6d4a7; its kept-pipeline override has no counterpart on main. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Review (head 398acfe, diff read, not a merge-check; draft):
Fine: the graphics branch uses AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Closing as a duplicate of #3318 (thanks @Foniass). #3318 shares the same helper with AI use: written by Capy (Claude Opus 5.5) and posted on raylitebull's behalf, with their go-ahead. |
bind.rsresolve_pipelineusesresolve_retained_for_emissionfor retained draws and dispatches, and that function waited for a pipeline still being built byXCL_PSO_WAIT_MSalone.XCL_GFX_PSO_WAIT_MSandXCL_CS_PSO_WAIT_MS, whichresolve_waithonours, did not apply there. So with only those set, a retained bind held the title's thread until its pipeline was built. Nothing changes while the budgets are unset, which is the default.What is in it
pso_async.rs:resolve_wait_pending_budgetsappliesresolve_wait_budgets' policy to the retainedPending: the graphics budget as a share of the thread's time, the compute one bybudget_for. It does this without looking the title address up again.amd-dev: its override for kept (bake) pipelines, whichmaindoes not have.a_retained_bind_waits_by_the_budget_of_its_kind.Tested
cargo check --workspace --all-targets --target x86_64-pc-windows-gnu: no errors, no new warnings.x86_64-pc-windows-gnuand run under Wine 9.0 (no GPU) with--test-threads=4, next to the same filters onmainb2b1f109:hle::d3d12x::pso_async: 194 passed, 0 failed (main: 193 / 0)The failures are the same tests on both, ones that need a D3D12 device or Windows' working-set queries, which Wine lacks.
Regression run
Not run yet: there was no Windows machine or title here.
scripts/smoke.ps1still has to run on a title, built frommainand from this head, soPR checksfails until those two blocks are added.Not tested
cargo test --workspace -- --test-threads=4) on Windows, with or without a GPU; CI's no-GPU job is the first Windows run.main, and any performance onmain: the numbers above are fromamd-dev.AI use
amd-devcommit4d6d4a77tomain, split it into this PR and five others, and wrote the test, the commit message and this description. Theamd-devmeasurements are raylitebull's own runs.