Shaders: count reused compute shaders as cache hits #1223
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1232"
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?
Imported from ivall/xcl. Originally posted by alpz1000 on 2026-11-24T13:26:28Z.
xcl shaders --precompile counted every successful compute shader lookup as a fresh compile, including when it reused cached DXIL. This change reports fresh compiles and cache hits separately.
What is in it
Tested
Regression run
Paired 60-second startup runs on the same title with fresh XCL data and caches per build.
Not tested
Gameplay beyond the 60-second startup run, other adapters, and the full shader corpus.
AI use
OpenAI Codex (GPT-6) implemented the change, ran the local checks, and drafted the description.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:47:27Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Note: the full
d3d12xlib filter currently aborts with 0xc0000005 on unmodifiedmaintoo (pre-existing, unrelated to this PR); the PR's own tests were run by name and pass.Imported from ivall/xcl. Originally posted by ettehn on 2026-11-25T10:04:01Z.
This accounting also matters for #2120. On its exact head, a second process reused the rerouted DXIL but still printed
compiled 1, already cached 0(check). I tested a local adaptation of #1232 on8dcc56d: carry a per-lookup DXIL reuse flag separately from the reroute flag, so it does not depend on process-wide counter deltas.Native Windows CLI, no
--pipelines, tested three cases: (1) a rerouted large record, cold and then a separate warm process, reported 1/0 then 0/1 (compiled/cached). (2) a smaller record with the translation cache disabled still reported 1/0 then 0/1 by reusing the DXC cache. (3) two identical inputs with workers enabled and a fresh cache emitted one reroute and reported 1/1. All runs exited 0 with zero reported errors under a 2 GiB job commit cap. No title or hardware GPU exercised. I have the local integration patch if useful when the conflict is resolved.AI use — OpenAI Codex (GPT-6) adapted the code and ran the checks.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:17:29Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:11:07Z.
Triage (#1607) – head
9af37dcNot on main:
precompilein shaders.rs still adds every compute program thatconsole_to_dxil_inreturns tocompiled, even when it came from the memory, translation or DXC cache. #2613 and #2928 (both opened later) make the same compute-branch change via aconsole_to_dxil_in_status, but inside much larger precompile reworks. This PR only makes this change.The flag logic is right: a memory or disk-translation hit never calls
compile_one, socachedstays true, and a DXC hit is passed through fromcompile_cached. The PR conflicts with main, wherecompile_console_shaderalready returns(Compiled, bool)andconsole_to_dxil_innow goes throughconsole_to_dxil_in_with, so it needs a rebase.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.