diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-08-27 20:20:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-08-28 13:53:50 +0300 |
commit | d3f2037966882d677711568c81de8b9b7eaec486 (patch) | |
tree | 8dadcad9afc3be72f5464e9b8d06737adef08fcc /intern/cycles/kernel | |
parent | 1725e46cee167d615db6be1dba64090459ac2321 (diff) |
Fix T80149: Cycles OpenCL baking broken after changes to uses tiles for baking
We forgot to update this code as part of D3108. I'd like to include this in 2.90,
it's entirely broken now so can't really get any worse.
Differential Revision: https://developer.blender.org/D8738
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_bake.cl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/intern/cycles/kernel/kernels/opencl/kernel_bake.cl b/intern/cycles/kernel/kernels/opencl/kernel_bake.cl index 041312b53cb..7b81e387467 100644 --- a/intern/cycles/kernel/kernels/opencl/kernel_bake.cl +++ b/intern/cycles/kernel/kernels/opencl/kernel_bake.cl @@ -12,12 +12,11 @@ __kernel void kernel_ocl_bake( ccl_constant KernelData *data, - ccl_global uint4 *input, - ccl_global float4 *output, + ccl_global float *buffer, KERNEL_BUFFER_PARAMS, - int type, int filter, int sx, int sw, int offset, int sample) + int sx, int sy, int sw, int sh, int offset, int stride, int sample) { KernelGlobals kglobals, *kg = &kglobals; @@ -27,12 +26,11 @@ __kernel void kernel_ocl_bake( kernel_set_buffer_info(kg); int x = sx + ccl_global_id(0); + int y = sy + ccl_global_id(1); - if(x < sx + sw) { -#ifdef __NO_BAKING__ - output[x] = make_float4(0.0f, 0.0f, 0.0f, 0.0f); -#else - kernel_bake_evaluate(kg, input, output, (ShaderEvalType)type, filter, x, offset, sample); + if(x < sx + sw && y < sy + sh) { +#ifndef __NO_BAKING__ + kernel_bake_evaluate(kg, buffer, sample, x, y, offset, stride); #endif } } |