GPU: static samplers are created in one listed order, so NVIDIA library pipelines load with their own samplers #3674

Open
upipibi wants to merge 2 commits from upstream-pr/3674 into main
upipibi commented 2026-11-28 05:25:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T05:25:26Z.


Two commits on main 63bcca4. Claimed in #1633 (finding).

What

On NVIDIA, a host pipeline loaded from the pipeline library can sample through the wrong static samplers. The driver gives each distinct static sampler a place in a per-process table, and a compiled pipeline refers to its samplers by place. The workers make pipelines in no fixed order, so a later run can give the same samplers other places. The blob still loads, but linear reads come back as point reads.

How the driver gives places, measured on an RTX 3070 (616.56), 3 of 3 runs per case (table):

  • the place depends on the sampler's description alone, not its register or visibility;
  • places go in creation order among the samplers alive at the time;
  • a released place goes to the next new sampler.

The first commit skipped the library on NVIDIA for these pipelines. Ym1r1710 measured what that costs on the retail title (RTX 5080): 540-960 rebuilds per launch, with 375-478 ms frames while they are built. So the second commit keeps the creation order fixed instead:

  • List (pipeline/sampler_order.rs): every distinct static sampler, as given to the host (after filter_for_host, without register, space and visibility), is listed in static-samplers.txt beside the library, in the order first met.

  • Priming: when the host device is made, every listed sampler is created in list order, each in a root signature of its own that lives as long as the process. A sampler's place is then its line, whatever order the workers ask in.

  • New samplers: a sampler not listed is appended, the list saved and its own root signature made under one lock, before the root signature that asked for it. The presenter's sampler goes through the same path.

  • Guard: a pipeline's library name also holds its samplers' lines and a hash of the list up to the last of them. A lost, cut or reordered list gives a miss and a compile, never a load through other samplers.

  • Fallback: where the order can't be vouched for, the first commit's skip stays: VICTORY_SAMPLER_ORDER=0, after a listed sampler was refused, or for a sampler first met after external::host_device() handed out the device (the host's FidelityFX may create samplers of its own). Otherwise NVIDIA uses the library again, and other vendors are unchanged.

  • Independent confirmation on a second card: CharlyRien's cross-process test on an RTX 3090 (also driver 616.56), on xcl, with a model that predicts all 26 reads: one place per static sampler description in a per-process table, in creation order, a released place given out again, places compiled into the code; descriptor-heap samplers take no place (comment).

The design follows trustno1-coder/VIctory-NVIDIA's pipeline/samplers.rs (at 64d4931), whose header counts 28 distinct static samplers in the title, far under the driver's 2,032. The code here is written separately.

Tested

RTX 3070 (desktop), driver 616.56, Windows 11 Pro 10.0.26100, debug build, head 9cabf54. Each test runs its stages as child processes on one cache folder.

Test What the last run does 3070, 3 of 3
a_kept_pipeline_samples_through_its_own_static_samplers creates 10 other static samplers first, then loads the pipeline loaded, [0.0, 0.25, 0.25], pass
a_static_sampler_met_in_a_later_run_is_appended run 2 meets the probe's three samplers for the first time (after 10 others) and appends them; run 3 meets 5 more new ones first, then loads loaded, right values, pass
a_lost_static_sampler_list_gives_a_miss the list is deleted between runs made again (miss), right values, pass
unprimed_static_samplers_load_wrong (ignored control: list read but not created first) loads the pipeline loaded, [0.0, 0.0, 0.0]
  • On WARP (--features diagnostics, VICTORY_D3D12_WARP=1) the three tests pass. The control samples right there ([0.0, 0.25, 0.25]), as WARP doesn't have this problem, so it is only meaningful on NVIDIA.
  • VICTORY_SAMPLER_ORDER=0 on the 3070: the pipeline is made, not loaded, with right values.
  • cargo test --locked -p victory-gpu --lib: 235 passed, 2 failed, 2 ignored. main 63bcca4 gives 229 passed, 2 failed, 1 ignored with the same two failures, descriptor::host::tests::dynamic_slots_are_held_until_released and memory::tests::lists_share_a_table_and_copies_keep_their_views. They come from the capped view heap on this card, which #2937, #3191, #3244 and #3286 already cover.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings, with and without --features diagnostics: clean. cargo run -p xtask -- policy: ok.

Not tested

  • Linux through vkd3d-proton: pickles976 ran the four tests on an RTX 4060 Laptop (NVIDIA 590.48.1, Wine 11, vkd3d-proton 3.2.0) (comment). The three fixtures pass. The control samples right there too, so the defect is the native Windows driver's; on that stack this PR changes nothing visible.
  • With #3685: andrewpozdnakov7-jpg has a three-process test for both PRs together (prebuilt key checked against the sampler list), passing on WARP, in 89f87aa, to add if both land.
  • The title: there's no game data here. How many pipelines load again on NVIDIA, and the frame times, would need someone with the title.
  • Other NVIDIA drivers and generations: the placement rules were measured on 616.56 only. RegisterSpace wasn't varied; every static sampler today is in one space.
  • AMD and Intel hardware. They keep the library as before, but the names of these pipelines change, so the first run after this rebuilds them once on every vendor.
  • Two processes on one cache folder: the last one to save the list wins. That can cost rebuilds but never a wrong load.

AI use

Claude Code (Claude Opus 5.5) found the bug, wrote the code, the tests and this description, and ran everything above on the hardware named.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:5537037154 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-28T05:25:26Z. --- Two commits on `main` `63bcca4`. Claimed in #1633 ([finding](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7234432011)). ## What On NVIDIA, a host pipeline loaded from the pipeline library can sample through the wrong static samplers. The driver gives each distinct static sampler a place in a per-process table, and a compiled pipeline refers to its samplers by place. The workers make pipelines in no fixed order, so a later run can give the same samplers other places. The blob still loads, but linear reads come back as point reads. How the driver gives places, measured on an RTX 3070 (616.56), 3 of 3 runs per case ([table](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7234723837)): - the place depends on the sampler's description alone, not its register or visibility; - places go in creation order among the samplers alive at the time; - a released place goes to the next new sampler. The first commit skipped the library on NVIDIA for these pipelines. Ym1r1710 measured what that costs on the retail title (RTX 5080): 540-960 rebuilds per launch, with 375-478 ms frames while they are built. So the second commit keeps the creation order fixed instead: - **List** (`pipeline/sampler_order.rs`): every distinct static sampler, as given to the host (after `filter_for_host`, without register, space and visibility), is listed in `static-samplers.txt` beside the library, in the order first met. - **Priming:** when the host device is made, every listed sampler is created in list order, each in a root signature of its own that lives as long as the process. A sampler's place is then its line, whatever order the workers ask in. - **New samplers:** a sampler not listed is appended, the list saved and its own root signature made under one lock, before the root signature that asked for it. The presenter's sampler goes through the same path. - **Guard:** a pipeline's library name also holds its samplers' lines and a hash of the list up to the last of them. A lost, cut or reordered list gives a miss and a compile, never a load through other samplers. - **Fallback:** where the order can't be vouched for, the first commit's skip stays: `VICTORY_SAMPLER_ORDER=0`, after a listed sampler was refused, or for a sampler first met after `external::host_device()` handed out the device (the host's FidelityFX may create samplers of its own). Otherwise NVIDIA uses the library again, and other vendors are unchanged. - Independent confirmation on a second card: CharlyRien's cross-process test on an RTX 3090 (also driver 616.56), on xcl, with a model that predicts all 26 reads: one place per static sampler description in a per-process table, in creation order, a released place given out again, places compiled into the code; descriptor-heap samplers take no place ([comment](https://github.com/xcl-dev/xcl/issues/505#issuecomment-7239567274)). The design follows trustno1-coder/VIctory-NVIDIA's `pipeline/samplers.rs` (at `64d4931`), whose header counts 28 distinct static samplers in the title, far under the driver's 2,032. The code here is written separately. ## Tested RTX 3070 (desktop), driver 616.56, Windows 11 Pro 10.0.26100, debug build, head `9cabf54`. Each test runs its stages as child processes on one cache folder. | Test | What the last run does | 3070, 3 of 3 | |---|---|---| | `a_kept_pipeline_samples_through_its_own_static_samplers` | creates 10 other static samplers first, then loads the pipeline | loaded, `[0.0, 0.25, 0.25]`, pass | | `a_static_sampler_met_in_a_later_run_is_appended` | run 2 meets the probe's three samplers for the first time (after 10 others) and appends them; run 3 meets 5 more new ones first, then loads | loaded, right values, pass | | `a_lost_static_sampler_list_gives_a_miss` | the list is deleted between runs | made again (miss), right values, pass | | `unprimed_static_samplers_load_wrong` (ignored control: list read but not created first) | loads the pipeline | loaded, `[0.0, 0.0, 0.0]` | - On WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`) the three tests pass. The control samples right there (`[0.0, 0.25, 0.25]`), as WARP doesn't have this problem, so it is only meaningful on NVIDIA. - `VICTORY_SAMPLER_ORDER=0` on the 3070: the pipeline is made, not loaded, with right values. - `cargo test --locked -p victory-gpu --lib`: 235 passed, 2 failed, 2 ignored. `main` `63bcca4` gives 229 passed, 2 failed, 1 ignored with the same two failures, `descriptor::host::tests::dynamic_slots_are_held_until_released` and `memory::tests::lists_share_a_table_and_copies_keep_their_views`. They come from the capped view heap on this card, which #2937, #3191, #3244 and #3286 already cover. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings`, with and without `--features diagnostics`: clean. `cargo run -p xtask -- policy`: ok. ## Not tested - Linux through vkd3d-proton: pickles976 ran the four tests on an RTX 4060 Laptop (NVIDIA 590.48.1, Wine 11, vkd3d-proton 3.2.0) ([comment](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7235473573)). The three fixtures pass. The control samples right there too, so the defect is the native Windows driver's; on that stack this PR changes nothing visible. - With #3685: andrewpozdnakov7-jpg has a three-process test for both PRs together (prebuilt key checked against the sampler list), passing on WARP, in [89f87aa](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/89f87aa054a24917fced63ace509ee95d9db8518), to add if both land. - The title: there's no game data here. How many pipelines load again on NVIDIA, and the frame times, would need someone with the title. - Other NVIDIA drivers and generations: the placement rules were measured on 616.56 only. `RegisterSpace` wasn't varied; every static sampler today is in one space. - AMD and Intel hardware. They keep the library as before, but the names of these pipelines change, so the first run after this rebuilds them once on every vendor. - Two processes on one cache folder: the last one to save the list wins. That can cost rebuilds but never a wrong load. ## AI use Claude Code (Claude Opus 5.5) found the bug, wrote the code, the tests and this description, and ran everything above on the hardware named. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ym1r1710 commented 2026-11-28 05:26:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Ym1r1710 on 2026-11-28T05:26:58Z.


Some numbers on the cost side, since that's the open question here. RTX 5080, driver 621.24, Windows 11, retail title.

I hit the same bug: blocky 8-16 px patches and a posterized picture in some launches, from linear reads coming back as point reads. I tried two things.

  1. Keep the library, but add each pipeline's static sampler numbers in this launch to its library name, so a blob stored under another order misses and gets rebuilt. It fixed the picture, but in a launch whose creation order differs from the one the library was saved with, 540 to 960 pipelines were rebuilt. Those launches ran at a 375-478 ms frame median in the world while they were being built. Making them every run, as this PR does, should cost about the same on every launch.

  2. Create the title's static samplers in a fixed order before any root signature that uses them. I record the list once and replay it at startup, then let new ones append. The driver's numbering is then the same every launch, so the library loads normally. No rebuilds, and the patches haven't come back in any launch since.

I run both together now: the fixed order for speed, the numbers in the key as a guard if the list is lost or cut. It might be worth considering the fixed order instead of skipping the library on NVIDIA, since on this title a good share of pipelines carry static samplers.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234675908 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7234675908). Originally posted by [Ym1r1710](https://github.com/Ym1r1710) on 2026-11-28T05:26:58Z. --- Some numbers on the cost side, since that's the open question here. RTX 5080, driver 621.24, Windows 11, retail title. I hit the same bug: blocky 8-16 px patches and a posterized picture in some launches, from linear reads coming back as point reads. I tried two things. 1. Keep the library, but add each pipeline's static sampler numbers in this launch to its library name, so a blob stored under another order misses and gets rebuilt. It fixed the picture, but in a launch whose creation order differs from the one the library was saved with, 540 to 960 pipelines were rebuilt. Those launches ran at a 375-478 ms frame median in the world while they were being built. Making them every run, as this PR does, should cost about the same on every launch. 2. Create the title's static samplers in a fixed order before any root signature that uses them. I record the list once and replay it at startup, then let new ones append. The driver's numbering is then the same every launch, so the library loads normally. No rebuilds, and the patches haven't come back in any launch since. I run both together now: the fixed order for speed, the numbers in the key as a guard if the list is lost or cut. It might be worth considering the fixed order instead of skipping the library on NVIDIA, since on this title a good share of pipelines carry static samplers.
upipibi commented 2026-11-28 05:31:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T05:31:40Z.


@Ym1r1710 Thanks, those are the numbers this PR was missing. If 540-960 pipelines get rebuilt on every NVIDIA launch, skipping the library costs too much to be the answer on its own.

The fixed order depends on how the driver numbers static samplers, and I'd like to measure that before reworking this. On the 3070 (616.56) I can test three things with synthetic root signatures:

  1. Whether a slot is reused after the last root signature holding that sampler is released. If it is, replaying the list doesn't give the same numbers in a launch that frees root signatures in a different order.
  2. Whether two descriptions that differ only in ShaderRegister or ShaderVisibility count as one sampler or two. That decides what the list and the name guard have to key on.
  3. How close the list gets to the 2,032 distinct-sampler limit I measured here.

On 3: how many entries does your list have after several launches, and does it keep growing?

If you'd rather open your version (fixed order plus the guard) as a PR, I'll run it on the 3070 with this PR's test and close this one in its favour. Otherwise I'll post the three results here and change this PR to follow them.

Edit (05:4x UTC): the results. This uses the test in this PR with its NVIDIA check forced to load. The first process stores the pipeline (point, linear and trilinear static samplers, registers 0-2). The second creates the root signatures below first, then loads it. RTX 3070, 616.56, 3 of 3 runs for each row:

Created first in the loading process Sampled (point, linear, trilinear)
nothing [0, 0.25, 0.25] right
10 other samplers, kept alive [0, 0, 0] wrong
the same 10, released before the load [0, 0.25, 0.25] right: released places are taken again
the same 3 samplers in reverse order [0.25, 0.25, 0] wrong: places follow the order of creation
the same 3, same order, on registers 5-7 [0, 0.25, 0.25] right: the register doesn't count
the same 3, reverse order, on registers 5-7 [0.25, 0.25, 0] wrong
the same 3, same order, SHADER_VISIBILITY_PIXEL [0, 0.25, 0.25] right: visibility doesn't count

So on this driver, a place belongs to a sampler's description only (not its register or visibility), in the order of creation among the samplers alive at the time. A replayed list has to stay alive for the whole process, because a released place goes to whatever sampler is created next. trustno1-coder/VIctory-NVIDIA's pipeline/samplers.rs (at 64d4931) works this way: it keys on the description words, keeps its priming root signatures alive, and counts 28 distinct static samplers in the title, far under the driver's 2,032.

That supports your fixed order. Unless you'd rather open your version, I'll change this PR to it: the replayed list kept alive from device creation, new samplers appended, and the library used again on NVIDIA.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234723837 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7234723837). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-28T05:31:40Z. --- @Ym1r1710 Thanks, those are the numbers this PR was missing. If 540-960 pipelines get rebuilt on every NVIDIA launch, skipping the library costs too much to be the answer on its own. The fixed order depends on how the driver numbers static samplers, and I'd like to measure that before reworking this. On the 3070 (616.56) I can test three things with synthetic root signatures: 1. Whether a slot is reused after the last root signature holding that sampler is released. If it is, replaying the list doesn't give the same numbers in a launch that frees root signatures in a different order. 2. Whether two descriptions that differ only in `ShaderRegister` or `ShaderVisibility` count as one sampler or two. That decides what the list and the name guard have to key on. 3. How close the list gets to the 2,032 distinct-sampler limit I measured here. On 3: how many entries does your list have after several launches, and does it keep growing? If you'd rather open your version (fixed order plus the guard) as a PR, I'll run it on the 3070 with this PR's test and close this one in its favour. Otherwise I'll post the three results here and change this PR to follow them. **Edit (05:4x UTC): the results.** This uses the test in this PR with its NVIDIA check forced to load. The first process stores the pipeline (point, linear and trilinear static samplers, registers 0-2). The second creates the root signatures below first, then loads it. RTX 3070, 616.56, 3 of 3 runs for each row: | Created first in the loading process | Sampled (point, linear, trilinear) | | |---|---|---| | nothing | `[0, 0.25, 0.25]` | right | | 10 other samplers, kept alive | `[0, 0, 0]` | wrong | | the same 10, released before the load | `[0, 0.25, 0.25]` | right: released places are taken again | | the same 3 samplers in reverse order | `[0.25, 0.25, 0]` | wrong: places follow the order of creation | | the same 3, same order, on registers 5-7 | `[0, 0.25, 0.25]` | right: the register doesn't count | | the same 3, reverse order, on registers 5-7 | `[0.25, 0.25, 0]` | wrong | | the same 3, same order, `SHADER_VISIBILITY_PIXEL` | `[0, 0.25, 0.25]` | right: visibility doesn't count | So on this driver, a place belongs to a sampler's description only (not its register or visibility), in the order of creation among the samplers alive at the time. A replayed list has to stay alive for the whole process, because a released place goes to whatever sampler is created next. trustno1-coder/VIctory-NVIDIA's `pipeline/samplers.rs` (at `64d4931`) works this way: it keys on the description words, keeps its priming root signatures alive, and counts 28 distinct static samplers in the title, far under the driver's 2,032. That supports your fixed order. Unless you'd rather open your version, I'll change this PR to it: the replayed list kept alive from device creation, new samplers appended, and the library used again on NVIDIA.
upipibi commented 2026-11-28 06:14:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T06:14:59Z.


