RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.78k stars 164 forks source link

Windows: improve dependency lookup when loading module library. #179

Open bruvzg opened 11 months ago

bruvzg commented 11 months ago

Fixes loading of the module library dependencies when OIDN main library is dynamically loaded at runtime, and libraries are not in the executable directory.

e.g., when app dynamically load OpenImageDenoise.dll at runtime, using absolute path, ModuleLoader attempts to load OpenImageDenoise_device_cpu.dll module, but it fails since tbb12.dll is not in the library search path. This change temporary adds the module library directory to the search path to ensure dependencies are loaded correctly.

Calinou commented 3 months ago

Bump :slightly_smiling_face: Any interest in reviewing this? This would make it possible for Godot to use OIDN as a library, as opposed to calling its oidnDenoise CLI (which doesn't have a stable interface).

atafra commented 3 months ago

Sorry, there is interest but so far we had other priorities. We need to look into this carefully because it might have some security implications as well.

kraszkow commented 2 months ago

@bruvzg - Could you provide specific details about the problem you're addressing? It would be helpful if you could show the exact location of the DLLs mentioned in the description.