diff --git a/framegen/public/lsfg_3_1.hpp b/framegen/public/lsfg_3_1.hpp index 40a60b5..71871d0 100644 --- a/framegen/public/lsfg_3_1.hpp +++ b/framegen/public/lsfg_3_1.hpp @@ -20,7 +20,7 @@ namespace LSFG_3_1 { /// /// @throws LSFG::vulkan_error if Vulkan objects fail to initialize. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void initialize(uint64_t deviceUUID, bool isHdr, float flowScale, uint64_t generationCount, const std::function(const std::string&)>& loader); @@ -37,7 +37,7 @@ namespace LSFG_3_1 { /// /// @throws LSFG::vulkan_error if the context cannot be created. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] int32_t createContext( int in0, int in1, const std::vector& outN, VkExtent2D extent, VkFormat format); @@ -51,7 +51,7 @@ namespace LSFG_3_1 { /// /// @throws LSFG::vulkan_error if the context cannot be presented. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void presentContext(int32_t id, int inSem, const std::vector& outSem); /// @@ -59,13 +59,13 @@ namespace LSFG_3_1 { /// /// @param id Unique identifier of the context to delete. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void deleteContext(int32_t id); /// /// Deinitialize the LSFG library. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void finalize(); } diff --git a/framegen/public/lsfg_3_1p.hpp b/framegen/public/lsfg_3_1p.hpp index fb7f725..8c1af41 100644 --- a/framegen/public/lsfg_3_1p.hpp +++ b/framegen/public/lsfg_3_1p.hpp @@ -20,7 +20,7 @@ namespace LSFG_3_1P { /// /// @throws LSFG::vulkan_error if Vulkan objects fail to initialize. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void initialize(uint64_t deviceUUID, bool isHdr, float flowScale, uint64_t generationCount, const std::function(const std::string&)>& loader); @@ -37,7 +37,7 @@ namespace LSFG_3_1P { /// /// @throws LSFG::vulkan_error if the context cannot be created. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] int32_t createContext( int in0, int in1, const std::vector& outN, VkExtent2D extent, VkFormat format); @@ -51,7 +51,7 @@ namespace LSFG_3_1P { /// /// @throws LSFG::vulkan_error if the context cannot be presented. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void presentContext(int32_t id, int inSem, const std::vector& outSem); /// @@ -59,13 +59,13 @@ namespace LSFG_3_1P { /// /// @param id Unique identifier of the context to delete. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void deleteContext(int32_t id); /// /// Deinitialize the LSFG library. /// - __attribute__((visibility("default"))) + [[gnu::visibility("default")]] void finalize(); } diff --git a/include/layer.hpp b/include/layer.hpp index 6ebe903..b6366f7 100644 --- a/include/layer.hpp +++ b/include/layer.hpp @@ -219,8 +219,10 @@ namespace Layer { } /// Symbol definition for Vulkan instance layer. -__attribute__((visibility("default"))) -extern "C" PFN_vkVoidFunction layer_vkGetInstanceProcAddr(VkInstance instance, const char* pName); +extern "C" +[[gnu::visibility("default")]] +PFN_vkVoidFunction layer_vkGetInstanceProcAddr(VkInstance instance, const char* pName); /// Symbol definition for Vulkan device layer. -__attribute__((visibility("default"))) -extern "C" PFN_vkVoidFunction layer_vkGetDeviceProcAddr(VkDevice device, const char* pName); +extern "C" +[[gnu::visibility("default")]] +PFN_vkVoidFunction layer_vkGetDeviceProcAddr(VkDevice device, const char* pName); diff --git a/src/main.cpp b/src/main.cpp index ac16086..756c6dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,8 +15,8 @@ #include namespace { - __attribute__((constructor)) - __attribute__((visibility("default"))) + [[gnu::constructor]] + [[gnu::visibility("default")]] void lsfgvk_init() { std::cerr << std::unitbuf;