Blender
V2.93
intern
cycles
bvh
bvh_optix.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2019, NVIDIA Corporation.
3
* Copyright 2019, Blender Foundation.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifdef WITH_OPTIX
19
20
# include "
device/device.h
"
21
22
# include "
bvh/bvh_optix.h
"
23
24
CCL_NAMESPACE_BEGIN
25
26
BVHOptiX::BVHOptiX(
const
BVHParams
¶ms_,
27
const
vector<Geometry *>
&geometry_,
28
const
vector<Object *>
&objects_,
29
Device
*device)
30
:
BVH
(params_, geometry_, objects_),
31
device(device),
32
traversable_handle(0),
33
as_data(device, params_.top_level ?
"optix tlas"
:
"optix blas"
, false),
34
motion_transform_data(device,
"optix motion transform"
, false)
35
{
36
}
37
38
BVHOptiX::~BVHOptiX()
39
{
40
// Acceleration structure memory is delayed freed on device, since deleting the
41
// BVH may happen while still being used for rendering.
42
device->
release_optix_bvh
(
this
);
43
}
44
45
CCL_NAMESPACE_END
46
47
#endif
/* WITH_OPTIX */
bvh_optix.h
BVHParams
Definition:
bvh_params.h:46
BVH
Definition:
bvh/bvh.h:80
Device
Definition:
device.h:293
Device::release_optix_bvh
virtual void release_optix_bvh(BVH *)
Definition:
device.h:430
vector< Geometry * >
device.h
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
kernel_compat_cuda.h:23
CCL_NAMESPACE_BEGIN
Definition:
blender_python.cpp:54
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1