Blender  V2.93
device_opencl.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifdef WITH_OPENCL
18 
19 # include "device/device.h"
20 # include "device/device_denoising.h"
22 
23 # include "util/util_map.h"
24 # include "util/util_param.h"
25 # include "util/util_string.h"
26 # include "util/util_task.h"
27 
28 # include "clew.h"
29 
31 
33 
34 /* Disable workarounds, seems to be working fine on latest drivers. */
35 # define CYCLES_DISABLE_DRIVER_WORKAROUNDS
36 
37 /* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workarounds for testing. */
38 # ifndef CYCLES_DISABLE_DRIVER_WORKAROUNDS
39 /* Work around AMD driver hangs by ensuring each command is finished before doing anything else. */
40 # undef clEnqueueNDRangeKernel
41 # define clEnqueueNDRangeKernel(a, b, c, d, e, f, g, h, i) \
42  CLEW_GET_FUN(__clewEnqueueNDRangeKernel)(a, b, c, d, e, f, g, h, i); \
43  clFinish(a);
44 
45 # undef clEnqueueWriteBuffer
46 # define clEnqueueWriteBuffer(a, b, c, d, e, f, g, h, i) \
47  CLEW_GET_FUN(__clewEnqueueWriteBuffer)(a, b, c, d, e, f, g, h, i); \
48  clFinish(a);
49 
50 # undef clEnqueueReadBuffer
51 # define clEnqueueReadBuffer(a, b, c, d, e, f, g, h, i) \
52  CLEW_GET_FUN(__clewEnqueueReadBuffer)(a, b, c, d, e, f, g, h, i); \
53  clFinish(a);
54 # endif /* CYCLES_DISABLE_DRIVER_WORKAROUNDS */
55 
56 # define CL_MEM_PTR(p) ((cl_mem)(uintptr_t)(p))
57 
58 struct OpenCLPlatformDevice {
59  OpenCLPlatformDevice(cl_platform_id platform_id,
60  const string &platform_name,
61  cl_device_id device_id,
62  cl_device_type device_type,
63  const string &device_name,
64  const string &hardware_id,
65  const string &device_extensions)
66  : platform_id(platform_id),
67  platform_name(platform_name),
68  device_id(device_id),
69  device_type(device_type),
70  device_name(device_name),
71  hardware_id(hardware_id),
72  device_extensions(device_extensions)
73  {
74  }
75  cl_platform_id platform_id;
76  string platform_name;
77  cl_device_id device_id;
78  cl_device_type device_type;
79  string device_name;
80  string hardware_id;
81  string device_extensions;
82 };
83 
84 /* Contains all static OpenCL helper functions. */
85 class OpenCLInfo {
86  public:
87  static cl_device_type device_type();
88  static bool use_debug();
89  static bool device_supported(const string &platform_name, const cl_device_id device_id);
90  static bool platform_version_check(cl_platform_id platform, string *error = NULL);
91  static bool device_version_check(cl_device_id device, string *error = NULL);
92  static bool get_device_version(cl_device_id device,
93  int *r_major,
94  int *r_minor,
95  string *error = NULL);
96  static string get_hardware_id(const string &platform_name, cl_device_id device_id);
97  static void get_usable_devices(vector<OpenCLPlatformDevice> *usable_devices);
98 
99  /* ** Some handy shortcuts to low level cl*GetInfo() functions. ** */
100 
101  /* Platform information. */
102  static bool get_num_platforms(cl_uint *num_platforms, cl_int *error = NULL);
103  static cl_uint get_num_platforms();
104 
105  static bool get_platforms(vector<cl_platform_id> *platform_ids, cl_int *error = NULL);
106  static vector<cl_platform_id> get_platforms();
107 
108  static bool get_platform_name(cl_platform_id platform_id, string *platform_name);
109  static string get_platform_name(cl_platform_id platform_id);
110 
111  static bool get_num_platform_devices(cl_platform_id platform_id,
112  cl_device_type device_type,
113  cl_uint *num_devices,
114  cl_int *error = NULL);
115  static cl_uint get_num_platform_devices(cl_platform_id platform_id, cl_device_type device_type);
116 
117  static bool get_platform_devices(cl_platform_id platform_id,
118  cl_device_type device_type,
119  vector<cl_device_id> *device_ids,
120  cl_int *error = NULL);
121  static vector<cl_device_id> get_platform_devices(cl_platform_id platform_id,
122  cl_device_type device_type);
123 
124  /* Device information. */
125  static bool get_device_name(cl_device_id device_id, string *device_name, cl_int *error = NULL);
126 
127  static string get_device_name(cl_device_id device_id);
128 
129  static bool get_device_extensions(cl_device_id device_id,
130  string *device_extensions,
131  cl_int *error = NULL);
132 
133  static string get_device_extensions(cl_device_id device_id);
134 
135  static bool get_device_type(cl_device_id device_id,
136  cl_device_type *device_type,
137  cl_int *error = NULL);
138  static cl_device_type get_device_type(cl_device_id device_id);
139 
140  static bool get_driver_version(cl_device_id device_id,
141  int *major,
142  int *minor,
143  cl_int *error = NULL);
144 
145  static int mem_sub_ptr_alignment(cl_device_id device_id);
146 
147  /* Get somewhat more readable device name.
148  * Main difference is AMD OpenCL here which only gives code name
149  * for the regular device name. This will give more sane device
150  * name using some extensions.
151  */
152  static string get_readable_device_name(cl_device_id device_id);
153 };
154 
155 /* Thread safe cache for contexts and programs.
156  */
157 class OpenCLCache {
158  struct Slot {
159  struct ProgramEntry {
160  ProgramEntry();
161  ProgramEntry(const ProgramEntry &rhs);
162  ~ProgramEntry();
163  cl_program program;
165  };
166 
167  Slot();
168  Slot(const Slot &rhs);
169  ~Slot();
170 
171  thread_mutex *context_mutex;
172  cl_context context;
173  typedef map<ustring, ProgramEntry> EntryMap;
174  EntryMap programs;
175  };
176 
177  /* key is combination of platform ID and device ID */
178  typedef pair<cl_platform_id, cl_device_id> PlatformDevicePair;
179 
180  /* map of Slot objects */
181  typedef map<PlatformDevicePair, Slot> CacheMap;
182  CacheMap cache;
183 
184  /* MD5 hash of the kernel source. */
185  string kernel_md5;
186 
187  thread_mutex cache_lock;
188  thread_mutex kernel_md5_lock;
189 
190  /* lazy instantiate */
191  static OpenCLCache &global_instance();
192 
193  public:
194  enum ProgramName {
195  OCL_DEV_BASE_PROGRAM,
196  OCL_DEV_MEGAKERNEL_PROGRAM,
197  };
198 
199  /* Lookup context in the cache. If this returns NULL, slot_locker
200  * will be holding a lock for the cache. slot_locker should refer to a
201  * default constructed thread_scoped_lock. */
202  static cl_context get_context(cl_platform_id platform,
203  cl_device_id device,
204  thread_scoped_lock &slot_locker);
205  /* Same as above. */
206  static cl_program get_program(cl_platform_id platform,
207  cl_device_id device,
208  ustring key,
209  thread_scoped_lock &slot_locker);
210 
211  /* Store context in the cache. You MUST have tried to get the item before storing to it. */
212  static void store_context(cl_platform_id platform,
213  cl_device_id device,
214  cl_context context,
215  thread_scoped_lock &slot_locker);
216  /* Same as above. */
217  static void store_program(cl_platform_id platform,
218  cl_device_id device,
219  cl_program program,
220  ustring key,
221  thread_scoped_lock &slot_locker);
222 
223  static string get_kernel_md5();
224 };
225 
226 # define opencl_device_assert(device, stmt) \
227  { \
228  cl_int err = stmt; \
229 \
230  if (err != CL_SUCCESS) { \
231  string message = string_printf( \
232  "OpenCL error: %s in %s (%s:%d)", clewErrorString(err), #stmt, __FILE__, __LINE__); \
233  if ((device)->error_message() == "") { \
234  (device)->set_error(message); \
235  } \
236  fprintf(stderr, "%s\n", message.c_str()); \
237  } \
238  } \
239  (void)0
240 
241 # define opencl_assert(stmt) \
242  { \
243  cl_int err = stmt; \
244 \
245  if (err != CL_SUCCESS) { \
246  string message = string_printf( \
247  "OpenCL error: %s in %s (%s:%d)", clewErrorString(err), #stmt, __FILE__, __LINE__); \
248  if (error_msg == "") { \
249  error_msg = message; \
250  } \
251  fprintf(stderr, "%s\n", message.c_str()); \
252  } \
253  } \
254  (void)0
255 
256 class OpenCLDevice : public Device {
257  public:
259 
260  /* Task pool for required kernels (base, AO kernels during foreground rendering) */
261  TaskPool load_required_kernel_task_pool;
262  /* Task pool for optional kernels (feature kernels during foreground rendering) */
263  TaskPool load_kernel_task_pool;
264  std::atomic<int> load_kernel_num_compiling;
265 
266  cl_context cxContext;
267  cl_command_queue cqCommandQueue;
268  cl_platform_id cpPlatform;
269  cl_device_id cdDevice;
270  cl_int ciErr;
271  int device_num;
272 
273  class OpenCLProgram {
274  public:
275  OpenCLProgram() : loaded(false), needs_compiling(true), program(NULL), device(NULL)
276  {
277  }
278  OpenCLProgram(OpenCLDevice *device,
279  const string &program_name,
280  const string &kernel_name,
281  const string &kernel_build_options,
282  bool use_stdout = true);
283  ~OpenCLProgram();
284 
285  void add_kernel(ustring name);
286 
287  /* Try to load the program from device cache or disk */
288  bool load();
289  /* Compile the kernel (first separate, fail-back to local). */
290  void compile();
291  /* Create the OpenCL kernels after loading or compiling */
292  void create_kernels();
293 
294  bool is_loaded() const
295  {
296  return loaded;
297  }
298  const string &get_log() const
299  {
300  return log;
301  }
302  void report_error();
303 
304  /* Wait until this kernel is available to be used
305  * It will return true when the kernel is available.
306  * It will return false when the kernel is not available
307  * or could not be loaded. */
308  bool wait_for_availability();
309 
310  cl_kernel operator()();
311  cl_kernel operator()(ustring name);
312 
313  void release();
314 
315  private:
316  bool build_kernel(const string *debug_src);
317  /* Build the program by calling the own process.
318  * This is required for multithreaded OpenCL compilation, since most Frameworks serialize
319  * build calls internally if they come from the same process.
320  * If that is not supported, this function just returns false.
321  */
322  bool compile_separate(const string &clbin);
323  /* Build the program by calling OpenCL directly. */
324  bool compile_kernel(const string *debug_src);
325  /* Loading and saving the program from/to disk. */
326  bool load_binary(const string &clbin, const string *debug_src = NULL);
327  bool save_binary(const string &clbin);
328 
329  void add_log(const string &msg, bool is_debug);
330  void add_error(const string &msg);
331 
332  bool loaded;
333  bool needs_compiling;
334 
335  cl_program program;
336  OpenCLDevice *device;
337 
338  /* Used for the OpenCLCache key. */
339  string program_name;
340 
341  string kernel_file, kernel_build_options, device_md5;
342 
343  bool use_stdout;
344  string log, error_msg;
345  string compile_output;
346 
347  map<ustring, cl_kernel> kernels;
348  };
349 
350  /* Container for all types of split programs. */
351  class OpenCLSplitPrograms {
352  public:
353  OpenCLDevice *device;
354  OpenCLProgram program_split;
355  OpenCLProgram program_lamp_emission;
356  OpenCLProgram program_do_volume;
357  OpenCLProgram program_indirect_background;
358  OpenCLProgram program_shader_eval;
359  OpenCLProgram program_holdout_emission_blurring_pathtermination_ao;
360  OpenCLProgram program_subsurface_scatter;
361  OpenCLProgram program_direct_lighting;
362  OpenCLProgram program_shadow_blocked_ao;
363  OpenCLProgram program_shadow_blocked_dl;
364 
365  OpenCLSplitPrograms(OpenCLDevice *device);
366  ~OpenCLSplitPrograms();
367 
368  /* Load the kernels and put the created kernels in the given
369  * `programs` parameter. */
370  void load_kernels(vector<OpenCLProgram *> &programs,
371  const DeviceRequestedFeatures &requested_features);
372  };
373 
374  DeviceSplitKernel *split_kernel;
375 
376  OpenCLProgram base_program;
377  OpenCLProgram bake_program;
378  OpenCLProgram displace_program;
379  OpenCLProgram background_program;
380  OpenCLProgram denoising_program;
381 
382  OpenCLSplitPrograms kernel_programs;
383 
384  typedef map<string, device_vector<uchar> *> ConstMemMap;
385  typedef map<string, device_ptr> MemMap;
386 
387  ConstMemMap const_mem_map;
388  MemMap mem_map;
389 
390  bool device_initialized;
391  string platform_name;
392  string device_name;
393 
394  bool opencl_error(cl_int err);
395  void opencl_error(const string &message);
396  void opencl_assert_err(cl_int err, const char *where);
397 
398  OpenCLDevice(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background);
399  ~OpenCLDevice();
400 
401  static void CL_CALLBACK context_notify_callback(const char *err_info,
402  const void * /*private_info*/,
403  size_t /*cb*/,
404  void *user_data);
405 
406  bool opencl_version_check();
407  OpenCLSplitPrograms *get_split_programs();
408 
409  string device_md5_hash(string kernel_custom_build_options = "");
410  bool load_kernels(const DeviceRequestedFeatures &requested_features);
411  void load_required_kernels(const DeviceRequestedFeatures &requested_features);
412 
413  bool wait_for_availability(const DeviceRequestedFeatures &requested_features);
414  DeviceKernelStatus get_active_kernel_switch_state();
415 
416  /* Get the name of the opencl program for the given kernel */
417  const string get_opencl_program_name(const string &kernel_name);
418  /* Get the program file name to compile (*.cl) for the given kernel */
419  const string get_opencl_program_filename(const string &kernel_name);
420  string get_build_options(const DeviceRequestedFeatures &requested_features,
421  const string &opencl_program_name);
422  /* Enable the default features to reduce recompilation events */
423  void enable_default_features(DeviceRequestedFeatures &features);
424 
425  void mem_alloc(device_memory &mem);
426  void mem_copy_to(device_memory &mem);
427  void mem_copy_from(device_memory &mem, int y, int w, int h, int elem);
428  void mem_zero(device_memory &mem);
429  void mem_free(device_memory &mem);
430 
431  int mem_sub_ptr_alignment();
432 
433  void const_copy_to(const char *name, void *host, size_t size);
434  void global_alloc(device_memory &mem);
435  void global_free(device_memory &mem);
436  void tex_alloc(device_texture &mem);
437  void tex_free(device_texture &mem);
438 
439  size_t global_size_round_up(int group_size, int global_size);
440  void enqueue_kernel(cl_kernel kernel,
441  size_t w,
442  size_t h,
443  bool x_workgroups = false,
444  size_t max_workgroup_size = -1);
445  void set_kernel_arg_mem(cl_kernel kernel, cl_uint *narg, const char *name);
446  void set_kernel_arg_buffers(cl_kernel kernel, cl_uint *narg);
447 
448  void film_convert(DeviceTask &task,
450  device_ptr rgba_byte,
451  device_ptr rgba_half);
452  void shader(DeviceTask &task);
453  void update_adaptive(DeviceTask &task, RenderTile &tile, int sample);
454  void bake(DeviceTask &task, RenderTile &tile);
455 
456  void denoise(RenderTile &tile, DenoisingTask &denoising);
457 
458  int get_split_task_count(DeviceTask & /*task*/)
459  {
460  return 1;
461  }
462 
463  void task_add(DeviceTask &task)
464  {
465  task_pool.push([=] {
466  DeviceTask task_copy = task;
467  thread_run(task_copy);
468  });
469  }
470 
471  void task_wait()
472  {
473  task_pool.wait();
474  }
475 
476  void task_cancel()
477  {
478  task_pool.cancel();
479  }
480 
481  void thread_run(DeviceTask &task);
482 
483  virtual BVHLayoutMask get_bvh_layout_mask() const
484  {
485  return BVH_LAYOUT_BVH2;
486  }
487 
488  virtual bool show_samples() const
489  {
490  return true;
491  }
492 
493  protected:
494  string kernel_build_options(const string *debug_src = NULL);
495 
496  void mem_zero_kernel(device_ptr ptr, size_t size);
497 
498  bool denoising_non_local_means(device_ptr image_ptr,
499  device_ptr guide_ptr,
500  device_ptr variance_ptr,
501  device_ptr out_ptr,
503  bool denoising_construct_transform(DenoisingTask *task);
504  bool denoising_accumulate(device_ptr color_ptr,
505  device_ptr color_variance_ptr,
506  device_ptr scale_ptr,
507  int frame,
509  bool denoising_solve(device_ptr output_ptr, DenoisingTask *task);
510  bool denoising_combine_halves(device_ptr a_ptr,
511  device_ptr b_ptr,
512  device_ptr mean_ptr,
513  device_ptr variance_ptr,
514  int r,
515  int4 rect,
517  bool denoising_divide_shadow(device_ptr a_ptr,
518  device_ptr b_ptr,
519  device_ptr sample_variance_ptr,
520  device_ptr sv_variance_ptr,
521  device_ptr buffer_variance_ptr,
523  bool denoising_get_feature(int mean_offset,
524  int variance_offset,
525  device_ptr mean_ptr,
526  device_ptr variance_ptr,
527  float scale,
529  bool denoising_write_feature(int to_offset,
530  device_ptr from_ptr,
531  device_ptr buffer_ptr,
533  bool denoising_detect_outliers(device_ptr image_ptr,
534  device_ptr variance_ptr,
535  device_ptr depth_ptr,
536  device_ptr output_ptr,
538 
539  device_ptr mem_alloc_sub_ptr(device_memory &mem, int offset, int size);
540  void mem_free_sub_ptr(device_ptr ptr);
541 
542  class ArgumentWrapper {
543  public:
544  ArgumentWrapper() : size(0), pointer(NULL)
545  {
546  }
547 
548  ArgumentWrapper(device_memory &argument)
549  : size(sizeof(void *)), pointer((void *)(&argument.device_pointer))
550  {
551  }
552 
553  template<typename T>
554  ArgumentWrapper(device_vector<T> &argument)
555  : size(sizeof(void *)), pointer((void *)(&argument.device_pointer))
556  {
557  }
558 
559  template<typename T>
560  ArgumentWrapper(device_only_memory<T> &argument)
561  : size(sizeof(void *)), pointer((void *)(&argument.device_pointer))
562  {
563  }
564  template<typename T> ArgumentWrapper(T &argument) : size(sizeof(argument)), pointer(&argument)
565  {
566  }
567 
568  ArgumentWrapper(int argument) : size(sizeof(int)), int_value(argument), pointer(&int_value)
569  {
570  }
571 
572  ArgumentWrapper(float argument)
573  : size(sizeof(float)), float_value(argument), pointer(&float_value)
574  {
575  }
576 
577  size_t size;
578  int int_value;
579  float float_value;
580  void *pointer;
581  };
582 
583  /* TODO(sergey): In the future we can use variadic templates, once
584  * C++0x is allowed. Should allow to clean this up a bit.
585  */
586  int kernel_set_args(cl_kernel kernel,
587  int start_argument_index,
588  const ArgumentWrapper &arg1 = ArgumentWrapper(),
589  const ArgumentWrapper &arg2 = ArgumentWrapper(),
590  const ArgumentWrapper &arg3 = ArgumentWrapper(),
591  const ArgumentWrapper &arg4 = ArgumentWrapper(),
592  const ArgumentWrapper &arg5 = ArgumentWrapper(),
593  const ArgumentWrapper &arg6 = ArgumentWrapper(),
594  const ArgumentWrapper &arg7 = ArgumentWrapper(),
595  const ArgumentWrapper &arg8 = ArgumentWrapper(),
596  const ArgumentWrapper &arg9 = ArgumentWrapper(),
597  const ArgumentWrapper &arg10 = ArgumentWrapper(),
598  const ArgumentWrapper &arg11 = ArgumentWrapper(),
599  const ArgumentWrapper &arg12 = ArgumentWrapper(),
600  const ArgumentWrapper &arg13 = ArgumentWrapper(),
601  const ArgumentWrapper &arg14 = ArgumentWrapper(),
602  const ArgumentWrapper &arg15 = ArgumentWrapper(),
603  const ArgumentWrapper &arg16 = ArgumentWrapper(),
604  const ArgumentWrapper &arg17 = ArgumentWrapper(),
605  const ArgumentWrapper &arg18 = ArgumentWrapper(),
606  const ArgumentWrapper &arg19 = ArgumentWrapper(),
607  const ArgumentWrapper &arg20 = ArgumentWrapper(),
608  const ArgumentWrapper &arg21 = ArgumentWrapper(),
609  const ArgumentWrapper &arg22 = ArgumentWrapper(),
610  const ArgumentWrapper &arg23 = ArgumentWrapper(),
611  const ArgumentWrapper &arg24 = ArgumentWrapper(),
612  const ArgumentWrapper &arg25 = ArgumentWrapper(),
613  const ArgumentWrapper &arg26 = ArgumentWrapper(),
614  const ArgumentWrapper &arg27 = ArgumentWrapper(),
615  const ArgumentWrapper &arg28 = ArgumentWrapper(),
616  const ArgumentWrapper &arg29 = ArgumentWrapper(),
617  const ArgumentWrapper &arg30 = ArgumentWrapper(),
618  const ArgumentWrapper &arg31 = ArgumentWrapper(),
619  const ArgumentWrapper &arg32 = ArgumentWrapper(),
620  const ArgumentWrapper &arg33 = ArgumentWrapper());
621 
622  void release_kernel_safe(cl_kernel kernel);
623  void release_mem_object_safe(cl_mem mem);
624  void release_program_safe(cl_program program);
625 
626  /* ** Those guys are for working around some compiler-specific bugs ** */
627 
628  cl_program load_cached_kernel(ustring key, thread_scoped_lock &cache_locker);
629 
630  void store_cached_kernel(cl_program program, ustring key, thread_scoped_lock &cache_locker);
631 
632  private:
633  MemoryManager memory_manager;
634  friend class MemoryManager;
635 
637  device_vector<TextureInfo> texture_info;
638 
639  typedef map<string, device_memory *> TexturesMap;
640  TexturesMap textures;
641 
642  bool textures_need_update;
643 
644  protected:
645  void flush_texture_buffers();
646 
647  friend class OpenCLSplitKernel;
648  friend class OpenCLSplitKernelFunction;
649 };
650 
651 Device *opencl_create_split_device(DeviceInfo &info,
652  Stats &stats,
653  Profiler &profiler,
654  bool background);
655 
657 
658 #endif
typedef float(TangentPoint)[2]
ThreadMutex mutex
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint * textures
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SIMD_FORCE_INLINE btVector3 operator()(const btVector3 &x) const
Return the transform of the vector.
Definition: btTransform.h:90
int BVHLayoutMask
Definition: bvh_params.h:39
Definition: device.h:293
void * user_data
DeviceKernelStatus
Definition: device.h:63
TaskPool * task_pool
static FT_Error err
Definition: freetypefont.c:52
#define CCL_NAMESPACE_END
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
@ BVH_LAYOUT_BVH2
#define T
static void error(const char *str)
Definition: meshlaplacian.c:65
int load(istream &in, Vec3r &v)
Definition: ViewMapIO.cpp:61
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:303
static void sample(SocketReader *reader, int x, int y, float color[4])
struct blender::compositor::@172::@174 task
static int bake(const BakeAPIRender *bkr, Object *ob_low, const ListBase *selected_objects, ReportList *reports)
struct SELECTID_Context context
Definition: select_engine.c:47
void push(TaskRunFunction &&task)
Definition: util_task.cpp:36
void cancel()
Definition: util_task.cpp:54
#define static_assert_align(st, align)
std::unique_lock< std::mutex > thread_scoped_lock
Definition: util_thread.h:41
CCL_NAMESPACE_BEGIN typedef std::mutex thread_mutex
Definition: util_thread.h:40
uint64_t device_ptr
Definition: util_types.h:62
PointerRNA * ptr
Definition: wm_files.c:3157