14# ifdef WITH_HIP_DYNLOAD
17# include <hiprt/hiprt_types.h>
29class HIPRTDevice :
public HIPDevice {
34 HIPRTDevice(
const DeviceInfo &info, Stats &stats, Profiler &profiler,
bool headless);
36 ~HIPRTDevice()
override;
37 unique_ptr<DeviceQueue> gpu_queue_create()
override;
38 string compile_kernel_get_common_cflags(
const uint kernel_features)
override;
39 string compile_kernel(
const uint kernel_features,
41 const char *base =
"hiprt")
override;
43 bool load_kernels(
const uint kernel_features)
override;
45 void const_copy_to(
const char *
name,
void *host,
const size_t size)
override;
49 void release_bvh(
BVH *bvh)
override;
51 hiprtContext get_hiprt_context()
56 hiprtGlobalStackBuffer global_stack_buffer;
59 enum Filter_Function { Closest = 0, Shadows,
Local,
Volume, Max_Intersect_Filter_Function };
60 enum Primitive_Type { Triangle = 0,
Curve, Motion_Triangle,
Point, Max_Primitive_Type };
62 hiprtGeometryBuildInput prepare_triangle_blas(BVHHIPRT *bvh,
Mesh *mesh);
63 hiprtGeometryBuildInput prepare_curve_blas(BVHHIPRT *bvh, Hair *hair);
64 hiprtGeometryBuildInput prepare_point_blas(BVHHIPRT *bvh,
PointCloud *pointcloud);
65 void build_blas(BVHHIPRT *bvh,
Geometry *geom, hiprtBuildOptions
options);
66 hiprtScene build_tlas(BVHHIPRT *bvh,
67 const vector<Object *> &objects,
70 void free_bvh_memory_delayed();
71 hiprtContext hiprt_context;
73 hiprtFuncTable functions_table;
76 size_t scratch_buffer_size;
77 device_vector<char> scratch_buffer;
84 vector<hiprtGeometry> stale_bvh;
88 bool use_motion_blur =
false;
100 device_vector<uint32_t> prim_visibility;
104 device_vector<hiprtFrameMatrix> instance_transform_matrix;
113 device_vector<hiprtTransformHeader> transform_headers;
124 device_vector<int> user_instance_id;
125 device_vector<hiprtInstance> hiprt_blas_ptr;
126 device_vector<uint64_t> blas_ptr;
132 device_vector<int2> custom_prim_info;
133 device_vector<int2> custom_prim_info_offset;
137 device_vector<float2> prims_time;
138 device_vector<int> prim_time_offset;
struct PointCloud PointCloud
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void refit(btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax)
CCL_NAMESPACE_BEGIN struct Options options
#define CCL_NAMESPACE_END
ccl_device bool BVH_FUNCTION_FULL_NAME BVH(KernelGlobals kg, const ccl_private Ray *ray, ccl_private LocalIntersection *local_isect, const int local_object, ccl_private uint *lcg_state, const int max_hits)