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

[Impeller] Added helper messaging around validation usage #42708

Merged
merged 6 commits into from
Jun 9, 2023

Conversation

gaaclarke
Copy link
Member

Adds some helper messages around using validation layers.

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.

@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.

ss << "]";
FML_DLOG(ERROR) << ss.str();
#if !IMPELLER_ENABLE_VULKAN_VALIDATION_LAYERS && FML_OS_ANDROID
VALIDATION_LOG << "Attempting to use validation layers without "
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think VALIDATION_LOG is right here - unless I'm misunderstanding and it's an error to end up in this state (although it seems like there are multiple ways now to turn on validation and I'm not clear on which path(s) are allowed or not).

Copy link
Member Author

@gaaclarke gaaclarke Jun 9, 2023

Choose a reason for hiding this comment

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

Yep, it's an error. We want people to be using the validation layers that we are building. There is no reason to turn on validation layers without building and packaging up validation layers. Jonah ran into this the other day where he thought just turning on the runtime flag was sufficient then had to go through the rigamarole to package prebuilt layers.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps make the message a bit more strongly worded, e.g.

"Vulkan validation layers found but command line argument --enable-vulkan-validation missing. Rerun with --enable-vulkan-validation"

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated it. I made it a bit stronger and also made sure to mention gn (as opposed to runtime arguments).

Copy link
Member Author

Choose a reason for hiding this comment

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

(sorry, uploaded now, i accidentally committed the local hack i need to make scenario_app work on my machine instead)

Copy link
Member

Choose a reason for hiding this comment

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

VALIDATION_LOG isn't fatal by default and won't show up in logcat unless fatal validations are enabled

Copy link
Member Author

Choose a reason for hiding this comment

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

So, this will crash in a way that is hard to know what is going on if the runtime flag is on, but it wasn't built to support it. Sounds like we want an FML_LOG(ERROR) instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Switched both things to FML_LOG(ERROR). There is no need to use DLOG since using validation layers should never happen in the wild anyways. ERROR since we know it will probably crash.

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.

LGTM with nit about message wording

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 9, 2023

auto label is removed for flutter/engine, pr: 42708, due to - The status or check suite Linux Android clang-tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2023
@auto-submit auto-submit bot merged commit 7e6dab6 into flutter:main Jun 9, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 10, 2023
…128643)

flutter/engine@b037db2...962d78e

2023-06-10 [email protected] Roll Fuchsia Linux SDK from 1ODZdNPvGxBrgnCzf... to pd1VfyK_WEW6tu8WI... (flutter/engine#42723)
2023-06-10 [email protected] Roll ANGLE from acdf872299ba to 10380f4ba473 (1 revision) (flutter/engine#42722)
2023-06-10 [email protected] Roll Fuchsia Mac SDK from EInl_eQkJekqc-gfW... to Otfnr8SATDVN_7BuI... (flutter/engine#42721)
2023-06-10 [email protected] Roll ANGLE from a01a566c489b to acdf872299ba (1 revision) (flutter/engine#42719)
2023-06-10 [email protected] Roll Clang from 6d667d4b261e to 7f374b6902fa (flutter/engine#42718)
2023-06-10 [email protected] Manual roll Dart SDK from d5b39a8385f9 to 9d705a5391b2 (7 revisions) (flutter/engine#42716)
2023-06-09 [email protected] [Impeller] Added helper messaging around validation usage (flutter/engine#42708)
2023-06-09 [email protected] Fix an archive name in windows_host_engine config (flutter/engine#42709)
2023-06-09 [email protected] Roll ANGLE from 72df42832ee4 to a01a566c489b (3 revisions) (flutter/engine#42712)
2023-06-09 [email protected] Delete WeakPtrFactory from GPUSurfaceVulkanImpeller (flutter/engine#42710)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 1ODZdNPvGxBr to pd1VfyK_WEW6
  fuchsia/sdk/core/mac-amd64 from EInl_eQkJekq to Otfnr8SATDVN

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
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 needs tests
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants