Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2020-11-10 20:28:14 +0300
committerPatrick Mours <pmours@nvidia.com>2020-11-10 20:28:14 +0300
commita63208823c8426b76270393f9217d3cf3ef66d0b (patch)
tree7e035eb94c7ddb1fad6356a5cef6555e03aafc6e /intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
parent339f442a9327d6eeb1bc7a52be702ea9b461df72 (diff)
Fix NanoVDB compile errors with recent NanoVDB versions
There were some changes to the NanoVDB API that broke the way Cycles was previously using it. With these changes it compiles successfully again and also still compiles with the NanoVDB revision that is currently part of the Blender dependencies. Ref T81454.
Diffstat (limited to 'intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h')
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
index b8aaacba960..001bc652810 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
+++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h
@@ -159,18 +159,18 @@ ccl_device_inline T kernel_tex_image_interp_nanovdb(
const TextureInfo &info, float x, float y, float z, uint interpolation)
{
using namespace nanovdb;
- typedef ReadAccessor<NanoRoot<T>> ReadAccessorT;
NanoGrid<T> *const grid = (NanoGrid<T> *)info.data;
- const NanoRoot<T> &root = grid->tree().root();
+ typedef typename nanovdb::NanoGrid<T>::AccessorType AccessorType;
+ AccessorType acc = grid->getAccessor();
switch (interpolation) {
case INTERPOLATION_CLOSEST:
- return NearestNeighborSampler<ReadAccessorT, false>(root)(Vec3f(x, y, z));
+ return SampleFromVoxels<AccessorType, 0, false>(acc)(Vec3f(x, y, z));
case INTERPOLATION_LINEAR:
- return TrilinearSampler<ReadAccessorT, false>(root)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f));
+ return SampleFromVoxels<AccessorType, 1, false>(acc)(Vec3f(x - 0.5f, y - 0.5f, z - 0.5f));
default:
- TrilinearSampler<ReadAccessorT, false> s(root);
+ SampleFromVoxels<AccessorType, 1, false> s(acc);
return kernel_tex_image_interp_tricubic_nanovdb<T>(s, x - 0.5f, y - 0.5f, z - 0.5f);
}
}