vulkan/layers: Use PUBLIC instead of VK_LAYER_EXPORT

VK_LAYER_EXPORT is going away in the next Vulkan header update.  We
already have a PUBLIC macro in util/macros.h which does the same thing.
Unlike VK_LAYER_EXPORT, it should work in Windows too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21225>
This commit is contained in:
Faith Ekstrand 2023-02-16 12:57:36 -06:00 committed by Marge Bot
parent f24f753c8a
commit d6248b8133
3 changed files with 9 additions and 9 deletions

View file

@ -351,8 +351,8 @@ static void *find_ptr(const char *name)
return NULL;
}
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev,
const char *funcName)
PUBLIC VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev,
const char *funcName)
{
void *ptr = find_ptr(funcName);
if (ptr) return (PFN_vkVoidFunction)(ptr);
@ -364,8 +364,8 @@ VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkD
return device_data->vtable.GetDeviceProcAddr(dev, funcName);
}
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
const char *funcName)
PUBLIC VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
const char *funcName)
{
void *ptr = find_ptr(funcName);
if (ptr) return (PFN_vkVoidFunction) ptr;

View file

@ -624,7 +624,7 @@ static void (*get_instance_proc_addr(VkInstance instance, const char* name))()
return info->GetInstanceProcAddr(instance, name);
}
VK_LAYER_EXPORT VkResult vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
PUBLIC VkResult vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct)
{
if (pVersionStruct->loaderLayerInterfaceVersion < 2)
return VK_ERROR_INITIALIZATION_FAILED;

View file

@ -2687,8 +2687,8 @@ static void *find_ptr(const char *name)
return NULL;
}
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev,
const char *funcName)
PUBLIC VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice dev,
const char *funcName)
{
void *ptr = find_ptr(funcName);
if (ptr) return reinterpret_cast<PFN_vkVoidFunction>(ptr);
@ -2700,8 +2700,8 @@ VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkD
return device_data->vtable.GetDeviceProcAddr(dev, funcName);
}
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
const char *funcName)
PUBLIC VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
const char *funcName)
{
void *ptr = find_ptr(funcName);
if (ptr) return reinterpret_cast<PFN_vkVoidFunction>(ptr);