Game: deduplicate depth and blend register searches independently #3713

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3713 into main
andrewpozdnakov7-jpg commented 2026-11-28 10:38:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T10:38:43Z.


During pipeline naming, the same depth or blend register state can recur while the other state varies. Track attempted expansions separately by kind. The depth key uses the three words read by the depth search. The blend key uses the render-target formats and nine relevant words. Each keeps its record's target hash. Candidate ordering and matching against all wanted hashes are preserved.

An optimized Windows fixture compared the exact main and proposed register scan in twelve balanced pairs. Both produced equal state bytes, source labels, and unresolved hash sets in all four cases.

Generated input Main median Proposed median
1,024 records, one pending depth state with varying blend registers 2.97 ms 0.11 ms
1,024 records, one pending blend state with varying depth registers 379.48 ms 0.53 ms
256 records, both pending and every register key distinct 90.57 ms 101.56 ms
1,024 records, both found on the first record 0.49 ms 0.39 ms

The all-distinct control reaps no deduplication benefit, uses two lookup tables, and showed run-to-run timing variation. These are register scan times on generated records. Game startup and hardware coverage remain unmeasured.

All 15 game crate tests, strict Clippy, and the asset policy passed.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5539258874 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3713). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T10:38:43Z. --- During pipeline naming, the same depth or blend register state can recur while the other state varies. Track attempted expansions separately by kind. The depth key uses the three words read by the depth search. The blend key uses the render-target formats and nine relevant words. Each keeps its record's target hash. Candidate ordering and matching against all wanted hashes are preserved. An optimized Windows fixture compared the exact main and proposed register scan in twelve balanced pairs. Both produced equal state bytes, source labels, and unresolved hash sets in all four cases. | Generated input | Main median | Proposed median | | --- | ---: | ---: | | 1,024 records, one pending depth state with varying blend registers | 2.97 ms | 0.11 ms | | 1,024 records, one pending blend state with varying depth registers | 379.48 ms | 0.53 ms | | 256 records, both pending and every register key distinct | 90.57 ms | 101.56 ms | | 1,024 records, both found on the first record | 0.49 ms | 0.39 ms | The all-distinct control reaps no deduplication benefit, uses two lookup tables, and showed run-to-run timing variation. These are register scan times on generated records. Game startup and hardware coverage remain unmeasured. All 15 game crate tests, strict Clippy, and the asset policy passed. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 10:41:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T10:41:46Z.


The exact 13a711a head passed Windows CI, including the workspace tests and both Clippy configurations. On generated input, the register scan returned the same state bytes, source labels, and unresolved hashes. In the all-distinct control, the median was 90.57 ms on main and 101.56 ms here. The timings for both repeated-state cases are in the PR description. Game startup and hardware coverage remain unmeasured.

Next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7238061923 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3713#issuecomment-7238061923). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T10:41:46Z. --- The exact `13a711a` head passed [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46136151599/job/140951799981), including the workspace tests and both Clippy configurations. On generated input, the register scan returned the same state bytes, source labels, and unresolved hashes. In the all-distinct control, the median was 90.57 ms on main and 101.56 ms here. The timings for both repeated-state cases are in the PR description. Game startup and hardware coverage remain unmeasured. Next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3713:upstream-pr/3713'
git switch 'upstream-pr/3713'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3713'
git switch 'upstream-pr/3713'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3713'
git switch 'upstream-pr/3713'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3713'
git switch 'main'
git merge --squash 'upstream-pr/3713'
git switch 'main'
git merge --ff-only 'upstream-pr/3713'
git switch 'main'
git merge 'upstream-pr/3713'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!3713
No description provided.