| 1 |
/* |
| 2 |
* Copyright (C) 2018-2022 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
#include "opencl/source/event/event.h" |
| 10 |
|
| 11 |
#include <GL/gl.h> |
| 12 |
|
| 13 |
struct _tagGLCLSyncInfo; |
| 14 |
typedef _tagGLCLSyncInfo GL_CL_SYNC_INFO; |
| 15 |
|
| 16 |
namespace NEO { |
| 17 |
class Context; |
| 18 |
|
| 19 |
class GlSyncEvent : public Event { |
| 20 |
public: |
| 21 |
GlSyncEvent() = delete; |
| 22 |
GlSyncEvent(Context &context, const GL_CL_SYNC_INFO &sync); |
| 23 |
~GlSyncEvent() override; |
| 24 |
|
| 25 |
static GlSyncEvent *create(Context &context, cl_GLsync sync, cl_int *errCode); |
| 26 |
void updateExecutionStatus() override; |
| 27 |
TaskCountType getTaskLevel() override; |
| 28 |
|
| 29 |
bool isExternallySynchronized() const override { return true; } |
| 30 |
|
| 31 |
protected: |
| 32 |
std::unique_ptr<GL_CL_SYNC_INFO> glSync; |
| 33 |
}; |
| 34 |
} // namespace NEO |