enable enhanced debugging for GLES playground#181157
enable enhanced debugging for GLES playground#181157auto-submit[bot] merged 1 commit intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
This pull request enables enhanced debugging for the GLES playground by setting up a debug context and a message callback when the KHR_debug extension is available. The changes are well-implemented and correctly guarded by NDEBUG to only affect debug builds. I have one suggestion to make the debug callback more comprehensive by logging additional message types, which would further improve the utility of this feature.
| switch (message_type) { | ||
| case GL_DEBUG_TYPE_ERROR_KHR: | ||
| FML_LOG(ERROR) << "GL Error: " << message; | ||
| return; | ||
| default: | ||
| return; | ||
| } |
There was a problem hiding this comment.
The current implementation of the debug callback only logs messages of type GL_DEBUG_TYPE_ERROR_KHR. The KHR_debug extension can provide other useful information, such as performance warnings (GL_DEBUG_TYPE_PERFORMANCE_KHR), portability issues (GL_DEBUG_TYPE_PORTABILITY_KHR), and deprecated API usage (GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR).
To make this debugging feature more comprehensive, consider logging these other message types as warnings. This would provide developers with more insight into potential issues beyond just hard errors.
switch (message_type) {
case GL_DEBUG_TYPE_ERROR_KHR:
FML_LOG(ERROR) << "GL Error: " << message;
return;
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR:
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR:
case GL_DEBUG_TYPE_PORTABILITY_KHR:
case GL_DEBUG_TYPE_PERFORMANCE_KHR:
case GL_DEBUG_TYPE_OTHER_KHR:
FML_LOG(WARNING) << "GL Debug Message: " << message;
return;
default:
// Other message types are ignored.
return;
}
There was a problem hiding this comment.
I did consider this but it can make the logs quite noisy. Intentionally left as a possible future enhancement.
a6c0c0e to
4fd5c24
Compare
|
I think this has a very real windows compile error: ../../../flutter\impeller/renderer/backend/gles/proc_table_gles.h(56,13): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast] 56 | stream << arg; | ^~~ |
… GL API wrappers log arguments with function types flutter#181157 introduced a call to the glDebugMessageCallback API using a lambda as the argument. On Windows builds this produces a warning about a nonstandard implicit conversion when the Impeller GL API wrappers try to log the callback argument.
Roll Flutter from da72d5936d69 to 1d9d6a9a5ef6 (33 revisions) flutter/flutter@da72d59...1d9d6a9 2026-01-30 [email protected] enable enhanced debugging for GLES playground (flutter/flutter#181157) 2026-01-30 [email protected] Make the Windows windowing_test in .ci.yaml have bringup as false (flutter/flutter#181664) 2026-01-30 [email protected] Roll Packages from cd4fd61 to 510dd40 (4 revisions) (flutter/flutter#181726) 2026-01-30 [email protected] Roll Skia from edbf7e9eb846 to 4745eb2fe837 (1 revision) (flutter/flutter#181725) 2026-01-30 [email protected] Enhance error handling of WidgetsBindingObserver callbacks (flutter/flutter#181174) 2026-01-30 [email protected] Roll Skia from 05d3cb9d2be9 to edbf7e9eb846 (2 revisions) (flutter/flutter#181715) 2026-01-30 [email protected] Roll Skia from c198e5fa9cd9 to 05d3cb9d2be9 (1 revision) (flutter/flutter#181712) 2026-01-30 [email protected] Roll Dart SDK from 920b7e24583e to 2703fd9733ce (2 revisions) (flutter/flutter#181693) 2026-01-30 [email protected] Roll Skia from b9f40c193e7a to c198e5fa9cd9 (6 revisions) (flutter/flutter#181692) 2026-01-30 [email protected] Roll pub packages (flutter/flutter#181690) 2026-01-30 [email protected] Extend the Windows tool_integration_tests_2_9 shard timeout to 1 hour (flutter/flutter#181678) 2026-01-29 [email protected] Add `android_sdk` dependency to `android_engine_opengles_tests` (flutter/flutter#181681) 2026-01-29 [email protected] Roll Dart SDK from a0685c8e946b to 920b7e24583e (3 revisions) (flutter/flutter#181680) 2026-01-29 [email protected] Roll Skia from 128b5213711e to b9f40c193e7a (14 revisions) (flutter/flutter#181675) 2026-01-29 [email protected] [Impeller] Ensure that HostBuffers/DeviceBuffers allocated by RendererTest tests are valid for the lifetime of the RenderPass (flutter/flutter#181635) 2026-01-29 [email protected] [Impeller] Fix off-by-one indices in the SimilarPointPair/SimilarPointTrio functions used by ShadowPathGeometryTest (flutter/flutter#181623) 2026-01-29 [email protected] 180162 fix radio list tile and switch list tile accept widget states controller (flutter/flutter#180367) 2026-01-29 [email protected] Remove unused test file (flutter/flutter#181671) 2026-01-29 [email protected] Roll libpng to version 1.6.54 (flutter/flutter#181625) 2026-01-29 [email protected] Remove nonstandard ndkpath for `hybrid_android_views` integration test (flutter/flutter#181666) 2026-01-29 [email protected] Add TestWidgetsApp utility and refactor widget tests to use WidgetsApp (flutter/flutter#180456) 2026-01-29 [email protected] Add `TestTextField` and migrate tests (flutter/flutter#180494) 2026-01-29 [email protected] Merge changelog for 3.38.9 (flutter/flutter#181668) 2026-01-29 [email protected] [flutter_tools] Deprecate `plugin_ffi` template (flutter/flutter#181588) 2026-01-29 [email protected] Deprecate onReorder callback (flutter/flutter#178242) 2026-01-29 [email protected] [web] Use defensive null check in text editing placeElement (flutter/flutter#180795) 2026-01-29 [email protected] Roll Packages from 1cb2148 to cd4fd61 (4 revisions) (flutter/flutter#181663) 2026-01-29 [email protected] Roll Skia from 89df65f8324c to 128b5213711e (2 revisions) (flutter/flutter#181651) 2026-01-29 [email protected] [hooks] Don't run build hooks for code assets in `flutter run` (flutter/flutter#181542) 2026-01-29 [email protected] Roll Dart SDK from f10dcbfca98f to a0685c8e946b (5 revisions) (flutter/flutter#181653) 2026-01-29 [email protected] Fixes getUniformX for Vulkan (flutter/flutter#181286) 2026-01-29 [email protected] Roll Fuchsia Linux SDK from adhoq9ouVRh0xzkm3... to isy1ARvK-3bsvtfc-... (flutter/flutter#181641) 2026-01-29 [email protected] Add isDark, isLight, and isSystem getters to ThemeMode (flutter/flutter#181475) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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: ...
… GL API wrappers log arguments with function types (#181734) #181157 introduced a call to the glDebugMessageCallback API using a lambda as the argument. On Windows builds this produces a warning about a nonstandard implicit conversion when the Impeller GL API wrappers try to log the callback argument.
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Enables improved OpenGLES debug support in the playground tests if [KHR_DEBUG](https://registry.khronos.org/OpenGL/extensions/KHR/KHR_debug.txt) is available. Only activated on unoptimized builds (where `NDEBUG` is not defined) Example: Before: ``` [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` After: ``` [ERROR:flutter/impeller/playground/backend/gles/playground_impl_gles.cc(146)] GL Error: GL_INVALID_ENUM error generated. Invalid buffer target enum. [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` Closes flutter#179329 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
… GL API wrappers log arguments with function types (flutter#181734) flutter#181157 introduced a call to the glDebugMessageCallback API using a lambda as the argument. On Windows builds this produces a warning about a nonstandard implicit conversion when the Impeller GL API wrappers try to log the callback argument.
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Enables improved OpenGLES debug support in the playground tests if [KHR_DEBUG](https://registry.khronos.org/OpenGL/extensions/KHR/KHR_debug.txt) is available. Only activated on unoptimized builds (where `NDEBUG` is not defined) Example: Before: ``` [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` After: ``` [ERROR:flutter/impeller/playground/backend/gles/playground_impl_gles.cc(146)] GL Error: GL_INVALID_ENUM error generated. Invalid buffer target enum. [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` Closes flutter#179329 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
… GL API wrappers log arguments with function types (flutter#181734) flutter#181157 introduced a call to the glDebugMessageCallback API using a lambda as the argument. On Windows builds this produces a warning about a nonstandard implicit conversion when the Impeller GL API wrappers try to log the callback argument.
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Enables improved OpenGLES debug support in the playground tests if [KHR_DEBUG](https://registry.khronos.org/OpenGL/extensions/KHR/KHR_debug.txt) is available. Only activated on unoptimized builds (where `NDEBUG` is not defined) Example: Before: ``` [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` After: ``` [ERROR:flutter/impeller/playground/backend/gles/playground_impl_gles.cc(146)] GL Error: GL_INVALID_ENUM error generated. Invalid buffer target enum. [FATAL:flutter/impeller/renderer/backend/gles/proc_table_gles.h(44)] Fatal GL Error GL_INVALID_ENUM(1280) encountered on call to glBindBuffer ``` Closes flutter#179329 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
… GL API wrappers log arguments with function types (flutter#181734) flutter#181157 introduced a call to the glDebugMessageCallback API using a lambda as the argument. On Windows builds this produces a warning about a nonstandard implicit conversion when the Impeller GL API wrappers try to log the callback argument.
Enables improved OpenGLES debug support in the playground tests if KHR_DEBUG is available. Only activated on unoptimized builds (where
NDEBUGis not defined)Example:
Before:
After:
Closes #179329
Pre-launch Checklist
///).