Loading vulkan/libvulkan/driver.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading vulkan/scripts/driver_generator.py +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,8 @@ struct ProcHook { f.write(gencom.indent(2) + gencom.base_ext_name(ext) + ',\n') f.write('\n') # EXTENSION_CORE_xxx API list must be the last set of enums after the extensions. # This allows to easily identify "a" core function hook for version in gencom.version_code_list: f.write(gencom.indent(2) + 'EXTENSION_CORE_' + version + ',\n') Loading Loading
vulkan/libvulkan/driver.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading
vulkan/scripts/driver_generator.py +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,8 @@ struct ProcHook { f.write(gencom.indent(2) + gencom.base_ext_name(ext) + ',\n') f.write('\n') # EXTENSION_CORE_xxx API list must be the last set of enums after the extensions. # This allows to easily identify "a" core function hook for version in gencom.version_code_list: f.write(gencom.indent(2) + 'EXTENSION_CORE_' + version + ',\n') Loading