kernel_background.cl 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "kernel/kernel_compat_opencl.h"
  2. #include "kernel/kernel_math.h"
  3. #include "kernel/kernel_types.h"
  4. #include "kernel/kernel_globals.h"
  5. #include "kernel/kernel_color.h"
  6. #include "kernel/kernels/opencl/kernel_opencl_image.h"
  7. #include "kernel/kernel_path.h"
  8. #include "kernel/kernel_path_branched.h"
  9. #include "kernel/kernel_bake.h"
  10. __kernel void kernel_ocl_background(
  11. ccl_constant KernelData *data,
  12. ccl_global uint4 *input,
  13. ccl_global float4 *output,
  14. KERNEL_BUFFER_PARAMS,
  15. int type, int sx, int sw, int offset, int sample)
  16. {
  17. KernelGlobals kglobals, *kg = &kglobals;
  18. kg->data = data;
  19. kernel_set_buffer_pointers(kg, KERNEL_BUFFER_ARGS);
  20. kernel_set_buffer_info(kg);
  21. int x = sx + ccl_global_id(0);
  22. if(x < sx + sw) {
  23. kernel_background_evaluate(kg, input, output, x);
  24. }
  25. }