Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-21 00:31:13 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-24 02:03:59 +0300
commit7ad9333fad25b9a7cabea0d659eaf724f89912c8 (patch)
tree4fa0d78c9659dd842852420bd1d8b8f8925a0c2f /intern/cycles/render/mesh_displace.cpp
parentae41f38f78f8c54f92cf34dd88e35948e19aed55 (diff)
Code refactor: store device/interp/extension/type in each device_memory.
Diffstat (limited to 'intern/cycles/render/mesh_displace.cpp')
-rw-r--r--intern/cycles/render/mesh_displace.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp
index 350a56bf185..c06cf86ea9c 100644
--- a/intern/cycles/render/mesh_displace.cpp
+++ b/intern/cycles/render/mesh_displace.cpp
@@ -64,7 +64,7 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me
/* setup input for device task */
const size_t num_verts = mesh->verts.size();
vector<bool> done(num_verts, false);
- device_vector<uint4> d_input;
+ device_vector<uint4> d_input(device, "displace_input", MEM_READ_ONLY);
uint4 *d_input_data = d_input.resize(num_verts);
size_t d_input_size = 0;
@@ -115,15 +115,15 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me
return false;
/* run device task */
- device_vector<float4> d_output;
+ device_vector<float4> d_output(device, "displace_output", MEM_WRITE_ONLY);
d_output.resize(d_input_size);
/* needs to be up to data for attribute access */
device->const_copy_to("__data", &dscene->data, sizeof(dscene->data));
- device->mem_alloc("displace_input", d_input, MEM_READ_ONLY);
+ device->mem_alloc(d_input);
device->mem_copy_to(d_input);
- device->mem_alloc("displace_output", d_output, MEM_WRITE_ONLY);
+ device->mem_alloc(d_output);
device->mem_zero(d_output);
DeviceTask task(DeviceTask::SHADER);