Files
compute-runtime/opencl/source/sharings/d3d/enable_d3d.h
Slawomir Milczarek 9022912a6d Check for image support in VA media sharing
Related-To: NEO-4473

Change-Id: I6015d67215267b1dcde1e885cf3696af10ea5e7d
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2020-03-31 07:29:13 +02:00

44 lines
1.2 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "opencl/source/sharings/sharing_factory.h"
#include <memory>
namespace NEO {
class Context;
class DriverInfo;
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(DriverInfo *driverInfo) override;
void fillGlobalDispatchTable() override;
void *getExtensionFunctionAddress(const std::string &functionName) override;
void setExtensionEnabled(DriverInfo *driverInfo) override;
bool extensionEnabled = true;
};
} // namespace NEO