diff options
Diffstat (limited to 'intern/cycles/device/device_network.cpp')
-rw-r--r-- | intern/cycles/device/device_network.cpp | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 3eb5ad2d2db..ced10c98dc9 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -14,12 +14,12 @@ * limitations under the License. */ -#include "device.h" -#include "device_intern.h" -#include "device_network.h" +#include "device/device.h" +#include "device/device_intern.h" +#include "device/device_network.h" -#include "util_foreach.h" -#include "util_logging.h" +#include "util/util_foreach.h" +#include "util/util_logging.h" #if defined(WITH_NETWORK) @@ -51,6 +51,11 @@ public: thread_mutex rpc_lock; + virtual bool show_samples() const + { + return false; + } + NetworkDevice(DeviceInfo& info, Stats &stats, const char *address) : Device(info, stats, true), socket(io_service) { @@ -82,8 +87,14 @@ public: snd.write(); } - void mem_alloc(device_memory& mem, MemoryType type) + void mem_alloc(const char *name, device_memory& mem, MemoryType type) { + if(name) { + VLOG(1) << "Buffer allocate: " << name << ", " + << string_human_readable_number(mem.memory_size()) << " bytes. (" + << string_human_readable_size(mem.memory_size()) << ")"; + } + thread_scoped_lock lock(rpc_lock); mem.device_pointer = ++mem_counter; @@ -332,8 +343,11 @@ void device_network_info(vector<DeviceInfo>& devices) info.description = "Network Device"; info.id = "NETWORK"; info.num = 0; - info.advanced_shading = true; /* todo: get this info from device */ - info.pack_images = false; + + /* todo: get this info from device */ + info.advanced_shading = true; + info.has_volume_decoupled = false; + info.has_qbvh = false; devices.push_back(info); } @@ -476,7 +490,7 @@ protected: mem.data_pointer = 0; /* perform the allocation on the actual device */ - device->mem_alloc(mem, type); + device->mem_alloc(NULL, mem, type); /* store a mapping to/from client_pointer and real device pointer */ pointer_mapping_insert(client_pointer, mem.device_pointer); @@ -650,10 +664,6 @@ protected: if(task.shader_output) task.shader_output = device_ptr_from_client_pointer(task.shader_output); - if(task.shader_output_luma) - task.shader_output_luma = device_ptr_from_client_pointer(task.shader_output_luma); - - task.acquire_tile = function_bind(&DeviceServer::task_acquire_tile, this, _1, _2); task.release_tile = function_bind(&DeviceServer::task_release_tile, this, _1); task.update_progress_sample = function_bind(&DeviceServer::task_update_progress_sample, this); @@ -727,7 +737,6 @@ protected: tile = entry.tile; if(tile.buffer) tile.buffer = ptr_map[tile.buffer]; - if(tile.rng_state) tile.rng_state = ptr_map[tile.rng_state]; result = true; break; @@ -759,7 +768,6 @@ protected: thread_scoped_lock acquire_lock(acquire_mutex); if(tile.buffer) tile.buffer = ptr_imap[tile.buffer]; - if(tile.rng_state) tile.rng_state = ptr_imap[tile.rng_state]; { thread_scoped_lock lock(rpc_lock); |