Restore early depth testing in the prison-window prepass #13

Closed
github-bot wants to merge 1 commit from github-bot/gh-13 into main AGit
Owner

@⁠OliWoly on GitHub · 2026-11-29 20:33 UTC · original
OliWoly:pr/prison-window-early-depth → main · +25 −2 · 3 files · 1 commits · closed without merging

Fix

Restore early depth/stencil testing for the Series X prison-window prepass. On RX 7900 XTX, the glass refraction carried across Lucia's hair when viewed from inside the cell. The patch matches the full shader digest and requires the guest's depth-before-shader flag and a pixel shader with no depth, stencil, or coverage export. It uses the DXIL early depth/stencil flag.

The shader-specific fix follows the VI-BR-PORT investigation.

Verification

  • Compared the same Series X checkpoint at 2560×1440 output and 0.5 render scale on RX 7900 XTX, RADV 26.3.1, and Proton-CachyOS. The distortion stays on the pane in the patched build.
  • Recompiled the window pipeline in the release with this fix alone. The pipeline compiled on the regular XMem driver and the fragment SPIR-V contains EarlyFragmentTests.
  • The matched gameplay comparison used the local 2773fdf-based build. I then built this PR at 5b19253 on top of 0989c16 and compiled the exact mesh/pixel pipeline on RX 7900 XTX with the regular XMem driver. The PR build also emits EarlyFragmentTests.

AI-assisted.

**@⁠OliWoly** on GitHub · 2026-11-29 20:33 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/13) `OliWoly:pr/prison-window-early-depth` → `main` · +25 −2 · 3 files · 1 commits · closed without merging ## Fix Restore early depth/stencil testing for the Series X prison-window prepass. On RX 7900 XTX, the glass refraction carried across Lucia's hair when viewed from inside the cell. The patch matches the full shader digest and requires the guest's depth-before-shader flag and a pixel shader with no depth, stencil, or coverage export. It uses the DXIL early depth/stencil flag. The shader-specific fix follows the [VI-BR-PORT investigation](https://github.com/edsuuu/VI-BR-PORT/commit/ed21d00dca77206ffa2db5b2c25328b34762526d). ## Verification - Compared the same Series X checkpoint at 2560×1440 output and 0.5 render scale on RX 7900 XTX, RADV 26.3.1, and Proton-CachyOS. The distortion stays on the pane in the patched build. - Recompiled the window pipeline in the release with this fix alone. The pipeline compiled on the regular XMem driver and the fragment SPIR-V contains `EarlyFragmentTests`. - The matched gameplay comparison used the local 2773fdf-based build. I then built this PR at `5b19253` on top of `0989c16` and compiled the exact mesh/pixel pipeline on RX 7900 XTX with the regular XMem driver. The PR build also emits `EarlyFragmentTests`. AI-assisted.
The user saw the prison window draw across the character's hair on
Navi 31. The XMem run bound d16aa6328e7f5025, the pixel program targeted
by VI-BR-PORT 34ceddaa and ed21d00d for the same artifact.

Match the full identifier and honour the console's depth-before-shader
bit for this program if it has no depth, stencil or coverage export.
Keep the other pixel shaders on their existing path.

The isolated mesh pipeline compiled on the RX 7900 XTX on both sides.
The targeted fragment stage gained EarlyFragmentTests in SPIR-V. The
visual result still needs a matched prison-window shot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e5d1d15af9628e3cb8447e888fc4d86bf05edacc)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 07:41:09 +00:00
github-bot closed this pull request 2026-12-03 02:14:34 +00:00
Author
Owner

@⁠goldfishdev on GitHub · 2026-12-03 02:13 UTC · original

This is already in main: commit fe13f18 ported it, and the CELL_WINDOW_PREPASS / EARLY_DEPTH_STENCIL code is in crates/victory-shader. Closing as applied — thanks.

**@⁠goldfishdev** on GitHub · 2026-12-03 02:13 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/13#issuecomment-7365221880) This is already in main: commit fe13f18 ported it, and the CELL_WINDOW_PREPASS / EARLY_DEPTH_STENCIL code is in crates/victory-shader. Closing as applied — thanks.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.