Changed to the fixed order (9cabf54), following the measurements above. Static samplers are listed beside the library and created in list order when the device is made, in root signatures kept for the whole process, and new ones are appended. Each pipeline's library name holds its samplers' list positions, so a lost or changed list gives a rebuild, never a wrong load. NVIDIA uses the library again. The skip stays only as a fallback (details in the description).

On the 3070, the load run creates 10 other samplers first and still loads the pipeline with the right values, 3 of 3. Without priming, it loads and samples [0, 0, 0]. A run on the title from someone with an NVIDIA card would show how many pipelines now load again, and whether the patches stay away.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235174714 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7235174714). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-28T06:14:59Z. --- Changed to the fixed order (`9cabf54`), following the measurements above. Static samplers are listed beside the library and created in list order when the device is made, in root signatures kept for the whole process, and new ones are appended. Each pipeline's library name holds its samplers' list positions, so a lost or changed list gives a rebuild, never a wrong load. NVIDIA uses the library again. The skip stays only as a fallback (details in the description). On the 3070, the load run creates 10 other samplers first and still loads the pipeline with the right values, 3 of 3. Without priming, it loads and samples `[0, 0, 0]`. A run on the title from someone with an NVIDIA card would show how many pipelines now load again, and whether the patches stay away.
pickles976 commented 2026-11-28 06:43:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-28T06:43:02Z.


