Debian Codegraph @

opencl/source/sharings/gl/linux/gl_sync_event_linux.cpp

raw
1 /*
2 * Copyright (C) 2023-2024 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #include "shared/source/command_stream/command_stream_receiver.h"
9 #include "shared/source/device/device.h"
10 #include "shared/source/helpers/get_info.h"
11 #include "shared/source/helpers/timestamp_packet.h"
12
13 #include "opencl/extensions/public/cl_gl_private_intel.h"
14 #include "opencl/source/context/context.h"
15 #include "opencl/source/event/async_events_handler.h"
16 #include "opencl/source/event/event_builder.h"
17 #include "opencl/source/platform/platform.h"
18 #include "opencl/source/sharings/gl/gl_context_guard.h"
19 #include "opencl/source/sharings/gl/gl_sync_event.h"
20 #include "opencl/source/sharings/gl/linux/gl_sharing_linux.h"
21
22 namespace NEO {
23 GlSyncEvent::GlSyncEvent(Context &context, const GL_CL_SYNC_INFO &sync)
24 : Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, CompletionStamp::notReady, CompletionStamp::notReady),
25 glSync(std::make_unique<GL_CL_SYNC_INFO>(sync)) {
26 transitionExecutionStatus(CL_SUBMITTED);
27 }
28
29 GlSyncEvent::~GlSyncEvent() {
30 }
31
32 GlSyncEvent *GlSyncEvent::create(Context &context, cl_GLsync sync, cl_int *errCode) {
33 /* Not supported */
34 return nullptr;
35 }
36
37 void GlSyncEvent::updateExecutionStatus() {
38 /* Not supported */
39 }
40
41 TaskCountType GlSyncEvent::getTaskLevel() {
42 if (peekExecutionStatus() == CL_COMPLETE) {
43 return 0;
44 }
45 return CompletionStamp::notReady;
46 }
47 } // namespace NEO