Files
compute-runtime/runtime/sharings/gl/gl_buffer.h
Maciej Plewka 9e52684f5b Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-26 15:48:19 +01:00

38 lines
1.1 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/sharings/gl/gl_sharing.h"
#include "CL/cl_gl.h"
struct _tagCLGLBufferInfo;
namespace NEO {
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 NEO