diff options
Diffstat (limited to 'intern/cycles/kernel/bvh/bvh_local.h')
-rw-r--r-- | intern/cycles/kernel/bvh/bvh_local.h | 63 |
1 files changed, 3 insertions, 60 deletions
diff --git a/intern/cycles/kernel/bvh/bvh_local.h b/intern/cycles/kernel/bvh/bvh_local.h index 7a069ef1108..4006c9c1632 100644 --- a/intern/cycles/kernel/bvh/bvh_local.h +++ b/intern/cycles/kernel/bvh/bvh_local.h @@ -17,13 +17,6 @@ * limitations under the License. */ -#ifdef __QBVH__ -# include "kernel/bvh/qbvh_local.h" -# ifdef __KERNEL_AVX2__ -# include "kernel/bvh/obvh_local.h" -# endif -#endif - #if BVH_FEATURE(BVH_HAIR) # define NODE_INTERSECT bvh_node_intersect #else @@ -88,26 +81,6 @@ ccl_device_inline object = local_object; } -#if defined(__KERNEL_SSE2__) - const shuffle_swap_t shuf_identity = shuffle_swap_identity(); - const shuffle_swap_t shuf_swap = shuffle_swap_swap(); - - const ssef pn = cast(ssei(0, 0, 0x80000000, 0x80000000)); - ssef Psplat[3], idirsplat[3]; -# if BVH_FEATURE(BVH_HAIR) - ssef tnear(0.0f), tfar(isect_t); -# endif - shuffle_swap_t shufflexyz[3]; - - Psplat[0] = ssef(P.x); - Psplat[1] = ssef(P.y); - Psplat[2] = ssef(P.z); - - ssef tsplat(0.0f, 0.0f, -isect_t, -isect_t); - - gen_idirsplat_swap(pn, shuf_identity, shuf_swap, idir, idirsplat, shufflexyz); -#endif - /* traversal loop */ do { do { @@ -117,33 +90,16 @@ ccl_device_inline float dist[2]; float4 cnodes = kernel_tex_fetch(__bvh_nodes, node_addr + 0); -#if !defined(__KERNEL_SSE2__) traverse_mask = NODE_INTERSECT(kg, P, -# if BVH_FEATURE(BVH_HAIR) +#if BVH_FEATURE(BVH_HAIR) dir, -# endif +#endif idir, isect_t, node_addr, PATH_RAY_ALL_VISIBILITY, dist); -#else // __KERNEL_SSE2__ - traverse_mask = NODE_INTERSECT(kg, - P, - dir, -# if BVH_FEATURE(BVH_HAIR) - tnear, - tfar, -# endif - tsplat, - Psplat, - idirsplat, - shufflexyz, - node_addr, - PATH_RAY_ALL_VISIBILITY, - dist); -#endif // __KERNEL_SSE2__ node_addr = __float_as_int(cnodes.z); node_addr_child1 = __float_as_int(cnodes.w); @@ -247,20 +203,7 @@ ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg, uint *lcg_state, int max_hits) { - switch (kernel_data.bvh.bvh_layout) { -#ifdef __KERNEL_AVX2__ - case BVH_LAYOUT_BVH8: - return BVH_FUNCTION_FULL_NAME(OBVH)(kg, ray, local_isect, local_object, lcg_state, max_hits); -#endif -#ifdef __QBVH__ - case BVH_LAYOUT_BVH4: - return BVH_FUNCTION_FULL_NAME(QBVH)(kg, ray, local_isect, local_object, lcg_state, max_hits); -#endif - case BVH_LAYOUT_BVH2: - return BVH_FUNCTION_FULL_NAME(BVH)(kg, ray, local_isect, local_object, lcg_state, max_hits); - } - kernel_assert(!"Should not happen"); - return false; + return BVH_FUNCTION_FULL_NAME(BVH)(kg, ray, local_isect, local_object, lcg_state, max_hits); } #undef BVH_FUNCTION_NAME |