diff options
author | 2016-03-24 13:01:16 +0800 | |
---|---|---|
committer | 2016-04-07 21:15:03 +0800 | |
commit | cc5e2765a9d56b03b69d0c3f25b94721f82d034e (patch) | |
tree | 27a163cd7cb9480ea30872616a9f1044799932e7 /vulkan/libvulkan/driver.cpp | |
parent | eb7db124e46da9a9210cf868353f5ea79502ffec (diff) |
vulkan: rework DriverDispatchTable
Generate {Instance,Device}DriverTable from code-generator.tmpl to replace
dispatch.tmpl entirely. The new code avoids initializing
VK_ANDROID_native_buffer entries when the extension is not enabled. The
separation of instance and device driver tables also allows us to
initialize the device driver table with vkGetDeviceProcAddr, which is
expected to return more efficient function pointers on properly
implemented HALs.
CreateInstance_Bottom always has a potential resource leak when the
HAL-created instance does not contain HWVULKAN_DISPATCH_MAGIC.
CreateDevice_Bottom now has the same issue. Both of them will be fixed in
following commits.
Change-Id: If7800ef23098121f1fff643a2c5224c2c9be0711
Diffstat (limited to 'vulkan/libvulkan/driver.cpp')
-rw-r--r-- | vulkan/libvulkan/driver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 68ae5c8314..d517c72440 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -193,7 +193,7 @@ PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName) { PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName) { const ProcHook* hook = GetProcHook(pName); if (!hook) - return GetData(device).get_device_proc_addr(device, pName); + return GetData(device).driver.GetDeviceProcAddr(device, pName); if (hook->type != ProcHook::DEVICE) { ALOGE("Invalid use of vkGetDeviceProcAddr to query %s", pName); |