Files
goo-engine/build_files/build_environment/patches/oidn.diff
T

76 lines
3.4 KiB
Diff

diff -Naur oidn-2.2.0/core/CMakeLists.txt external_openimagedenoise/core/CMakeLists.txt
--- oidn-2.2.0/core/CMakeLists.txt 2024-02-01 17:52:16 -0700
+++ external_openimagedenoise/core/CMakeLists.txt 2024-02-03 12:41:34 -0700
@@ -87,7 +87,7 @@
add_library(OpenImageDenoise_core ${OIDN_CORE_LIB_TYPE} ${OIDN_CORE_SOURCES} ${OIDN_RESOURCE_FILE})
set_property(TARGET OpenImageDenoise_core PROPERTY VERSION ${PROJECT_VERSION})
-
+target_compile_definitions(OpenImageDenoise_core PRIVATE SHARED_POSTFIX=\"$<$<CONFIG:Debug>:$<TARGET_PROPERTY:OpenImageDenoise_core,DEBUG_POSTFIX>>\")
target_link_libraries(OpenImageDenoise_core
PUBLIC
OpenImageDenoise_common
diff -Naur oidn-2.2.0/core/module.cpp external_openimagedenoise/core/module.cpp
--- oidn-2.2.0/core/module.cpp 2024-02-01 17:52:16 -0700
+++ external_openimagedenoise/core/module.cpp 2024-02-03 12:41:34 -0700
@@ -29,7 +29,7 @@
return true; // module already loaded
// Get the path of the module to load
- std::string filename = "OpenImageDenoise_" + name;
+ std::string filename = "OpenImageDenoise_" + name + SHARED_POSTFIX;
#if defined(_WIN32)
filename += ".dll";
#else
@@ -37,7 +37,8 @@
"." + toString(OIDN_VERSION_MINOR) +
"." + toString(OIDN_VERSION_PATCH);
#if defined(__APPLE__)
- filename = "lib" + filename + versionStr + ".dylib";
+ // BLENDER: version string is stripped on macOS.
+ filename = "lib" + filename + ".dylib";
#else
filename = "lib" + filename + ".so" + versionStr;
#endif
diff -Naur oidn-2.2.0/devices/CMakeLists.txt external_openimagedenoise/devices/CMakeLists.txt
--- oidn-2.2.0/devices/CMakeLists.txt 2024-02-01 17:52:16 -0700
+++ external_openimagedenoise/devices/CMakeLists.txt 2024-02-03 13:10:31 -0700
@@ -65,6 +65,7 @@
-DOIDN_WARN_AS_ERRORS:BOOL=${OIDN_WARN_AS_ERRORS}
-DOIDN_SANITIZER:STRING=${OIDN_SANITIZER}
-DOIDN_DEVICE_CUDA_API:STRING=${OIDN_DEVICE_CUDA_API}
+ -DPython_EXECUTABLE:STRING=${Python_EXECUTABLE}
BUILD_ALWAYS TRUE
DEPENDS
OpenImageDenoise_core
@@ -155,6 +156,8 @@
-DOIDN_API_NAMESPACE:STRING=${OIDN_API_NAMESPACE}
-DOIDN_WARN_AS_ERRORS:BOOL=${OIDN_WARN_AS_ERRORS}
-DOIDN_SANITIZER:STRING=${OIDN_SANITIZER}
+ -DPython_EXECUTABLE:STRING=${Python_EXECUTABLE}
+ -DCMAKE_DEBUG_POSTFIX:STRING=${CMAKE_DEBUG_POSTFIX}
BUILD_ALWAYS TRUE
DEPENDS
OpenImageDenoise_core
diff --git a/devices/hip/hip_device.cpp b/devices/hip/hip_device.cpp
index ae14ced..a49e131 100644
--- a/devices/hip/hip_device.cpp
+++ b/devices/hip/hip_device.cpp
@@ -93,10 +93,16 @@ OIDN_NAMESPACE_BEGIN
{
const std::string name = getArchName(prop);
+ // BLENDER: this comment is meant to generate a merge conflict if the code
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
if (name == "gfx1030")
return HIPArch::DL;
+ // BLENDER: this comment is meant to generate a merge conflict if the code
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
if (name == "gfx1100" || name == "gfx1101" || name == "gfx1102")
return HIPArch::WMMA;
+ // BLENDER: this comment is meant to generate a merge conflict if the code
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
else
return HIPArch::Unknown;
}