wip
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
light7734 2025-10-10 16:49:09 +03:30
parent 4475375e28
commit 2fd02ce929
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
2 changed files with 12 additions and 12 deletions

View file

@ -112,7 +112,7 @@ Instance::~Instance()
unload_library(); unload_library();
} }
void Instance::initialize_instance() __attribute__((no_sanitize("memory"))) void Instance::initialize_instance()
{ {
auto app_info = VkApplicationInfo { auto app_info = VkApplicationInfo {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
@ -231,7 +231,7 @@ void Instance::initialize_instance()
ensure(m_instance, "Failed to create vulkan 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; constexpr auto runtime_loader_flags = RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE;
library = dlopen("libvulkan.so.1", runtime_loader_flags); 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"); 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) if (!library)
{ {
@ -263,7 +263,7 @@ void Instance::unload_library()
// library = nullptr; // 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) { constexpr auto load_fn = []<typename T>(T &pfn, const char *fn_name) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
@ -277,7 +277,7 @@ void Instance::load_global_functions()
load_fn(vk_enumerate_instance_layer_properties, "vkEnumerateInstanceLayerProperties"); 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) { const auto load_fn = [&]<typename T>(T &pfn, const char *fn_name) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
@ -321,7 +321,7 @@ void Instance::load_instance_functions()
load_fn(vk_destroy_surface_khr, "vkDestroySurfaceKHR"); 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) { const auto load_fn = [&]<typename T>(T &pfn, const char *fn_name) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)

View file

@ -64,17 +64,17 @@ private:
Instance(); 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; VkInstance m_instance = VK_NULL_HANDLE;