Blender
V5.3
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/types_image.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
#define KERNEL_DATA_ARRAY_WRITABLE(type, name) type *name;
31
#include "
kernel/data_arrays.h
"
32
33
/* Integrator state */
34
IntegratorStateGPU
integrator_state
;
35
};
36
37
#ifdef __KERNEL_GPU__
38
__constant__
KernelParamsHIP
kernel_params;
39
#endif
40
41
/* Abstraction macros */
42
#define kernel_data kernel_params.data
43
#define kernel_data_fetch(name, index) kernel_params.name[(index)]
44
#define kernel_data_write(name, index, value) kernel_params.name[(index)] = (value)
45
#define kernel_data_array(name) (kernel_params.name)
46
#define kernel_integrator_state kernel_params.integrator_state
47
48
CCL_NAMESPACE_END
color.h
data_arrays.h
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:41
profiler.h
state.h
IntegratorStateGPU
Definition
state.h:140
KernelGlobalsGPU
Definition
device/cuda/globals.h:21
KernelGlobalsGPU::unused
int unused[1]
Definition
device/cuda/globals.h:22
KernelGlobals
Definition
eevee_nodetree_lib.bsl.hh:141
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:34
types_image.h
Generated on
for Blender by
doxygen
1.18.0