-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Fixed blit command missing tracking and added mock vulkan for tests #41408
Conversation
@@ -100,7 +100,7 @@ bool BlitCopyTextureToBufferCommandVK::Encode(CommandEncoderVK& encoder) const { | |||
// cast source and destination to TextureVK | |||
const auto& src = TextureVK::Cast(*source); | |||
|
|||
if (!encoder.Track(source)) { | |||
if (!encoder.Track(source) || !encoder.Track(destination)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a tracking I missed until I wrote the test.
friend class ::impeller::testing:: | ||
BlitCommandVkTest_BlitCopyTextureToTextureCommandVK_Test; | ||
friend class ::impeller::testing:: | ||
BlitCommandVkTest_BlitCopyTextureToBufferCommandVK_Test; | ||
friend class ::impeller::testing:: | ||
BlitCommandVkTest_BlitGenerateMipmapCommandVK_Test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just make the constructor public?
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "impeller/renderer/backend/vulkan/test/mock_vulkan.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I would probably call this a fake instead of a mock, but I think the design is fine? I was more worried about individual test suites constructing mocks on the fly to test specific subsets of impeller - but a reusable fake seems perfectly reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was playing around in a different PR the ability to make it record what was communicated to it. I think as we expand the test suite when we fix bugs and add tests it may end up looking more and more like what we think of with mocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ck vulkan for tests (flutter/engine#41408)
…ck vulkan for tests (flutter/engine#41408)
…ck vulkan for tests (flutter/engine#41408)
…125529) flutter/engine@34ece7a...b3cbf06 2023-04-25 [email protected] Migrate windows host engine to engine v2. (flutter/engine#41487) 2023-04-25 [email protected] Roll Skia from f6f0c4b5ee98 to 809bf518d4ab (3 revisions) (flutter/engine#41494) 2023-04-25 [email protected] Made sure not to turn on wide gamut support without impeller. (flutter/engine#41460) 2023-04-25 [email protected] Roll Fuchsia Mac SDK from 5bc9_eyVcLoMrWvdO... to JKHSUjf-qEr0ZMdEi... (flutter/engine#41493) 2023-04-25 [email protected] Roll Skia from 1bed4228ea3b to f6f0c4b5ee98 (7 revisions) (flutter/engine#41492) 2023-04-25 [email protected] [Impeller] Fixed blit command missing tracking and added mock vulkan for tests (flutter/engine#41408) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from 5bc9_eyVcLoM to JKHSUjf-qEr0 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
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
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.