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

[Android] choose 24 bit depth buffer. #56553

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Conversation

jonahwilliams
Copy link
Member

Fixes flutter/flutter#158531

Make sure the onscreen framebuffer has a depth attachment that matches the depth24_s8 format expected.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. 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.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2024
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

nice!

@gaaclarke
Copy link
Member

Wait, couldn't we have a golden test for this?

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I'd like a test for this, putting a request change in until we have that answered.

@jonahwilliams
Copy link
Member Author

we do not have android devices in the engine repo. I can add a unit test that the config contains depth 24.

@gaaclarke
Copy link
Member

we do not have android devices in the engine repo. I can add a unit test that the config contains depth 24.

Okay, I see how this worked. That value is just a preference for eglChooseConfig:

EGL_DEPTH_SIZE
Must be followed by a nonnegative integer that indicates the desired depth buffer size, in bits. The smallest depth buffers of at least the specified size is preferred. If the desired size is zero, frame buffer configurations with no depth buffer are preferred. The default value is zero.

Should we instead be specifying a smaller bit depth? Should we have a validation error if we get a frame buffer that doesn't have depth?

@gaaclarke
Copy link
Member

A unit test would be nice. Since we can't get a golden test I think we should at least have a validation error if we don't get a depth buffer since we assume we have one in order for impeller to work.

@jonahwilliams
Copy link
Member Author

jonahwilliams commented Nov 13, 2024

Part of the problem with golden testing this particular change is that the EGL config is just a request. On the mali devices we requested 8 bit stencil and 0 depth, but Mali doesn't support separate depth+stencil so it gives a D24S8. This happens to match what we need to render exactly and so things just work.

Whereas the Adreno support separate depth and stencil, so when we requested S8 it only gives us S8. Then onscreen clipping appears to not work because of the wonderful world of GL.

So we'd need specific hardware hooked up. Even then...

@gaaclarke
Copy link
Member

So we'd need specific hardware hooked up. Even then...

I mean we aren't even using the real opengles drivers. Potentially ANGLE or SwiftShader could duplicate the Adreno behavior. That's way out of scope though for this.

Copy link
Contributor

auto-submit bot commented Nov 13, 2024

auto label is removed for flutter/engine/56553, due to This PR has not met approval requirements for merging. Changes were requested by {gaaclarke}, please make the needed changes and resubmit this PR.
The PR author is a member of flutter-hackers and needs 0 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2024
Copy link
Member Author

@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.

@gaaclarke is this a test? does it run... somewhere?

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

