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:
authorHristo Gueorguiev <prem.nirved@gmail.com>2017-03-08 17:42:26 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-03-09 19:09:37 +0300
commit57e26627c485baab63e108821b2712d5e234ae7c (patch)
treee3ee5aa4bf759121559c69504b77d600552bf527 /intern/cycles/kernel/split/kernel_split_data.h
parent6c942db30dee14eb37229879656fa049a9ac6df6 (diff)
Cycles: SSS and Volume rendering in split kernel
Decoupled ray marching is not supported yet. Transparent shadows are always enabled for volume rendering. Changes in kernel/bvh and kernel/geom are from Sergey. This simiplifies code significantly, and prepares it for record-all transparent shadow function in split kernel.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_split_data.h')
-rw-r--r--intern/cycles/kernel/split/kernel_split_data.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/intern/cycles/kernel/split/kernel_split_data.h b/intern/cycles/kernel/split/kernel_split_data.h
index 5380c0c5de6..81dcdbaedde 100644
--- a/intern/cycles/kernel/split/kernel_split_data.h
+++ b/intern/cycles/kernel/split/kernel_split_data.h
@@ -31,6 +31,14 @@ ccl_device_inline size_t split_data_buffer_size(KernelGlobals *kg, size_t num_el
size = size SPLIT_DATA_ENTRIES;
#undef SPLIT_DATA_ENTRY
+#ifdef __SUBSURFACE__
+ size += align_up(num_elements * sizeof(SubsurfaceIndirectRays), 16); /* ss_rays */
+#endif
+
+#ifdef __VOLUME__
+ size += align_up(2 * num_elements * sizeof(PathState), 16); /* state_shadow */
+#endif
+
return size;
}
@@ -46,9 +54,19 @@ ccl_device_inline void split_data_init(KernelGlobals *kg,
#define SPLIT_DATA_ENTRY(type, name, num) \
split_data->name = (type*)p; p += align_up(num_elements * num * sizeof(type), 16);
- SPLIT_DATA_ENTRIES
+ SPLIT_DATA_ENTRIES;
#undef SPLIT_DATA_ENTRY
+#ifdef __SUBSURFACE__
+ split_data->ss_rays = (ccl_global SubsurfaceIndirectRays*)p;
+ p += align_up(num_elements * sizeof(SubsurfaceIndirectRays), 16);
+#endif
+
+#ifdef __VOLUME__
+ split_data->state_shadow = (ccl_global PathState*)p;
+ p += align_up(2 * num_elements * sizeof(PathState), 16);
+#endif
+
split_data->ray_state = ray_state;
}