Blender
V5.0
intern
cycles
kernel
device
hip
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
11
#include "
kernel/integrator/state.h
"
12
#include "
kernel/util/profiler.h
"
13
14
#include "
util/color.h
"
15
#include "
util/texture.h
"
16
17
CCL_NAMESPACE_BEGIN
18
19
/* Not actually used, just a nullptr pointer that gets passed everywhere, which we
20
* hope gets optimized out by the compiler. */
21
struct
KernelGlobalsGPU
{
22
int
unused
[1];
23
};
24
using
KernelGlobals
=
const
ccl_global
KernelGlobalsGPU
*
ccl_restrict
;
25
26
struct
KernelParamsHIP
{
27
/* Global scene data and textures */
28
KernelData
data
;
29
#define KERNEL_DATA_ARRAY(type, name) const type *name;
30
#include "
kernel/data_arrays.h
"
31
32
/* Integrator state */
33
IntegratorStateGPU
integrator_state
;
34
};
35
36
#ifdef __KERNEL_GPU__
37
__constant__
KernelParamsHIP
kernel_params;
38
#endif
39
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
45
46
CCL_NAMESPACE_END
color.h
data_arrays.h
KernelGlobals
const ThreadKernelGlobalsCPU * KernelGlobals
Definition
device/cpu/globals.h:92
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
ccl_restrict
#define ccl_restrict
ccl_global
#define ccl_global
types.h
CCL_NAMESPACE_BEGIN
Definition
python.cpp:37
profiler.h
state.h
IntegratorStateGPU
Definition
state.h:141
KernelGlobalsGPU
Definition
device/cuda/globals.h:21
KernelGlobalsGPU::unused
int unused[1]
Definition
device/cuda/globals.h:22
KernelParamsHIP
Definition
device/hip/globals.h:26
KernelParamsHIP::data
KernelData data
Definition
device/hip/globals.h:28
KernelParamsHIP::integrator_state
CCL_NAMESPACE_END IntegratorStateGPU integrator_state
Definition
device/hip/globals.h:33
texture.h
Generated on
for Blender by
doxygen
1.16.1