-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
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.
Some nits but all minor. LGTM. Thanks!
shell/common/switches.h
Outdated
@@ -266,6 +266,11 @@ DEF_SWITCH(EnableVulkanValidation, | |||
"Enable loading Vulkan validation layers. The layers must be " | |||
"available to the application and loadable. On non-Vulkan backends, " | |||
"this flag does nothing.") | |||
DEF_SWITCH(ImpellerUseGL, | |||
"impeller-use-gl", |
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.
--impeller-force-gl
makes it a teeny bit clearer IMO.
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.
Done
shell/common/switches.h
Outdated
DEF_SWITCH(ImpellerUseGL, | ||
"impeller-use-gl", | ||
"Force Impeller to use the GL backend, if available. If Impeller is " | ||
"not enabled or it does not support a GL backend for the target " |
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.
Nit: commas in help text.
@@ -56,6 +56,9 @@ AndroidSurfaceVulkanImpeller::AndroidSurfaceVulkanImpeller( | |||
CreateImpellerContext(proc_table_, workers_, enable_vulkan_validation); | |||
is_valid_ = | |||
proc_table_->HasAcquiredMandatoryProcAddresses() && impeller_context_; | |||
if (is_valid_) { | |||
FML_LOG(ERROR) << "Using the Impeller Vulkan rendering backend."; |
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.
Perhaps just an info log. Not really an error that we end up using Vulkan.
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 matches the behavior on the GL side, and I assume it was done this way because info logs by default do not show up from flutter run
.
@@ -13,7 +13,7 @@ namespace flutter { | |||
|
|||
enum class AndroidRenderingAPI { | |||
kSoftware, | |||
kOpenGLES, | |||
kGPU, |
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.
👍🏽
if (vk_surface->IsValid()) { | ||
return vk_surface; | ||
} | ||
} |
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.
An info log here saying we are falling back to GL would be good.
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.
There's a log later saying we're using ht eGL backend in this path.
@@ -75,10 +75,9 @@ static std::shared_ptr<impeller::Context> CreateImpellerContext( | |||
FML_LOG(ERROR) << "Could not add reactor worker."; | |||
return nullptr; | |||
} | |||
FML_LOG(ERROR) << "Using the Impeller rendering backend."; | |||
FML_LOG(ERROR) << "Using the Impeller GL rendering backend."; |
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.
I guess the same comment about this being an info log.
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.
(At some point this shoul dbecome an info log but let's handle that in a separate patch)
auto label is removed for flutter/engine, pr: 40809, due to - The status or check suite Linux Android clang-tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
@gaaclarke What's your interpretation of the flagged skia gold diff? Since this PR probably only affected Android/Vulkan, I'm wondering if it means that the test might be flaky? |
I asked in the impeller chat, I think thi particular one is flaky. It's related to text rendering and probably has some difference depending on whehter it's running on an Intel or Arm mac. |
Sibling of the engine patch flutter/engine#40809 Part of flutter#116801
This reverts commit a6421ed.
This reverts commit a6421ed.
This reverts commit a6421ed. Reverting for flutter/flutter#123859
Adds a flag
--impeller-force-gl
to allow us to force the GLES backend to be used for testing purposes. Wired up in the tool in flutter/flutter#123828.Attempts to create the Vulkan backend first (unless flag requesting GL is true). If the context can't be created, then creates the GLES backend instead. Updates the logging statements about using impeller to specify whether it's GL or Vulkan.
I've renamed
AndroidRenderingApi::kOpenGLES
toAndroidRenderingApi::kGPU
because it's confusing to have it referred to that way for Vulkan. Also renamedAndroidContextGLImpeller
toAndroidContextImpeller
- although that class is not really used at this point.Fixes flutter/flutter#116801