GPU: fingerprint the pipeline library on demand #3685

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

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T06:30:18Z.


Warm startup now fingerprints the host pipeline library only after D3D12 accepts its bytes and a prebuilt list is available to check. A normal library load without that list no longer hashes the whole blob. The list still has to match the accepted library before any prebuilt keys are used.

The source-derived fixture agreed on the resulting keys in six cases, including a matching list, a list for different bytes and an absent list. With no list, the optimized local CPU fixture measured 11.6 ms of avoided work for a generated 16 MiB blob and 46.1 ms for 64 MiB, over 15 alternating runs. These measurements cover the startup decision and hashing. They exclude file I/O, driver library creation and game startup.

Three pipeline-library tests passed, including the list check and concurrent WARP loading. Strict GPU Clippy and the asset policy also passed. The optional prebuilt list is versioned by this source file, so an existing list is regenerated on the next prebuild. The D3D12 library blob remains eligible for normal loading.

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:5537467317 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3685). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:30:18Z. --- Warm startup now fingerprints the host pipeline library only after D3D12 accepts its bytes and a prebuilt list is available to check. A normal library load without that list no longer hashes the whole blob. The list still has to match the accepted library before any prebuilt keys are used. The source-derived fixture agreed on the resulting keys in six cases, including a matching list, a list for different bytes and an absent list. With no list, the optimized local CPU fixture measured 11.6 ms of avoided work for a generated 16 MiB blob and 46.1 ms for 64 MiB, over 15 alternating runs. These measurements cover the startup decision and hashing. They exclude file I/O, driver library creation and game startup. Three pipeline-library tests passed, including the list check and concurrent WARP loading. Strict GPU Clippy and the asset policy also passed. The optional prebuilt list is versioned by this source file, so an existing list is regenerated on the next prebuild. The D3D12 library blob remains eligible for normal loading. 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 06:33:37 +00:00 (Migrated from github.com)

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


Windows CI passed at 35625d7, including Clippy on both build configurations and the repository test job. The six startup cases and the synthetic hashing measurements in the description apply to this head. The same behavior also passed with per-translation cache directories in #2706.

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 this change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235372763 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3685#issuecomment-7235372763). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:33:37Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46116906608/job/140892672906) passed at `35625d7`, including Clippy on both build configurations and the repository test job. The six startup cases and the synthetic hashing measurements in the description apply to this head. The same behavior also passed with per-translation cache directories in [#2706](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7235369226). 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 this 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/3685:upstream-pr/3685'
git switch 'upstream-pr/3685'

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