Blender V5.0
oneapi/graphics_interop.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Intel Corporation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#if defined(WITH_ONEAPI) && defined(SYCL_LINEAR_MEMORY_INTEROP_AVAILABLE)
6
7# include <sycl/sycl.hpp>
8
11
12# include "device/oneapi/device.h"
13# include "device/oneapi/queue.h"
14
16
17class OneapiDevice;
18class OneapiDeviceQueue;
19
20class OneapiDeviceGraphicsInterop : public DeviceGraphicsInterop {
21 public:
22 explicit OneapiDeviceGraphicsInterop(OneapiDeviceQueue *queue);
23
24 OneapiDeviceGraphicsInterop(const OneapiDeviceGraphicsInterop &other) = delete;
25 OneapiDeviceGraphicsInterop(OneapiDeviceGraphicsInterop &&other) noexcept = delete;
26
27 ~OneapiDeviceGraphicsInterop() override;
28
29 OneapiDeviceGraphicsInterop &operator=(const OneapiDeviceGraphicsInterop &other) = delete;
30 OneapiDeviceGraphicsInterop &operator=(OneapiDeviceGraphicsInterop &&other) = delete;
31
32 void set_buffer(GraphicsInteropBuffer &interop_buffer) override;
33
34 device_ptr map() override;
35 void unmap() override;
36
37 protected:
38 OneapiDeviceQueue *queue_ = nullptr;
39 OneapiDevice *device_ = nullptr;
40
41 /* Size of the buffer in bytes. */
42 size_t buffer_size_ = 0;
43
44 /* The destination was requested to be cleared. */
45 bool need_zero_ = false;
46
47 /* Oneapi resources. */
48 sycl::ext::oneapi::experimental::external_mem sycl_external_memory_{};
49 void *sycl_memory_ptr_ = nullptr;
50
51 /* Vulkan handle to free. */
52# ifdef _WIN32
53 void *vulkan_windows_handle_ = nullptr;
54# endif
55
56 void free();
57};
58
60
61#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