Blender
V4.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
13
#include "
kernel/util/profiling.h
"
14
15
CCL_NAMESPACE_BEGIN
16
17
/* Not actually used, just a NULL pointer that gets passed everywhere, which we
18
* hope gets optimized out by the compiler. */
19
struct
KernelGlobalsGPU
{
20
int
unused
[1];
21
};
22
typedef
ccl_global
const
KernelGlobalsGPU
*
ccl_restrict
KernelGlobals
;
23
24
struct
KernelParamsHIP
{
25
/* Global scene data and textures */
26
KernelData
data
;
27
#define KERNEL_DATA_ARRAY(type, name) const type *name;
28
#include "
kernel/data_arrays.h
"
29
30
/* Integrator state */
31
IntegratorStateGPU
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
44
CCL_NAMESPACE_END
data_arrays.h
ccl_restrict
#define ccl_restrict
Definition
device/cuda/compat.h:54
ccl_global
#define ccl_global
Definition
device/cuda/compat.h:45
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
KernelGlobals
ccl_global const KernelGlobalsGPU *ccl_restrict KernelGlobals
Definition
device/hip/globals.h:22
types.h
KernelData
KernelData
Definition
kernel/types.h:1509
profiling.h
CCL_NAMESPACE_BEGIN
Definition
python.cpp:44
state.h
IntegratorStateGPU
Definition
state.h:141
KernelGlobalsGPU
Definition
device/cuda/globals.h:19
KernelGlobalsGPU::unused
int unused[1]
Definition
device/cuda/globals.h:20
KernelParamsHIP
Definition
device/hip/globals.h:24
KernelParamsHIP::data
KernelData data
Definition
device/hip/globals.h:26
KernelParamsHIP::integrator_state
IntegratorStateGPU integrator_state
Definition
device/hip/globals.h:31
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0