Cycles OpenCL: make displacement and world importance sampling work.

This commit is contained in:
Brecht Van Lommel
2013-06-21 13:05:08 +00:00
parent e1f79351d6
commit 2e3035dd80
6 changed files with 70 additions and 11 deletions

View File

@@ -704,7 +704,7 @@ public:
CUfunction cuDisplace;
CUdeviceptr d_input = cuda_device_ptr(task.shader_input);
CUdeviceptr d_offset = cuda_device_ptr(task.shader_output);
CUdeviceptr d_output = cuda_device_ptr(task.shader_output);
/* get kernel function */
cuda_assert(cuModuleGetFunction(&cuDisplace, cuModule, "kernel_cuda_shader"))
@@ -715,8 +715,8 @@ public:
cuda_assert(cuParamSetv(cuDisplace, offset, &d_input, sizeof(d_input)))
offset += sizeof(d_input);
cuda_assert(cuParamSetv(cuDisplace, offset, &d_offset, sizeof(d_offset)))
offset += sizeof(d_offset);
cuda_assert(cuParamSetv(cuDisplace, offset, &d_output, sizeof(d_output)))
offset += sizeof(d_output);
int shader_eval_type = task.shader_eval_type;
offset = align_up(offset, __alignof(shader_eval_type));