Adds opengles to engine dart tests#181933
Conversation
…irectory for `vk_swiftshader_icd.json`
…les and vulkan TesterContext.
…s VULKAN_SO_PATH for proc_address_callback rather than using vkGetInstanceProcAddr
…ls/gn `angle_enable_metal` is True, which is the default The other two angle_enable values need to be True (default) to enable opengles testing on mac
- Fill in shader_mappings - Add a reactor worker to ContextGLES. The worker sets the current egl context when requested, and properly handles releasing the current context by using TesterGLContext
… in the arguments
…d by the most recent merge
…/non-vm-service loops in gather_dart_tests
…d AddTaskObserver() if the context is already current. Otherwise, the added observer replaces the existing one, and the current context gets inadvertently cleared.
…is set but requested_rendering_backend is empty. I think this case happens when running "flutter test --impeller-enabled", so I couldn't get rid of it like before. This uses an empty() check, so unlike the original "!tester_context" check, this won't silently fall back to vulkan when trying and failing with a different backend
…testing, this takes longer than the default 30 min.
gaaclarke
left a comment
There was a problem hiding this comment.
Awesome, this is looking good. There is a lot of fiddly code for setting up swangle but ultimately if it run on CI that's the ultimate test and that's what its use is limited to. I just have a few cleanup suggestions.
engine/src/flutter/shell/testing/tester_context_gles_factory.cc
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/testing/tester_context_gles_factory.cc
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/testing/tester_context_gles_factory.cc
Outdated
Show resolved
Hide resolved
| // Impeller should only be enabled if the Metal backend is enabled. | ||
| #define TESTER_ENABLE_METAL \ | ||
| (IMPELLER_SUPPORTS_RENDERING && IMPELLER_ENABLE_METAL) | ||
| (IMPELLER_SUPPORTS_RENDERING && IMPELLER_ENABLE_METAL && SHELL_ENABLE_METAL) |
There was a problem hiding this comment.
I think I see. I guess it's not really a big deal if flutter_tester_opengles has metal if we don't run metal tests with it, right? Not a big deal, just making sure I understand.
| dart_tests = glob.glob(f'{dart_tests_dir}/*_test.dart') | ||
|
|
||
| impeller_backends = ['', 'vulkan'] | ||
| opengles_skipped_tests = [ |
There was a problem hiding this comment.
Ahh nice work. It sounds like we should add the [[nodiscard]] annotation to MakeRenderContextCurrent().
We might have to change the test's to artificially keep that context in scope and active to mimic the runtime behavior.
| dart_tests = glob.glob(f'{dart_tests_dir}/*_test.dart') | ||
|
|
||
| impeller_backends = ['', 'vulkan'] | ||
| opengles_skipped_tests = [ |
There was a problem hiding this comment.
Let's add an issue to get these turned back on.
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
gaaclarke
left a comment
There was a problem hiding this comment.
LGTM! There is some bad changes in the golden tests. I'm not sure what those are about. Maybe try rebasing.
|
@b-luk ahh, okay I missed the backend dimension. Okay, I'd approve those new goldens and file a bug. I think there may be a way to discard the old approvals after we fix the bug. |
|
Sounds good. Assuming the goldens after the merge come back the same way, I'll approve them and get this PR submitted, then file an issue about the one weird test. |
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
The goldens failed in the same way. I think they're all fine except for the weird drawImageNine issue I mentioned. I approved the changed goldens and filed #182101 |
Roll Flutter from e8f9dc50356d to 9bda20a11f1e (34 revisions) flutter/flutter@e8f9dc5...9bda20a 2026-02-10 [email protected] Remove Material import from focus_traversal_test.dart (flutter/flutter#180994) 2026-02-10 [email protected] Roll Skia from 6e217430c052 to cffb3bf918df (1 revision) (flutter/flutter#182131) 2026-02-10 [email protected] Encourage splitting large test files in testing documentation 2 (flutter/flutter#182051) 2026-02-10 [email protected] refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder (flutter/flutter#179776) 2026-02-10 [email protected] Delete the last remaining skia only fragment shader tests (flutter/flutter#182127) 2026-02-10 [email protected] [a11y][android] Set new CheckState APIs for android API 36 (flutter/flutter#182113) 2026-02-10 [email protected] Add missing dependencies to framework_tests_misc_leak_tracking (flutter/flutter#181929) 2026-02-10 [email protected] Roll Dart SDK from eee0e2e11174 to 69eb951f8f7e (2 revisions) (flutter/flutter#182128) 2026-02-10 [email protected] Marks Linux_android_emu android_display_cutout to be flaky (flutter/flutter#181901) 2026-02-10 [email protected] Bump Dart to 3.10 (flutter/flutter#174066) 2026-02-10 [email protected] Roll Skia from d4b7e24a209b to 6e217430c052 (6 revisions) (flutter/flutter#182126) 2026-02-09 [email protected] Intercept UIScene device log and print a guided warning (flutter/flutter#181515) 2026-02-09 [email protected] Introduce ScrollCacheExtent and also fixes unbound shrinkwrap cache ex… (flutter/flutter#181092) 2026-02-09 [email protected] [Android] Add mechanism for setting Android engine flags via Android manifest (take 2) (flutter/flutter#181632) 2026-02-09 [email protected] Fix wrong comment about default impeller value (flutter/flutter#181831) 2026-02-09 [email protected] fix build fail for wayland only platform (flutter/flutter#182057) 2026-02-09 [email protected] [AGP 9] Added Warning Against Updating to AGP 9 (flutter/flutter#181977) 2026-02-09 [email protected] Updated Shaderc dep (flutter/flutter#180976) 2026-02-09 [email protected] Refactor accessibility guidelines out to widget layer (flutter/flutter#181672) 2026-02-09 [email protected] Roll Skia from 68dff53238e5 to d4b7e24a209b (2 revisions) (flutter/flutter#182087) 2026-02-09 [email protected] fix: OutlineInputBorder not respecting BorderSide stroke alignment (flutter/flutter#180487) 2026-02-09 [email protected] Adds opengles to engine dart tests (flutter/flutter#181933) 2026-02-09 [email protected] Add command to build a Swift Package for Add to App and generate FlutterPluginRegistrant (flutter/flutter#181224) 2026-02-09 [email protected] Remove unused constant in `bundle.dart` (flutter/flutter#182023) 2026-02-09 [email protected] Roll Fuchsia Linux SDK from iqtwdXlgKIyZkL5Li... to 7BGf7mPQvgLi7Axb6... (flutter/flutter#182082) 2026-02-09 [email protected] Remove unused getters in `user_messages.dart` (flutter/flutter#181867) 2026-02-09 [email protected] Roll Packages from 7805d3e to 3d5eaa5 (3 revisions) (flutter/flutter#182083) 2026-02-09 [email protected] Roll Skia from 5d891cd7fb7f to 68dff53238e5 (1 revision) (flutter/flutter#182080) 2026-02-09 [email protected] Update example description (flutter/flutter#182067) 2026-02-09 [email protected] Roll Dart SDK from 965b51c219d3 to eee0e2e11174 (1 revision) (flutter/flutter#182073) 2026-02-09 [email protected] Roll Skia from 9533d7533d59 to 5d891cd7fb7f (6 revisions) (flutter/flutter#182070) 2026-02-09 [email protected] Add a new flutter cli command, running-apps, using mDNS app discovery (flutter/flutter#180098) 2026-02-09 [email protected] Roll Skia from b7db9f35f0f2 to 9533d7533d59 (2 revisions) (flutter/flutter#182069) 2026-02-08 [email protected] Improve FlWindowMonitor API (flutter/flutter#181885) 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 ...
Forked from flutter#180704. See comments there for more context. Enables most of the dart tests for opengles. There are some which aren't passing, which are filtered out in run_tests.py. Fixes an issue in snapshot_controller_impeller.cc where a returned GLContextResult is ignored. The returned GLContextResult is potentially an RAII object, so it must stay in scope for subsequent GL calls. Fixes flutter#180601 ## 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. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Aaron Clarke <[email protected]> Co-authored-by: gaaclarke <[email protected]>
…ith opengles (#182179) The `frag_info.source_rect` passed into https://github.com/flutter/flutter/blob/98977409b2ac8209be9e918abb0bbb9c37a23d0f/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag from [texture_contents.cc](https://github.com/flutter/flutter/blob/98977409b2ac8209be9e918abb0bbb9c37a23d0f/engine/src/flutter/impeller/entity/contents/texture_contents.cc#L187) did not account for an inverted y scale (used with an opengles impeller backend). This ends up causing the coordinates used to sample the texture in the fragment shader to be incorrectly clamped. A lot of the y coordinates end up incorrectly being considered outside of the source_rect, so we end up with lots of incorrect y values and vertical smearing caused by the clamping. The texture_fill_strict_src.frag shader is used primarily by calls to drawImageNIne. NinePatchConverter calls DrawImageRect with SourceRectConstraint::kStrict, which uses texture_fill_strict_src.frag. #182101 shows a repro case for this. The golden test issue discussed in #181933 (comment) is also caused by this. ## 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. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Forked from flutter#180704. See comments there for more context. Enables most of the dart tests for opengles. There are some which aren't passing, which are filtered out in run_tests.py. Fixes an issue in snapshot_controller_impeller.cc where a returned GLContextResult is ignored. The returned GLContextResult is potentially an RAII object, so it must stay in scope for subsequent GL calls. Fixes flutter#180601 ## 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. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Aaron Clarke <[email protected]> Co-authored-by: gaaclarke <[email protected]>
…ith opengles (flutter#182179) The `frag_info.source_rect` passed into https://github.com/flutter/flutter/blob/98977409b2ac8209be9e918abb0bbb9c37a23d0f/engine/src/flutter/impeller/entity/shaders/texture_fill_strict_src.frag from [texture_contents.cc](https://github.com/flutter/flutter/blob/98977409b2ac8209be9e918abb0bbb9c37a23d0f/engine/src/flutter/impeller/entity/contents/texture_contents.cc#L187) did not account for an inverted y scale (used with an opengles impeller backend). This ends up causing the coordinates used to sample the texture in the fragment shader to be incorrectly clamped. A lot of the y coordinates end up incorrectly being considered outside of the source_rect, so we end up with lots of incorrect y values and vertical smearing caused by the clamping. The texture_fill_strict_src.frag shader is used primarily by calls to drawImageNIne. NinePatchConverter calls DrawImageRect with SourceRectConstraint::kStrict, which uses texture_fill_strict_src.frag. flutter#182101 shows a repro case for this. The golden test issue discussed in flutter#181933 (comment) is also caused by this. ## 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. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md


Forked from #180704. See comments there for more context.
Enables most of the dart tests for opengles. There are some which aren't passing, which are filtered out in run_tests.py.
Fixes an issue in snapshot_controller_impeller.cc where a returned GLContextResult is ignored. The returned GLContextResult is potentially an RAII object, so it must stay in scope for subsequent GL calls.
Fixes #180601
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.