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

Commit 6aa5a3b5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "libvulkan: make vkEnumerateInstanceVersion trigger driver loading"

parents 6c420207 c889d3c5
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1256,7 +1256,7 @@ VkResult EnumerateInstanceLayerProperties(uint32_t* pPropertyCount,
    ATRACE_CALL();

    if (!EnsureInitialized())
        return VK_ERROR_INITIALIZATION_FAILED;
        return VK_ERROR_OUT_OF_HOST_MEMORY;

    uint32_t count = GetLayerCount();

@@ -1280,7 +1280,7 @@ VkResult EnumerateInstanceExtensionProperties(
    ATRACE_CALL();

    if (!EnsureInitialized())
        return VK_ERROR_INITIALIZATION_FAILED;
        return VK_ERROR_OUT_OF_HOST_MEMORY;

    if (pLayerName) {
        const Layer* layer = FindLayer(pLayerName);
@@ -1456,6 +1456,11 @@ VkResult EnumerateDeviceExtensionProperties(
VkResult EnumerateInstanceVersion(uint32_t* pApiVersion) {
    ATRACE_CALL();

    // Load the driver here if not done yet. This api will be used in Zygote
    // for Vulkan driver pre-loading because of the minimum overhead.
    if (!EnsureInitialized())
        return VK_ERROR_OUT_OF_HOST_MEMORY;

    *pApiVersion = VK_API_VERSION_1_1;
    return VK_SUCCESS;
}