Repository navigation
fix: shader warm-up cache key, water read-back, frame shots, pipeline skip list, agent skills - #19
Merged
Conversation
Cherry-picked from fxceless/victory-fork 895c0b8, 04df435 and 79cfdd9, renamed.
…ipeline from the driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #18. Six commits:
1. Agent skills (
a003e58).claude/skills/systematic-debugging(obra/superpowers) and.claude/skills/tdd(mattpocock/skills), installed as plain files, plusskills-lock.jsonso anyone can restore them withnpx skills experimental_install. One TypeScript sample is git-ignored because.tsis not on the asset-policy allowlist.2. Shader warm-up lands in the run's cache, and the run scripts offer it (TODO P-7)
leonida translate --warmnever opened the GPU, so it filed its translations under a different cache key than a run uses (the key includes the card's widest wave and view heap limit). A full warm-up translated 25,700 shaders that the game then ignored.LEONIDA_HOST_WAVEandLEONIDA_VIEW_LIMITstill override them. It also uses every core by default (it used 4 unless--jobswas given).run-gta6.ps1andmeasure-gta6.ps1ask "Warm up now? [Y/n]" and warn that without it the game translates shaders mid-play and stutters.-WarmUp yes|noanswers from the command line.run-gta6.ps1setsLEONIDA_LOG=warnunless it is already set, so the console shows warnings and errors only.leonida translateprints a progress line every 1,000 containers (it printed nothing for about 90 s before).TODO.md.3. Water texture read-back and frame shots from victory-fork
Cherry-picked from fxceless/victory-fork and renamed:
895c0b8and04df435: textures that compute shaders write and the title reads on the CPU (the ocean height and displacement maps) are copied back into title memory. Upstream's note: boats read memory nothing wrote and sank.79cfdd9: frame shots built into the layer (LEONIDA_SHOT, diagnostics builds), a pipeline library the driver rejects is kept under another name instead of being saved over,LEONIDA_WINDOW_UPLOAD=1(off by default), a DirectStorage fix for reads into physical pages, and=altmodes for two switches. Conflicts inhost.rsandtexture.rstook upstream's side (our code plus thealtmode); the README conflict kept ours. One new clippy warning it brought (a collapsibleifinpipeline/library.rs) is fixed.4.
LEONIDA_SKIP_PIPELINESworks in every buildA tester's RX 9070 crashes inside the AMD driver's compiler (
amdxc64.dll, access violation) while the pipeline of compute shader0a12de46c4d5db08is made. That shader's DXIL passes Microsoft's validator here, so this looks like a driver bug (not confirmed). The switch only existed in diagnostics builds and only dropped draws. Now a pipeline with a listed shader is never handed to the driver, in release builds too. Workaround for that tester:LEONIDA_SKIP_PIPELINES=0a12de46c4d5db08.5.
shot-run.ps1Runs the diagnostics build unattended, presses scripted keys (
-Keys,LEONIDA_KEYS), takes frame shots at fixed frames (-ShotAt), and closes the game when the shots are written or after-Seconds. Shots go to%LOCALAPPDATA%\leonida\shots, outside the repository. They are game data and must never be posted.6. Small fixes
.un-gta6.ps1; it is.\run-gta6.ps1.scripts/rename-from-upstream.ps1skipsCLAUDE.mdandTODO.md, which name upstream on purpose.Tested
On Windows 11 Pro, Ryzen 7 7800X3D, RTX 3080 12 GB, driver 621.24:
cargo check -p leonida --all-targets, release and--features diagnostics: both pass.leonida-gpu185 passed,leonida-hle100,leonida-core15,leonida2, 0 failed. The oldwarp_budget_saturates...test (TODO C-2) passed in this run and failed in two earlier ones today, so it looks flaky.cargo clippy --workspace --all-targets -- -D warnings, plain and--all-features: the same errors asmain(TODO C-1, see C-1: resolve clippy warnings in leonida-gpu #20), none new.cargo xtask policy: 221 files ok.run-gta6.ps1,measure-gta6.ps1andshot-run.ps1: 0 errors each.shot-run.ps1from start to finish, and the scripts' warm-up prompt. The skip list is not tested against the AMD crash, since there is no AMD card here.Not in this pull request
Upstream VIctory's "descriptors joined by nested control flow" commits (
59c78bb,ff47463,e8e9f0c,54ab406) all conflict inleonida-shader, because victory-gta6 already has its owndescriptor_phifor the same case. 40 programs still stop at "a descriptor chosen by control flow". That needs a hand merge and is left for a pull request of its own.AI-assisted.
🤖 Generated with Claude Code