mirror of
https://github.com/openharmony/third_party_vulkan-loader.git
synced 2026-07-19 17:13:36 -04:00
Remove hasing of unknown functions
Use a simple linear search instead. This greatly simplifies the logic and reduces the places for the logic to go awry.
This commit is contained in:
committed by
Charles Giessen
parent
b986091316
commit
dec1fcac60
+5
-5
@@ -3909,7 +3909,8 @@ static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpdpa_instance_internal(V
|
||||
return addr;
|
||||
}
|
||||
|
||||
if (loader_phys_dev_ext_gpa(loader_get_instance(inst), pName, true, NULL, &addr)) return addr;
|
||||
addr = loader_phys_dev_ext_gpa_term(loader_get_instance(inst), pName);
|
||||
if (NULL != addr) return addr;
|
||||
|
||||
// Don't call down the chain, this would be an infinite loop
|
||||
loader_log(NULL, VULKAN_LOADER_DEBUG_BIT, 0, "loader_gpdpa_instance_internal() unrecognized name %s", pName);
|
||||
@@ -3934,9 +3935,8 @@ static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpdpa_instance_terminator
|
||||
|
||||
// Get the terminator, but don't perform checking since it should already
|
||||
// have been setup if we get here.
|
||||
if (loader_phys_dev_ext_gpa(loader_get_instance(inst), pName, false, NULL, &addr)) {
|
||||
return addr;
|
||||
}
|
||||
addr = loader_phys_dev_ext_gpa_term_no_check(loader_get_instance(inst), pName);
|
||||
if (NULL != addr) return addr;
|
||||
|
||||
// Don't call down the chain, this would be an infinite loop
|
||||
loader_log(NULL, VULKAN_LOADER_DEBUG_BIT, 0, "loader_gpdpa_instance_terminator() unrecognized name %s", pName);
|
||||
@@ -5358,7 +5358,7 @@ out:
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL terminator_DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) {
|
||||
struct loader_instance *ptr_instance = loader_instance(instance);
|
||||
struct loader_instance *ptr_instance = loader_get_instance(instance);
|
||||
if (NULL == ptr_instance) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user