diff options
author | Normunds Rieksts <normunds.rieksts+arm@gmail.com> | 2023-04-17 10:59:19 +0000 |
---|---|---|
committer | Normunds Rieksts <normunds.rieksts+arm@gmail.com> | 2023-04-17 10:59:19 +0000 |
commit | 43d806de38388ed83d40c78314e85268aca735e6 (patch) | |
tree | 812112b2f9c1c6fe5aca9737359f6988b4795050 | |
parent | 5befc4cb7d831b55c51e9f2339c40c0f739c5f71 (diff) | |
download | vulkan-wsi-layer-43d806de38388ed83d40c78314e85268aca735e6.tar.gz vulkan-wsi-layer-43d806de38388ed83d40c78314e85268aca735e6.tar.bz2 vulkan-wsi-layer-43d806de38388ed83d40c78314e85268aca735e6.zip |
Replace VK_LAYER_EXPORT with VWL_VKAPI_EXPORT
-rw-r--r-- | layer/layer.cpp | 5 | ||||
-rw-r--r-- | util/macros.hpp | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/layer/layer.cpp b/layer/layer.cpp index cc5634b..8ecc165 100644 --- a/layer/layer.cpp +++ b/layer/layer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Arm Limited. + * Copyright (c) 2016-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -377,7 +377,8 @@ wsi_layer_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateIn } VWL_VKAPI_CALL(VkResult) -VK_LAYER_EXPORT wsi_layer_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) VWL_API_POST +VWL_VKAPI_EXPORT wsi_layer_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) + VWL_API_POST { assert(pVersionStruct); assert(pVersionStruct->sType == LAYER_NEGOTIATE_INTERFACE_STRUCT); diff --git a/util/macros.hpp b/util/macros.hpp index 058b5be..505df90 100644 --- a/util/macros.hpp +++ b/util/macros.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -39,7 +39,16 @@ * are used by C code. * VWL_API_POST - Placed at the end of the function signature. These will typically be * functions that need to be callable from C. + * VWL_VKAPI_EXPORT - Marks that the symbol should use the "default" visibility */ #define VWL_VKAPI_CALL(ret_type) extern "C" VKAPI_ATTR ret_type VKAPI_CALL #define VWL_CAPI_CALL(ret_type) extern "C" ret_type #define VWL_API_POST noexcept + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define VWL_VKAPI_EXPORT __attribute__((visibility("default"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define VWL_VKAPI_EXPORT __attribute__((visibility("default"))) +#else +#define VWL_VKAPI_EXPORT +#endif
\ No newline at end of file |