* update blender to 17:4.3.2-8

This commit is contained in:
Alexander Baldeck 2025-02-20 21:44:33 +01:00
parent eb8ef2b707
commit 69b8e9bfb5

View File

@ -0,0 +1,43 @@
diff --git a/extern/hipew/src/hiprtew.cc b/extern/hipew/src/hiprtew.cc
index b1db74faa7e..f7c8241cc5a 100644
--- a/extern/hipew/src/hiprtew.cc
+++ b/extern/hipew/src/hiprtew.cc
@@ -45,6 +45,18 @@ thiprtDestroyGlobalStackBuffer *hiprtDestroyGlobalStackBuffer;
thiprtDestroyFuncTable *hiprtDestroyFuncTable;
thiprtSetLogLevel *hiprtSetLogLevel;
+static DynamicLibrary dynamic_library_open_find(const char **paths) {
+ int i = 0;
+ while (paths[i] != NULL) {
+ DynamicLibrary lib = dynamic_library_open(paths[i]);
+ if (lib != NULL) {
+ return lib;
+ }
+ ++i;
+ }
+ return NULL;
+}
+
static void hipewHipRtExit(void)
{
if (hiprt_lib != NULL) {
@@ -70,12 +82,16 @@ bool hiprtewInit()
}
#ifdef _WIN32
- std::string hiprt_path = "hiprt64.dll";
+ const char *hiprt_paths[] = {"hiprt64.dll", NULL};
#else
- std::string hiprt_path = "libhiprt64.so";
+ /* libhiprt is installed to the bin subfolder by default, so we include it
+ * in our search path. */
+ const char *hiprt_paths[] = {"libhiprt64.so",
+ "/opt/rocm/lib/libhiprt64.so",
+ "/opt/rocm/bin/libhiprt64.so", NULL};
#endif
- hiprt_lib = dynamic_library_open(hiprt_path.c_str());
+ hiprt_lib = dynamic_library_open_find(hiprt_paths);
if (hiprt_lib == NULL) {
return false;