Debian Codegraph @

opencl/source/sharings/d3d/enable_d3d.h

raw
1 /*
2 * Copyright (C) 2018-2021 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9
10 #include "opencl/source/sharings/sharing_factory.h"
11
12 #include <memory>
13
14 namespace NEO {
15 class Context;
16 class DriverInfo;
17
18 template <typename D3D>
19 struct D3DCreateContextProperties {
20 typename D3D::D3DDevice *pDevice = nullptr;
21 bool argumentsDefined = false;
22 };
23
24 template <typename D3D>
25 class D3DSharingContextBuilder : public SharingContextBuilder {
26 protected:
27 std::unique_ptr<D3DCreateContextProperties<D3D>> contextData;
28
29 public:
30 bool processProperties(cl_context_properties &propertyType, cl_context_properties &propertyValue) override;
31 bool finalizeProperties(Context &context, int32_t &errcodeRet) override;
32 };
33
34 template <typename D3D>
35 class D3DSharingBuilderFactory : public SharingBuilderFactory {
36 public:
37 std::unique_ptr<SharingContextBuilder> createContextBuilder() override;
38 std::string getExtensions(DriverInfo *driverInfo) override;
39 void fillGlobalDispatchTable() override;
40 void *getExtensionFunctionAddress(const std::string &functionName) override;
41 void setExtensionEnabled(DriverInfo *driverInfo) override;
42 bool extensionEnabled = true;
43 };
44 } // namespace NEO