Files
compute-runtime/runtime/sharings/gl/gl_buffer.h
Artur Harasimiuk 40146291ad Update copyright headers
Updating files modified in 2018 only. Older files remain with old style
copyright header

Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 18:02:35 +02:00

37 lines
1.1 KiB
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/sharings/gl/gl_sharing.h"
#include "CL/cl_gl.h"
struct _tagCLGLBufferInfo;
namespace OCLRT {
class Buffer;
class Context;
class GlBuffer : public GlSharing {
public:
static Buffer *createSharedGlBuffer(Context *context, cl_mem_flags flags, unsigned int bufferId, cl_int *errcodeRet);
void synchronizeObject(UpdateData &updateData) override;
void releaseReusedGraphicsAllocation() override;
protected:
GlBuffer(GLSharingFunctions *sharingFunctions, unsigned int glObjectId)
: GlSharing(sharingFunctions, CL_GL_OBJECT_BUFFER, glObjectId){};
void releaseResource(MemObj *memObject) override;
void resolveGraphicsAllocationChange(osHandle currentSharedHandle, UpdateData *updateData) override;
void popGraphicsAllocationFromReuse(GraphicsAllocation *graphicsAllocation);
static GraphicsAllocation *createGraphicsAllocation(Context *context, unsigned int bufferId, _tagCLGLBufferInfo &bufferInfo);
};
} // namespace OCLRT