mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Remove unused macro SUPPORT_YUV
Change-Id: Ia8daebf2a0193005c6172510ab1206c437e2dd45 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a7f6697f17
commit
2be79fd579
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -170,7 +170,6 @@ const SurfaceFormatInfo SurfaceFormats::readWriteSurfaceFormats[] = {
|
||||
{{CL_RGBA, CL_SNORM_INT16}, GMM_FORMAT_R16G16B16A16_SNORM_TYPE, GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SNORM , 0, 4, 2, 8},
|
||||
};
|
||||
|
||||
#if SUPPORT_YUV
|
||||
const SurfaceFormatInfo SurfaceFormats::packedYuvSurfaceFormats[] = {
|
||||
{{CL_YUYV_INTEL, CL_UNORM_INT8}, GMM_FORMAT_YUY2, GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL , 0, 2, 1, 2},
|
||||
{{CL_UYVY_INTEL, CL_UNORM_INT8}, GMM_FORMAT_UYVY, GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY , 0, 2, 1, 2},
|
||||
@@ -182,8 +181,6 @@ const SurfaceFormatInfo SurfaceFormats::planarYuvSurfaceFormats[] = {
|
||||
{{CL_NV12_INTEL, CL_UNORM_INT8}, GMM_FORMAT_NV12, GFX3DSTATE_SURFACEFORMAT_NV12 , 0, 1, 1, 1}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
const SurfaceFormatInfo SurfaceFormats::readOnlyDepthSurfaceFormats[] = {
|
||||
{{ CL_DEPTH, CL_FLOAT}, GMM_FORMAT_R32_FLOAT_TYPE, GFX3DSTATE_SURFACEFORMAT_R32_FLOAT , 0, 1, 4, 4},
|
||||
{{ CL_DEPTH, CL_UNORM_INT16}, GMM_FORMAT_R16_UNORM_TYPE, GFX3DSTATE_SURFACEFORMAT_R16_UNORM , 0, 1, 2, 2},
|
||||
@@ -209,19 +206,11 @@ ArrayRef<const SurfaceFormatInfo> SurfaceFormats::readWrite() noexcept {
|
||||
}
|
||||
|
||||
ArrayRef<const SurfaceFormatInfo> SurfaceFormats::packedYuv() noexcept {
|
||||
#if SUPPORT_YUV
|
||||
return ArrayRef<const SurfaceFormatInfo>(packedYuvSurfaceFormats);
|
||||
#else
|
||||
return ArrayRef<const SurfaceFormatInfo>();
|
||||
#endif
|
||||
}
|
||||
|
||||
ArrayRef<const SurfaceFormatInfo> SurfaceFormats::planarYuv() noexcept {
|
||||
#if SUPPORT_YUV
|
||||
return ArrayRef<const SurfaceFormatInfo>(planarYuvSurfaceFormats);
|
||||
#else
|
||||
return ArrayRef<const SurfaceFormatInfo>();
|
||||
#endif
|
||||
}
|
||||
|
||||
ArrayRef<const SurfaceFormatInfo> SurfaceFormats::readOnlyDepth() noexcept {
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "CL/cl.h"
|
||||
|
||||
#ifndef SUPPORT_YUV
|
||||
#define SUPPORT_YUV 1
|
||||
#include "CL/cl_ext.h"
|
||||
#endif
|
||||
|
||||
#include "core/gmm_helper/gmm_lib.h"
|
||||
#include "core/utilities/arrayref.h"
|
||||
|
||||
#include "CL/cl.h"
|
||||
|
||||
namespace NEO {
|
||||
enum GFX3DSTATE_SURFACEFORMAT : unsigned short {
|
||||
GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_FLOAT = 0x000,
|
||||
@@ -237,10 +232,9 @@ class SurfaceFormats {
|
||||
static const SurfaceFormatInfo readWriteSurfaceFormats[];
|
||||
static const SurfaceFormatInfo readOnlyDepthSurfaceFormats[];
|
||||
static const SurfaceFormatInfo readWriteDepthSurfaceFormats[];
|
||||
#ifdef SUPPORT_YUV
|
||||
|
||||
static const SurfaceFormatInfo packedYuvSurfaceFormats[];
|
||||
static const SurfaceFormatInfo planarYuvSurfaceFormats[];
|
||||
#endif
|
||||
|
||||
public:
|
||||
static ArrayRef<const SurfaceFormatInfo> readOnly() noexcept;
|
||||
|
||||
@@ -523,10 +523,9 @@ cl_int Image::validateImageFormat(const cl_image_format *imageFormat) {
|
||||
isValidRGBAFormat(imageFormat) ||
|
||||
isValidSRGBFormat(imageFormat) ||
|
||||
isValidARGBFormat(imageFormat) ||
|
||||
isValidDepthStencilFormat(imageFormat);
|
||||
#if SUPPORT_YUV
|
||||
isValidFormat = isValidFormat || isValidYUVFormat(imageFormat);
|
||||
#endif
|
||||
isValidDepthStencilFormat(imageFormat) ||
|
||||
isValidYUVFormat(imageFormat);
|
||||
|
||||
if (isValidFormat) {
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user