Wine/NVIDIA check: the three ordered-cache fixtures pass, but the native-Windows corruption control does not reproduce here.

  • Physical RTX 4060 Laptop 8 GiB, NVIDIA 590.48.1, Linux/Wine 11, DXVK NVIDIA masking disabled; diagnostic vkd3d-proton 3.2.0 2576c0b4adfae4a+ (not stock certification).
  • Production head 9cabf54654b7141ba108ab70c3ce8f04613c6e1a plus #1722's null-pointer empty-library bootstrap required by this Wine stack. Test-only absent-host skip replaced by an assertion. Thus a disclosed compatibility combination, not pristine-head coverage.
  • Fresh matching shader/core/pipeline/formats/GPU compilation: 8.11 s. Single-threaded Windows-MSVC fixture group: 5.97 s.
  • Kept pipeline, later appended sampler, and lost-list recovery: 3/3 pass. Cross-process loads return [0.0, 0.25, 0.25]; lost list correctly rebuilds.
  • unprimed_static_samplers_load_wrong: pipeline really loaded, but also returned the correct [0.0, 0.25, 0.25]. It fails its deliberately inverted assert_ne! (0/1), so this is non-reproduction of the Windows driver defect, not incorrect Wine readback or a PR regression.
  • Guarded whole command 14.54 s; GPU peak 218.0 MiB, minimum available RAM 10881.6 MiB. No title run, no visual/performance causality claim.

