mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
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>
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
/*
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "runtime/sharings/gl/gl_sharing.h"
|
|
#include "runtime/sharings/sharing_factory.h"
|
|
|
|
#include <memory>
|
|
|
|
namespace OCLRT {
|
|
class Context;
|
|
|
|
struct GlCreateContextProperties {
|
|
GLType GLHDCType = 0;
|
|
GLContext GLHGLRCHandle = 0;
|
|
GLDisplay GLHDCHandle = 0;
|
|
};
|
|
|
|
class GlSharingContextBuilder : public SharingContextBuilder {
|
|
protected:
|
|
std::unique_ptr<GlCreateContextProperties> contextData;
|
|
|
|
public:
|
|
bool processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue, cl_int &errcodeRet) override;
|
|
bool finalizeProperties(Context &context, int32_t &errcodeRet) override;
|
|
};
|
|
|
|
class GlSharingBuilderFactory : public SharingBuilderFactory {
|
|
public:
|
|
std::unique_ptr<SharingContextBuilder> createContextBuilder() override;
|
|
std::string getExtensions() override;
|
|
void fillGlobalDispatchTable() override;
|
|
void *getExtensionFunctionAddress(const std::string &functionName) override;
|
|
};
|
|
} // namespace OCLRT
|