Blender
V3.3
intern
cycles
bvh
optix.cpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0
2
* Copyright 2019, NVIDIA Corporation.
3
* Copyright 2019-2022 Blender Foundation. */
4
5
#ifdef WITH_OPTIX
6
7
# include "
device/device.h
"
8
9
# include "
bvh/optix.h
"
10
11
CCL_NAMESPACE_BEGIN
12
13
BVHOptiX::BVHOptiX(
const
BVHParams
¶ms_,
14
const
vector<Geometry *>
&geometry_,
15
const
vector<Object *>
&objects_,
16
Device
*device)
17
:
BVH
(params_, geometry_, objects_),
18
device(device),
19
traversable_handle(0),
20
as_data(make_unique<
device_only_memory
<char>>(
21
device,
params
.top_level ?
"optix tlas"
:
"optix blas"
, false)),
22
motion_transform_data(
23
make_unique<
device_only_memory
<char>>(device,
"optix motion transform"
, false))
24
{
25
}
26
27
BVHOptiX::~BVHOptiX()
28
{
29
/* Acceleration structure memory is delayed freed on device, since deleting the
30
* BVH may happen while still being used for rendering. */
31
device->
release_optix_bvh
(
this
);
32
}
33
34
CCL_NAMESPACE_END
35
36
#endif
/* WITH_OPTIX */
BVHParams
Definition:
params.h:54
BVH
Definition:
bvh/bvh.h:63
Device
Definition:
device/device.h:105
Device::release_optix_bvh
virtual void release_optix_bvh(BVH *)
Definition:
device/device.h:182
device_only_memory
Definition:
cycles/device/memory.h:295
vector< Geometry * >
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
cuda/compat.h:9
device.h
params
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
Definition:
interface_widgets.c:1132
CCL_NAMESPACE_BEGIN
Definition:
python.cpp:37
optix.h
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1