Blender  V3.3
state_util.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #pragma once
5 
7 
9 
11 
12 /* Ray */
13 
16  ccl_private const Ray *ccl_restrict ray)
17 {
18  INTEGRATOR_STATE_WRITE(state, ray, P) = ray->P;
19  INTEGRATOR_STATE_WRITE(state, ray, D) = ray->D;
20  INTEGRATOR_STATE_WRITE(state, ray, tmin) = ray->tmin;
21  INTEGRATOR_STATE_WRITE(state, ray, tmax) = ray->tmax;
22  INTEGRATOR_STATE_WRITE(state, ray, time) = ray->time;
23  INTEGRATOR_STATE_WRITE(state, ray, dP) = ray->dP;
24  INTEGRATOR_STATE_WRITE(state, ray, dD) = ray->dD;
25 }
26 
30 {
31  ray->P = INTEGRATOR_STATE(state, ray, P);
32  ray->D = INTEGRATOR_STATE(state, ray, D);
33  ray->tmin = INTEGRATOR_STATE(state, ray, tmin);
34  ray->tmax = INTEGRATOR_STATE(state, ray, tmax);
35  ray->time = INTEGRATOR_STATE(state, ray, time);
36  ray->dP = INTEGRATOR_STATE(state, ray, dP);
37  ray->dD = INTEGRATOR_STATE(state, ray, dD);
38 }
39 
40 /* Shadow Ray */
41 
44 {
45  INTEGRATOR_STATE_WRITE(state, shadow_ray, P) = ray->P;
46  INTEGRATOR_STATE_WRITE(state, shadow_ray, D) = ray->D;
47  INTEGRATOR_STATE_WRITE(state, shadow_ray, tmin) = ray->tmin;
48  INTEGRATOR_STATE_WRITE(state, shadow_ray, tmax) = ray->tmax;
49  INTEGRATOR_STATE_WRITE(state, shadow_ray, time) = ray->time;
50  INTEGRATOR_STATE_WRITE(state, shadow_ray, dP) = ray->dP;
51 }
52 
56 {
57  ray->P = INTEGRATOR_STATE(state, shadow_ray, P);
58  ray->D = INTEGRATOR_STATE(state, shadow_ray, D);
59  ray->tmin = INTEGRATOR_STATE(state, shadow_ray, tmin);
60  ray->tmax = INTEGRATOR_STATE(state, shadow_ray, tmax);
61  ray->time = INTEGRATOR_STATE(state, shadow_ray, time);
62  ray->dP = INTEGRATOR_STATE(state, shadow_ray, dP);
63  ray->dD = differential_zero_compact();
64 }
65 
66 /* Intersection */
67 
70 {
71  INTEGRATOR_STATE_WRITE(state, isect, t) = isect->t;
72  INTEGRATOR_STATE_WRITE(state, isect, u) = isect->u;
73  INTEGRATOR_STATE_WRITE(state, isect, v) = isect->v;
74  INTEGRATOR_STATE_WRITE(state, isect, object) = isect->object;
75  INTEGRATOR_STATE_WRITE(state, isect, prim) = isect->prim;
76  INTEGRATOR_STATE_WRITE(state, isect, type) = isect->type;
77 }
78 
81 {
82  isect->prim = INTEGRATOR_STATE(state, isect, prim);
83  isect->object = INTEGRATOR_STATE(state, isect, object);
84  isect->type = INTEGRATOR_STATE(state, isect, type);
85  isect->u = INTEGRATOR_STATE(state, isect, u);
86  isect->v = INTEGRATOR_STATE(state, isect, v);
87  isect->t = INTEGRATOR_STATE(state, isect, t);
88 }
89 
91  int i)
92 {
93  VolumeStack entry = {INTEGRATOR_STATE_ARRAY(state, volume_stack, i, object),
94  INTEGRATOR_STATE_ARRAY(state, volume_stack, i, shader)};
95  return entry;
96 }
97 
99  int i,
100  VolumeStack entry)
101 {
102  INTEGRATOR_STATE_ARRAY_WRITE(state, volume_stack, i, object) = entry.object;
103  INTEGRATOR_STATE_ARRAY_WRITE(state, volume_stack, i, shader) = entry.shader;
104 }
105 
108 {
109  return (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) ?
110  INTEGRATOR_STATE_ARRAY(state, volume_stack, 0, shader) == SHADER_NONE :
111  true;
112 }
113 
114 /* Shadow Intersection */
115 
119  const int index)
120 {
121  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, t) = isect->t;
122  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, u) = isect->u;
123  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, v) = isect->v;
124  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, object) = isect->object;
125  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, prim) = isect->prim;
126  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, index, type) = isect->type;
127 }
128 
132  const int index)
133 {
134  isect->prim = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, prim);
135  isect->object = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, object);
136  isect->type = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, type);
137  isect->u = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, u);
138  isect->v = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, v);
139  isect->t = INTEGRATOR_STATE_ARRAY(state, shadow_isect, index, t);
140 }
141 
144 {
145  if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) {
146  int index = 0;
147  int shader;
148  do {
149  shader = INTEGRATOR_STATE_ARRAY(state, volume_stack, index, shader);
150 
151  INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_volume_stack, index, object) =
152  INTEGRATOR_STATE_ARRAY(state, volume_stack, index, object);
153  INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_volume_stack, index, shader) = shader;
154 
155  ++index;
156  } while (shader != OBJECT_NONE);
157  }
158 }
159 
161  IntegratorState to_state,
163 {
164  if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) {
165  int index = 0;
166  int shader;
167  do {
168  shader = INTEGRATOR_STATE_ARRAY(state, volume_stack, index, shader);
169 
170  INTEGRATOR_STATE_ARRAY_WRITE(to_state, volume_stack, index, object) = INTEGRATOR_STATE_ARRAY(
171  state, volume_stack, index, object);
172  INTEGRATOR_STATE_ARRAY_WRITE(to_state, volume_stack, index, shader) = shader;
173 
174  ++index;
175  } while (shader != OBJECT_NONE);
176  }
177 }
178 
181 {
182  VolumeStack entry = {INTEGRATOR_STATE_ARRAY(state, shadow_volume_stack, i, object),
183  INTEGRATOR_STATE_ARRAY(state, shadow_volume_stack, i, shader)};
184  return entry;
185 }
186 
189 {
190  return (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) ?
191  INTEGRATOR_STATE_ARRAY(state, shadow_volume_stack, 0, shader) == SHADER_NONE :
192  true;
193 }
194 
196  int i,
197  VolumeStack entry)
198 {
199  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_volume_stack, i, object) = entry.object;
200  INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_volume_stack, i, shader) = entry.shader;
201 }
202 
203 #if defined(__KERNEL_GPU__)
204 ccl_device_inline void integrator_state_copy_only(KernelGlobals kg,
205  ConstIntegratorState to_state,
207 {
208  int index;
209 
210  /* Rely on the compiler to optimize out unused assignments and `while(false)`'s. */
211 
212 # define KERNEL_STRUCT_BEGIN(name) \
213  index = 0; \
214  do {
215 
216 # define KERNEL_STRUCT_MEMBER(parent_struct, type, name, feature) \
217  if (kernel_integrator_state.parent_struct.name != nullptr) { \
218  kernel_integrator_state.parent_struct.name[to_state] = \
219  kernel_integrator_state.parent_struct.name[state]; \
220  }
221 
222 # define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature) \
223  if (kernel_integrator_state.parent_struct[index].name != nullptr) { \
224  kernel_integrator_state.parent_struct[index].name[to_state] = \
225  kernel_integrator_state.parent_struct[index].name[state]; \
226  }
227 
228 # define KERNEL_STRUCT_END(name) \
229  } \
230  while (false) \
231  ;
232 
233 # define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \
234  ++index; \
235  } \
236  while (index < gpu_array_size) \
237  ;
238 
239 # define KERNEL_STRUCT_VOLUME_STACK_SIZE kernel_data.volume_stack_size
240 
242 
243 # undef KERNEL_STRUCT_BEGIN
244 # undef KERNEL_STRUCT_MEMBER
245 # undef KERNEL_STRUCT_ARRAY_MEMBER
246 # undef KERNEL_STRUCT_END
247 # undef KERNEL_STRUCT_END_ARRAY
248 # undef KERNEL_STRUCT_VOLUME_STACK_SIZE
249 }
250 
251 ccl_device_inline void integrator_state_move(KernelGlobals kg,
252  ConstIntegratorState to_state,
254 {
255  integrator_state_copy_only(kg, to_state, state);
256 
257  INTEGRATOR_STATE_WRITE(state, path, queued_kernel) = 0;
258 }
259 
260 ccl_device_inline void integrator_shadow_state_copy_only(KernelGlobals kg,
263 {
264  int index;
265 
266  /* Rely on the compiler to optimize out unused assignments and `while(false)`'s. */
267 
268 # define KERNEL_STRUCT_BEGIN(name) \
269  index = 0; \
270  do {
271 
272 # define KERNEL_STRUCT_MEMBER(parent_struct, type, name, feature) \
273  if (kernel_integrator_state.parent_struct.name != nullptr) { \
274  kernel_integrator_state.parent_struct.name[to_state] = \
275  kernel_integrator_state.parent_struct.name[state]; \
276  }
277 
278 # define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature) \
279  if (kernel_integrator_state.parent_struct[index].name != nullptr) { \
280  kernel_integrator_state.parent_struct[index].name[to_state] = \
281  kernel_integrator_state.parent_struct[index].name[state]; \
282  }
283 
284 # define KERNEL_STRUCT_END(name) \
285  } \
286  while (false) \
287  ;
288 
289 # define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size) \
290  ++index; \
291  } \
292  while (index < gpu_array_size) \
293  ;
294 
295 # define KERNEL_STRUCT_VOLUME_STACK_SIZE kernel_data.volume_stack_size
296 
298 
299 # undef KERNEL_STRUCT_BEGIN
300 # undef KERNEL_STRUCT_MEMBER
301 # undef KERNEL_STRUCT_ARRAY_MEMBER
302 # undef KERNEL_STRUCT_END
303 # undef KERNEL_STRUCT_END_ARRAY
304 # undef KERNEL_STRUCT_VOLUME_STACK_SIZE
305 }
306 
307 ccl_device_inline void integrator_shadow_state_move(KernelGlobals kg,
308  ConstIntegratorState to_state,
310 {
311  integrator_shadow_state_copy_only(kg, to_state, state);
312 
313  INTEGRATOR_STATE_WRITE(state, shadow_path, queued_kernel) = 0;
314 }
315 
316 #endif
317 
318 /* NOTE: Leaves kernel scheduling information untouched. Use INIT semantic for one of the paths
319  * after this function. */
322 {
323 #if defined(__KERNEL_GPU__)
325  &kernel_integrator_state.next_main_path_index[0], 1);
326 
327  integrator_state_copy_only(kg, to_state, state);
328 #else
329  IntegratorStateCPU *ccl_restrict to_state = state + 1;
330 
331  /* Only copy the required subset for performance. */
332  to_state->path = state->path;
333  to_state->ray = state->ray;
334  to_state->isect = state->isect;
336 #endif
337 
338  return to_state;
339 }
340 
341 #ifndef __KERNEL_GPU__
343 {
344  return INTEGRATOR_STATE(state, path, bounce);
345 }
346 
348 {
349  return INTEGRATOR_STATE(state, shadow_path, bounce);
350 }
351 
353 {
354  return INTEGRATOR_STATE(state, path, diffuse_bounce);
355 }
356 
358 {
359  return INTEGRATOR_STATE(state, shadow_path, diffuse_bounce);
360 }
361 
363 {
364  return INTEGRATOR_STATE(state, path, glossy_bounce);
365 }
366 
368 {
369  return INTEGRATOR_STATE(state, shadow_path, glossy_bounce);
370 }
371 
373 {
374  return INTEGRATOR_STATE(state, path, transmission_bounce);
375 }
376 
378  const int)
379 {
380  return INTEGRATOR_STATE(state, shadow_path, transmission_bounce);
381 }
382 
384 {
385  return INTEGRATOR_STATE(state, path, transparent_bounce);
386 }
387 
389  const int)
390 {
391  return INTEGRATOR_STATE(state, shadow_path, transparent_bounce);
392 }
393 #else
395  const uint32_t path_flag)
396 {
397  return (path_flag & PATH_RAY_SHADOW) ? INTEGRATOR_STATE(state, shadow_path, bounce) :
398  INTEGRATOR_STATE(state, path, bounce);
399 }
400 
402  const uint32_t path_flag)
403 {
404  return (path_flag & PATH_RAY_SHADOW) ? INTEGRATOR_STATE(state, shadow_path, diffuse_bounce) :
405  INTEGRATOR_STATE(state, path, diffuse_bounce);
406 }
407 
409  const uint32_t path_flag)
410 {
411  return (path_flag & PATH_RAY_SHADOW) ? INTEGRATOR_STATE(state, shadow_path, glossy_bounce) :
412  INTEGRATOR_STATE(state, path, glossy_bounce);
413 }
414 
416  const uint32_t path_flag)
417 {
418  return (path_flag & PATH_RAY_SHADOW) ?
419  INTEGRATOR_STATE(state, shadow_path, transmission_bounce) :
420  INTEGRATOR_STATE(state, path, transmission_bounce);
421 }
422 
424  const uint32_t path_flag)
425 {
426  return (path_flag & PATH_RAY_SHADOW) ? INTEGRATOR_STATE(state, shadow_path, transparent_bounce) :
427  INTEGRATOR_STATE(state, path, transparent_bounce);
428 }
429 #endif
430 
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
ATOMIC_INLINE uint32_t atomic_fetch_and_add_uint32(uint32_t *p, uint32_t x)
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define ccl_restrict
Definition: cuda/compat.h:50
#define ccl_device_forceinline
Definition: cuda/compat.h:35
#define ccl_private
Definition: cuda/compat.h:48
#define ccl_device_inline
Definition: cuda/compat.h:34
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
double time
#define kernel_data
const KernelGlobalsCPU *ccl_restrict KernelGlobals
#define kernel_integrator_state
ccl_device_forceinline float differential_zero_compact()
Definition: differential.h:112
const int state
#define SHADER_NONE
Definition: kernel/types.h:39
@ PATH_RAY_SHADOW
Definition: kernel/types.h:206
@ KERNEL_FEATURE_VOLUME
#define OBJECT_NONE
Definition: kernel/types.h:40
static float P(float k)
Definition: math_interp.c:25
const IntegratorShadowStateCPU *ccl_restrict ConstIntegratorShadowState
Definition: state.h:150
#define INTEGRATOR_STATE_ARRAY_WRITE(state, nested_struct, array_index, member)
Definition: state.h:159
IntegratorStateCPU *ccl_restrict IntegratorState
Definition: state.h:147
#define INTEGRATOR_STATE_WRITE(state, nested_struct, member)
Definition: state.h:155
const IntegratorStateCPU *ccl_restrict ConstIntegratorState
Definition: state.h:148
#define INTEGRATOR_STATE(state, nested_struct, member)
Definition: state.h:154
IntegratorShadowStateCPU *ccl_restrict IntegratorShadowState
Definition: state.h:149
#define INTEGRATOR_STATE_ARRAY(state, nested_struct, array_index, member)
Definition: state.h:157
ccl_device_inline int integrator_state_bounce(ConstIntegratorState state, const int)
Definition: state_util.h:342
ccl_device_forceinline void integrator_state_write_shadow_isect(IntegratorShadowState state, ccl_private const Intersection *ccl_restrict isect, const int index)
Definition: state_util.h:116
ccl_device_inline int integrator_state_transmission_bounce(ConstIntegratorState state, const int)
Definition: state_util.h:372
ccl_device_forceinline VolumeStack integrator_state_read_volume_stack(ConstIntegratorState state, int i)
Definition: state_util.h:90
ccl_device_forceinline void integrator_state_read_shadow_ray(KernelGlobals kg, ConstIntegratorShadowState state, ccl_private Ray *ccl_restrict ray)
Definition: state_util.h:53
ccl_device_forceinline void integrator_state_write_isect(KernelGlobals kg, IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
Definition: state_util.h:68
ccl_device_forceinline void integrator_state_read_ray(KernelGlobals kg, ConstIntegratorState state, ccl_private Ray *ccl_restrict ray)
Definition: state_util.h:27
ccl_device_forceinline bool integrator_state_volume_stack_is_empty(KernelGlobals kg, ConstIntegratorState state)
Definition: state_util.h:106
ccl_device_inline int integrator_state_transparent_bounce(ConstIntegratorState state, const int)
Definition: state_util.h:383
ccl_device_forceinline VolumeStack integrator_state_read_shadow_volume_stack(ConstIntegratorShadowState state, int i)
Definition: state_util.h:180
ccl_device_forceinline void integrator_state_write_shadow_volume_stack(IntegratorShadowState state, int i, VolumeStack entry)
Definition: state_util.h:195
ccl_device_inline IntegratorState integrator_state_shadow_catcher_split(KernelGlobals kg, IntegratorState state)
Definition: state_util.h:320
ccl_device_forceinline void integrator_state_read_isect(KernelGlobals kg, ConstIntegratorState state, ccl_private Intersection *ccl_restrict isect)
Definition: state_util.h:79
ccl_device_forceinline void integrator_state_write_shadow_ray(KernelGlobals kg, IntegratorShadowState state, ccl_private const Ray *ccl_restrict ray)
Definition: state_util.h:42
ccl_device_forceinline void integrator_state_read_shadow_isect(ConstIntegratorShadowState state, ccl_private Intersection *ccl_restrict isect, const int index)
Definition: state_util.h:129
ccl_device_forceinline void integrator_state_copy_volume_stack(KernelGlobals kg, IntegratorState to_state, ConstIntegratorState state)
Definition: state_util.h:160
CCL_NAMESPACE_BEGIN ccl_device_forceinline void integrator_state_write_ray(KernelGlobals kg, IntegratorState state, ccl_private const Ray *ccl_restrict ray)
Definition: state_util.h:14
ccl_device_inline int integrator_state_glossy_bounce(ConstIntegratorState state, const int)
Definition: state_util.h:362
ccl_device_inline int integrator_state_diffuse_bounce(ConstIntegratorState state, const int)
Definition: state_util.h:352
ccl_device_forceinline void integrator_state_write_volume_stack(IntegratorState state, int i, VolumeStack entry)
Definition: state_util.h:98
ccl_device_forceinline bool integrator_state_shadow_volume_stack_is_empty(KernelGlobals kg, ConstIntegratorShadowState state)
Definition: state_util.h:187
ccl_device_forceinline void integrator_state_copy_volume_stack_to_shadow(KernelGlobals kg, IntegratorShadowState shadow_state, ConstIntegratorState state)
Definition: state_util.h:142
unsigned int uint32_t
Definition: stdint.h:80
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)
Definition: voxel.c:13