Command: cargo test -p victory-gpu --lib -- a_kept_pipeline_samples_through_its_own_static_samplers a_static_sampler_met_in_a_later_run_is_appended a_lost_static_sampler_list_gives_a_miss unprimed_static_samplers_load_wrong --include-ignored --nocapture --test-threads=1 through the existing Wine/MSVC wrapper.

Evidence: .compat-runtime/logs/verify-pr3674-wine-sampler-cache-20261128T064122Z/ (console, exact command/provenance, resources, result). We will not attribute our title's incomplete lighting to this native-Windows cache defect on the strength of this test; the control instead shows an important platform distinction. No assets or imagery attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235473573 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7235473573). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-28T06:43:02Z. --- Wine/NVIDIA check: the three ordered-cache fixtures pass, but the native-Windows corruption control does **not reproduce** here. - Physical RTX 4060 Laptop 8 GiB, NVIDIA 590.48.1, Linux/Wine 11, DXVK NVIDIA masking disabled; diagnostic vkd3d-proton 3.2.0 `2576c0b4adfae4a+` (not stock certification). - Production head `9cabf54654b7141ba108ab70c3ce8f04613c6e1a` **plus #1722's null-pointer empty-library bootstrap** required by this Wine stack. Test-only absent-host skip replaced by an assertion. Thus a disclosed compatibility combination, not pristine-head coverage. - Fresh matching shader/core/pipeline/formats/GPU compilation: 8.11 s. Single-threaded Windows-MSVC fixture group: 5.97 s. - Kept pipeline, later appended sampler, and lost-list recovery: **3/3 pass**. Cross-process loads return `[0.0, 0.25, 0.25]`; lost list correctly rebuilds. - `unprimed_static_samplers_load_wrong`: pipeline really **loaded**, but also returned the correct `[0.0, 0.25, 0.25]`. It fails its deliberately inverted `assert_ne!` (0/1), so this is **non-reproduction of the Windows driver defect**, not incorrect Wine readback or a PR regression. - Guarded whole command 14.54 s; GPU peak 218.0 MiB, minimum available RAM 10881.6 MiB. No title run, no visual/performance causality claim. Command: `cargo test -p victory-gpu --lib -- a_kept_pipeline_samples_through_its_own_static_samplers a_static_sampler_met_in_a_later_run_is_appended a_lost_static_sampler_list_gives_a_miss unprimed_static_samplers_load_wrong --include-ignored --nocapture --test-threads=1` through the existing Wine/MSVC wrapper. Evidence: `.compat-runtime/logs/verify-pr3674-wine-sampler-cache-20261128T064122Z/` (console, exact command/provenance, resources, result). We will not attribute our title's incomplete lighting to this native-Windows cache defect on the strength of this test; the control instead shows an important platform distinction. No assets or imagery attached.
andrewpozdnakov7-jpg commented 2026-11-28 06:45:27 +00:00 (Migrated from github.com)

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


I combined #3674 at 9cabf54 with #3685 at 35625d7 in 89f87aa. The added test runs three separate processes. The first writes the library and a prebuilt key. The second finds that key before appending any new samplers, then creates ten more and loads the saved probe. The third opens the changed sampler list, rejects the old prebuilt key and still loads the saved probe via its unchanged sampler prefix.

On WARP the probe returned [0.0, 0.25, 0.25] in each case. The absent-prebuilt-list and appended-sampler tests loaded their probes. The missing-sampler-list test rebuilt the probe and returned the same values. All seven targeted tests, strict GPU Clippy and the asset policy passed with WARP 1.0.22 and Agility 1.620.2.

The NVIDIA results remain those from your RTX 3070 run. upipibi or a maintainer can use the additional test if both PRs land.

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

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235498330 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7235498330). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:45:27Z. --- I combined #3674 at `9cabf54` with #3685 at `35625d7` in [89f87aa](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/89f87aa054a24917fced63ace509ee95d9db8518). The added test runs three separate processes. The first writes the library and a prebuilt key. The second finds that key before appending any new samplers, then creates ten more and loads the saved probe. The third opens the changed sampler list, rejects the old prebuilt key and still loads the saved probe via its unchanged sampler prefix. On WARP the probe returned `[0.0, 0.25, 0.25]` in each case. The absent-prebuilt-list and appended-sampler tests loaded their probes. The missing-sampler-list test rebuilt the probe and returned the same values. All seven targeted tests, strict GPU Clippy and the asset policy passed with WARP 1.0.22 and Agility 1.620.2. The NVIDIA results remain those from your RTX 3070 run. upipibi or a maintainer can use the additional test if both PRs land. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this resolution into another commit. AI-assisted with OpenAI Codex.
Aniseto commented 2026-11-28 14:12:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Aniseto on 2026-11-28T14:12:10Z.


