Unverified Commit 7d31fe32 authored by Chinmay Garde's avatar Chinmay Garde Committed by GitHub

[Impeller] Plumb through the enable-vulkan-validation flag. (#123808)

[Impeller] Plumb through the enable-vulkan-validation flag.
parent d163620f
......@@ -660,6 +660,8 @@ class AndroidDevice extends Device {
...<String>['--ez', 'enable-impeller', 'true'],
if (debuggingOptions.enableImpeller == ImpellerStatus.disabled)
...<String>['--ez', 'enable-impeller', 'false'],
if (debuggingOptions.enableVulkanValidation)
...<String>['--ez', 'enable-vulkan-validation', 'true'],
if (debuggingOptions.debuggingEnabled) ...<String>[
if (debuggingOptions.buildInfo.isDebug) ...<String>[
...<String>['--ez', 'enable-checked-mode', 'true'],
......
......@@ -183,6 +183,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
addAndroidSpecificBuildOptions(hide: !verboseHelp);
usesFatalWarningsOption(verboseHelp: verboseHelp);
addEnableImpellerFlag(verboseHelp: verboseHelp);
addEnableVulkanValidationFlag(verboseHelp: verboseHelp);
addEnableEmbedderApiFlag(verboseHelp: verboseHelp);
}
......@@ -196,6 +197,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
bool get runningWithPrebuiltApplication => argResults![FlutterOptions.kUseApplicationBinary] != null;
bool get trackWidgetCreation => boolArg('track-widget-creation');
ImpellerStatus get enableImpeller => ImpellerStatus.fromBool(argResults!['enable-impeller'] as bool?);
bool get enableVulkanValidation => boolArg('enable-vulkan-validation');
bool get uninstallFirst => boolArg('uninstall-first');
bool get enableEmbedderApi => boolArg('enable-embedder-api');
......@@ -237,6 +239,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
webBrowserDebugPort: webBrowserDebugPort,
webBrowserFlags: webBrowserFlags,
enableImpeller: enableImpeller,
enableVulkanValidation: enableVulkanValidation,
uninstallFirst: uninstallFirst,
enableDartProfiling: enableDartProfiling,
enableEmbedderApi: enableEmbedderApi,
......@@ -285,6 +288,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
nullAssertions: boolArg('null-assertions'),
nativeNullAssertions: boolArg('native-null-assertions'),
enableImpeller: enableImpeller,
enableVulkanValidation: enableVulkanValidation,
uninstallFirst: uninstallFirst,
serveObservatory: boolArg('serve-observatory'),
enableDartProfiling: enableDartProfiling,
......
......@@ -965,6 +965,7 @@ class DebuggingOptions {
this.nullAssertions = false,
this.nativeNullAssertions = false,
this.enableImpeller = ImpellerStatus.platformDefault,
this.enableVulkanValidation = false,
this.uninstallFirst = false,
this.serveObservatory = false,
this.enableDartProfiling = true,
......@@ -986,6 +987,7 @@ class DebuggingOptions {
this.cacheSkSL = false,
this.traceAllowlist,
this.enableImpeller = ImpellerStatus.platformDefault,
this.enableVulkanValidation = false,
this.uninstallFirst = false,
this.enableDartProfiling = true,
this.enableEmbedderApi = false,
......@@ -1059,6 +1061,7 @@ class DebuggingOptions {
required this.nullAssertions,
required this.nativeNullAssertions,
required this.enableImpeller,
required this.enableVulkanValidation,
required this.uninstallFirst,
required this.serveObservatory,
required this.enableDartProfiling,
......@@ -1098,6 +1101,7 @@ class DebuggingOptions {
final bool webUseSseForDebugBackend;
final bool webUseSseForInjectedClient;
final ImpellerStatus enableImpeller;
final bool enableVulkanValidation;
final bool serveObservatory;
final bool enableDartProfiling;
final bool enableEmbedderApi;
......@@ -1230,6 +1234,7 @@ class DebuggingOptions {
'nullAssertions': nullAssertions,
'nativeNullAssertions': nativeNullAssertions,
'enableImpeller': enableImpeller.asBool,
'enableVulkanValidation': enableVulkanValidation,
'serveObservatory': serveObservatory,
'enableDartProfiling': enableDartProfiling,
'enableEmbedderApi': enableEmbedderApi,
......@@ -1278,6 +1283,7 @@ class DebuggingOptions {
nullAssertions: json['nullAssertions']! as bool,
nativeNullAssertions: json['nativeNullAssertions']! as bool,
enableImpeller: ImpellerStatus.fromBool(json['enableImpeller'] as bool?),
enableVulkanValidation: (json['enableVulkanValidation'] as bool?) ?? false,
uninstallFirst: (json['uninstallFirst'] as bool?) ?? false,
serveObservatory: (json['serveObservatory'] as bool?) ?? false,
enableDartProfiling: (json['enableDartProfiling'] as bool?) ?? true,
......
......@@ -1060,6 +1060,15 @@ abstract class FlutterCommand extends Command<void> {
);
}
void addEnableVulkanValidationFlag({required bool verboseHelp}) {
argParser.addFlag('enable-vulkan-validation',
hide: !verboseHelp,
help: 'Enable vulkan validation on the Impeller rendering backend if '
'Vulkan is in use and the validation layers are available to the '
'application.',
);
}
void addEnableEmbedderApiFlag({required bool verboseHelp}) {
argParser.addFlag('enable-embedder-api',
hide: !verboseHelp,
......
......@@ -1050,6 +1050,7 @@ void main() {
'--null-assertions',
'--native-null-assertions',
'--enable-impeller',
'--enable-vulkan-validation',
'--trace-systrace',
'--enable-software-rendering',
'--skia-deterministic-rendering',
......@@ -1068,6 +1069,7 @@ void main() {
expect(options.nativeNullAssertions, true);
expect(options.traceSystrace, true);
expect(options.enableImpeller, ImpellerStatus.enabled);
expect(options.enableVulkanValidation, true);
expect(options.enableSoftwareRendering, true);
expect(options.skiaDeterministicRendering, true);
}, overrides: <Type, Generator>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment