Blender Git Commit Log

Git Commits -> Revision 04857cc

Revision 04857cc by Brecht Van Lommel (master)
October 6, 2021, 15:52 (GMT)
Cycles: fully decouple triangle and curve primitive storage from BVH2

Previously the storage here was optimized to avoid indirections in BVH2
traversal. This helps improve performance a bit, but makes performance
and memory usage of Embree and OptiX BVHs a bit worse also. It also adds
code complexity in other parts of the code.

Now decouple triangle and curve primitive storage from BVH2.
* Reduced peak memory usage on all devices
* Bit better performance for OptiX and Embree
* Bit worse performance for CUDA
* Simplified code:
** Intersection.prim/object now matches ShaderData.prim/object
** No more offset manipulation for mesh displacement before a BVH is built
** Remove primitive packing code and flags for Embree and OptiX
** Curve segments are now stored in a KernelCurve struct
* Also happens to fix a bug in baking with incorrect prim/object

Fixes T91968, T91770, T91902

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

Commit Details:

Full Hash: 04857cc8efb385af5d8f40b655eeca41e2b73494
Parent Commit: 0fd0b06
Lines Changed: +365, -671

32 Modified Paths:

/intern/cycles/bvh/bvh.h (+0, -4) (Diff)
/intern/cycles/bvh/bvh2.cpp (+0, -61) (Diff)
/intern/cycles/bvh/bvh_build.cpp (+20, -16) (Diff)
/intern/cycles/bvh/bvh_embree.cpp (+6, -11) (Diff)
/intern/cycles/device/optix/device_impl.cpp (+5, -8) (Diff)
/intern/cycles/kernel/bvh/bvh_embree.h (+20, -13) (Diff)
/intern/cycles/kernel/bvh/bvh_shadow_all.h (+17, -14) (Diff)
/intern/cycles/kernel/bvh/bvh_traversal.h (+12, -12) (Diff)
/intern/cycles/kernel/bvh/bvh_util.h (+8, -23) (Diff)
/intern/cycles/kernel/device/optix/kernel.cu (+49, -37) (Diff)
/intern/cycles/kernel/geom/geom_curve.h (+12, -12) (Diff)
/intern/cycles/kernel/geom/geom_curve_intersect.h (+15, -40) (Diff)
/intern/cycles/kernel/geom/geom_motion_triangle.h (+3, -3) (Diff)
/intern/cycles/kernel/geom/geom_motion_triangle_intersect.h (+9, -8) (Diff)
/intern/cycles/kernel/geom/geom_shader_data.h (+2, -3) (Diff)
/intern/cycles/kernel/geom/geom_triangle.h (+15, -15) (Diff)
/intern/cycles/kernel/geom/geom_triangle_intersect.h (+32, -29) (Diff)
/intern/cycles/kernel/integrator/integrator_intersect_closest.h (+1, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_shade_background.h (+2, -1) (Diff)
/intern/cycles/kernel/integrator/integrator_subsurface.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_textures.h (+4, -4) (Diff)
/intern/cycles/kernel/kernel_types.h (+16, -1) (Diff)
/intern/cycles/kernel/svm/svm_bevel.h (+3, -6) (Diff)
/intern/cycles/render/geometry.cpp (+57, -187) (Diff)
/intern/cycles/render/geometry.h (+2, -28) (Diff)
/intern/cycles/render/hair.cpp (+21, -49) (Diff)
/intern/cycles/render/hair.h (+9, -6) (Diff)
/intern/cycles/render/mesh.cpp (+11, -58) (Diff)
/intern/cycles/render/mesh.h (+4, -12) (Diff)
/intern/cycles/render/object.cpp (+4, -0) (Diff)
/intern/cycles/render/scene.cpp (+2, -2) (Diff)
/intern/cycles/render/scene.h (+3, -3) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021