-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Fix GL depth state. #51040
Conversation
| // https://github.com/flutter/flutter/issues/136322 | ||
| #if !FML_OS_MACOSX | ||
| gl.ClearDepthf(pass_data.clear_depth); | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one of the issues for OpenGLES playground runs on MacOS. OpenGL defaults the depth clear value to 1. But my new depth clipping scheme relies on clearing to 0.
And so not being able to modify the depth clear value meant nothing could draw in subpasses that had a depth attachment.
| gl.ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | ||
| gl.DepthMask(GL_TRUE); | ||
| gl.StencilMaskSeparate(GL_FRONT, 0xFFFFFFFF); | ||
| gl.StencilMaskSeparate(GL_BACK, 0xFFFFFFFF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When depth buffer clipping + StC is enabled, the depth mask toggles very frequently, so we need to make sure it's on before clearing.
We've yet to utilize the stencil mask in the 2D renderer, which is why we haven't noticed this problem up until now.
jonahwilliams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/engine@91898e3...c9381fb 2024-02-28 dnfield@google.com Revert "Bump everything to Android 21" (flutter/engine#51056) 2024-02-28 skia-flutter-autoroll@skia.org Roll Skia from 0c294ee206e8 to 93f245da0097 (2 revisions) (flutter/engine#51055) 2024-02-28 jonahwilliams@google.com [Android] update fallback and rendering state to combine impeller + android backend. (flutter/engine#51008) 2024-02-28 bdero@google.com [Impeller] Fix GL depth state. (flutter/engine#51040) 2024-02-28 chris@bracken.jp Roll buildroot to 7b537de78ac2239982ace130d1845374e5dcf113 (flutter/engine#51053) 2024-02-28 skia-flutter-autoroll@skia.org Roll Skia from d935943bedcd to 0c294ee206e8 (3 revisions) (flutter/engine#51051) 2024-02-28 zanderso@users.noreply.github.com When run_tests.py is in --quiet mode, write verbose logs to a file (flutter/engine#51029) 2024-02-28 skia-flutter-autoroll@skia.org Roll Skia from fe34002ee826 to d935943bedcd (1 revision) (flutter/engine#51049) 2024-02-28 dnfield@google.com Bump everything to Android 21 (flutter/engine#51032) 2024-02-28 jiahaog@users.noreply.github.com Add flutter prefix to import (flutter/engine#51042) 2024-02-28 skia-flutter-autoroll@skia.org Roll Skia from d591703635b0 to fe34002ee826 (1 revision) (flutter/engine#51048) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC aaclarke@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Resolves flutter/flutter#136322.
This patch fixes problems with GL depth (in service of #50856):
glClearDepthandglDepthRangerather thanglClearDepthfandglDepthRangef.