[Bf-blender-cvs] [02239aca42c] soc-2022-many-lights-sampling: Merge branch 'master' into soc-2022-many-lights-sampling
Jeffrey Liu
noreply at git.blender.org
Tue Jun 21 06:15:21 CEST 2022
Commit: 02239aca42cbc452993e501266d76600090a3b12
Author: Jeffrey Liu
Date: Tue Jun 21 00:14:40 2022 -0400
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB02239aca42cbc452993e501266d76600090a3b12
Merge branch 'master' into soc-2022-many-lights-sampling
===================================================================
===================================================================
diff --cc intern/cycles/kernel/data_arrays.h
index 00000000000,7205f728088..978e45f07b7
mode 000000,100644..100644
--- a/intern/cycles/kernel/data_arrays.h
+++ b/intern/cycles/kernel/data_arrays.h
@@@ -1,0 -1,82 +1,86 @@@
+ /* SPDX-License-Identifier: Apache-2.0
+ * Copyright 2011-2022 Blender Foundation */
+
+ #ifndef KERNEL_DATA_ARRAY
+ # define KERNEL_DATA_ARRAY(type, name)
+ #endif
+
+ /* BVH2, not used for OptiX or Embree. */
+ KERNEL_DATA_ARRAY(float4, bvh_nodes)
+ KERNEL_DATA_ARRAY(float4, bvh_leaf_nodes)
+ KERNEL_DATA_ARRAY(uint, prim_type)
+ KERNEL_DATA_ARRAY(uint, prim_visibility)
+ KERNEL_DATA_ARRAY(uint, prim_index)
+ KERNEL_DATA_ARRAY(uint, prim_object)
+ KERNEL_DATA_ARRAY(uint, object_node)
+ KERNEL_DATA_ARRAY(float2, prim_time)
+
+ /* objects */
+ KERNEL_DATA_ARRAY(KernelObject, objects)
+ KERNEL_DATA_ARRAY(Transform, object_motion_pass)
+ KERNEL_DATA_ARRAY(DecomposedTransform, object_motion)
+ KERNEL_DATA_ARRAY(uint, object_flag)
+ KERNEL_DATA_ARRAY(float, object_volume_step)
+ KERNEL_DATA_ARRAY(uint, object_prim_offset)
+
+ /* cameras */
+ KERNEL_DATA_ARRAY(DecomposedTransform, camera_motion)
+
+ /* triangles */
+ KERNEL_DATA_ARRAY(uint, tri_shader)
+ KERNEL_DATA_ARRAY(packed_float3, tri_vnormal)
+ KERNEL_DATA_ARRAY(uint4, tri_vindex)
+ KERNEL_DATA_ARRAY(uint, tri_patch)
+ KERNEL_DATA_ARRAY(float2, tri_patch_uv)
+ KERNEL_DATA_ARRAY(packed_float3, tri_verts)
+
+ /* curves */
+ KERNEL_DATA_ARRAY(KernelCurve, curves)
+ KERNEL_DATA_ARRAY(float4, curve_keys)
+ KERNEL_DATA_ARRAY(KernelCurveSegment, curve_segments)
+
+ /* patches */
+ KERNEL_DATA_ARRAY(uint, patches)
+
+ /* pointclouds */
+ KERNEL_DATA_ARRAY(float4, points)
+ KERNEL_DATA_ARRAY(uint, points_shader)
+
+ /* attributes */
+ KERNEL_DATA_ARRAY(AttributeMap, attributes_map)
+ KERNEL_DATA_ARRAY(float, attributes_float)
+ KERNEL_DATA_ARRAY(float2, attributes_float2)
+ KERNEL_DATA_ARRAY(packed_float3, attributes_float3)
+ KERNEL_DATA_ARRAY(float4, attributes_float4)
+ KERNEL_DATA_ARRAY(uchar4, attributes_uchar4)
+
+ /* lights */
+ KERNEL_DATA_ARRAY(KernelLightDistribution, light_distribution)
+ KERNEL_DATA_ARRAY(KernelLight, lights)
+ KERNEL_DATA_ARRAY(float2, light_background_marginal_cdf)
+ KERNEL_DATA_ARRAY(float2, light_background_conditional_cdf)
+
++/* light tree */
++KERNEL_DATA_ARRAY(KernelLightTreeNode, light_tree_nodes)
++KERNEL_DATA_ARRAY(KernelLightTreeEmitter, light_tree_emitters)
++
+ /* particles */
+ KERNEL_DATA_ARRAY(KernelParticle, particles)
+
+ /* shaders */
+ KERNEL_DATA_ARRAY(uint4, svm_nodes)
+ KERNEL_DATA_ARRAY(KernelShader, shaders)
+
+ /* lookup tables */
+ KERNEL_DATA_ARRAY(float, lookup_table)
+
+ /* sobol */
+ KERNEL_DATA_ARRAY(float, sample_pattern_lut)
+
+ /* image textures */
+ KERNEL_DATA_ARRAY(TextureInfo, texture_info)
+
+ /* ies lights */
+ KERNEL_DATA_ARRAY(float, ies)
+
+ #undef KERNEL_DATA_ARRAY
diff --cc intern/cycles/scene/scene.cpp
index b4a57f77552,1fcc3331337..85050c99518
--- a/intern/cycles/scene/scene.cpp
+++ b/intern/cycles/scene/scene.cpp
@@@ -34,51 -34,49 +34,51 @@@
CCL_NAMESPACE_BEGIN
DeviceScene::DeviceScene(Device *device)
- : bvh_nodes(device, "__bvh_nodes", MEM_GLOBAL),
- bvh_leaf_nodes(device, "__bvh_leaf_nodes", MEM_GLOBAL),
- object_node(device, "__object_node", MEM_GLOBAL),
- prim_type(device, "__prim_type", MEM_GLOBAL),
- prim_visibility(device, "__prim_visibility", MEM_GLOBAL),
- prim_index(device, "__prim_index", MEM_GLOBAL),
- prim_object(device, "__prim_object", MEM_GLOBAL),
- prim_time(device, "__prim_time", MEM_GLOBAL),
- tri_verts(device, "__tri_verts", MEM_GLOBAL),
- tri_shader(device, "__tri_shader", MEM_GLOBAL),
- tri_vnormal(device, "__tri_vnormal", MEM_GLOBAL),
- tri_vindex(device, "__tri_vindex", MEM_GLOBAL),
- tri_patch(device, "__tri_patch", MEM_GLOBAL),
- tri_patch_uv(device, "__tri_patch_uv", MEM_GLOBAL),
- curves(device, "__curves", MEM_GLOBAL),
- curve_keys(device, "__curve_keys", MEM_GLOBAL),
- curve_segments(device, "__curve_segments", MEM_GLOBAL),
- patches(device, "__patches", MEM_GLOBAL),
- points(device, "__points", MEM_GLOBAL),
- points_shader(device, "__points_shader", MEM_GLOBAL),
- objects(device, "__objects", MEM_GLOBAL),
- object_motion_pass(device, "__object_motion_pass", MEM_GLOBAL),
- object_motion(device, "__object_motion", MEM_GLOBAL),
- object_flag(device, "__object_flag", MEM_GLOBAL),
- object_volume_step(device, "__object_volume_step", MEM_GLOBAL),
- object_prim_offset(device, "__object_prim_offset", MEM_GLOBAL),
- camera_motion(device, "__camera_motion", MEM_GLOBAL),
- attributes_map(device, "__attributes_map", MEM_GLOBAL),
- attributes_float(device, "__attributes_float", MEM_GLOBAL),
- attributes_float2(device, "__attributes_float2", MEM_GLOBAL),
- attributes_float3(device, "__attributes_float3", MEM_GLOBAL),
- attributes_float4(device, "__attributes_float4", MEM_GLOBAL),
- attributes_uchar4(device, "__attributes_uchar4", MEM_GLOBAL),
- light_distribution(device, "__light_distribution", MEM_GLOBAL),
- lights(device, "__lights", MEM_GLOBAL),
- light_background_marginal_cdf(device, "__light_background_marginal_cdf", MEM_GLOBAL),
- light_background_conditional_cdf(device, "__light_background_conditional_cdf", MEM_GLOBAL),
- light_tree_nodes(device, "__light_tree_nodes", MEM_GLOBAL),
- light_tree_emitters(device, "__light_tree_emitters", MEM_GLOBAL),
- particles(device, "__particles", MEM_GLOBAL),
- svm_nodes(device, "__svm_nodes", MEM_GLOBAL),
- shaders(device, "__shaders", MEM_GLOBAL),
- lookup_table(device, "__lookup_table", MEM_GLOBAL),
- sample_pattern_lut(device, "__sample_pattern_lut", MEM_GLOBAL),
- ies_lights(device, "__ies", MEM_GLOBAL)
+ : bvh_nodes(device, "bvh_nodes", MEM_GLOBAL),
+ bvh_leaf_nodes(device, "bvh_leaf_nodes", MEM_GLOBAL),
+ object_node(device, "object_node", MEM_GLOBAL),
+ prim_type(device, "prim_type", MEM_GLOBAL),
+ prim_visibility(device, "prim_visibility", MEM_GLOBAL),
+ prim_index(device, "prim_index", MEM_GLOBAL),
+ prim_object(device, "prim_object", MEM_GLOBAL),
+ prim_time(device, "prim_time", MEM_GLOBAL),
+ tri_verts(device, "tri_verts", MEM_GLOBAL),
+ tri_shader(device, "tri_shader", MEM_GLOBAL),
+ tri_vnormal(device, "tri_vnormal", MEM_GLOBAL),
+ tri_vindex(device, "tri_vindex", MEM_GLOBAL),
+ tri_patch(device, "tri_patch", MEM_GLOBAL),
+ tri_patch_uv(device, "tri_patch_uv", MEM_GLOBAL),
+ curves(device, "curves", MEM_GLOBAL),
+ curve_keys(device, "curve_keys", MEM_GLOBAL),
+ curve_segments(device, "curve_segments", MEM_GLOBAL),
+ patches(device, "patches", MEM_GLOBAL),
+ points(device, "points", MEM_GLOBAL),
+ points_shader(device, "points_shader", MEM_GLOBAL),
+ objects(device, "objects", MEM_GLOBAL),
+ object_motion_pass(device, "object_motion_pass", MEM_GLOBAL),
+ object_motion(device, "object_motion", MEM_GLOBAL),
+ object_flag(device, "object_flag", MEM_GLOBAL),
+ object_volume_step(device, "object_volume_step", MEM_GLOBAL),
+ object_prim_offset(device, "object_prim_offset", MEM_GLOBAL),
+ camera_motion(device, "camera_motion", MEM_GLOBAL),
+ attributes_map(device, "attributes_map", MEM_GLOBAL),
+ attributes_float(device, "attributes_float", MEM_GLOBAL),
+ attributes_float2(device, "attributes_float2", MEM_GLOBAL),
+ attributes_float3(device, "attributes_float3", MEM_GLOBAL),
+ attributes_float4(device, "attributes_float4", MEM_GLOBAL),
+ attributes_uchar4(device, "attributes_uchar4", MEM_GLOBAL),
+ light_distribution(device, "light_distribution", MEM_GLOBAL),
+ lights(device, "lights", MEM_GLOBAL),
+ light_background_marginal_cdf(device, "light_background_marginal_cdf", MEM_GLOBAL),
+ light_background_conditional_cdf(device, "light_background_conditional_cdf", MEM_GLOBAL),
++ light_tree_nodes(device, "light_tree_nodes", MEM_GLOBAL),
++ light_tree_emitters(device, "light_tree_emitters", MEM_GLOBAL),
+ particles(device, "particles", MEM_GLOBAL),
+ svm_nodes(device, "svm_nodes", MEM_GLOBAL),
+ shaders(device, "shaders", MEM_GLOBAL),
+ lookup_table(device, "lookup_table", MEM_GLOBAL),
+ sample_pattern_lut(device, "sample_pattern_lut", MEM_GLOBAL),
+ ies_lights(device, "ies", MEM_GLOBAL)
{
memset((void *)&data, 0, sizeof(data));
}
More information about the Bf-blender-cvs
mailing list