This commit is contained in:
		
							parent
							
								
									4475375e28
								
							
						
					
					
						commit
						2fd02ce929
					
				
					 2 changed files with 12 additions and 12 deletions
				
			
		|  | @ -112,7 +112,7 @@ Instance::~Instance() | |||
| 	unload_library(); | ||||
| } | ||||
| 
 | ||||
| void Instance::initialize_instance() | ||||
| __attribute__((no_sanitize("memory"))) void Instance::initialize_instance() | ||||
| { | ||||
| 	auto app_info = VkApplicationInfo { | ||||
| 		.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, | ||||
|  | @ -231,7 +231,7 @@ void Instance::initialize_instance() | |||
| 	ensure(m_instance, "Failed to create vulkan instance"); | ||||
| } | ||||
| 
 | ||||
| void Instance::load_library() | ||||
| __attribute__((no_sanitize("memory"))) void Instance::load_library() | ||||
| { | ||||
| 	constexpr auto runtime_loader_flags = RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE; | ||||
| 	library = dlopen("libvulkan.so.1", runtime_loader_flags); | ||||
|  | @ -248,7 +248,7 @@ void Instance::load_library() | |||
| 	ensure(vk_get_instance_proc_address, "Failed to load vulkan function: vkGetInstanceProcAddr"); | ||||
| } | ||||
| 
 | ||||
| void Instance::unload_library() | ||||
| __attribute__((no_sanitize("memory"))) void Instance::unload_library() | ||||
| { | ||||
| 	if (!library) | ||||
| 	{ | ||||
|  | @ -263,7 +263,7 @@ void Instance::unload_library() | |||
| 	// library = nullptr;
 | ||||
| } | ||||
| 
 | ||||
| void Instance::load_global_functions() | ||||
| __attribute__((no_sanitize("memory"))) void Instance::load_global_functions() | ||||
| { | ||||
| 	constexpr auto load_fn = []<typename T>(T &pfn, const char *fn_name) { | ||||
| 		// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
 | ||||
|  | @ -277,7 +277,7 @@ void Instance::load_global_functions() | |||
| 	load_fn(vk_enumerate_instance_layer_properties, "vkEnumerateInstanceLayerProperties"); | ||||
| } | ||||
| 
 | ||||
| void Instance::load_instance_functions() | ||||
| __attribute__((no_sanitize("memory"))) void Instance::load_instance_functions() | ||||
| { | ||||
| 	const auto load_fn = [&]<typename T>(T &pfn, const char *fn_name) { | ||||
| 		// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
 | ||||
|  | @ -321,7 +321,7 @@ void Instance::load_instance_functions() | |||
| 	load_fn(vk_destroy_surface_khr, "vkDestroySurfaceKHR"); | ||||
| } | ||||
| 
 | ||||
| void Instance::load_device_functions_impl(VkDevice device) | ||||
| __attribute__((no_sanitize("memory"))) void Instance::load_device_functions_impl(VkDevice device) | ||||
| { | ||||
| 	const auto load_fn = [&]<typename T>(T &pfn, const char *fn_name) { | ||||
| 		// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
 | ||||
|  |  | |||
|  | @ -64,17 +64,17 @@ private: | |||
| 
 | ||||
| 	Instance(); | ||||
| 
 | ||||
| 	void initialize_instance(); | ||||
| 	__attribute__((no_sanitize("memory"))) void initialize_instance(); | ||||
| 
 | ||||
| 	void load_library(); | ||||
| 	__attribute__((no_sanitize("memory"))) void load_library(); | ||||
| 
 | ||||
| 	void unload_library(); | ||||
| 	__attribute__((no_sanitize("memory"))) void unload_library(); | ||||
| 
 | ||||
| 	void load_global_functions(); | ||||
| 	__attribute__((no_sanitize("memory"))) void load_global_functions(); | ||||
| 
 | ||||
| 	void load_instance_functions(); | ||||
| 	__attribute__((no_sanitize("memory"))) void load_instance_functions(); | ||||
| 
 | ||||
| 	void load_device_functions_impl(VkDevice device); | ||||
| 	__attribute__((no_sanitize("memory"))) void load_device_functions_impl(VkDevice device); | ||||
| 
 | ||||
| 	VkInstance m_instance = VK_NULL_HANDLE; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue