One translation: PE side still consults its own shader cache in vkback runs #251

Open
opened 2026-12-02 17:11:58 +00:00 by github-bot · 1 comment
Owner

@⁠TheRifai on GitHub · 2026-12-02 16:26 UTC · original

Finding (TASKS "One translation", line 841)

Seen on: main 9d4e2f1 (before that, bc86e65 ran for the evidence), RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house rt3, 75 s warm-store run /home/shlong/Documents/VKtory-capture/hunt-base/.

The PE side still maintains a second shader translation/cache in a vkback run:

  • WARN victory_gpu::shader_cache: VICTORY_SHADER_LOOP_LIMIT: translated loops stop sooner limit=4096
  • INFO victory_gpu::queue: shaders from the cache and translated so far hits=17 misses=0, later hits=2225 misses=0
  • vkback live: has its own translator and shader cache (bin-hunt/translate-dir, tr-05d1291ee8a9861a.sqlite, 19,139 containers / 3,691 shaders known).

So the two sides disagree on which cache is authoritative exactly as TASKS describes; vkback's translator settings (translate-dir --fingerprint) are not the PE side's. No translation misses in the warm run, so the redundancy is invisible in fps today, but after a translator change the PE side would retranslate its own set.

No code change from me: deleting shader_cache.rs/draw.rs also removes the PE path's host_shader (pipeline.rs:203), the fresh-shader frame stat (vklive.rs:182) and the D3D12 pipeline bookkeeping (queue.rs:323), so it needs the maintainer decision the task calls for (one owner of translation) plus the "identical slot sets" check. This issue records the current-run evidence for that decision.

**@⁠TheRifai** on GitHub · 2026-12-02 16:26 UTC · [original](https://github.com/vktory6/VKtory/issues/251) ## Finding (TASKS "One translation", line 841) **Seen on:** main `9d4e2f1` (before that, `bc86e65` ran for the evidence), RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, house `rt3`, 75 s warm-store run `/home/shlong/Documents/VKtory-capture/hunt-base/`. The PE side still maintains a second shader translation/cache in a vkback run: - `WARN victory_gpu::shader_cache: VICTORY_SHADER_LOOP_LIMIT: translated loops stop sooner limit=4096` - `INFO victory_gpu::queue: shaders from the cache and translated so far hits=17 misses=0`, later `hits=2225 misses=0` - `vkback live:` has its own translator and shader cache (`bin-hunt/translate-dir`, `tr-05d1291ee8a9861a.sqlite`, 19,139 containers / 3,691 shaders known). So the two sides disagree on which cache is authoritative exactly as TASKS describes; vkback's translator settings (`translate-dir --fingerprint`) are not the PE side's. No translation misses in the warm run, so the redundancy is invisible in fps today, but after a translator change the PE side would retranslate its own set. No code change from me: deleting `shader_cache.rs`/`draw.rs` also removes the PE path's `host_shader` (`pipeline.rs:203`), the fresh-shader frame stat (`vklive.rs:182`) and the D3D12 pipeline bookkeeping (`queue.rs:323`), so it needs the maintainer decision the task calls for (one owner of translation) plus the "identical slot sets" check. This issue records the current-run evidence for that decision.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 17:11:58 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 18:38 UTC · original

Thanks, the current-run evidence helps. It's in "One translation": github.com/vktory6/VKtory@a58cd901dd

One thing it showed: the fresh-shader count in frame_note (vklive.rs:182) counts misses in the PE side's cache. That cache isn't the one vkback translates with, so the "fresh shader work" exemption from the 30 fps goal is counting the wrong thing. The task now says so, and the count moves to vkback with the rest.

The decision you mention is already made: the task's goal is that vkback alone translates. What's left is the work itself: move host_shader (pipeline.rs:203), the fresh-shader count and the pipeline bookkeeping (queue.rs:323) over, then delete. The check is identical slot sets on the same scene before and after. Closing here. The task tracks it, and a PR for any of those steps is welcome.

**@⁠vktory6** on GitHub · 2026-12-02 18:38 UTC · [original](https://github.com/vktory6/VKtory/issues/251#issuecomment-7354925767) Thanks, the current-run evidence helps. It's in "One translation": https://github.com/vktory6/VKtory/commit/a58cd901ddf9004fdcbc8a1a936f868cca0e0e5d One thing it showed: the fresh-shader count in `frame_note` (`vklive.rs:182`) counts misses in the PE side's cache. That cache isn't the one vkback translates with, so the "fresh shader work" exemption from the 30 fps goal is counting the wrong thing. The task now says so, and the count moves to vkback with the rest. The decision you mention is already made: the task's goal is that vkback alone translates. What's left is the work itself: move `host_shader` (`pipeline.rs:203`), the fresh-shader count and the pipeline bookkeeping (`queue.rs:323`) over, then delete. The check is identical slot sets on the same scene before and after. Closing here. The task tracks it, and a PR for any of those steps is welcome.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#251
No description provided.