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 Oct 18, 2024

reverted #55939 due to postsubmit failures.

It turns out the lifecycle is not exactly the same as the command pool. Instead, use a thread id map on the context to keep the right thread running and simplify shutdown. Leaving CI yaml edit for now to prove it works :)

Fixes flutter/flutter#157115

@jonahwilliams jonahwilliams added the test: all See https://github.com/flutter/engine/blob/main/docs/ci/Engine-pre-submits-and-post-submits.md label Oct 18, 2024
@jonahwilliams jonahwilliams removed the test: all See https://github.com/flutter/engine/blob/main/docs/ci/Engine-pre-submits-and-post-submits.md label Oct 18, 2024
@jonahwilliams jonahwilliams marked this pull request as draft October 18, 2024 20:38
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

jonahwilliams added 2 commits October 18, 2024 14:10
@jonahwilliams jonahwilliams marked this pull request as ready for review October 19, 2024 06:09
std::weak_ptr<const Context> context,
std::weak_ptr<const DeviceHolderVK> device_holder,
std::shared_ptr<TrackedObjectsVK> tracked_objects,
std::shared_ptr<FenceWaiterVK> fence_waiter)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fence waiter is unused

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

Some suggestions but this should work well.

Don't forget to back out the CI stuff.

.ci.yaml Outdated
- shell/platform/android/**
- testing/scenario_app/**
- testing/skia_gold_client/**
# runIf:
Copy link
Member

Choose a reason for hiding this comment

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

Presumably, this is unrelated and will be backed out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

return nullptr;
}

// look up a cached descriptor pool for the current frame and reuse it
Copy link
Member

Choose a reason for hiding this comment

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

In cases where we operate on a thread pool where threads are being created and collected, thread ID reuse may cause us issues. This is just a hypothetical though. Our existing pools don't work that way. Not sure we should care.

Copy link
Member

Choose a reason for hiding this comment

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

Thinking about this some more, perhaps we should steal NSNotificationCenter from Foundation. The thread locals can add listeners (by object) to certain lifecycle events where they can collect resources when the context shuts down in addition to collection those same resources when the thread itself shuts down. In any case, what you have here should work well for our use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you file a bug for this and describe how it would work?

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 21, 2024
@auto-submit auto-submit bot merged commit 5eb21d2 into flutter:main Oct 21, 2024
35 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 21, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 21, 2024
…157295)

flutter/engine@de569ba...5eb21d2

2024-10-21 [email protected] [Impeller] Reland: one descriptor pool per frame. (flutter/engine#55960)
2024-10-21 [email protected] Scribe (Android stylus handwriting text input) (flutter/engine#52943)

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] 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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
reverted flutter/engine#55939 due to postsubmit failures.

It turns out the lifecycle is not exactly the same as the command pool. Instead, use a thread id map on the context to keep the right thread running and simplify shutdown. Leaving CI yaml edit for now to prove it works :)

Fixes flutter#157115
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] create one DescriptorPool per frame.

2 participants