Add Chromium-only Blender WebEngine parity work
This commit is contained in:
32
blender-5.2.0/intern/cycles/util/openimagedenoise.h
Normal file
32
blender-5.2.0/intern/cycles/util/openimagedenoise.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 */
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef WITH_OPENIMAGEDENOISE
|
||||
# include <OpenImageDenoise/oidn.hpp> // IWYU pragma: export
|
||||
#endif
|
||||
|
||||
#include "util/system.h" // IWYU pragma: keep
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
static inline bool openimagedenoise_supported()
|
||||
{
|
||||
#ifdef WITH_OPENIMAGEDENOISE
|
||||
# if defined(__APPLE__)
|
||||
/* Always supported through Accelerate framework BNNS. */
|
||||
return true;
|
||||
# elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
/* OIDN 2.2 and up supports ARM64 on Windows and Linux. */
|
||||
return true;
|
||||
# else
|
||||
return system_cpu_support_sse42();
|
||||
# endif
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
Reference in New Issue
Block a user