Debian Codegraph @

opencl/source/sharings/d3d/d3d_texture.h

raw
1 /*
2 * Copyright (C) 2018-2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #pragma once
9 #include "opencl/source/sharings/d3d/d3d_sharing.h"
10
11 namespace NEO {
12 class Context;
13 class Image;
14
15 template <typename D3D>
16 class D3DTexture : public D3DSharing<D3D> {
17 typedef typename D3D::D3DTexture2dDesc D3DTexture2dDesc;
18 typedef typename D3D::D3DTexture3dDesc D3DTexture3dDesc;
19 typedef typename D3D::D3DTexture2d D3DTexture2d;
20 typedef typename D3D::D3DTexture3d D3DTexture3d;
21 typedef typename D3D::D3DResource D3DResource;
22
23 public:
24 ~D3DTexture() override = default;
25
26 static Image *create2d(Context *context, D3DTexture2d *d3dTexture, cl_mem_flags flags, cl_uint subresource, cl_int *retCode);
27
28 static Image *create3d(Context *context, D3DTexture3d *d3dTexture, cl_mem_flags flags, cl_uint subresource, cl_int *retCode);
29
30 static const ClSurfaceFormatInfo *findYuvSurfaceFormatInfo(DXGI_FORMAT dxgiFormat, ImagePlane imagePlane, cl_mem_flags flags);
31
32 protected:
33 D3DTexture(Context *context, D3DResource *d3dTexture, cl_uint subresource, D3DResource *textureStaging, bool sharedResource)
34 : D3DSharing<D3D>(context, d3dTexture, textureStaging, subresource, sharedResource){};
35 };
36 } // namespace NEO