GPU: decode each shader once for both store classifications (#1055) #1203

Manually merged
github merged 3 commits from github-bot/gh-1203 into main 2026-11-30 14:17:37 +00:00 AGit
Owner

@⁠Yuanzer on GitHub · 2026-11-28 15:30 UTC · original
Yuanzer:codex/issue-1055-share-store-decode → main · +97 −36 · 1 files · 3 commits · merged 2026-11-30 14:12 UTC

The problem

pipeline::translate classified each native shader once with stores and once with stores_by_address. Both predicates call victory_shader::gfx10::decode on the same code, so a shader without stores, or one where both classifications were needed, decoded its program twice for these two booleans.

Fixes #1055.

The change

  • Decode each native program once and derive both classification flags in that pass.
  • Preserve the original conservative result: empty programs and code that does not decode still report both true.
  • Stop scanning a program as soon as both kinds are known, and stop scanning the program list once both aggregate flags are known.
  • Keep texture stores and scratch stores out of stores, as before.

No cache or persistent state is introduced.

Tests

  • New pipeline::tests::store_classification_keeps_both_kinds: no-store, buffer-store, flat-store, global-store, scratch-store, empty-program, undecodable-code, and multi-program aggregation.
  • cargo test -p victory-gpu --lib --locked: 455 passed, 0 failed, 36 ignored.
  • cargo check -p victory-gpu --all-targets --all-features --locked: passed.

I did not run the game or claim an FPS change. The local toolchain's rustfmt and clippy components were unavailable, so CI remains the authoritative lint check.

**@⁠Yuanzer** on GitHub · 2026-11-28 15:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1203) `Yuanzer:codex/issue-1055-share-store-decode` → `main` · +97 −36 · 1 files · 3 commits · merged 2026-11-30 14:12 UTC ## The problem `pipeline::translate` classified each native shader once with `stores` and once with `stores_by_address`. Both predicates call `victory_shader::gfx10::decode` on the same code, so a shader without stores, or one where both classifications were needed, decoded its program twice for these two booleans. Fixes #1055. ## The change - Decode each native program once and derive both classification flags in that pass. - Preserve the original conservative result: empty programs and code that does not decode still report both `true`. - Stop scanning a program as soon as both kinds are known, and stop scanning the program list once both aggregate flags are known. - Keep texture stores and scratch stores out of `stores`, as before. No cache or persistent state is introduced. ## Tests - New `pipeline::tests::store_classification_keeps_both_kinds`: no-store, buffer-store, flat-store, global-store, scratch-store, empty-program, undecodable-code, and multi-program aggregation. - `cargo test -p victory-gpu --lib --locked`: 455 passed, 0 failed, 36 ignored. - `cargo check -p victory-gpu --all-targets --all-features --locked`: passed. I did not run the game or claim an FPS change. The local toolchain's rustfmt and clippy components were unavailable, so CI remains the authoritative lint check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 15:32:53 +00:00
# Conflicts:
#	crates/victory-gpu/src/pipeline.rs
github manually merged commit 8a17a4ff82 into main 2026-11-30 14:17:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!1203
No description provided.