diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-20 00:28:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-20 00:53:19 +0300 |
commit | 52e34ffe333e1de83540555b6fcf2ff2b4532bc8 (patch) | |
tree | 739ee8417071e9c8d35e9e6791b763056518cc0c | |
parent | aeaa0ce3e8aafb45d84ba3dd73a500ae6f98eb02 (diff) |
Cycles: Pass missing shader filter argument to CUDA and OpenCL kernels
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 19 |
2 files changed, 16 insertions, 6 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index b87d1773bbc..39af40dec2a 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -787,6 +787,9 @@ public: args[arg++] = &d_output_luma; } args[arg++] = &task.shader_eval_type; + if(task.shader_eval_type >= SHADER_EVAL_BAKE) { + args[arg++] = &task.shader_filter; + } args[arg++] = &shader_x; args[arg++] = &shader_w; args[arg++] = &offset; diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index ce854ca3031..6e2365d7831 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -1305,6 +1305,7 @@ public: cl_mem d_output = CL_MEM_PTR(task.shader_output); cl_mem d_output_luma = CL_MEM_PTR(task.shader_output_luma); cl_int d_shader_eval_type = task.shader_eval_type; + cl_int d_shader_filter = task.shader_filter; cl_int d_shader_x = task.shader_x; cl_int d_shader_w = task.shader_w; cl_int d_offset = task.offset; @@ -1330,11 +1331,11 @@ public: d_input, d_output); - if(task.shader_eval_type < SHADER_EVAL_BAKE) { - start_arg_index += kernel_set_args(kernel, - start_arg_index, - d_output_luma); - } + if(task.shader_eval_type < SHADER_EVAL_BAKE) { + start_arg_index += kernel_set_args(kernel, + start_arg_index, + d_output_luma); + } #define KERNEL_TEX(type, ttype, name) \ set_kernel_arg_mem(kernel, &start_arg_index, #name); @@ -1343,7 +1344,13 @@ public: start_arg_index += kernel_set_args(kernel, start_arg_index, - d_shader_eval_type, + d_shader_eval_type); + if(task.shader_eval_type >= SHADER_EVAL_BAKE) { + start_arg_index += kernel_set_args(kernel, + d_shader_filter); + } + start_arg_index += kernel_set_args(kernel, + start_arg_index, d_shader_x, d_shader_w, d_offset, |