Ran the ordered static-sampler cache fixtures at 9cabf54 on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build.

VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_kept_pipeline_samples_through_its_own_static_samplers -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out      (exit 0)

VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_static_sampler_met_in_a_later_run_is_appended -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out      (exit 0)

VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_lost_static_sampler_list_gives_a_miss -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out      (exit 0)

All three ordered-cache fixtures pass, each running its stages as child processes on one cache folder. They cover a kept pipeline sampling through its own samplers after another run made different ones first, a sampler first met later being appended, and a lost list producing a miss so the pipeline is rebuilt. The thread already has RTX 3070, 3090, 5080 and Wine/4060 datapoints; this adds native Windows Blackwell. I did not run the ignored native-Windows corruption control or the full workspace suite.

Not tested: the ignored corruption control, the full workspace suite, a retail title, a paired smoke run, AMD and Intel GPUs, wave64 hardware, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7240493899 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7240493899). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-28T14:12:10Z. --- Ran the ordered static-sampler cache fixtures at `9cabf54` on an NVIDIA Blackwell desktop part: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build. ``` VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_kept_pipeline_samples_through_its_own_static_samplers -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out (exit 0) VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_static_sampler_met_in_a_later_run_is_appended -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out (exit 0) VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib a_lost_static_sampler_list_gives_a_miss -- --test-threads=1 1 passed; 0 failed; 0 ignored; 0 measured; 238 filtered out (exit 0) ``` All three ordered-cache fixtures pass, each running its stages as child processes on one cache folder. They cover a kept pipeline sampling through its own samplers after another run made different ones first, a sampler first met later being appended, and a lost list producing a miss so the pipeline is rebuilt. The thread already has RTX 3070, 3090, 5080 and Wine/4060 datapoints; this adds native Windows Blackwell. I did not run the ignored native-Windows corruption control or the full workspace suite. Not tested: the ignored corruption control, the full workspace suite, a retail title, a paired smoke run, AMD and Intel GPUs, wave64 hardware, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
gtport646 commented 2026-11-29 03:47:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by gtport646 on 2026-11-29T03:47:09Z.


