Blender V4.3
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
8
9# ifdef WITH_HIP_DYNLOAD
10# include "hipew.h"
11# endif
12
14
15class HIPDevice;
16class HIPDeviceQueue;
17
18class HIPDeviceGraphicsInterop : public DeviceGraphicsInterop {
19 public:
20 explicit HIPDeviceGraphicsInterop(HIPDeviceQueue *queue);
21
22 HIPDeviceGraphicsInterop(const HIPDeviceGraphicsInterop &other) = delete;
23 HIPDeviceGraphicsInterop(HIPDeviceGraphicsInterop &&other) noexcept = delete;
24
25 ~HIPDeviceGraphicsInterop();
26
27 HIPDeviceGraphicsInterop &operator=(const HIPDeviceGraphicsInterop &other) = delete;
28 HIPDeviceGraphicsInterop &operator=(HIPDeviceGraphicsInterop &&other) = delete;
29
30 virtual void set_display_interop(const DisplayDriver::GraphicsInterop &display_interop) override;
31
32 virtual device_ptr map() override;
33 virtual void unmap() override;
34
35 protected:
36 HIPDeviceQueue *queue_ = nullptr;
37 HIPDevice *device_ = nullptr;
38
39 /* OpenGL PBO which is currently registered as the destination for the HIP buffer. */
40 int64_t opengl_pbo_id_ = 0;
41 /* Buffer area in pixels of the corresponding PBO. */
42 int64_t buffer_area_ = 0;
43
44 /* The destination was requested to be cleared. */
45 bool need_clear_ = false;
46
47 hipGraphicsResource hip_graphics_resource_ = nullptr;
48};
49
51
52#endif
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
#define CCL_NAMESPACE_END
__int64 int64_t
Definition stdint.h:89
uint64_t device_ptr
Definition util/types.h:45