mirror of
https://github.com/blender/blender
synced 2026-09-26 16:15:47 +03:00
Cycles: Allow enabling OIDN for HIP with environment variable
Using the existing OIDN_DEVICE_HIP, don't overwrite it if it was already set. Ref #115045 Pull Request: https://projects.blender.org/blender/blender/pulls/119672
This commit is contained in:
parent
f771a8563b
commit
ab9f9930b5
1 changed files with 4 additions and 2 deletions
|
|
@ -220,11 +220,13 @@ static void device_oidn_init_once()
|
|||
*
|
||||
* This also affects systems which have for example an NVIDIA GPU as OIDN
|
||||
* initializes all device types together. */
|
||||
if (getenv("OIDN_DEVICE_HIP") == nullptr) {
|
||||
#ifdef _WIN32
|
||||
_putenv_s("OIDN_DEVICE_HIP", "0");
|
||||
_putenv_s("OIDN_DEVICE_HIP", "0");
|
||||
#else
|
||||
setenv("OIDN_DEVICE_HIP", "0", true);
|
||||
setenv("OIDN_DEVICE_HIP", "0", true);
|
||||
#endif
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue