Blender Git Loki

Git Commits -> Revision baeb118

Revision baeb118 by Patrick Mours (master)
December 9, 2019, 13:32 (GMT)
Cycles: Add OptiX acceleration structure compaction

This adds compaction support for OptiX acceleration structures, which reduces the device memory footprint in a post step after building. Depending on the scene this can reduce the amount of used device memory quite a bit and even improve performance (smaller acceleration structure improves cache usage). It's only enabled for background renders to make acceleration structure builds fast in viewport.

Also fixes a bug in the memory management for OptiX acceleration structures: These were held in a dynamic vector of 'device_memory' instances and used the mem_alloc/mem_free functions. However, those keep track of memory instances in the 'cuda_mem_map' via pointers to 'device_memory' (which works fine everywhere else since those are never copied/moved). But in the case of the vector, it may decide to reallocate at some point, which invalidates those pointers and would result in some nasty accesses to invalid memory. So it is not actually safe to move a 'device_memory' object and therefore this removes the move operator overloads again.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6369

Commit Details:

Full Hash: baeb11826b9fe5525db6dd05ba5271949079fc1e
Parent Commit: c9dc57b
Lines Changed: +101, -77

4 Modified Paths:

/intern/cycles/device/device_memory.cpp (+0, -25) (Diff)
/intern/cycles/device/device_memory.h (+0, -12) (Diff)
/intern/cycles/device/device_optix.cpp (+100, -39) (Diff)
/intern/cycles/kernel/svm/svm_bevel.h (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021