I don't have a good solution for testing this. The following things would work but are out of scope:

  1. setting up ANGLE to duplicate Adreno behavior (maybe not possible)
  2. setting up SwiftShader to duplicate Adreno behavior (probably possible, but we don't use SwiftShader for opengles golden tests today)
  3. Mocking out egl (this is a massive gutting that isn't as valuable as a golden test)

Looks like we might have a good log for this anyways via IMPELLER_LOG_EGL_ERROR

@gaaclarke
Copy link
Member

@gaaclarke is this a test? does it run... somewhere?

Not really a test since it isn't asserting that the changed code is correct =)

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2024
@auto-submit auto-submit bot merged commit 259703a into flutter:main Nov 14, 2024
34 checks passed
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 16, 2024
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 16, 2024
…159015)

Roll Flutter Engine from 619804c0fbb7 to f649330affa8 (47 revisions)

flutter/engine@619804c...f649330

2024-11-16 [email protected] Roll Skia from 1ef3b910e064 to
6b0f264bde33 (6 revisions) (flutter/engine#56635)
2024-11-16 [email protected] Revert "Remove
`android_jit_release_x86`." (flutter/engine#56634)
2024-11-15 [email protected] Move SetRenderTargetType to
EmbedderTestCompositor (flutter/engine#56626)
2024-11-15 [email protected] Roll Dart SDK from
b62dadb14d82 to eccb15756020 (2 revisions) (flutter/engine#56630)
2024-11-15 [email protected] [TextInput] Add
TextInputType.webSearch (#15762) (flutter/engine#56428)
2024-11-15 [email protected] [web] Send the correct view ID with
semantics actions (flutter/engine#56595)
2024-11-15 [email protected] [macos] early
return to suppress clang-tidy warning (flutter/engine#56588)
2024-11-15 [email protected] [Impeller] libImpeller: Tinker on the
README to cross reference the SDK and the example.
(flutter/engine#56623)
2024-11-15 [email protected] [fuchsia] MaybeRunInitialVsyncCallback
should only called once (flutter/engine#56429)
2024-11-15 [email protected] Move mac clangd build from x64 to arm
(flutter/engine#56567)
2024-11-15 [email protected] Added assert for
opengles thread safety (flutter/engine#56585)
2024-11-15 [email protected] [Impeller] enable OpenGL fallback on
Android. (flutter/engine#56591)
2024-11-15 [email protected] [Impeller] Maintain
separate queues of GLES operations for each thread in the reactor
(flutter/engine#56573)
2024-11-15 [email protected] Roll Dart SDK from
abe86ca4eb01 to b62dadb14d82 (2 revisions) (flutter/engine#56615)
2024-11-15 [email protected] Roll Skia from b730eb340852 to
1ef3b910e064 (4 revisions) (flutter/engine#56613)
2024-11-15 [email protected] Roll Fuchsia Linux SDK from
JkpuAsLzcmYLzf1iX... to UpSQzyXGUhMfedYIh... (flutter/engine#56611)
2024-11-15 [email protected] Roll Dart SDK from
bf0eeb9d929c to abe86ca4eb01 (1 revision) (flutter/engine#56610)
2024-11-15 [email protected] Roll Skia from e5fda8472b21 to
b730eb340852 (1 revision) (flutter/engine#56608)
2024-11-15 [email protected] Roll Skia from 8ff65da4b8bf to
e5fda8472b21 (1 revision) (flutter/engine#56603)
2024-11-15 [email protected] Move TestMetalContext/Surface to testing
namespace (flutter/engine#56602)
2024-11-15 [email protected] Roll Dart SDK from
343b9fc6eafe to bf0eeb9d929c (1 revision) (flutter/engine#56604)
2024-11-15 [email protected] [Impeller] Don't enable KHR_debug on
Angle. (flutter/engine#56601)
2024-11-15 [email protected] [Impeller] libImpeller: Reset the GL
state when transitioning control back to the embedder.
(flutter/engine#56597)
2024-11-15 [email protected] Roll Skia from 8946ea477b42 to
8ff65da4b8bf (2 revisions) (flutter/engine#56600)
2024-11-14 [email protected] [Impeller] Put test components in the
testing namespace. (flutter/engine#56594)
2024-11-14 [email protected] [Impeller] libImpeller: Add a warning
about OpenGL state being trampled. (flutter/engine#56599)
2024-11-14 [email protected] Embedder: Refactor EmbedderConfigBuilder by
backend (flutter/engine#56598)
2024-11-14 [email protected] Migrate Metal translation units to Obj-C++
(flutter/engine#56592)
2024-11-14 [email protected] Roll Dart SDK from
db4d7d52db48 to 343b9fc6eafe (1 revision) (flutter/engine#56590)
2024-11-14 [email protected] iOS,macOS: Build/test
test_metal_surface_unittests (flutter/engine#56586)
2024-11-14 [email protected] Roll Skia from 3222456e63dc to
8946ea477b42 (2 revisions) (flutter/engine#56587)
2024-11-14 [email protected] Roll Skia from 16178bf63de7 to
3222456e63dc (3 revisions) (flutter/engine#56584)
2024-11-14 [email protected] [Android] Fix Slider semantics double
tap behaviors (flutter/engine#56452)
2024-11-14 [email protected] Roll Dart SDK from
a3b6652100c8 to db4d7d52db48 (1 revision) (flutter/engine#56581)
2024-11-14 [email protected] Move Vulkan context to
EmbedderTestContextVulkan (flutter/engine#56571)
2024-11-14 [email protected] Roll Skia from a076435073fc to
16178bf63de7 (1 revision) (flutter/engine#56579)
2024-11-14 [email protected] Roll Skia from 70553189e4e8 to
a076435073fc (1 revision) (flutter/engine#56577)
2024-11-14 [email protected] Roll Skia from fa52f2c1ddba to
70553189e4e8 (1 revision) (flutter/engine#56576)
2024-11-14 [email protected] Roll Dart SDK from
3f05b3540cb2 to a3b6652100c8 (3 revisions) (flutter/engine#56575)
2024-11-14 [email protected] Roll Skia from ddbd8d1cb8d8 to
fa52f2c1ddba (3 revisions) (flutter/engine#56574)
2024-11-14 [email protected] [Android] choose 24 bit depth
buffer. (flutter/engine#56553)
2024-11-14 [email protected] Roll Skia from 3750b8939c7f to
ddbd8d1cb8d8 (1 revision) (flutter/engine#56562)
2024-11-14 [email protected] Move FlMouseCursorHandler from
FlView to FlEngine (flutter/engine#56026)
2024-11-14 [email protected] [Impeller] force software resize
usage for GLES backend. (flutter/engine#56511)
2024-11-14 [email protected] Roll Dart SDK from
66ab1774bfe9 to 3f05b3540cb2 (2 revisions) (flutter/engine#56564)
2024-11-14 [email protected] Embedder: Refactor EmbedderTestContext
creation (flutter/engine#56563)
...
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
Fixes flutter#158531

Make sure the onscreen framebuffer has a depth attachment that matches the depth24_s8 format expected.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[impeller:opengles] clipping of images not working in wonderous
3 participants