Repository navigation
Conversation
The pack's register images keep the rasteriser registers 0x28 bytes into the fixed part (PA_CL_CLIP_CNTL, PA_SU_SC_MODE_CNTL, the poly-offset clamp, front scale and front offset). Reading cull, winding, depth clip, clamp, slope (scale / 16) and bias from them names every rasteriser hash of the pack, including six whose clamped, fractional slope biases no enumeration reached: all three states of 25,329 of 25,471 records are named instead of 24,477, so the pre-build makes 852 more pipelines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The register images leave out b14 and the depth-bounds test (b15), keep the write mask of a stencil that can write nothing as 0, and still hold the ops and funcs of a stencil that is off, which the engine's descriptions name. Trying those as well names 11 of the 13 depth-stencil hashes the pack's records had unnamed (136 of 139 records): all three states of 25,465 of 25,471 records are named, and the pre-build skips 41 of 28,164 pipelines instead of 1,029. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fuzeofficlal
left a comment
There was a problem hiding this comment.
Static review of commit 1d5afa02 (stacked on #3047) in crates/victory-game/src/pipelines.rs.
depth_from_registers cleanly wraps depth_kept and tries the four combinations of (b[14], b[15]), the 0xFF / read-mask write-mask variants when DB_STENCILREFMASK has write mask 0 with stencil enabled, and the register-encoded stencil faces when STENCIL_ENABLE is clear. Trying (b[14], b[15]) unconditionally also catches descriptions that enable depth bounds even when DB_DEPTH_CONTROL bit 3 is clear, and CityHash64 remains the exact arbiter. Clean factoring via stencil_faces and clear unit tests.
kotekompotek
left a comment
There was a problem hiding this comment.
Verified (delta over #3047): stencil_faces is a faithful extraction of the inline decode (same control/stencil shifts, back=front when back-face stencil is off). The enumeration bounds at faces(≤2) × writes(≤3) × tail(4) = 24 candidates and covers exactly the non-kept fields the doc names: b14/b15, register-decoded faces under stencil-off, and write-mask alternatives under kept-0. The test discriminates each variant. 25,465 of 25,471 records named.
|
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
The face decoding is moved unchanged into Note for the maintainer: #3040 also changes CI: Generated by Claude Code |
The 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