Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bdero
Copy link
Member

@bdero bdero commented Feb 8, 2024

Closes flutter/flutter#137108

We don't rely on stencil-only textures anymore in the 2D renderer.

default_stencil_format_ = PixelFormat::kS8UInt;
} else if (default_stencil_format_ != PixelFormat::kUnknown) {
default_stencil_format_ = default_depth_stencil_format_;
} else {
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Member Author

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.

@bdero bdero marked this pull request as ready for review February 8, 2024 02:30
@bdero bdero requested a review from jonahwilliams February 8, 2024 02:30
@bdero
Copy link
Member Author

bdero commented Feb 8, 2024

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.

@bdero bdero force-pushed the bdero/allow-missing-stencilonly branch from 0ac9a7e to 9b0505a Compare February 8, 2024 02:36
// 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) {
Copy link
Contributor

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

Copy link
Member Author

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.

@bdero bdero requested a review from jonahwilliams February 8, 2024 17:08
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bdero bdero added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 8, 2024
@auto-submit auto-submit bot merged commit d184e0f into flutter:main Feb 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Impeller] Vulkan backend needs to support platforms that only support combined depth-stencil.

2 participants