diff options
| author | 2024-06-18 14:13:37 -0700 | |
|---|---|---|
| committer | 2024-06-18 14:13:37 -0700 | |
| commit | bb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (patch) | |
| tree | 27e66123b9acee1a608b520afebbce3b6cd3c037 /vulkan/libvulkan/driver.cpp | |
| parent | 13fde70bd413e24c6667ec8ad84ea0d9e07058d6 (diff) | |
| parent | 29f1274c966a27f929cf8d6f21a538d53a3f9ac3 (diff) | |
Merge 24Q3 (ab/11976889) to aosp-main-future
Bug: 347831320
Merged-In: I30f4c21dfee68603d0dad01d205f8a5581e6db31
Change-Id: I301c522ae67cc1f30fe0ddc819aa3dffd4c32d1a
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
| -rw-r--r-- | vulkan/libvulkan/driver.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 81fd1185b6..3f89960e32 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -964,14 +964,20 @@ PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName) { PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName) { const ProcHook* hook = GetProcHook(pName); + PFN_vkVoidFunction drv_func = GetData(device).driver.GetDeviceProcAddr(device, pName); + if (!hook) - return GetData(device).driver.GetDeviceProcAddr(device, pName); + return drv_func; if (hook->type != ProcHook::DEVICE) { ALOGE("internal vkGetDeviceProcAddr called for %s", pName); return nullptr; } + // Don't hook if we don't have a device entry function below for the core function. + if (!drv_func && (hook->extension >= ProcHook::EXTENSION_CORE_1_0)) + return nullptr; + return (GetData(device).hook_extensions[hook->extension]) ? hook->proc : nullptr; } @@ -1372,6 +1378,11 @@ VkResult CreateInstance(const VkInstanceCreateInfo* pCreateInfo, android::GraphicsEnv::getInstance().setTargetStats( android::GpuStatsInfo::Stats::CREATED_VULKAN_API_VERSION, vulkanApiVersion); + + if (pCreateInfo->pApplicationInfo->pEngineName) { + android::GraphicsEnv::getInstance().addVulkanEngineName( + pCreateInfo->pApplicationInfo->pEngineName); + } } // Update stats for the extensions requested |