mirror of
				https://github.com/PancakeTAS/lsfg-vk.git
				synced 2025-10-30 07:01:10 +00:00 
			
		
		
		
	fix: hide symbols by default
This commit is contained in:
		
							parent
							
								
									61be74fe18
								
							
						
					
					
						commit
						60ccaac64d
					
				
					 6 changed files with 20 additions and 1 deletions
				
			
		|  | @ -1,6 +1,8 @@ | |||
| cmake_minimum_required(VERSION 3.10) | ||||
| 
 | ||||
| set(CMAKE_SKIP_RPATH ON) | ||||
| set(CMAKE_C_VISIBILITY_PRESET "hidden") | ||||
| set(CMAKE_CXX_VISIBILITY_PRESET "hidden") | ||||
| 
 | ||||
| # subprojects | ||||
| add_compile_options(-fPIC | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| cmake_minimum_required(VERSION 3.10) | ||||
| 
 | ||||
| set(CMAKE_C_VISIBILITY_PRESET "hidden") | ||||
| set(CMAKE_CXX_VISIBILITY_PRESET "hidden") | ||||
| 
 | ||||
| project(lsfg-vk-framegen | ||||
|     DESCRIPTION "Lossless Scaling Frame Generation Backend" | ||||
|     LANGUAGES CXX) | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ namespace LSFG_3_1 { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if Vulkan objects fail to initialize.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void initialize(uint64_t deviceUUID, | ||||
|         bool isHdr, float flowScale, uint64_t generationCount, | ||||
|         const std::function<std::vector<uint8_t>(const std::string&)>& loader); | ||||
|  | @ -36,6 +37,7 @@ namespace LSFG_3_1 { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if the context cannot be created.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     int32_t createContext( | ||||
|         int in0, int in1, const std::vector<int>& outN, | ||||
|         VkExtent2D extent, VkFormat format); | ||||
|  | @ -49,6 +51,7 @@ namespace LSFG_3_1 { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if the context cannot be presented.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void presentContext(int32_t id, int inSem, const std::vector<int>& outSem); | ||||
| 
 | ||||
|     ///
 | ||||
|  | @ -56,11 +59,13 @@ namespace LSFG_3_1 { | |||
|     ///
 | ||||
|     /// @param id Unique identifier of the context to delete.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void deleteContext(int32_t id); | ||||
| 
 | ||||
|     ///
 | ||||
|     /// Deinitialize the LSFG library.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void finalize(); | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ namespace LSFG_3_1P { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if Vulkan objects fail to initialize.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void initialize(uint64_t deviceUUID, | ||||
|         bool isHdr, float flowScale, uint64_t generationCount, | ||||
|         const std::function<std::vector<uint8_t>(const std::string&)>& loader); | ||||
|  | @ -36,6 +37,7 @@ namespace LSFG_3_1P { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if the context cannot be created.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     int32_t createContext( | ||||
|         int in0, int in1, const std::vector<int>& outN, | ||||
|         VkExtent2D extent, VkFormat format); | ||||
|  | @ -49,6 +51,7 @@ namespace LSFG_3_1P { | |||
|     ///
 | ||||
|     /// @throws LSFG::vulkan_error if the context cannot be presented.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void presentContext(int32_t id, int inSem, const std::vector<int>& outSem); | ||||
| 
 | ||||
|     ///
 | ||||
|  | @ -56,11 +59,13 @@ namespace LSFG_3_1P { | |||
|     ///
 | ||||
|     /// @param id Unique identifier of the context to delete.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void deleteContext(int32_t id); | ||||
| 
 | ||||
|     ///
 | ||||
|     /// Deinitialize the LSFG library.
 | ||||
|     ///
 | ||||
|     __attribute__((visibility("default"))) | ||||
|     void finalize(); | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -219,6 +219,8 @@ namespace Layer { | |||
| } | ||||
| 
 | ||||
| /// Symbol definition for Vulkan instance layer.
 | ||||
| __attribute__((visibility("default"))) | ||||
| extern "C" 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); | ||||
|  |  | |||
|  | @ -15,7 +15,9 @@ | |||
| #include <thread> | ||||
| 
 | ||||
| namespace { | ||||
|     __attribute__((constructor)) void lsfgvk_init() { | ||||
|     __attribute__((constructor)) | ||||
|     __attribute__((visibility("default"))) | ||||
|     void lsfgvk_init() { | ||||
|         std::cerr << std::unitbuf; | ||||
| 
 | ||||
|         // read configuration
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 PancakeTAS
						PancakeTAS