Commit 8edc68e3 by Yuly Novikov Committed by Commit Bot

Vulkan: Require Android NDK API level 26, dropping Android N support.

Due to Vulkan Validation Layers breaking Android N backward compatibility. See http://crrev/c/1405714 and https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/623 Bug: angleproject:3095 Change-Id: I5da306c567cd9a0088149ca9929b38c8ed2cc86a Reviewed-on: https://chromium-review.googlesource.com/c/1465954Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent 4a298703
...@@ -465,7 +465,9 @@ config("libANGLE_config") { ...@@ -465,7 +465,9 @@ config("libANGLE_config") {
} }
if (is_android && (angle_enable_gl || angle_enable_vulkan)) { if (is_android && (angle_enable_gl || angle_enable_vulkan)) {
if (ndk_supports_nativewindow) { # In API level 26 ANativeWindow APIs were moved from libandroid.so
# into a separate library, libnativewindow.so
if (ndk_api_level_at_least_26) {
libs += [ "nativewindow" ] libs += [ "nativewindow" ]
} else { } else {
libs += [ "android" ] libs += [ "android" ]
......
...@@ -107,10 +107,10 @@ target_cpu = "arm64" # Nexus 5X is 64 bit, remove this on 32 bit device ...@@ -107,10 +107,10 @@ target_cpu = "arm64" # Nexus 5X is 64 bit, remove this on 32 bit device
target_os = "android" target_os = "android"
use_goma = true # Remove this if you don't have goma use_goma = true # Remove this if you don't have goma
``` ```
Additional flags to build the Vulkan backend, enable only if running on Android N or higher: Additional flags to build the Vulkan backend, enable only if running on Android O or higher:
``` ```
android32_ndk_api_level = 24 android32_ndk_api_level = 26
android64_ndk_api_level = 24 android64_ndk_api_level = 26
``` ```
These ANGLE targets are supported: These ANGLE targets are supported:
......
...@@ -42,13 +42,9 @@ declare_args() { ...@@ -42,13 +42,9 @@ declare_args() {
declare_args() { declare_args() {
if (!is_android) { if (!is_android) {
ndk_supports_vulkan = false ndk_api_level_at_least_26 = false
ndk_supports_nativewindow = false
} else { } else {
ndk_supports_vulkan = ndk_api_level_at_least_26 =
(!angle_64bit_current_cpu && android32_ndk_api_level >= 24) ||
(angle_64bit_current_cpu && android64_ndk_api_level >= 24)
ndk_supports_nativewindow =
(!angle_64bit_current_cpu && android32_ndk_api_level >= 26) || (!angle_64bit_current_cpu && android32_ndk_api_level >= 26) ||
(angle_64bit_current_cpu && android64_ndk_api_level >= 26) (angle_64bit_current_cpu && android64_ndk_api_level >= 26)
} }
...@@ -62,8 +58,11 @@ declare_args() { ...@@ -62,8 +58,11 @@ declare_args() {
angle_enable_gl = (ozone_platform_gbm || !is_linux || angle_enable_gl = (ozone_platform_gbm || !is_linux ||
(use_x11 && !is_chromeos)) && !is_fuchsia (use_x11 && !is_chromeos)) && !is_fuchsia
# ANGLE Vulkan backend on Android requires API level 26, i.e. Oreo, due to
# Vulkan Validation Layers compatibility issues, see http://crrev/c/1405714.
# Otherwise, API level 24 would have been enough.
angle_enable_vulkan = is_win || (is_linux && use_x11 && !is_chromeos) || angle_enable_vulkan = is_win || (is_linux && use_x11 && !is_chromeos) ||
(is_android && ndk_supports_vulkan) (is_android && ndk_api_level_at_least_26)
angle_enable_null = true angle_enable_null = true
angle_enable_essl = true angle_enable_essl = true
angle_enable_glsl = true angle_enable_glsl = true
......
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