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

Conversation

jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Feb 9, 2024

See also flutter/flutter#140901 . We were not accounting for GPU backpressure in the FML, this applies the patch from @knopp to track this.

[self removeMetalLayer:layer];
}

- (void)testTimeout {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs more thought, I haven't actually looked at how to grab the usage flag in the test yet

Copy link
Member

@knopp knopp Feb 13, 2024

Choose a reason for hiding this comment

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

The test fails because isInUse=true doesn't prevent layer from returning the surface.

isInUse=false: Compositor is definitely not using the surface. This is useful to reuse surface immediately after a dropped frame.
isInUse=true: Compositor may be using the surface. if there is no surface with isInUse=false, return one with isUnUse=true that was presented longest time ago.

The blocking in this PR is performed when front surface command buffer has not been completed. This is different from compositor using the surface. The test will likely need to call flutterPrepareForPresent: with command buffer and then test if nextSurface blocks while the command buffer waits for completion.

@knopp
Copy link
Member

knopp commented Feb 14, 2024

@jonahwilliams, I added PR for the test in jonahwilliams#1

@jonahwilliams
Copy link
Contributor Author

Thank you!

@jonahwilliams jonahwilliams changed the title Fix flutter metal layer bp [iOS] Ensure FlutterMetalLayer has correct backpressure. Feb 14, 2024
@jonahwilliams jonahwilliams marked this pull request as ready for review February 14, 2024 18:13
@jonahwilliams jonahwilliams requested a review from knopp February 14, 2024 18:15
Copy link
Member

@knopp knopp left a comment

Choose a reason for hiding this comment

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

Tested this. LGTM!

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 15, 2024
@auto-submit auto-submit bot merged commit 5548b4b into flutter:main Feb 15, 2024
sealesj pushed a commit to sealesj/engine that referenced this pull request Feb 15, 2024
See also flutter/flutter#140901 . We were not accounting for GPU backpressure in the FML, this applies the patch from @knopp to track this.
jason-simmons added a commit to jason-simmons/flutter that referenced this pull request Feb 16, 2024
2024-02-15 [email protected] Added tool to easily check golden diffs locally. (flutter/engine#50654)
2024-02-15 [email protected] Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689)
2024-02-15 [email protected] Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545)
2024-02-15 [email protected] [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486)
2024-02-15 [email protected] Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686)
2024-02-15 [email protected] Pin OSV-Scanner reusable workflow (flutter/engine#50649)
2024-02-15 [email protected] Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685)
2024-02-15 [email protected] fix: consider array size on canvaskit shader data (flutter/engine#49754)
2024-02-15 [email protected] Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683)
2024-02-15 [email protected] Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 16, 2024
2024-02-15 [email protected] Added tool to easily check golden diffs locally. (flutter/engine#50654)
2024-02-15 [email protected] Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689)
2024-02-15 [email protected] Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545)
2024-02-15 [email protected] [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486)
2024-02-15 [email protected] Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686)
2024-02-15 [email protected] Pin OSV-Scanner reusable workflow (flutter/engine#50649)
2024-02-15 [email protected] Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685)
2024-02-15 [email protected] fix: consider array size on canvaskit shader data (flutter/engine#49754)
2024-02-15 [email protected] Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683)
2024-02-15 [email protected] Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
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 platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants