Game: try what depth-stencil registers do not keep (stacked on #3047) #3048
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3048
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3048"
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?
@zed6000 on GitHub · 2026-11-26 05:14 UTC · original
zed6000:pr-depth-registers→main· +222 −21 · 1 files · 2 commits · openThe depth-stencil half of #2930. Stacked on #3047: the first commit here is #3047's, and this PR's own change is the second commit (
1d5afa0). Once #3047 is in, only that commit remains.After rasterisers, the pre-build's largest named-state gap is 139 records (13 hashes) with
depth-stencil state not named. Comparingdepth_from_registers's candidates with the descriptions that do match shows three things the registers don't keep:DEPTH_BOUNDS_ENABLEis clear. Both are now tried as 0 and 1.DB_STENCILREFMASKholds 0 where the description has 0xFF (or the read mask). Both are tried.STENCIL_ENABLEclear,DB_DEPTH_CONTROL/DB_STENCIL_CONTROLstill hold the faces the engine's description names. They are tried next to the D3D12 default faces.depth_from_registersnow wraps the old body (depth_kept) and adds those variants. The face decoding moved tostencil_facesso both use it. The CityHash64 still decides.Measured on
shaders.rpf1.0.2.1 (offline, RX 7900 XTX):Named::findtakes ~88 ms.translate --cache --pipelinesskips 41 of 28,164 pipelines (main: 1,029): 3 depth-stencil, 3 blend, and the 35 shader causes. Every pipeline it made was created.cargo test -p victory-game18/0 (1 new test, on synthetic registers), and clippy clean.The 2 hashes still unnamed (3 records) have depth on and a stencil whose registers keep nothing it writes. A search over every op and func of both faces didn't match them, so they're left alone.
🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-26 06:17 UTC · original
Automated triage for the maintainers.
Verdict: merge candidate, after #3047. The PR's first commit is #3047's. The only change of its own is
1d5afa0incrates/victory-game/src/pipelines.rs.depth_from_registersnow wraps the old body (renameddepth_kept) and also tries:DB_STENCIL_CONTROL/DB_DEPTH_CONTROLstill hold.The face decoding is moved unchanged into
stencil_faces. A candidate still counts only when its CityHash64 matches the record's, so the extra variants cannot name a wrong state. The search stays small, at most a few hundred candidates per register image.Note for the maintainer: #3040 also changes
depth_from_registersanddepth_spaceto recover the depth-bounds bit (b15), and the two will conflict textually. This PR covers b15 in the register path more broadly. #3040 also adds b15 to the enumeration and checks the stream output. Pick one, or rebase the other.CI:
checkpassing.Generated by Claude Code
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.