mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
#include "runtime/sharings/d3d/d3d_sharing.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Buffer;
|
||||
class Context;
|
||||
|
||||
@@ -50,4 +50,4 @@ class D3DBuffer : public D3DSharing<D3D> {
|
||||
D3DBuffer(Context *context, D3DBufferObj *d3dBuffer, D3DBufferObj *bufferStaging, bool sharedResource)
|
||||
: D3DSharing(context, d3dBuffer, bufferStaging, 0, sharedResource){};
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "runtime/gmm_helper/gmm.h"
|
||||
#include "runtime/mem_obj/image.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
template class D3DSharing<D3DTypesHelper::D3D9>;
|
||||
template class D3DSharing<D3DTypesHelper::D3D10>;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d3d_sharing_functions.h"
|
||||
|
||||
enum GMM_RESOURCE_FORMAT_ENUM;
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
enum class OCLPlane;
|
||||
class Context;
|
||||
class Gmm;
|
||||
@@ -49,4 +49,4 @@ class D3DSharing : public SharingHandler {
|
||||
bool sharedResource = false;
|
||||
unsigned int subresource = 0;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "mmsystem.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
D3DSurface::D3DSurface(Context *context, cl_dx9_surface_info_khr *surfaceInfo, D3D9Surface *surfaceStaging, cl_uint plane,
|
||||
OCLPlane oclPlane, cl_dx9_media_adapter_type_khr adapterType, bool sharedResource, bool lockable)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <map>
|
||||
|
||||
struct ErrorCodeHelper;
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
enum class OCLPlane;
|
||||
class Image;
|
||||
class Context;
|
||||
@@ -50,4 +50,4 @@ class D3DSurface : public D3DSharing<D3DTypesHelper::D3D9> {
|
||||
D3D9Surface *d3d9SurfaceStaging = nullptr;
|
||||
D3DDevice *resourceDevice = nullptr;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "runtime/mem_obj/image.h"
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
template class D3DTexture<D3DTypesHelper::D3D10>;
|
||||
template class D3DTexture<D3DTypesHelper::D3D11>;
|
||||
|
||||
@@ -1,29 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/sharings/d3d/d3d_sharing.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class Image;
|
||||
|
||||
@@ -48,4 +33,4 @@ class D3DTexture : public D3DSharing<D3D> {
|
||||
D3DTexture(Context *context, D3DResource *d3dTexture, cl_uint subresource, D3DResource *textureStaging, bool sharedResource)
|
||||
: D3DSharing(context, d3dTexture, textureStaging, subresource, sharedResource){};
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
bool D3DSharingContextBuilder<D3DTypesHelper::D3D9>::processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue, cl_int &errcodeRet) {
|
||||
if (contextData.get() == nullptr) {
|
||||
@@ -158,5 +158,5 @@ void *D3DSharingBuilderFactory<D3DTypesHelper::D3D11>::getExtensionFunctionAddre
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D9>, D3DSharingFunctions<D3DTypesHelper::D3D9>> D3D9Sharing;
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D10>, D3DSharingFunctions<D3DTypesHelper::D3D10>> D3D10Sharing;
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D11>, D3DSharingFunctions<D3DTypesHelper::D3D11>> D3D11Sharing;
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
|
||||
template <typename D3D>
|
||||
@@ -38,4 +38,4 @@ class D3DSharingBuilderFactory : public SharingBuilderFactory {
|
||||
void fillGlobalDispatchTable() override;
|
||||
void *getExtensionFunctionAddress(const std::string &functionName) override;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "CL/cl_gl.h"
|
||||
#include "config.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
cl_mem CL_API_CALL clCreateFromGLBuffer(cl_context context, cl_mem_flags flags, cl_GLuint bufobj, cl_int *errcodeRet) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
|
||||
struct GlCreateContextProperties {
|
||||
@@ -36,4 +36,4 @@ class GlSharingBuilderFactory : public SharingBuilderFactory {
|
||||
void fillGlobalDispatchTable() override;
|
||||
void *getExtensionFunctionAddress(const std::string &functionName) override;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
GlArbSyncEvent::GlArbSyncEvent(Context &context)
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, eventNotReady, eventNotReady),
|
||||
glSyncInfo(new CL_GL_SYNC_INFO{}) {
|
||||
@@ -31,7 +31,7 @@ bool GlArbSyncEvent::setBaseEvent(Event &ev) {
|
||||
auto cmdQueue = ev.getCommandQueue();
|
||||
auto osInterface = cmdQueue->getCommandStreamReceiver().getOSInterface();
|
||||
UNRECOVERABLE_IF(osInterface == nullptr);
|
||||
if (false == ctx->getSharing<OCLRT::GLSharingFunctions>()->glArbSyncObjectSetup(*osInterface, *glSyncInfo)) {
|
||||
if (false == ctx->getSharing<NEO::GLSharingFunctions>()->glArbSyncObjectSetup(*osInterface, *glSyncInfo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ bool GlArbSyncEvent::setBaseEvent(Event &ev) {
|
||||
|
||||
GlArbSyncEvent::~GlArbSyncEvent() {
|
||||
if (baseEvent != nullptr) {
|
||||
ctx->getSharing<OCLRT::GLSharingFunctions>()->glArbSyncObjectCleanup(*osInterface, glSyncInfo.get());
|
||||
ctx->getSharing<NEO::GLSharingFunctions>()->glArbSyncObjectCleanup(*osInterface, glSyncInfo.get());
|
||||
baseEvent->decRefInternal();
|
||||
}
|
||||
}
|
||||
@@ -70,10 +70,10 @@ void GlArbSyncEvent::unblockEventBy(Event &event, uint32_t taskLevel, int32_t tr
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->getSharing<OCLRT::GLSharingFunctions>()->glArbSyncObjectSignal(event.getCommandQueue()->getCommandStreamReceiver().getOsContext(), *glSyncInfo);
|
||||
ctx->getSharing<OCLRT::GLSharingFunctions>()->glArbSyncObjectWaitServer(*osInterface, *glSyncInfo);
|
||||
ctx->getSharing<NEO::GLSharingFunctions>()->glArbSyncObjectSignal(event.getCommandQueue()->getCommandStreamReceiver().getOsContext(), *glSyncInfo);
|
||||
ctx->getSharing<NEO::GLSharingFunctions>()->glArbSyncObjectWaitServer(*osInterface, *glSyncInfo);
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
extern "C" CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMarkerWithSyncObjectINTEL(cl_command_queue commandQueue,
|
||||
@@ -94,7 +94,7 @@ clGetCLEventInfoINTEL(cl_event event, PCL_GL_SYNC_INFO *pSyncInfoHandleRet, cl_c
|
||||
return CL_INVALID_ARG_VALUE;
|
||||
}
|
||||
|
||||
auto neoEvent = OCLRT::castToObject<OCLRT::Event>(event);
|
||||
auto neoEvent = NEO::castToObject<NEO::Event>(event);
|
||||
if (nullptr == neoEvent) {
|
||||
return CL_INVALID_EVENT;
|
||||
}
|
||||
@@ -105,12 +105,12 @@ clGetCLEventInfoINTEL(cl_event event, PCL_GL_SYNC_INFO *pSyncInfoHandleRet, cl_c
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
auto sharing = neoEvent->getContext()->getSharing<OCLRT::GLSharingFunctions>();
|
||||
auto sharing = neoEvent->getContext()->getSharing<NEO::GLSharingFunctions>();
|
||||
if (sharing == nullptr) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
OCLRT::GlArbSyncEvent *arbSyncEvent = sharing->getOrCreateGlArbSyncEvent(*neoEvent);
|
||||
NEO::GlArbSyncEvent *arbSyncEvent = sharing->getOrCreateGlArbSyncEvent(*neoEvent);
|
||||
if (nullptr == arbSyncEvent) {
|
||||
return CL_OUT_OF_RESOURCES;
|
||||
}
|
||||
@@ -125,12 +125,12 @@ clGetCLEventInfoINTEL(cl_event event, PCL_GL_SYNC_INFO *pSyncInfoHandleRet, cl_c
|
||||
|
||||
extern "C" CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseGlSharedEventINTEL(cl_event event) {
|
||||
auto neoEvent = OCLRT::castToObject<OCLRT::Event>(event);
|
||||
auto neoEvent = NEO::castToObject<NEO::Event>(event);
|
||||
if (nullptr == neoEvent) {
|
||||
return CL_INVALID_EVENT;
|
||||
}
|
||||
auto arbSyncEvent = neoEvent->getContext()->getSharing<OCLRT::GLSharingFunctions>()->getGlArbSyncEvent(*neoEvent);
|
||||
neoEvent->getContext()->getSharing<OCLRT::GLSharingFunctions>()->removeGlArbSyncEventMapping(*neoEvent);
|
||||
auto arbSyncEvent = neoEvent->getContext()->getSharing<NEO::GLSharingFunctions>()->getGlArbSyncEvent(*neoEvent);
|
||||
neoEvent->getContext()->getSharing<NEO::GLSharingFunctions>()->removeGlArbSyncEventMapping(*neoEvent);
|
||||
if (nullptr != arbSyncEvent) {
|
||||
arbSyncEvent->release();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
struct _tagCLGLSyncInfo;
|
||||
typedef _tagCLGLSyncInfo CL_GL_SYNC_INFO;
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class GLSharingFunctions;
|
||||
class OsInterface;
|
||||
@@ -46,7 +46,7 @@ class GlArbSyncEvent : public Event {
|
||||
OSInterface *osInterface = nullptr;
|
||||
std::unique_ptr<CL_GL_SYNC_INFO> glSyncInfo;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
extern "C" CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMarkerWithSyncObjectINTEL(cl_command_queue commandQueue,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
Buffer *GlBuffer::createSharedGlBuffer(Context *context, cl_mem_flags flags, unsigned int bufferId, cl_int *errcodeRet) {
|
||||
ErrorCodeHelper errorCode(errcodeRet, CL_SUCCESS);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
struct _tagCLGLBufferInfo;
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Buffer;
|
||||
class Context;
|
||||
|
||||
@@ -34,4 +34,4 @@ class GlBuffer : public GlSharing {
|
||||
|
||||
static GraphicsAllocation *createGraphicsAllocation(Context *context, unsigned int bufferId, _tagCLGLBufferInfo &bufferInfo);
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "GL/gl.h"
|
||||
#include "config.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
bool GlTexture::setClImageFormat(int glFormat, cl_image_format &clImgFormat) {
|
||||
switch (glFormat) {
|
||||
case GL_RGBA8:
|
||||
@@ -198,4 +198,4 @@ bool GlTexture::setClImageFormat(int glFormat, cl_image_format &clImgFormat) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "runtime/sharings/gl/gl_sharing.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
GLContextGuard::GLContextGuard(GLSharingFunctions &sharingFcns) : sharingFunctions(&sharingFcns) {
|
||||
currentContextHandle = sharingFcns.getCurrentContext();
|
||||
currentDisplayHandle = sharingFcns.getCurrentDisplay();
|
||||
@@ -31,4 +31,4 @@ GLContextGuard::~GLContextGuard() {
|
||||
sharingFunctions->makeCurrent(currentContextHandle, currentDisplayHandle);
|
||||
}
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "runtime/sharings/gl/gl_arb_sync_event.h"
|
||||
#include "runtime/sharings/sharing_factory.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
const uint32_t GLSharingFunctions::sharingId = SharingType::CLGL_SHARING;
|
||||
|
||||
int GlSharing::synchronizeHandler(UpdateData &updateData) {
|
||||
@@ -65,4 +65,4 @@ char *createArbSyncEventName() {
|
||||
}
|
||||
|
||||
void destroyArbSyncEventName(char *name) { delete[] name; }
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
struct _tagCLGLSyncInfo;
|
||||
typedef struct _tagCLGLSyncInfo CL_GL_SYNC_INFO, *PCL_GL_SYNC_INFO;
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Event;
|
||||
class GlArbSyncEvent;
|
||||
class GLSharingFunctions;
|
||||
@@ -284,4 +284,4 @@ class GLContextGuard {
|
||||
GLDisplay currentDisplayHandle;
|
||||
};
|
||||
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "runtime/sharings/gl/gl_sharing.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
GlSyncEvent::GlSyncEvent(Context &context, const GL_CL_SYNC_INFO &sync)
|
||||
: Event(&context, nullptr, CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR, eventNotReady, eventNotReady), glSync(new GL_CL_SYNC_INFO(sync)) {
|
||||
transitionExecutionStatus(CL_SUBMITTED);
|
||||
@@ -57,4 +57,4 @@ uint32_t GlSyncEvent::getTaskLevel() {
|
||||
}
|
||||
return Event::eventNotReady;
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,7 +13,7 @@
|
||||
struct _tagGLCLSyncInfo;
|
||||
typedef _tagGLCLSyncInfo GL_CL_SYNC_INFO;
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
|
||||
class GlSyncEvent : public Event {
|
||||
@@ -31,4 +31,4 @@ class GlSyncEvent : public Event {
|
||||
protected:
|
||||
std::unique_ptr<GL_CL_SYNC_INFO> glSync;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "config.h"
|
||||
#include <GL/gl.h>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture,
|
||||
cl_int *errcodeRet) {
|
||||
ErrorCodeHelper errorCode(errcodeRet, CL_INVALID_GL_OBJECT);
|
||||
@@ -243,4 +243,4 @@ void GlTexture::releaseResource(MemObj *memObject) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "CL/cl_gl.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class Image;
|
||||
class GlTexture : GlSharing {
|
||||
@@ -43,4 +43,4 @@ class GlTexture : GlSharing {
|
||||
cl_GLint miplevel;
|
||||
CL_GL_RESOURCE_INFO textureInfo;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
bool GlSharingContextBuilder::processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue,
|
||||
cl_int &errcodeRet) {
|
||||
@@ -101,4 +101,4 @@ std::string GlSharingBuilderFactory::getExtensions() {
|
||||
void *GlSharingBuilderFactory::getExtensionFunctionAddress(const std::string &functionName) { return nullptr; }
|
||||
|
||||
static SharingFactory::RegisterSharing<GlSharingBuilderFactory, GLSharingFunctions> glSharing;
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
int SharingHandler::acquire(MemObj *memObj) {
|
||||
if (acquireCount == 0) {
|
||||
@@ -58,4 +58,4 @@ void SharingHandler::release(MemObj *memObject) {
|
||||
releaseResource(memObject);
|
||||
}
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "runtime/memory_manager/graphics_allocation.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class MemObj;
|
||||
|
||||
@@ -50,4 +50,4 @@ class SharingHandler {
|
||||
virtual void releaseResource(MemObj *memObject){};
|
||||
unsigned int acquireCount = 0u;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "sharing_factory.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
std::unique_ptr<SharingFactory> SharingFactory::build() {
|
||||
std::unique_ptr<SharingFactory> res(new SharingFactory());
|
||||
@@ -71,4 +71,4 @@ SharingBuilderFactory *SharingFactory::sharingContextBuilder[SharingType::MAX_SH
|
||||
nullptr,
|
||||
};
|
||||
SharingFactory sharingFactory;
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
|
||||
enum SharingType {
|
||||
@@ -61,4 +61,4 @@ class SharingFactory {
|
||||
};
|
||||
|
||||
extern SharingFactory sharingFactory;
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,10 +8,10 @@
|
||||
#pragma once
|
||||
#include "runtime/sharings/sharing_factory.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
template <typename F, typename T>
|
||||
SharingFactory::RegisterSharing<F, T>::RegisterSharing() {
|
||||
sharingContextBuilder[T::sharingId] = new F;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace OCLRT;
|
||||
using namespace NEO;
|
||||
|
||||
cl_mem CL_API_CALL
|
||||
clCreateFromVA_APIMediaSurfaceINTEL(cl_context context, cl_mem_flags flags, VASurfaceID *surface,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
|
||||
bool VaSharingContextBuilder::processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue, cl_int &errcodeRet) {
|
||||
if (contextData.get() == nullptr) {
|
||||
@@ -84,5 +84,5 @@ void *VaSharingBuilderFactory::getExtensionFunctionAddress(const std::string &fu
|
||||
}
|
||||
|
||||
static SharingFactory::RegisterSharing<VaSharingBuilderFactory, VASharingFunctions> vaSharing;
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
|
||||
struct VaCreateContextProperties {
|
||||
@@ -35,4 +35,4 @@ class VaSharingBuilderFactory : public SharingBuilderFactory {
|
||||
void fillGlobalDispatchTable() override;
|
||||
void *getExtensionFunctionAddress(const std::string &functionName) override;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "runtime/sharings/va/va_sharing_defines.h"
|
||||
#include "runtime/sharings/va/va_sharing_functions.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
const uint32_t VASharingFunctions::sharingId = SharingType::VA_SHARING;
|
||||
|
||||
template VASharingFunctions *Context::getSharing<VASharingFunctions>();
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2018 Intel Corporation
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "runtime/sharings/va/va_sharing_defines.h"
|
||||
#include "runtime/sharings/va/va_sharing_functions.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class VASharing : public SharingHandler {
|
||||
public:
|
||||
VASharing(VASharingFunctions *sharingFunctions, VAImageID imageId)
|
||||
@@ -22,4 +22,4 @@ class VASharing : public SharingHandler {
|
||||
VASharingFunctions *sharingFunctions = nullptr;
|
||||
VAImageID imageId;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Os {
|
||||
extern const char *libvaDllName;
|
||||
}
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
std::function<void *(const char *, int)> VASharingFunctions::fdlopen = dlopen;
|
||||
std::function<void *(void *handle, const char *symbol)> VASharingFunctions::fdlsym = dlsym;
|
||||
std::function<int(void *handle)> VASharingFunctions::fdlclose = dlclose;
|
||||
@@ -60,4 +60,4 @@ void VASharingFunctions::initFunctions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class VASharingFunctions : public SharingFunctions {
|
||||
public:
|
||||
VASharingFunctions(VADisplay vaDisplay);
|
||||
@@ -66,4 +66,4 @@ class VASharingFunctions : public SharingFunctions {
|
||||
VAExtGetSurfaceHandlePFN vaExtGetSurfaceHandlePFN;
|
||||
VAGetLibFuncPFN vaGetLibFuncPFN;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "runtime/mem_obj/image.h"
|
||||
#include "runtime/memory_manager/memory_manager.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
Image *VASurface::createSharedVaSurface(Context *context, VASharingFunctions *sharingFunctions,
|
||||
cl_mem_flags flags, VASurfaceID *surface,
|
||||
cl_uint plane, cl_int *errcodeRet) {
|
||||
@@ -97,4 +97,4 @@ void VASurface::getMemObjectInfo(size_t ¶mValueSize, void *¶mValue) {
|
||||
paramValue = &surfaceId;
|
||||
}
|
||||
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "runtime/mem_obj/image.h"
|
||||
#include "runtime/sharings/va/va_sharing.h"
|
||||
|
||||
namespace OCLRT {
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class Image;
|
||||
|
||||
@@ -32,4 +32,4 @@ class VASurface : VASharing {
|
||||
VASurfaceID *surfaceId;
|
||||
bool interopUserSync;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user