Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device_network.cpp
| Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | void const_copy_to(const char *name, void *host, size_t size) | ||||
| string name_string(name); | string name_string(name); | ||||
| snd.add(name_string); | snd.add(name_string); | ||||
| snd.add(size); | snd.add(size); | ||||
| snd.write(); | snd.write(); | ||||
| snd.write_buffer(host, size); | snd.write_buffer(host, size); | ||||
| } | } | ||||
| void tex_alloc(const char *name, device_memory& mem, bool interpolation, bool periodic) | void tex_alloc(const char *name, device_memory& mem, InterpolationType interpolation, bool periodic) | ||||
| { | { | ||||
| thread_scoped_lock lock(rpc_lock); | thread_scoped_lock lock(rpc_lock); | ||||
| mem.device_pointer = ++mem_counter; | mem.device_pointer = ++mem_counter; | ||||
| RPCSend snd(socket, &error_func, "tex_alloc"); | RPCSend snd(socket, &error_func, "tex_alloc"); | ||||
| string name_string(name); | string name_string(name); | ||||
| ▲ Show 20 Lines • Show All 380 Lines • ▼ Show 20 Lines | else if(rcv.name == "const_copy_to") { | ||||
| rcv.read_buffer(&host_vector[0], size); | rcv.read_buffer(&host_vector[0], size); | ||||
| lock.unlock(); | lock.unlock(); | ||||
| device->const_copy_to(name_string.c_str(), &host_vector[0], size); | device->const_copy_to(name_string.c_str(), &host_vector[0], size); | ||||
| } | } | ||||
| else if(rcv.name == "tex_alloc") { | else if(rcv.name == "tex_alloc") { | ||||
| network_device_memory mem; | network_device_memory mem; | ||||
| string name; | string name; | ||||
| bool interpolation; | InterpolationType interpolation; | ||||
| bool periodic; | bool periodic; | ||||
| device_ptr client_pointer; | device_ptr client_pointer; | ||||
| rcv.read(name); | rcv.read(name); | ||||
| rcv.read(mem); | rcv.read(mem); | ||||
| rcv.read(interpolation); | rcv.read(interpolation); | ||||
| rcv.read(periodic); | rcv.read(periodic); | ||||
| lock.unlock(); | lock.unlock(); | ||||
| ▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines | |||||