Files
compute-runtime/opencl/source/helpers/surface_formats.h
Filip Hazubski 8fd40b090d Add supportsOcl21Features value to capability table
Related-To: NEO-4368

Change-Id: If176d3be7c47d9d9ab70beebe664f2d569997501
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2020-05-05 15:02:50 +02:00

49 lines
1.8 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/gmm_helper/gmm_lib.h"
#include "shared/source/helpers/surface_format_info.h"
#include "shared/source/utilities/arrayref.h"
#include "CL/cl.h"
namespace NEO {
struct ClSurfaceFormatInfo {
cl_image_format OCLImageFormat;
SurfaceFormatInfo surfaceFormat;
};
class SurfaceFormats {
private:
static const ClSurfaceFormatInfo readOnlySurfaceFormats12[];
static const ClSurfaceFormatInfo readOnlySurfaceFormats20[];
static const ClSurfaceFormatInfo writeOnlySurfaceFormats[];
static const ClSurfaceFormatInfo readWriteSurfaceFormats[];
static const ClSurfaceFormatInfo readOnlyDepthSurfaceFormats[];
static const ClSurfaceFormatInfo readWriteDepthSurfaceFormats[];
static const ClSurfaceFormatInfo packedYuvSurfaceFormats[];
static const ClSurfaceFormatInfo planarYuvSurfaceFormats[];
public:
static ArrayRef<const ClSurfaceFormatInfo> readOnly12() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> readOnly20() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> writeOnly() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> readWrite() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> packedYuv() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> planarYuv() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> readOnlyDepth() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> readWriteDepth() noexcept;
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, bool supportsOcl20Features) noexcept;
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat, bool supportsOcl20Features) noexcept;
};
} // namespace NEO