device: hold the claimed capabilities against what the host reports #111
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/111"
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 Zettrox/ztrx. Originally posted by xiaotu030202 on 2026-11-25T12:11:01Z.
What
device.rsanswers the title's feature queries with a fixed table,OPTIONS, which is right — a title written for a console must see the console's values or it takes a different path. What was not checked anywhere is whether the host can deliver them.host::createreads two (OPTIONS1's wave lanes,OPTIONS7's mesh shader tier); the other fourteen are claimed and never compared with anything.Two tests now compare them on the machine they run on. Neither fails when the tables differ — a host weaker than the console in a field the title never reads is not a bug — they fail only where the layer reads a field without a fallback.
What this machine reports
This is the device report the PR is really for: RTX 5070 Ti, driver 32.0.16.2140, Ryzen 7 9800X3D, Windows 11 22631.
Thirteen of fifteen agree. The three that do not:
Mesh shader tier 1 vs 10 —
10isD3D12_MESH_SHADER_TIER_1;1is the console's own numbering.host::createcompares with!= NOT_SUPPORTED, which is right, so this is not a gap. The test prints both so nobody reads1vs10as a regression later.Wave lanes 64 vs 32 — known and handled:
set_host_max_wave(32)from that samehost::create, and the translator narrows what it can. The useful half of that check:cargo test -p victory-shader --libwithVICTORY_HOST_MAX_WAVE=32is 211 passed, 0 failed on this card.Stencil reference from a pixel shader — claimed 1, host says 0. This is the finding.
emitsupportsSV_StencilRef(there is a test for its SFI0 bit), so a title that believes the claim can put that output in a shader, have it translated, and be handed to the host. What the host then does is tested nowhere, and on a card reporting0the honest possibilities are "pipeline creation refuses it" or "accepted and the output ignored". Either way the title was told something untrue about the machine.Why this is not a patch
Changing
OPTIONS[5]to0changes what the title does, and claiming1may be right anyway if the stencil work the title needs goes throughOMSetStencilRef— whichdraw.rsimplements, which is a different mechanism, and which does work. That is a call for someone who can watch the title react. The test records the difference and says so; it does not assert which answer is correct, only that the console's claim is1and that changing it should be deliberate.Verification
Windows 11 22631, RTX 5070 Ti 32.0.16.2140, Rust 1.98.1 (pinned), MSVC 14.44.35207, Windows SDK 10.0.26100.0. No game files.
Both new tests skip on a machine with no host GPU, like the other hardware tests here.
One small addition outside them:
claimed_stencil_ref(),#[cfg(test)], so the test holds the table entry instead of repeating the literal1— if someone changesOPTIONS[5]the test moves with it rather than silently passing.Not done
The stencil gap itself. The two places to change are
OPTIONS[5]here and whatever the title does with the answer — the second needs a run.If this device report is useful on its own, it may belong in a comment on #37 (the other 5070 Ti report, driver 621.24) rather than as a patch; happy to move it if that is a better home.
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.