Skip to content

Commit

Permalink
Set the required Android API level when Vulkan validation layers are …
Browse files Browse the repository at this point in the history
…automatically enabled for android_debug_unopt_arm64 builds (flutter#44116)

The Vulkan validation layer headers will not build if the Android API level is 23 or lower.

Currently the engine buildroot's default Android API level is 23.  The API level must be overridden for any configuration where Vulkan validation is enabled.
  • Loading branch information
jason-simmons authored Jul 28, 2023
1 parent c71f9f8 commit b4bf592
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/gn
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,16 @@ def to_gn_args(args):
if args.fstack_protector:
gn_args['use_fstack_protector'] = True

if args.enable_vulkan_validation_layers:
if args.target_os == 'android':
gn_args['android_api_level'] = 26
gn_args['enable_vulkan_validation_layers'] = True
enable_vulkan_validation = args.enable_vulkan_validation_layers

# Enable Vulkan validation layer automatically on debug builds for arm64.
if args.unoptimized and args.target_os == 'android' and args.android_cpu == 'arm64':
enable_vulkan_validation = True

if enable_vulkan_validation:
gn_args['enable_vulkan_validation_layers'] = True
if args.target_os == 'android':
gn_args['android_api_level'] = 26

# Enable pointer compression on 64-bit mobile targets. iOS is excluded due to
# its inability to allocate address space without allocating memory.
Expand Down

0 comments on commit b4bf592

Please sign in to comment.