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

[impeller] fixed flake where blit wasn't tracking its texture #41347

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Apr 19, 2023

fixes flutter/flutter#125147

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@gaaclarke
Copy link
Member Author

@chinmaygarde Let me know if you have any ideas on how to make this less likely to happen in the future. It seems like an easy mistake to make and it's difficult to debug. Nothing about the failure communicated to me that the command buffer was referencing a texture that doesn't exist.

I mentioned in the chat but maybe we should make people requesting the command buffer to state their tracked resources at the same time so that they have to explicitly omit tracking a resource. That may help.

@gaaclarke
Copy link
Member Author

By extension, shouldn't BlitCopyTextureToTextureCommandVK::Encode also track its textures?

@gaaclarke
Copy link
Member Author

I expanded this to the other blit commands. Every 10th run of the unit tests can pass now, but there seems to be another case where we aren't tracking something we should be.

@gaaclarke gaaclarke requested a review from chinmaygarde April 19, 2023 23:39
@gaaclarke
Copy link
Member Author

@chinmaygarde can you please give this a review. This makes sense to me but I want to double check that it does for you too. After we decide that I can look into adding tests and we can think about how to maybe change the API to make this harder to happen or easier to debug.

@gaaclarke
Copy link
Member Author

I'm going to put this up for review, it is technically covered by playground tests but I plan on investigating creating a more extensive testing platform that will allow us to assert this problem directly.

@gaaclarke gaaclarke merged commit 462e9bb into flutter:main Apr 21, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 21, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 21, 2023
…125324)

flutter/engine@dd67063...462e9bb

2023-04-21 [email protected] [impeller] fixed flake where blit wasn't tracking its texture (flutter/engine#41347)
2023-04-21 [email protected] removing the check_gn_format.py file from ci/  (flutter/engine#41397)
2023-04-21 [email protected] [web] Fix HashUrlStrategy.addPopStateListener (flutter/engine#41384)

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],[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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ditman pushed a commit to ditman/flutter-flutter that referenced this pull request Apr 24, 2023
…lutter#125324)

flutter/engine@dd67063...462e9bb

2023-04-21 [email protected] [impeller] fixed flake where blit wasn't tracking its texture (flutter/engine#41347)
2023-04-21 [email protected] removing the check_gn_format.py file from ci/  (flutter/engine#41397)
2023-04-21 [email protected] [web] Fix HashUrlStrategy.addPopStateListener (flutter/engine#41384)

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],[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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke added a commit that referenced this pull request Apr 25, 2023
…for tests (#41408)

Adds test for #41347 and adds an
extra fix for flutter/flutter#125147.

Testing this is possible because I've mocked out all of vulkan. We can
expand on this in the future we want to be more robust.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[impeller] vulkan has a CommandBuffer memory corruption bug
2 participants