Blender V5.3
kernel/device/hiprt/kernel.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2023 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifdef __HIP_DEVICE_COMPILE__
6
9
10# include <hiprt/impl/hiprt_device_impl.h>
11
13
15
16# include "kernel/tables.h"
17
21
29
34 const int work_size,
35 ccl_global hiprtGlobalStackBuffer stack_buffer)
36{
37 const int global_index = ccl_gpu_global_id_x();
38
39 if (global_index < work_size) {
41 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
43 }
44}
46
50 const int work_size,
51 ccl_global hiprtGlobalStackBuffer stack_buffer)
52{
53 const int global_index = ccl_gpu_global_id_x();
54
55 if (global_index < work_size) {
57 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
59 }
60}
62
66 const int work_size,
67 ccl_global hiprtGlobalStackBuffer stack_buffer)
68{
69 const int global_index = ccl_gpu_global_id_x();
70
71 if (global_index < work_size) {
73 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
75 }
76}
78
82 const int work_size,
83 ccl_global hiprtGlobalStackBuffer stack_buffer)
84{
85 const int global_index = ccl_gpu_global_id_x();
86
87 if (global_index < work_size) {
89 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
91 }
92}
93
97 const int work_size,
98 ccl_global hiprtGlobalStackBuffer stack_buffer)
99{
100 const int global_index = ccl_gpu_global_id_x();
101
102 if (global_index < work_size) {
104 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
106 }
107}
108
112 const ccl_global int *path_index_array,
114 const int work_size,
115 ccl_global hiprtGlobalStackBuffer stack_buffer)
116{
117 const int global_index = ccl_gpu_global_id_x();
118 if (global_index < work_size) {
120 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
122 }
123}
127 const ccl_global int *path_index_array,
128 const int work_size,
129 ccl_global hiprtGlobalStackBuffer stack_buffer)
130{
131 const int global_index = ccl_gpu_global_id_x();
132 if (global_index < work_size) {
134 const int state = (path_index_array) ? path_index_array[global_index] : global_index;
136 }
137}
139
140#endif /* __HIP_DEVICE_COMPILE__ */
#define ccl_global
#define ccl_gpu_global_id_x()
#define HIPRT_INIT_KERNEL_GLOBAL()
ccl_device void integrator_intersect_closest(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_dedicated_light(KernelGlobals kg, IntegratorState state)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_mnee(KernelGlobals kg, IntegratorState state)
ccl_device void integrator_intersect_shadow(KernelGlobals kg, IntegratorShadowState state)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_subsurface(KernelGlobals kg, IntegratorState state)
ccl_device void integrator_intersect_volume_stack(KernelGlobals kg, IntegratorState state)
#define ccl_gpu_kernel_call(x)
#define ccl_gpu_kernel_postfix
#define ccl_gpu_kernel_threads(block_num_threads)
#define ccl_gpu_kernel_signature(name,...)
ccl_gpu_kernel_postfix const ccl_global int ccl_global float const int work_size
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float const int const ccl_global int * path_index_array
const int state
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
#define GPU_HIPRT_KERNEL_BLOCK_NUM_THREADS
ccl_device_forceinline void integrator_shade_surface_raytrace(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)