Game: skip register packets for already named pipeline states #3698
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3698"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T08:44:52Z.
Before reading a record's register image, check whether its depth/stencil or blend state still needs a name. Records whose hashes are already resolved now skip the register and format reads and the deduplication table. The existing matching path still handles either kind independently.
In an optimized Windows fixture with 25,003 generated records, 25,000 referred only to states supplied by the database. The other records supplied one depth state and one blend state and left a third hash unresolved. The full Named::find returned the same state bytes and source labels. Its median across nine alternating pairs was 141.44 ms on main and 128.35 ms with this change.
For the register matching step alone, fifteen alternating pairs measured 12.55 ms to 2.78 ms in the mixed fixture. In the control where every record repeats one still-unresolved packet, the precheck adds a lookup on each record and the median was 5.63 ms to 6.16 ms. Both checks use generated inputs. #2575 stops whole searches after the wanted hashes have been found, while this handles already named records even with unresolved hashes elsewhere.
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.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T08:47:38Z.
Windows CI passed on
9dfdf6d, including both Clippy configurations and the workspace tests. On the generated 25,003-record mixed pack,Named::findreturned identical depth, blend and raster maps and source labels. Median time was 141.44 ms on base and 128.35 ms with this change. The all-unresolved repeated-packet control was about 0.53 ms slower at the register stage.The 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.