diff options
Diffstat (limited to 'intern/cycles/bvh/bvh.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index ae6655eb27b..703639e29f3 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -19,6 +19,7 @@ #include "bvh/bvh2.h" #include "bvh/embree.h" +#include "bvh/metal.h" #include "bvh/multi.h" #include "bvh/optix.h" @@ -40,8 +41,12 @@ const char *bvh_layout_name(BVHLayout layout) return "EMBREE"; case BVH_LAYOUT_OPTIX: return "OPTIX"; + case BVH_LAYOUT_METAL: + return "METAL"; case BVH_LAYOUT_MULTI_OPTIX: + case BVH_LAYOUT_MULTI_METAL: case BVH_LAYOUT_MULTI_OPTIX_EMBREE: + case BVH_LAYOUT_MULTI_METAL_EMBREE: return "MULTI"; case BVH_LAYOUT_ALL: return "ALL"; @@ -103,8 +108,17 @@ BVH *BVH::create(const BVHParams ¶ms, (void)device; break; #endif + case BVH_LAYOUT_METAL: +#ifdef WITH_METAL + return bvh_metal_create(params, geometry, objects, device); +#else + (void)device; + break; +#endif case BVH_LAYOUT_MULTI_OPTIX: + case BVH_LAYOUT_MULTI_METAL: case BVH_LAYOUT_MULTI_OPTIX_EMBREE: + case BVH_LAYOUT_MULTI_METAL_EMBREE: return new BVHMulti(params, geometry, objects); case BVH_LAYOUT_NONE: case BVH_LAYOUT_ALL: |