Cycles: Add BVH8 and packeted triangle intersection
This is an initial implementation of BVH8 optimization structure and packated triangle intersection. The aim is to get faster ray to scene intersection checks. Scene BVH4 BVH8 barbershop_interior 10:24.94 10:10.74 bmw27 02:41.25 02:38.83 classroom 08:16.49 07:56.15 fishy_cat 04:24.56 04:17.29 koro 06:03.06 06:01.45 pavillon_barcelona 09:21.26 09:02.98 victor 23:39.65 22:53.71 As memory goes, peak usage raises by about 4.7% in a complex scenes. Note that BVH8 is disabled when using OSL, this is because OSL kernel does not get per-microarchitecture optimizations and hence always considers BVH3 is used. Original BVH8 patch from Anton Gavrikov. Batched triangles intersection from Victoria Zhislina. Extra work and tests and fixes from Maxym Dmytrychenko.
This commit is contained in:
@@ -57,7 +57,19 @@ void DebugFlags::CPU::reset()
|
||||
#undef STRINGIFY
|
||||
#undef CHECK_CPU_FLAGS
|
||||
|
||||
bvh_layout = BVH_LAYOUT_DEFAULT;
|
||||
if (getenv("CYCLES_BVH2") != NULL) {
|
||||
bvh_layout = BVH_LAYOUT_BVH2;
|
||||
}
|
||||
else if (getenv("CYCLES_BVH4") != NULL) {
|
||||
bvh_layout = BVH_LAYOUT_BVH4;
|
||||
}
|
||||
else if (getenv("CYCLES_BVH8") != NULL) {
|
||||
bvh_layout = BVH_LAYOUT_BVH8;
|
||||
}
|
||||
else {
|
||||
bvh_layout = BVH_LAYOUT_DEFAULT;
|
||||
}
|
||||
|
||||
split_kernel = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user