Files
compute-runtime/runtime/sharings/d3d/d3d_texture.h
Mateusz Hoppe 81e9591c31 Refactor ImageInfo 2/n
Change-Id: I5e6081a75b802cc98fd89e384d550a219353728b
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-01-10 14:20:31 +01:00

37 lines
1.2 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/sharings/d3d/d3d_sharing.h"
namespace NEO {
class Context;
class Image;
template <typename D3D>
class D3DTexture : public D3DSharing<D3D> {
typedef typename D3D::D3DTexture2dDesc D3DTexture2dDesc;
typedef typename D3D::D3DTexture3dDesc D3DTexture3dDesc;
typedef typename D3D::D3DTexture2d D3DTexture2d;
typedef typename D3D::D3DTexture3d D3DTexture3d;
typedef typename D3D::D3DResource D3DResource;
public:
~D3DTexture() override = default;
static Image *create2d(Context *context, D3DTexture2d *d3dTexture, cl_mem_flags flags, cl_uint subresource, cl_int *retCode);
static Image *create3d(Context *context, D3DTexture3d *d3dTexture, cl_mem_flags flags, cl_uint subresource, cl_int *retCode);
static const ClSurfaceFormatInfo *findYuvSurfaceFormatInfo(DXGI_FORMAT dxgiFormat, ImagePlane imagePlane, cl_mem_flags flags);
protected:
D3DTexture(Context *context, D3DResource *d3dTexture, cl_uint subresource, D3DResource *textureStaging, bool sharedResource)
: D3DSharing(context, d3dTexture, textureStaging, subresource, sharedResource){};
};
} // namespace NEO