Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2019-12-05 21:17:01 +0300
committerPatrick Mours <pmours@nvidia.com>2019-12-09 16:32:12 +0300
commitbaeb11826b9fe5525db6dd05ba5271949079fc1e (patch)
tree9d646d69ef51c3fb1dab3d76798936160b1560f9 /intern/cycles/kernel/svm/svm_bevel.h
parentc9dc57be3ae59fac84b243f8bfdaddaa9b5e2f20 (diff)
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
Diffstat (limited to 'intern/cycles/kernel/svm/svm_bevel.h')
-rw-r--r--intern/cycles/kernel/svm/svm_bevel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_bevel.h b/intern/cycles/kernel/svm/svm_bevel.h
index 434502f31f9..bf5957ec9e4 100644
--- a/intern/cycles/kernel/svm/svm_bevel.h
+++ b/intern/cycles/kernel/svm/svm_bevel.h
@@ -53,7 +53,7 @@ ccl_device_noinline float3 svm_bevel(KernelGlobals *kg,
float3 sum_N = make_float3(0.0f, 0.0f, 0.0f);
for (int sample = 0; sample < num_samples; sample++) {
- float disk_u = 0.0f, disk_v = 0.0f;
+ float disk_u, disk_v;
path_branched_rng_2D(
kg, state->rng_hash, state, sample, num_samples, PRNG_BEVEL_U, &disk_u, &disk_v);