diff options
| author | 2022-04-25 05:41:48 +0000 | |
|---|---|---|
| committer | 2022-04-25 05:41:48 +0000 | |
| commit | e1d00a48657213d1eca5abde11383a59b28f11bc (patch) | |
| tree | 7ecd1e933296d9d5d7ac28ed77a7d79950c34b12 | |
| parent | 26d3593f6009646c3039416505545a559df79ca3 (diff) | |
| parent | 769f64e532339679f3849eb3c04b028c453550bf (diff) | |
Merge "Add Vulkan 1.2 and 1.3 to getVulkanVersion()" into tm-dev am: 3f598fadcd am: 769f64e532
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17891135
Change-Id: I1657a816879d43d9e9b88462332253b1363341db
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/os/GraphicsEnvironment.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/os/GraphicsEnvironment.java b/core/java/android/os/GraphicsEnvironment.java index c6cf09789899..cb7e6f71a8fd 100644 --- a/core/java/android/os/GraphicsEnvironment.java +++ b/core/java/android/os/GraphicsEnvironment.java @@ -94,6 +94,8 @@ public class GraphicsEnvironment { private static final int VULKAN_1_0 = 0x00400000; private static final int VULKAN_1_1 = 0x00401000; + private static final int VULKAN_1_2 = 0x00402000; + private static final int VULKAN_1_3 = 0x00403000; // Values for UPDATABLE_DRIVER_ALL_APPS // 0: Default (Invalid values fallback to default as well) @@ -213,6 +215,14 @@ public class GraphicsEnvironment { private int getVulkanVersion(PackageManager pm) { // PackageManager doesn't have an API to retrieve the version of a specific feature, and we // need to avoid retrieving all system features here and looping through them. + if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_3)) { + return VULKAN_1_3; + } + + if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_2)) { + return VULKAN_1_2; + } + if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_1)) { return VULKAN_1_1; } |