Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 832f5862 authored by Chris Forbes's avatar Chris Forbes
Browse files

Add GraphicsEnvironment support for Vulkan 1.4

Bug: b/370568136
Flag: NONE infra for feature flag
Change-Id: I4440b1c1eca787f5e88d10f79c122dfb573d0b47
parent 173284d5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ public class GraphicsEnvironment {
    private static final int VULKAN_1_1 = 0x00401000;
    private static final int VULKAN_1_2 = 0x00402000;
    private static final int VULKAN_1_3 = 0x00403000;
    private static final int VULKAN_1_4 = 0x00404000;

    // Values for UPDATABLE_DRIVER_ALL_APPS
    // 0: Default (Invalid values fallback to default as well)
@@ -190,6 +191,10 @@ 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_4)) {
            return VULKAN_1_4;
        }

        if (pm.hasSystemFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION, VULKAN_1_3)) {
            return VULKAN_1_3;
        }