Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/device/oneapi/device.cpp')
-rw-r--r--intern/cycles/device/oneapi/device.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/device/oneapi/device.cpp b/intern/cycles/device/oneapi/device.cpp
index 8056c204188..4aa307e9300 100644
--- a/intern/cycles/device/oneapi/device.cpp
+++ b/intern/cycles/device/oneapi/device.cpp
@@ -25,10 +25,12 @@ static OneAPIDLLInterface oneapi_dll;
#ifdef _WIN32
# define LOAD_ONEAPI_SHARED_LIBRARY(path) (void *)(LoadLibrary(path))
+# define LOAD_ONEAPI_SHARED_LIBRARY_ERROR() GetLastError()
# define FREE_SHARED_LIBRARY(handle) FreeLibrary((HMODULE)handle)
# define GET_SHARED_LIBRARY_SYMBOL(handle, name) GetProcAddress((HMODULE)handle, name)
#elif __linux__
# define LOAD_ONEAPI_SHARED_LIBRARY(path) dlopen(path, RTLD_NOW)
+# define LOAD_ONEAPI_SHARED_LIBRARY_ERROR() dlerror()
# define FREE_SHARED_LIBRARY(handle) dlclose(handle)
# define GET_SHARED_LIBRARY_SYMBOL(handle, name) dlsym(handle, name)
#endif
@@ -49,8 +51,8 @@ bool device_oneapi_init()
/* This shouldn't happen, but it still makes sense to have a branch for this. */
if (lib_handle == NULL) {
- LOG(ERROR) << "oneAPI kernel shared library cannot be loaded for some reason. This should not "
- "happen, however, it occurs hence oneAPI rendering will be disabled";
+ LOG(ERROR) << "oneAPI kernel shared library cannot be loaded: "
+ << LOAD_ONEAPI_SHARED_LIBRARY_ERROR();
return false;
}