Game: build blend register candidates in fixed arrays #3723

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

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T11:47:33Z.


Build each eight-target blend candidate in an array. The independent-blend base rows are generated in their current order, and each variation copies an array instead of allocating a vector. The single-target replication cases also use an array. The lookup and every emitted descriptor stay the same.

The exact old and new enumerators produced the same 283,232 descriptor byte arrays in the same order across 128 generated state and format combinations. A release fixture hashes every candidate in order and checks the resulting checksum. Across 16 balanced Windows measurements, the per-enumeration medians were:

Typed render targets Main Proposed
0 348.40 µs 137.41 µs
1 282.14 µs 99.73 µs
4 225.26 µs 87.27 µs
8 122.59 µs 56.69 µs

The timings cover the blend candidate generator and its hash consumer on generated states. #3713 avoids repeating an entire search across records. This change reduces work inside one search. All 15 game 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:5539802635 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3723). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T11:47:33Z. --- Build each eight-target blend candidate in an array. The independent-blend base rows are generated in their current order, and each variation copies an array instead of allocating a vector. The single-target replication cases also use an array. The lookup and every emitted descriptor stay the same. The exact old and new enumerators produced the same 283,232 descriptor byte arrays in the same order across 128 generated state and format combinations. A release fixture hashes every candidate in order and checks the resulting checksum. Across 16 balanced Windows measurements, the per-enumeration medians were: | Typed render targets | Main | Proposed | | --- | ---: | ---: | | 0 | 348.40 µs | 137.41 µs | | 1 | 282.14 µs | 99.73 µs | | 4 | 225.26 µs | 87.27 µs | | 8 | 122.59 µs | 56.69 µs | The timings cover the blend candidate generator and its hash consumer on generated states. #3713 avoids repeating an entire search across records. This change reduces work inside one search. All 15 game 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 11:50:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T11:50:25Z.


The exact 0478400 head passed Windows CI, including workspace tests and both Clippy configurations. The generated comparison preserved every descriptor and its ordering. With a hash for each candidate, the isolated blend search took 54–65% less time across the four render-target shapes in the PR description.

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:7238816607 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3723#issuecomment-7238816607). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T11:50:25Z. --- The exact `0478400` head passed [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46141537913/job/140968342840), including workspace tests and both Clippy configurations. The generated comparison preserved every descriptor and its ordering. With a hash for each candidate, the isolated blend search took 54–65% less time across the four render-target shapes in the PR description. 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/3723:upstream-pr/3723'
git switch 'upstream-pr/3723'

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/3723'
git switch 'upstream-pr/3723'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3723'
git switch 'upstream-pr/3723'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3723'
git switch 'main'
git merge --squash 'upstream-pr/3723'
git switch 'main'
git merge --ff-only 'upstream-pr/3723'
git switch 'main'
git merge 'upstream-pr/3723'
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!3723
No description provided.