Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reject depth-failing triangle pixels before color interpolation, texture sampling, and fog. This applies only to enabled GEQUAL/GREATER tests; passing pixels retain the existing WritePixel path, including its depth test. Sprites, lines, alpha-test behavior, blending, framebuffer/depth masks, and depth-format conversion are unchanged.
PS2X_GS_DISABLE_EARLY_DEPTH=1restores the reference path at process launch for differential checks.Validation
e1af4f1cfc948cc3on this build.Downstream Measurement
In an X-Men Legends bring-up branch with other runtime fixes, a same-executable on/off comparison across 301 gameplay frames reduced mean CPU raster time from 98.98 ms to 63.03 ms, approximately 36%. This is a downstream rasterization measurement, not a claim about whole-game FPS or upstream-main performance.
A separate downstream verification replayed all 23,042 triangle submissions in one live gameplay frame against private copies of their starting VRAM and CLUT state, comparing every VRAM byte after each draw. There were zero mismatches. That diagnostic harness and the game's data are not part of this PR.
Limits
This is an incremental software-rasterizer optimization, not a fix for existing visual defects. Passing pixels incur an extra depth read. Low-overdraw workloads may benefit less or regress; the reference switch is retained for comparisons.