Blender V4.3
device/hip/globals.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5/* Constant Globals */
6
7#pragma once
8
9#include "kernel/types.h"
10
12
14
16
17/* Not actually used, just a NULL pointer that gets passed everywhere, which we
18 * hope gets optimized out by the compiler. */
19struct KernelGlobalsGPU {
20 int unused[1];
21};
23
25 /* Global scene data and textures */
27#define KERNEL_DATA_ARRAY(type, name) const type *name;
28#include "kernel/data_arrays.h"
29
30 /* Integrator state */
32};
33
34#ifdef __KERNEL_GPU__
35__constant__ KernelParamsHIP kernel_params;
36#endif
37
38/* Abstraction macros */
39#define kernel_data kernel_params.data
40#define kernel_data_fetch(name, index) kernel_params.name[(index)]
41#define kernel_data_array(name) (kernel_params.name)
42#define kernel_integrator_state kernel_params.integrator_state
43
#define ccl_restrict
#define ccl_global
#define CCL_NAMESPACE_END
ccl_global const KernelGlobalsGPU *ccl_restrict KernelGlobals
KernelData
IntegratorStateGPU integrator_state