diff options
Diffstat (limited to 'intern/cycles/render/mesh_displace.cpp')
-rw-r--r-- | intern/cycles/render/mesh_displace.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp index 04267697b29..f20bc73a542 100644 --- a/intern/cycles/render/mesh_displace.cpp +++ b/intern/cycles/render/mesh_displace.cpp @@ -28,7 +28,7 @@ CCL_NAMESPACE_BEGIN -bool MeshManager::displace(Device *device, Scene *scene, Mesh *mesh, Progress& progress) +bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Mesh *mesh, Progress& progress) { /* verify if we have a displacement shader */ bool has_displacement = false; @@ -106,6 +106,9 @@ bool MeshManager::displace(Device *device, Scene *scene, Mesh *mesh, Progress& p device_vector<float4> d_output; 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(d_input, MEM_READ_ONLY); device->mem_copy_to(d_input); device->mem_alloc(d_output, MEM_WRITE_ONLY); |