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

Conversation

@chinmaygarde
Copy link
Member

I have temporarily made GL errors log instead of assert. But the only issues we
run into are with the "create on bind" resources and setting debug object labels
on them. I am going to rework setting debug labels right now. But, in the
meantime, the OpenGL ES backend can show cross-context textures.

There is also still an outstanding issue where cross-context textures will be
uploaded on the main context (in the same sharegroup) if the thread on which the
operation is dispatched doesn't have a context current. This will also be fixed
to pin those tasks to the worker context in an upcoming patch.
screen

I have temporarily made GL errors log instead of assert. But the only issues we
run into are with the "create on bind" resources and setting debug object labels
on them. I am going to rework setting debug labels right now. But, in the
meantime, the OpenGL ES backend can show cross-context textures.

There is also still an outstanding issue where cross-context textures will be
uploaded on the main context (in the same sharegroup) if the thread on which the
operation is dispatched doesn't have a context current. This will also be fixed
to pin those tasks to the worker context in an upcoming patch.
@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 to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

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.

@chinmaygarde
Copy link
Member Author

The screenshot reminds me, there is no mip-mapping just yet either.

{
Lock ops_lock(ops_mutex_);
std::swap(gl_handles_to_collect_, gl_handles_to_collect);
FML_DCHECK(gl_handles_to_collect_.empty());
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this runtime asserting the behavior of swap?

Copy link
Member Author

Choose a reason for hiding this comment

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

Umm, yeah. Thats possibly a bit much. I'll get rid of it in a subsequent patch.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

Change seems good, it'd be good to make sure this builds in google3 before landing

@chinmaygarde
Copy link
Member Author

it'd be good to make sure this builds in google3 before landing

Is there anything in particular that seems unique about this patch vis-a-vis building in g3? I thought this was much like the rest of the work on ES2.

@dnfield
Copy link
Contributor

dnfield commented May 24, 2022

impeller isn't getting rolled into google3, so I added some compiler guards around other code that references impeller classes/headers. You seem to have added some more in this patch, specifically to files that don't match *_impeller.* in the Android folder - that may cause compilation to fail internally.

@dnfield
Copy link
Contributor

dnfield commented May 24, 2022

(We're in a world right now where the android engine needs to be able to build as if the impeller directory does not exist and no build files refer to anything in it or anything with _impeller in the file name)

@chinmaygarde
Copy link
Member Author

The two files that are not _impeller or in the impeller/ dep are using forward declarations already. So I think we are good.

@chinmaygarde chinmaygarde added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 24, 2022
@fluttergithubbot fluttergithubbot merged commit f91ccb4 into flutter:main May 24, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 24, 2022
@chinmaygarde chinmaygarde deleted the threading branch May 24, 2022 06:01
@chinmaygarde
Copy link
Member Author

The issue with the varying worst frame times is because the texture might be uploaded using the main context instead of the resource context. See the caveat in the original commit message:

There is also still an outstanding issue where cross-context textures will be
uploaded on the main context (in the same sharegroup) if the thread on which the
operation is dispatched doesn't have a context current. This will also be fixed
to pin those tasks to the worker context in an upcoming patch.

#33598 doesn't address this but the commit right after should as that patch sets up the necessary refactors for addressing pinned tasks. Rest assured, the regressions are due to images actually being uploaded and displayed, just using the wrong context. If we didn't have a resource context in Flutter, thats what the benchmarks would look like.

I'll keep a lookout on the benchmarks once we call the OpenGL ES backend work done for this milestone. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

e: impeller needs tests platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants