Blender V4.3
kernel/bvh/types.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#pragma once
6
8
9/* Don't inline intersect functions on GPU, this is faster */
10#ifdef __KERNEL_GPU__
11# define ccl_device_intersect ccl_device_forceinline
12#else
13# define ccl_device_intersect ccl_device_inline
14#endif
15
16/* bottom-most stack entry, indicating the end of traversal */
17#define ENTRYPOINT_SENTINEL 0x76543210
18
19/* 64 object BVH + 64 mesh BVH + 64 object node splitting */
20#define BVH_STACK_SIZE 192
21/* BVH intersection function variations */
22
23#define BVH_MOTION 1
24#define BVH_HAIR 2
25#define BVH_POINTCLOUD 4
26
27#define BVH_NAME_JOIN(x, y) x##_##y
28#define BVH_NAME_EVAL(x, y) BVH_NAME_JOIN(x, y)
29#define BVH_FUNCTION_FULL_NAME(prefix) BVH_NAME_EVAL(prefix, BVH_FUNCTION_NAME)
30
31#define BVH_FEATURE(f) (((BVH_FUNCTION_FEATURES) & (f)) != 0)
32
#define CCL_NAMESPACE_END