Avoid redundant shader decoding during store classification #1055
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Damokles2 on 2026-11-28T12:19:08Z.
I found a redundant shader decoding operation in
victory-gpu/src/pipeline.rs.The current
translatepath evaluatesany(stores)andany(stores_by_address)separately. Both predicates decode the native shader program before classifying its instructions.Since every raw-address store match also establishes the general store flag, both classifications can share a single decode while preserving the existing short-circuit behavior.
I tested an isolated prototype against upstream commit
63b902fe.Results:
The benchmark used actual decoder implementations, optimized Rust builds, warmups, and 15 alternating paired samples on an Intel Core Ultra 9 275HX.
Some predecoded classification-only cases showed additional scan overhead, but all non-empty complete classification workloads improved.
The proposed change preserves conservative opcode classification, decode-error handling, and existing short-circuit behavior without introducing a persistent cache.
These measurements concern store classification only, not total shader compilation time or gameplay FPS.
I found no equivalent correction in the reviewed PR diffs. Is anyone already working on this? If not, I would like to prepare a narrow optimization with regression tests.
AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-28T12:19:15Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)