Blender V5.0
device/optix/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};
26/* Launch parameters */
28 /* Kernel arguments */
29 const int *path_index_array;
31 int offset;
33 /* Init kernel arguments */
37 /* Global scene data and textures */
38 KernelData data;
39#define KERNEL_DATA_ARRAY(type, name) const type *name;
42 /* Integrator state */
46};
48#ifdef __NVCC__
49extern "C"
50# ifndef __CUDACC_RDC__
51 static
52# endif
53 __constant__ KernelParamsOptiX kernel_params;
54#endif
56/* Abstraction macros */
57#define kernel_data kernel_params.data
58#define kernel_data_array(name) kernel_params.name
59#define kernel_data_fetch(name, index) kernel_params.name[(index)]
60#define kernel_integrator_state kernel_params.integrator_state
const ThreadKernelGlobalsCPU * KernelGlobals
#define CCL_NAMESPACE_END
#define ccl_restrict
#define ccl_global
CCL_NAMESPACE_END IntegratorStateGPU integrator_state