Files
compute-runtime/runtime/helpers/surface_formats.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

47 lines
1.6 KiB
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "core/gmm_helper/gmm_lib.h"
#include "core/helpers/surface_format_info.h"
#include "core/utilities/arrayref.h"
#include "CL/cl.h"
namespace NEO {
struct ClSurfaceFormatInfo {
cl_image_format OCLImageFormat;
SurfaceFormatInfo surfaceFormat;
};
class SurfaceFormats {
private:
static const ClSurfaceFormatInfo readOnlySurfaceFormats[];
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> readOnly() 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) noexcept;
static ArrayRef<const ClSurfaceFormatInfo> surfaceFormats(cl_mem_flags flags, const cl_image_format *imageFormat) noexcept;
};
} // namespace NEO