summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r--vulkan/libvulkan/driver.cpp13
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