NVIDIA: the picture depends on which launches filled the pipeline library (static samplers; shadows and hair wrong in the prologue cell) #1459
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-27T11:09:52Z.
Short version. On an NVIDIA card the title's picture depends on which launches filled the pipeline library, and on whether this launch makes one more static sampler before the title's own. My reading of it: a pipeline loaded from the library samples with other static samplers than its root signature names when this launch first makes its static samplers in another order than the launch that stored it. The picture is then wrong for the whole run, with no error and no warning. Measured on an RTX 3090 Ti, driver 616.92, Windows 11 26200, Series S profile, prologue cell.
I found it through my own #1081 (its blend pass had a static sampler; that is fixed there, see the comment), but it does not need a sampler of the layer's: a library filled by launches of another configuration is enough.
What I measured
1. One more static sampler, made early, with a library filled without it (
main1f5d17a; the extra root signature is made at the first present and never bound):20 runs of 20 wrong with a sampler unlike the title's own, 0 of 12 without one or with the last row's. The title's pipelines carry 23 different static samplers in their first 2,048 root signatures; one of them is its shadow comparison sampler, and the wrong picture looks like shadow lookups made without comparison.
2. The library is what carries it (
main9a9091dwith #798 and #1081, the same build and switches each time):mainwithout #798, where the title takes another upscaler path)3. The same again with my own test tree (
9a9091dwith #798, #1081, #1388, #1414; one build, the usual switches):In every "right" row the cell has dark hair, an evenly dark wall and the print on the shirt; in every "wrong" row the hair is bright yellow. Shader translations were shared between all of these (one folder); only the library differed.
What I have not done: the reverse of 1 (fill a library with the extra sampler present, then load it without).
What I think happens
The driver numbers the different static samplers of a device in the order they are first made, a compiled pipeline refers to them by number, and a pipeline stored in the library keeps the numbers of the launch that compiled it. The library's check that an entry's description is the same passes, since the description is the same: the samplers are equal by value, only their numbers on this device differ. I have no way to look inside the driver; this is the simplest thing that fits every row above.
Why it matters beyond one PR
Anything that changes the order in which different static samplers are first made, between the launch that stored a pipeline and a later one, can do this:
tiles.rshas one; #1081 had one);mainwhose pipelines of unchanged description are still in the library from an older one;It would explain pictures that are wrong in some runs and right in others with no change in between, and wrong for one tester and right for another on the same commit.
What could be done
I can send the first as a PR if you want it; say so and I will, with the same measurements repeated on it.
Numbers and descriptions only; no game data. AI-assisted (Claude Code, Claude Fable 5.2).
Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-27T11:43:21Z.
A fix along the first of the three lines above is in #1461: the static samplers a cache has seen are listed beside the library and made in that order before a launch's first root signature.
It also gives a way to reproduce this on other cards without my debug build: in a diagnostics build of that branch,
VICTORY_SAMPLER_ORDER=0 VICTORY_EXTRA_STATIC_SAMPLER=1on a library that was filled without the second switch makes one more unlike static sampler before the title's first root signature. Here that gives the wrong picture (bright yellow hair in the prologue's cell); the same launch with the order kept is right. Four launches, in the PR's table.Still a guess, as said above: that the driver numbers the samplers by first use. The test shows the case that was wrong 20 times of 20 come out right; it does not show the driver.
AI-assisted (Claude Code, Claude Fable 5.2).