Blender V5.0
device/cuda/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"
14#include "util/color.h"
19/* Not actually used, just a nullptr pointer that gets passed everywhere, which we
20 * hope gets optimized out by the compiler. */
22 int unused[1];
23};
27 /* Global scene data and textures */
28 KernelData data;
29#define KERNEL_DATA_ARRAY(type, name) const type *name;
32 /* Integrator state */
34};
36#ifdef __KERNEL_GPU__
37__constant__ KernelParamsCUDA kernel_params;
38#endif
40/* Abstraction macros */
41#define kernel_data kernel_params.data
42#define kernel_data_fetch(name, index) kernel_params.name[(index)]
43#define kernel_data_array(name) (kernel_params.name)
44#define kernel_integrator_state kernel_params.integrator_state
#define CCL_NAMESPACE_END
#define ccl_restrict
#define ccl_global
const ccl_global KernelGlobalsGPU *ccl_restrict KernelGlobals
CCL_NAMESPACE_END IntegratorStateGPU integrator_state