diff --git a/intern/cycles/kernel/device/oneapi/context_begin.h b/intern/cycles/kernel/device/oneapi/context_begin.h index 86532635f2c..8f705983567 100644 --- a/intern/cycles/kernel/device/oneapi/context_begin.h +++ b/intern/cycles/kernel/device/oneapi/context_begin.h @@ -2,41 +2,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#ifdef WITH_NANOVDB -/* Data type to replace `double` used in the NanoVDB headers. Cycles don't need doubles, and is - * safer and more portable to never use double datatype on GPU. - * Use a special structure, so that the following is true: - * - No unnoticed implicit cast or mathematical operations used on scalar 64bit type - * (which rules out trick like using `uint64_t` as a drop-in replacement for double). - * - Padding rules are matching exactly `double` - * (which rules out array of `uint8_t`). */ -struct ccl_vdb_double_t { - union ccl_vdb_helper_t { - double d; - uint64_t i; - }; - - uint64_t i; - ccl_vdb_double_t(double value) - { - ccl_vdb_helper_t helper; - helper.d = value; - i = helper.i; - } - /* We intentionally allow conversion to float in order to workaround compilation errors - * for defined math functions that take doubles. */ - operator float() const - { - ccl_vdb_helper_t helper; - helper.i = i; - return (float)helper.d; - } -}; - -# define double ccl_vdb_double_t -# include "kernel/util/nanovdb.h" -# undef double -#endif +#include "kernel/util/nanovdb.h" /* clang-format off */ struct ONEAPIKernelContext : public KernelGlobalsGPU {