Blender  V3.3
hip/graphics_interop.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #ifdef WITH_HIP
5 
7 
8 # ifdef WITH_HIP_DYNLOAD
9 # include "hipew.h"
10 # endif
11 
13 
14 class HIPDevice;
15 class HIPDeviceQueue;
16 
17 class HIPDeviceGraphicsInterop : public DeviceGraphicsInterop {
18  public:
19  explicit HIPDeviceGraphicsInterop(HIPDeviceQueue *queue);
20 
21  HIPDeviceGraphicsInterop(const HIPDeviceGraphicsInterop &other) = delete;
22  HIPDeviceGraphicsInterop(HIPDeviceGraphicsInterop &&other) noexcept = delete;
23 
24  ~HIPDeviceGraphicsInterop();
25 
26  HIPDeviceGraphicsInterop &operator=(const HIPDeviceGraphicsInterop &other) = delete;
27  HIPDeviceGraphicsInterop &operator=(HIPDeviceGraphicsInterop &&other) = delete;
28 
29  virtual void set_display_interop(const DisplayDriver::GraphicsInterop &display_interop) override;
30 
31  virtual device_ptr map() override;
32  virtual void unmap() override;
33 
34  protected:
35  HIPDeviceQueue *queue_ = nullptr;
36  HIPDevice *device_ = nullptr;
37 
38  /* OpenGL PBO which is currently registered as the destination for the HIP buffer. */
39  uint opengl_pbo_id_ = 0;
40  /* Buffer area in pixels of the corresponding PBO. */
41  int64_t buffer_area_ = 0;
42 
43  /* The destination was requested to be cleared. */
44  bool need_clear_ = false;
45 
46  hipGraphicsResource hip_graphics_resource_ = nullptr;
47 };
48 
50 
51 #endif
unsigned int uint
Definition: BLI_sys_types.h:67
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
SyclQueue * queue
SocketIndexByIdentifierMap * map
__int64 int64_t
Definition: stdint.h:89
uint64_t device_ptr
Definition: util/types.h:43