From 5ff132182dbb089111cba3a80fa3a8eeb6009ec3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 28 Mar 2015 00:15:15 +0500 Subject: Cycles: Code cleanup, spaces around keywords This inconsistency drove me totally crazy, it's really confusing when it's inconsistent especially when you work on both Cycles and Blender sides. Shouldn;t cause merge PITA, it's whitespace changes only, Git should be able to merge it nicely. --- intern/cycles/device/device_network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/device/device_network.cpp') diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 4733482bf4e..20df2434a4a 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -269,7 +269,7 @@ public: lock.unlock(); TileList::iterator it = tile_list_find(the_tiles, tile); - if (it != the_tiles.end()) { + if(it != the_tiles.end()) { tile.buffers = it->buffers; the_tiles.erase(it); } -- cgit v1.2.3 From 2f5dd83759d2db8480706c3a472bdf0f7db4f725 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 10 Apr 2015 15:36:56 +0500 Subject: Cycles: Add some statistics logging Covers number of entities in the scene (objects, meshes etc), also reports sizes of textures being allocated. --- intern/cycles/device/device_network.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/device/device_network.cpp') diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 20df2434a4a..90cd6a76d63 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -164,6 +164,8 @@ public: void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic) { + VLOG(1) << "Texture allocate: " << name << ", " << mem.memory_size() << " bytes."; + thread_scoped_lock lock(rpc_lock); mem.device_pointer = ++mem_counter; -- cgit v1.2.3 From 0e4ddaadd487ebdd80399e2fd24cb8b12bd7f721 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 9 May 2015 19:05:49 +0500 Subject: Cycles: Change the way how we pass requested capabilities to the device Previously we only had experimental flag passed to device's load_kernel() which was all fine. But since we're gonna to have some extra parameters passed there it makes sense to wrap them into a single struct, which will make it easier to pass stuff around. --- intern/cycles/device/device_network.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'intern/cycles/device/device_network.cpp') diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 90cd6a76d63..454f7301975 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -196,7 +196,7 @@ public: } } - bool load_kernels(bool experimental) + bool load_kernels(const DeviceRequestedFeatures& requested_features) { if(error_func.have_error()) return false; @@ -204,7 +204,7 @@ public: thread_scoped_lock lock(rpc_lock); RPCSend snd(socket, &error_func, "load_kernels"); - snd.add(experimental); + snd.add(requested_features.experimental); snd.write(); bool result; @@ -607,11 +607,11 @@ protected: device->tex_free(mem); } else if(rcv.name == "load_kernels") { - bool experimental; - rcv.read(experimental); + DeviceRequestedFeatures requested_features; + rcv.read(requested_features.experimental); bool result; - result = device->load_kernels(experimental); + result = device->load_kernels(requested_features); RPCSend snd(socket, &error_func, "load_kernels"); snd.add(result); snd.write(); -- cgit v1.2.3 From f680c1b54a28a02fb86271bca649da0660542e9a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 9 May 2015 19:28:00 +0500 Subject: Cycles: Communicate number of closures and nodes feature set to the device This way device can actually make a decision of how it can optimize the kernel in order to make it most efficient. --- intern/cycles/device/device_network.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/device/device_network.cpp') diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 454f7301975..ca6d668a79d 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -205,6 +205,9 @@ public: RPCSend snd(socket, &error_func, "load_kernels"); snd.add(requested_features.experimental); + snd.add(requested_features.max_closure); + snd.add(requested_features.max_nodes_group); + snd.add(requested_features.nodes_features); snd.write(); bool result; @@ -609,6 +612,9 @@ protected: else if(rcv.name == "load_kernels") { DeviceRequestedFeatures requested_features; rcv.read(requested_features.experimental); + rcv.read(requested_features.max_closure); + rcv.read(requested_features.max_nodes_group); + rcv.read(requested_features.nodes_features); bool result; result = device->load_kernels(requested_features); -- cgit v1.2.3 From b79a33e2d4e7610d3ea4fe4c98486bb0c594f731 Mon Sep 17 00:00:00 2001 From: Martijn Berger Date: Sun, 7 Jun 2015 15:24:15 +0200 Subject: Allow compilation of cycles network with WITH_CYCLES_LOGGING is ON --- intern/cycles/device/device_network.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'intern/cycles/device/device_network.cpp') diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index ca6d668a79d..1d6066c94dc 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -19,6 +19,7 @@ #include "device_network.h" #include "util_foreach.h" +#include "util_logging.h" #if defined(WITH_NETWORK) -- cgit v1.2.3