Skip to content

Honor disabled GS depth testing and restore movie pixels - #280

Open
Fiztba wants to merge 1 commit into
ran-j:mainfrom
Fiztba:fix/gs-disabled-depth-test
Open

Fiztba wants to merge 1 commit into
ran-j:mainfrom
Fiztba:fix/gs-disabled-depth-test

Conversation

@Fiztba

@Fiztba Fiztba commented Oct 10, 2026

Copy link
Copy Markdown

King's Field: The Ancient City's opening movie sets TEST.ZTE=0. The CPU GS backend still applied the stored ZTST=NEVER, so decoded and uploaded movie pictures were rejected and only audio played. Disabled depth testing now passes pixels regardless of ZTST and suppresses depth writes, including alpha-failure ZB_ONLY. Enabled depth comparisons retain their existing behavior.

This follows the ZTE handling in PCSX2's software renderer. Six synthetic tests use the actual CPU GS backend and cover the movie's two field sprites, disabled methods, enabled comparisons, ZBUF masking and ZB_ONLY.

Validation: native Windows x64 MSVC 19.44, RelWithDebInfo with /O2 /fp:strict, passed all 51 standalone GS cache/depth CTest cases. Reverting just the two production hunks makes three of the six new cases fail, including the black movie. The Holyland integration also displayed the opening with audio and reached gameplay at its natural ending in a private retail run. No disc assets or generated guest code are included. This PR's standalone tests do not exercise the full runtime; Linux was not run.

Treat ZTE=0 as an unconditional depth-test pass without Z-buffer writes, regardless of stored ZTST or alpha-failure ZB_ONLY. Add synthetic real-backend regression coverage for the opening-movie sprite state and enabled depth comparisons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant