112 for (list<SubDevice>::iterator device_it =
devices.begin(),
115 ++device_it, ++denoising_device_it) {
117 const DeviceInfo &denoising_info = denoising_device_it->device->info;
129 ServerDiscovery discovery(
true);
134 foreach (
string &server, servers) {
167 return devices.front().device->show_samples();
176 bvh_layout_mask &= device_bvh_layout_mask;
177 bvh_layout_mask_all |= device_bvh_layout_mask;
187 if ((bvh_layout_mask_all & BVH_LAYOUT_OPTIX_EMBREE) == BVH_LAYOUT_OPTIX_EMBREE) {
191 return bvh_layout_mask;
263 geom_bvhs.reserve(bvh->
geometry.size());
265 geom_bvhs.push_back(
static_cast<BVHMulti *
>(geom->
bvh));
272 for (
size_t k = 0; k < bvh->
geometry.size(); ++k) {
273 bvh->
geometry[k]->bvh = geom_bvhs[k]->sub_bvhs[i];
287 !bvh->
geometry[0]->is_instanced()) {
300 for (
size_t k = 0; k < bvh->
geometry.size(); ++k) {
301 bvh->
geometry[k]->bvh = geom_bvhs[k];
310 return devices.front().device->osl_memory();
316 if (sub.
device == sub_device) {
331 if (island_sub != owner_sub &&
333 owner_sub = island_sub;
342 assert(!island.empty());
346 foreach (
SubDevice *island_sub, island) {
347 if (key ? (island_sub->
ptr_map.find(key) != island_sub->
ptr_map.end()) :
349 owner_sub = island_sub;
425 foreach (
SubDevice *island_sub, island) {
426 if (island_sub != owner_sub) {
442 int i = 0, sub_h = h /
devices.size();
445 int sy =
y + i * sub_h;
446 int sh = (i == (int)
devices.size() - 1) ? h - sub_h * i : sub_h;
471 device_pointers.reserve(
devices.size());
485 sub.
ptr_map[key] = device_pointers.front();
486 device_pointers.erase(device_pointers.begin());
556 foreach (
SubDevice *island_sub, island) {
557 if (island_sub != owner_sub) {
593 int i = 0, sub_h = h /
devices.size();
597 int sy =
y + i * sub_h;
598 int sh = (i == (int)
devices.size() - 1) ? h - sub_h * i : sub_h;
599 int sheight = (i == (int)
devices.size() - 1) ?
height - sub_height * i : sub_height;
600 int sdy = dy + i * sub_height;
605 rgba, sy,
w, sh,
width, sheight, dx, sdy, dw, dh, transparent, draw_params);
619 if (sub.
device == sub_device) {
626 if (sub.
device == sub_device) {
638 if (sub.
device == sub_device)
644 if (sub.
device == sub_device)
675 if (mem.
device != sub_device) {
741 list<DeviceTask> tasks;
744 if (!tasks.empty()) {
756 list<SubDevice> task_devices =
devices;
763 const uint tile_types =
task.tile_types;
775 list<DeviceTask> tasks;
776 task.split(tasks, task_devices.size());
779 if (!tasks.empty()) {
789 if (
task.shader_input)
791 if (
task.shader_output)
796 if (
task.buffers &&
task.buffers->buffer.device ==
this) {
823 return new MultiDevice(info, stats, profiler, background);
_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 GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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 > denoising_devices
vector< DeviceInfo > multi_devices
static Device * create(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background=true)
virtual void draw_pixels(device_memory &mem, int y, int w, int h, int width, int height, int dx, int dy, int dw, int dh, bool transparent, const DeviceDrawParams &draw_params)
virtual BVHLayoutMask get_bvh_layout_mask() const =0
virtual DeviceKernelStatus get_active_kernel_switch_state()
virtual void const_copy_to(const char *name, void *host, size_t size)=0
virtual void mem_zero(device_memory &mem)=0
virtual void task_wait()=0
virtual bool wait_for_availability(const DeviceRequestedFeatures &)
virtual void mem_copy_from(device_memory &mem, int y, int w, int h, int elem)=0
virtual void build_bvh(BVH *bvh, Progress &progress, bool refit)
virtual void task_cancel()=0
virtual int get_split_task_count(DeviceTask &)
virtual const string & error_message()
virtual bool check_peer_access(Device *)
virtual void mem_free(device_memory &mem)=0
virtual void mem_copy_to(device_memory &mem)=0
virtual void task_add(DeviceTask &task)=0
virtual void mem_alloc(device_memory &mem)=0
virtual bool load_kernels(const DeviceRequestedFeatures &)
list< SubDevice > devices
void unmap_neighbor_tiles(Device *sub_device, RenderTileNeighbors &neighbors) override
bool is_resident(device_ptr key, Device *sub_device) override
void map_tile(Device *sub_device, RenderTile &tile) override
const string & error_message() override
int device_number(Device *sub_device) override
bool wait_for_availability(const DeviceRequestedFeatures &requested_features) override
bool load_kernels(const DeviceRequestedFeatures &requested_features) override
virtual BVHLayoutMask get_bvh_layout_mask() const override
void mem_copy_to(device_memory &mem) override
void mem_free(device_memory &mem) override
bool matching_rendering_and_denoising_devices
void const_copy_to(const char *name, void *host, size_t size) override
DeviceKernelStatus get_active_kernel_switch_state() override
virtual bool show_samples() const override
int get_split_task_count(DeviceTask &task) override
SubDevice * find_matching_mem_device(device_ptr key, SubDevice &sub)
vector< vector< SubDevice * > > peer_islands
void mem_zero(device_memory &mem) override
void build_bvh(BVH *bvh, Progress &progress, bool refit) override
void task_wait() override
void mem_copy_from(device_memory &mem, int y, int w, int h, int elem) override
void map_neighbor_tiles(Device *sub_device, RenderTileNeighbors &neighbors) override
MultiDevice(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background_)
void task_add(DeviceTask &task) override
SubDevice * find_suitable_mem_device(device_ptr key, const vector< SubDevice * > &island)
void mem_alloc(device_memory &mem) override
void task_cancel() override
list< SubDevice > denoising_devices
void draw_pixels(device_memory &rgba, int y, int w, int h, int width, int height, int dx, int dy, int dw, int dh, bool transparent, const DeviceDrawParams &draw_params) override
virtual void * osl_memory() override
device_ptr find_matching_mem(device_ptr key, SubDevice &sub)
device_vector< float > buffer
void mem_free(size_t size)
void mem_alloc(size_t size)
device_ptr device_pointer
void swap_device(Device *new_device, size_t new_device_size, device_ptr new_device_ptr)
@ DEVICE_KERNEL_USING_FEATURE_KERNEL
@ DEVICE_KERNEL_FEATURE_KERNEL_AVAILABLE
@ DEVICE_KERNEL_FEATURE_KERNEL_INVALID
Device * device_network_create(DeviceInfo &info, Stats &stats, Profiler &profiler, const char *address)
Device * device_multi_create(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background)
#define CCL_NAMESPACE_END
@ BVH_LAYOUT_MULTI_OPTIX_EMBREE
struct blender::compositor::@172::@174 task
map< device_ptr, device_ptr > ptr_map
void time_sleep(double t)