105 bvh_layout_mask &= device_bvh_layout_mask;
106 bvh_layout_mask_all |= device_bvh_layout_mask;
121 if ((bvh_layout_mask_all & BVH_LAYOUT_OPTIX_EMBREE) == BVH_LAYOUT_OPTIX_EMBREE) {
125 if ((bvh_layout_mask_all & BVH_LAYOUT_METAL_EMBREE) == BVH_LAYOUT_METAL_EMBREE) {
129 return bvh_layout_mask;
158 geom_bvhs.reserve(bvh->
geometry.size());
160 geom_bvhs.push_back(
static_cast<BVHMulti *
>(geom->
bvh));
167 for (
size_t k = 0; k < bvh->
geometry.size(); ++k) {
168 bvh->
geometry[k]->bvh = geom_bvhs[k]->sub_bvhs[i];
187 !bvh->
geometry[0]->is_instanced()) {
200 for (
size_t k = 0; k < bvh->
geometry.size(); ++k) {
201 bvh->
geometry[k]->bvh = geom_bvhs[k];
210 return devices.front().device->get_cpu_osl_memory();
216 if (sub.
device == sub_device) {
231 if (island_sub != owner_sub &&
233 owner_sub = island_sub;
242 assert(!island.empty());
246 foreach (
SubDevice *island_sub, island) {
247 if (key ? (island_sub->
ptr_map.find(key) != island_sub->
ptr_map.end()) :
249 owner_sub = island_sub;
299 foreach (
SubDevice *island_sub, island) {
300 if (island_sub != owner_sub) {
315 size_t i = 0, sub_h = h /
devices.size();
318 size_t sy =
y + i * sub_h;
319 size_t sh = (i == (size_t)
devices.size() - 1) ? h - sub_h * i : sub_h;
371 foreach (
SubDevice *island_sub, island) {
372 if (island_sub != owner_sub) {
396 if (sub.
device == sub_device)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void refit(btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
vector< Geometry * > geometry
static BVH * create(const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects, Device *device)
vector< Object * > objects
vector< DeviceInfo > multi_devices
virtual BVHLayoutMask get_bvh_layout_mask() const =0
virtual void const_copy_to(const char *name, void *host, size_t size)=0
virtual void mem_zero(device_memory &mem)=0
static Device * create(const DeviceInfo &info, Stats &stats, Profiler &profiler)
virtual void mem_copy_from(device_memory &mem, size_t y, size_t w, size_t h, size_t elem)=0
virtual void build_bvh(BVH *bvh, Progress &progress, bool refit)
virtual bool load_kernels(uint)
virtual const string & error_message()
virtual bool check_peer_access(Device *)
virtual void mem_free(device_memory &mem)=0
virtual void foreach_device(const function< void(Device *)> &callback)
virtual void mem_copy_to(device_memory &mem)=0
virtual void mem_alloc(device_memory &mem)=0
list< SubDevice > devices
bool is_resident(device_ptr key, Device *sub_device) override
const string & error_message() override
int device_number(Device *sub_device) override
virtual BVHLayoutMask get_bvh_layout_mask() const override
void mem_copy_to(device_memory &mem) override
void mem_free(device_memory &mem) override
void const_copy_to(const char *name, void *host, size_t size) override
SubDevice * find_matching_mem_device(device_ptr key, SubDevice &sub)
vector< vector< SubDevice * > > peer_islands
void mem_zero(device_memory &mem) override
MultiDevice(const DeviceInfo &info, Stats &stats, Profiler &profiler)
void build_bvh(BVH *bvh, Progress &progress, bool refit) override
SubDevice * find_suitable_mem_device(device_ptr key, const vector< SubDevice * > &island)
void mem_copy_from(device_memory &mem, size_t y, size_t w, size_t h, size_t elem) override
void mem_alloc(device_memory &mem) override
bool load_kernels(const uint kernel_features) override
virtual void foreach_device(const function< void(Device *)> &callback) override
virtual void * get_cpu_osl_memory() override
device_ptr find_matching_mem(device_ptr key, SubDevice &sub)
void mem_free(size_t size)
void mem_alloc(size_t size)
device_ptr device_pointer
#define CCL_NAMESPACE_END
DEGForeachIDComponentCallback callback
Device * device_multi_create(const DeviceInfo &info, Stats &stats, Profiler &profiler)
ccl_gpu_kernel_postfix ccl_global float int int sy
ccl_gpu_kernel_postfix ccl_global float int int int int sh
@ BVH_LAYOUT_MULTI_METAL_EMBREE
@ BVH_LAYOUT_MULTI_OPTIX_EMBREE
map< device_ptr, device_ptr > ptr_map