engine icon indicating copy to clipboard operation
engine copied to clipboard

[Impeller] fix heap selection process for YUV textures.

Open jonahwilliams opened this issue 1 year ago • 5 comments

This does not fix the emulator weirdness!

Today we automatically select the first memory type index requested by an AHB. The device in question may lack that memory type index, so we can then fail to import the AHB. Additionally, if we do fail we need to ensure that we don't attempt to display the texture.

jonahwilliams avatar Mar 07 '24 21:03 jonahwilliams

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 "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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.

flutter-dashboard[bot] avatar Mar 07 '24 21:03 flutter-dashboard[bot]

Good hunch.

chinmaygarde avatar Mar 07 '24 21:03 chinmaygarde

@chinmaygarde this probably impacts the AHB based swapchain too. We should confirm that emulators can actually import AHB, and if not then we need to escalate to the Android team because that seems oddly limiting.

jonahwilliams avatar Mar 07 '24 21:03 jonahwilliams

To be honest, I sort of just assumed the heap selection was fine since @johnmccutchan wired it up and I was always running to crashes on emulators. It also JustWorked™ on the devices. So I have spent zero time reasoning about the correctness of the heap selection during import. I'll take a closer look now.

chinmaygarde avatar Mar 07 '24 21:03 chinmaygarde

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #51262 at sha 37620e167399fddad0bcdd9eacc0abe60c173397

flutter-dashboard[bot] avatar Mar 07 '24 22:03 flutter-dashboard[bot]