Blender  V3.3
device/optix/globals.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 /* Constant Globals */
5 
6 #pragma once
7 
8 #include "kernel/types.h"
9 
11 
12 #include "kernel/util/profiling.h"
13 
15 
16 /* Not actually used, just a NULL pointer that gets passed everywhere, which we
17  * hope gets optimized out by the compiler. */
18 struct KernelGlobalsGPU {
19  int unused[1];
20 };
22 
23 /* Launch parameters */
25  /* Kernel arguments */
26  const int *path_index_array;
27  float *render_buffer;
28 
29  /* Global scene data and textures */
31 #define KERNEL_DATA_ARRAY(type, name) const type *name;
32 #include "kernel/data_arrays.h"
33 
34  /* Integrator state */
36 };
37 
38 #ifdef __NVCC__
39 extern "C" static __constant__ KernelParamsOptiX kernel_params;
40 #endif
41 
42 /* Abstraction macros */
43 #define kernel_data kernel_params.data
44 #define kernel_data_array(name) kernel_params.name
45 #define kernel_data_fetch(name, index) kernel_params.name[(index)]
46 #define kernel_integrator_state kernel_params.integrator_state
47 
#define ccl_restrict
Definition: cuda/compat.h:50
#define ccl_global
Definition: cuda/compat.h:43
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
ccl_global const KernelGlobalsGPU *ccl_restrict KernelGlobals
const int * path_index_array
IntegratorStateGPU integrator_state