-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Vulkan: Don't fail initialization if stencil-only textures aren't supported. #50455
[Impeller] Vulkan: Don't fail initialization if stencil-only textures aren't supported. #50455
Conversation
… aren't supported.
| default_stencil_format_ = PixelFormat::kS8UInt; | ||
| } else if (default_stencil_format_ != PixelFormat::kUnknown) { | ||
| default_stencil_format_ = default_depth_stencil_format_; | ||
| } else { |
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 will set the default_depth_stencil_format_ to kUnknown after we may have already initialized it above. Instead maybe we can just delete this entire block?
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.
wait no, that is default_depth_stencil_format_ which is different. woops
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 deleted this since it was checking against default_stencil_format_ and not default_depth_stencil_format_, and so it would always end up being PixelFormat::kUnknown because we haven't set it yet. I think that was a logic error.
Either way, making the originally intended fallback work SGTM. Done.
|
Added a couple of tests. One to verify that having a stencil-only format isn't necessary for context context creation to succeed, and another to verify that context creation will fail if Mercury is in retrograde and a combined depth-stencil format isn't available. |
0ac9a7e to
9b0505a
Compare
| // In Impeller's 2D renderer, we no longer use stencil-only formats. They're | ||
| // less widely supported than combined depth-stencil formats, so make sure we | ||
| // don't fail initialization if we can't find a suitable stencil format. | ||
| TEST(CapabilitiesVKTest, ContextInitializesWithNoStencilFormat) { |
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.
You should be able to bring back the previous test case using ScopedValidationDisable
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.
Ah forgot about this! Done.
This reverts commit 901bcc2.
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
…y textures aren't supported. (flutter/engine#50455)
…y textures aren't supported. (flutter/engine#50455)
…143183) flutter/engine@fb99a84...6f5b6a3 2024-02-08 [email protected] [web] - Fix `inputmode` on Android Firefox (flutter/engine#46901) 2024-02-08 [email protected] [Impeller] Vulkan: Don't fail initialization if stencil-only textures aren't supported. (flutter/engine#50455) 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 [email protected],[email protected],[email protected] 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
Closes flutter/flutter#137108
We don't rely on stencil-only textures anymore in the 2D renderer.