Blender V5.0
hip/graphics_interop.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#ifdef WITH_HIP
6
9
10# ifdef WITH_HIP_DYNLOAD
11# include "hipew.h"
12# endif
13
15
16class HIPDevice;
17class HIPDeviceQueue;
18
19class HIPDeviceGraphicsInterop : public DeviceGraphicsInterop {
20 public:
21 explicit HIPDeviceGraphicsInterop(HIPDeviceQueue *queue);
22
23 HIPDeviceGraphicsInterop(const HIPDeviceGraphicsInterop &other) = delete;
24 HIPDeviceGraphicsInterop(HIPDeviceGraphicsInterop &&other) noexcept = delete;
25
26 ~HIPDeviceGraphicsInterop() override;
27
28 HIPDeviceGraphicsInterop &operator=(const HIPDeviceGraphicsInterop &other) = delete;
29 HIPDeviceGraphicsInterop &operator=(HIPDeviceGraphicsInterop &&other) = delete;
30
31 void set_buffer(GraphicsInteropBuffer &interop_buffer) override;
32
33 device_ptr map() override;
34 void unmap() override;
35
36 protected:
37 HIPDeviceQueue *queue_ = nullptr;
38 HIPDevice *device_ = nullptr;
39
40 /* Size of the buffer in bytes. */
41 size_t buffer_size_ = 0;
42
43 /* The destination was requested to be cleared. */
44 bool need_zero_ = false;
45
46 hipGraphicsResource hip_graphics_resource_ = nullptr;
47 hipDeviceptr_t hip_external_memory_ptr_ = 0;
48
49 void free();
50};
51
53
54#endif
void BLI_kdtree_nd_ free(KDTree *tree)
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
#define CCL_NAMESPACE_END
uint64_t device_ptr
Definition types_base.h:44