1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-11-28 10:24:15 +01:00

return 0 for null instance and functions not on list

This commit is contained in:
Unknown 2018-11-14 21:17:24 +00:00
parent 6f0d74e765
commit 6416227127

View File

@ -147,6 +147,16 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(
//TODO take instance into consideration
//eg only return extension functions that are enabled?
if(!instance && !(
!strcmp(pName, "vkEnumerateInstanceVersion") ||
!strcmp(pName, "vkEnumerateInstanceExtensionProperties") ||
!strcmp(pName, "vkEnumerateInstanceLayerProperties") ||
!strcmp(pName, "vkCreateInstance")
))
{
return 0;
}
RETFUNC(vkCreateInstance);
RETFUNC(vkDestroyInstance);
RETFUNC(vkEnumeratePhysicalDevices);