Blender  V3.3
device/hip/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 
24  /* Global scene data and textures */
26 #define KERNEL_DATA_ARRAY(type, name) const type *name;
27 #include "kernel/data_arrays.h"
28 
29  /* Integrator state */
31 };
32 
33 #ifdef __KERNEL_GPU__
34 __constant__ KernelParamsHIP kernel_params;
35 #endif
36 
37 /* Abstraction macros */
38 #define kernel_data kernel_params.data
39 #define kernel_data_fetch(name, index) kernel_params.name[(index)]
40 #define kernel_data_array(name) (kernel_params.name)
41 #define kernel_integrator_state kernel_params.integrator_state
42 
#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
IntegratorStateGPU integrator_state