Independent confirmation on an RTX 4090 (Windows 11), from a fork that carries the same fix (same design: listed order, primed at device creation, new samplers appended under one lock, library names tied to the list, a fallback that makes instead of loads; also VICTORY_SAMPLER_ORDER=0 for the old behaviour).

A two-process probe: a pipeline with a linear static sampler is stored by one run and loaded by another.

  • If the loading run created ten other static samplers first, the loaded pipeline read the linear sampler as point.
  • If the loading run created the storing run's samplers first, in the storing run's order, it read correctly.
  • The place followed the sampler's description alone.

That matches your 3070 table and CharlyRien's 3090 result, so it holds on Ada too.

In the title (Series S profile), the fix didn't change how often one dark-lighting scene appeared (1 of 5 launches bright with it, 1 of 5 with these pipelines always made). That scene had other causes, so it isn't evidence against this PR, just a note that it isn't a fix for that scene.

No game data used.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7250256833 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3674#issuecomment-7250256833). Originally posted by [gtport646](https://github.com/gtport646) on 2026-11-29T03:47:09Z. --- Independent confirmation on an RTX 4090 (Windows 11), from a fork that carries the same fix (same design: listed order, primed at device creation, new samplers appended under one lock, library names tied to the list, a fallback that makes instead of loads; also `VICTORY_SAMPLER_ORDER=0` for the old behaviour). A two-process probe: a pipeline with a linear static sampler is stored by one run and loaded by another. - If the loading run created ten other static samplers first, the loaded pipeline read the linear sampler as point. - If the loading run created the storing run's samplers first, in the storing run's order, it read correctly. - The place followed the sampler's description alone. That matches your 3070 table and CharlyRien's 3090 result, so it holds on Ada too. In the title (Series S profile), the fix didn't change how often one dark-lighting scene appeared (1 of 5 launches bright with it, 1 of 5 with these pipelines always made). That scene had other causes, so it isn't evidence against this PR, just a note that it isn't a fix for that scene. No game data used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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/3674:upstream-pr/3674'
git switch 'upstream-pr/3674'

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