[pr-fix][shaders] Pipelines in warm-bad.txt are refused in play too #365
Loading…
Reference in a new issue
No description provided.
Delete branch "jensmonne/Darner:pr/warm-bad-in-play"
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?
Contributor role (optional)
What it changes
darner warmwrites a pipeline whose compile crashed or hung a child process towarm-bad.txt, andwarmandpreloadthen skip it. A run does not read that file, so it compiles the pipeline again, and this time inside the game. When the driver's compiler hangs on it, a pipeline worker never comes back, and every draw that waits for that pipeline spends its frame's wait budget. When the compiler crashes, the game ends.A run now refuses those pipelines at once. It reads the keys
warm-bad.txtlists under the run's own warm fingerprint (translator and its settings, driver, program path, card), so after an update of the driver or the translator they are compiled again, as in the warm. The refusal happens inPending::make, the one place a run builds a host pipeline, so a refused one completes and wakes its waiters like any other refusal, and what it would have drawn is missing, as with the other refusals. The fingerprint,program()and thewarm-bad.txtreader move fromapps/darner/src/warm.rstocrates/darner-gpu/src/pipeline/known.rs(the fingerprint renamedwarm_fingerprint, all three made public, their bodies unchanged), so the warm and the game use the same code. Their test moves with them.DARNER_WARM_BAD=0makes the game compile them, as it already makes the warm retry them. The README row forDARNER_WARM_BADsays so.How it was tested
Tested revision:
7615611(this branch, on mainf3840d7).Commands and results (cross-built on Linux with
cargo xwin, targetx86_64-pc-windows-msvc; tests run under Proton Experimental 11.0-20261123b's Wine with its vkd3d-proton and DXVK DLLs and Microsoft's d3dcompiler_47):cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings: clean.cargo xwin clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-msvc -- -D warnings: clean.darner-gpulib tests filtered topipeline::knownandpipeline::make, under Wine: 63 passed, 2 failed. On mainf3840d7: 62 passed, the same 2 failed (a_waiting_draw_raises_the_worker_making_its_pipeline,a_dispatch_waiting_on_a_worker_raises_it; they assert a raised thread priority, 2 of 2 runs each). The movedthe_quarantine_follows_the_fingerprint_and_keeps_older_linespasses.darnerbin tests filtered towarm::, under Wine: 22 passed.warm_baditself: it reads the cache folder once per process.Changes a default: yes, for every setup with a
warm-bad.txt. It only matters where a warm has listed pipelines, which so far means the driver's compiler crashed or hung on them.A/B result: same save, scripted walk (menus, a 150-second walk, then standing), about 6 minutes in the world each, after a warm of this build that listed 2 pipelines under its fingerprint (both "hung for 180 s"). A =
DARNER_WARM_BAD=0, B = not set. One run each:pipelines=2The log line in B shows the game's fingerprint matches the warm's, so the run found both listed pipelines. Neither log names those two keys, so I cannot tell whether this walk asked for them; the frame-rate difference is within what I see between identical runs here (about 5 %), and I would not read it as an effect. Neither run hung, crashed or panicked.
Gates run on that revision: 1 and 2 (the two clippy commands above). Gate 3 (
cargo test --workspace) was not run: only the filtered tests above, under Wine.Gameplay: the A/B above, on this revision plus my local Linux patches that are not part of this PR (64 MB pipeline worker stacks, a guard for driver compiler crashes, two input helpers for scripted runs). RTX 5080, NVIDIA 620.73, Proton Experimental 11.0-20261123b, Series X profile, 2560x1440, DLSS Super Resolution at the quality scale, frame generation off, uncapped.
Shader wave sizes tested: not applicable (no translator change).
Hardware dependence: likely general (any card whose driver crashes or hangs on a pipeline in the warm). Under Wine on NVIDIA a warm of this build listed 2 (both "hung for 180 s"); earlier builds here listed 2 to 3 each, and once one with "exit code: 1".
Coverage gaps: not run on Windows. No Windows setup with a listed pipeline was tested. Gate 3 was not run in full. The A/B does not show a run that would have hung without this change: one run each, and the walk may not reach the listed pipelines.
Checklist
main.docs/asset-policy.md.Checked for overlap
warm-bad.txt(which cache files a translator change clears); the two merge without conflict, and this PR reads the file per fingerprint either way. Same files: #165, #215, #234, #266 and #270 changeapps/darner/src/warm.rs; #187, #247, #350 and #352 changepipeline/make.rs. Each merges with this branch without conflict. Of the 44 other open pull requests that changeREADME.md, the ones that merge withmainalso merge with this branch.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.