Files
test2/intern/cycles/util/guiding.h
Brecht Van Lommel 7a395e2e7f Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was f57e4c5b98.

After this one more fix was committed, this one is preserved as well:
67bd678887.
2024-03-18 15:04:12 +01:00

41 lines
618 B
C

/* SPDX-FileCopyrightText: 2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#ifdef WITH_PATH_GUIDING
# include <openpgl/cpp/OpenPGL.h>
# include <openpgl/version.h>
#endif
#include "util/system.h"
CCL_NAMESPACE_BEGIN
static int guiding_device_type()
{
#ifdef WITH_PATH_GUIDING
# if defined(__ARM_NEON)
return 8;
# else
if (system_cpu_support_avx2()) {
return 8;
}
if (system_cpu_support_sse41()) {
return 4;
}
return 0;
# endif
#else
return 0;
#endif
}
static inline bool guiding_supported()
{
return guiding_device_type() != 0;
}
CCL_NAMESPACE_END