Files
compute-runtime/opencl/source/sharings/d3d/enable_d3d.h
kamdiedrich fa8e720f9e Reorganization directory structure [1/n]
Change-Id: Id1a94577437a4826a32411869f516fec20314ec0
2020-02-22 21:56:09 +01:00

41 lines
1.1 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "sharings/sharing_factory.h"
#include <memory>
namespace NEO {
class Context;
template <typename D3D>
struct D3DCreateContextProperties {
typename D3D::D3DDevice *pDevice = nullptr;
bool argumentsDefined = false;
};
template <typename D3D>
class D3DSharingContextBuilder : public SharingContextBuilder {
protected:
std::unique_ptr<D3DCreateContextProperties<D3D>> contextData;
public:
bool processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue, cl_int &errcodeRet) override;
bool finalizeProperties(Context &context, int32_t &errcodeRet) override;
};
template <typename D3D>
class D3DSharingBuilderFactory : public SharingBuilderFactory {
public:
std::unique_ptr<SharingContextBuilder> createContextBuilder() override;
std::string getExtensions() override;
void fillGlobalDispatchTable() override;
void *getExtensionFunctionAddress(const std::string &functionName) override;
};
} // namespace NEO