Blender
V4.3
intern
cycles
bvh
optix.cpp
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2019 NVIDIA Corporation
2
* SPDX-FileCopyrightText: 2019-2022 Blender Foundation
3
*
4
* SPDX-License-Identifier: Apache-2.0 */
5
6
#ifdef WITH_OPTIX
7
8
# include "
device/device.h
"
9
10
# include "
bvh/optix.h
"
11
12
CCL_NAMESPACE_BEGIN
13
14
BVHOptiX::BVHOptiX(
const
BVHParams
¶ms_,
15
const
vector<Geometry *>
&geometry_,
16
const
vector<Object *>
&objects_,
17
Device
*device)
18
:
BVH
(params_, geometry_, objects_),
19
device(device),
20
traversable_handle(0),
21
as_data(make_unique<
device_only_memory
<char>>(
22
device,
params
.top_level ?
"optix tlas"
:
"optix blas"
,
false
)),
23
motion_transform_data(
24
make_unique<
device_only_memory
<char>>(device,
"optix motion transform"
,
false
))
25
{
26
}
27
28
BVHOptiX::~BVHOptiX()
29
{
30
/* Acceleration structure memory is delayed freed on device, since deleting the
31
* BVH may happen while still being used for rendering. */
32
device->
release_bvh
(
this
);
33
}
34
35
CCL_NAMESPACE_END
36
37
#endif
/* WITH_OPTIX */
BVHParams
Definition
params.h:58
BVH
Definition
bvh/bvh.h:66
Device
Definition
device/device.h:136
Device::release_bvh
virtual void release_bvh(BVH *)
Definition
device/device.h:227
device_only_memory
Definition
cycles/device/memory.h:310
vector
Definition
cycles/util/vector.h:22
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
device.h
false
false
Definition
eevee_depth_of_field_info.hh:134
params
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
Definition
interface_widgets.cc:1055
CCL_NAMESPACE_BEGIN
Definition
python.cpp:44
optix.h
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0