diff options
author | Patrick Mours <pmours@nvidia.com> | 2021-03-03 16:35:50 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2021-03-11 16:12:35 +0300 |
commit | f4f8b6dde32b0438e0b97a6d8ebeb89802987127 (patch) | |
tree | 9cab5fe3998b72e481238289c5298b8a16dc7445 /intern/cycles/bvh/bvh_optix.cpp | |
parent | ba996ddb3a3a49065d26ff1010790b17bc8709ec (diff) |
Cycles: Change device-only memory to actually only allocate on the device
This patch changes the `MEM_DEVICE_ONLY` type to only allocate on the device and fail if
that is not possible anymore because out-of-memory (since OptiX acceleration structures may
not be allocated in host memory). It also fixes high peak memory usage during OptiX
acceleration structure building.
Reviewed By: brecht
Maniphest Tasks: T85985
Differential Revision: https://developer.blender.org/D10535
Diffstat (limited to 'intern/cycles/bvh/bvh_optix.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh_optix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh_optix.cpp b/intern/cycles/bvh/bvh_optix.cpp index e094f339ede..d630e8965dc 100644 --- a/intern/cycles/bvh/bvh_optix.cpp +++ b/intern/cycles/bvh/bvh_optix.cpp @@ -27,8 +27,8 @@ BVHOptiX::BVHOptiX(const BVHParams ¶ms_, Device *device) : BVH(params_, geometry_, objects_), traversable_handle(0), - as_data(device, params_.top_level ? "optix tlas" : "optix blas"), - motion_transform_data(device, "optix motion transform") + as_data(device, params_.top_level ? "optix tlas" : "optix blas", false), + motion_transform_data(device, "optix motion transform", false) { } |