Repository navigation
Metal: Preserve reversed depth ranges after viewport updates - #110
Open
andyfangdz wants to merge 1 commit into
Open
andyfangdz wants to merge 1 commit into
andyfangdz wants to merge 1 commit into
Conversation
andyfangdz
force-pushed
the
codex/metal-reversed-depth-viewport
branch
4 times, most recently
from
October 27, 2026 16:06
4433679 to
e168416
Compare
Reapply depth-range normalization after rebuilding the Metal viewport. Otherwise viewport or framebuffer changes restore reversed endpoints while shader depth inversion remains active. Add GLES 1/2/3 regression coverage for viewport changes, framebuffer switches, attachment resizing, and fixed-point depth ranges. Isolate viewport-only changes between draws and probe near a known depth value. Test: angle_end2end_tests (28 Metal cases pass) Test: All 9 regression cases fail without the renderer fix Bug: angleproject:578080497 Change-Id: I3f63a8615191ee9bb7d4ca92eb2f9afef1ebe5dc
andyfangdz
force-pushed
the
codex/metal-reversed-depth-viewport
branch
from
October 27, 2026 16:07
e168416 to
317b0d8
Compare
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.
Upstream review: Gerrit 8663444 · Issue 578080497
Viewport and framebuffer updates can reverse depth ordering when the GL depth range is unchanged. Reuse
updateDepthRangewhen rebuilding the Metal viewport.Regression tests cover viewport-only state changes, framebuffer switches/resizing, and GLES 1 fixed-point ranges.
Validated on Apple M4 with Metal API Validation enabled: 28 Metal tests pass. All 9 regression cases fail without the fix, including the isolated viewport-change tests in GLES 1/2/3.
Before/after framebuffer screenshots: