2020-03-24 12:17:13 +01:00
|
|
|
/*
|
2022-01-11 15:45:49 +00:00
|
|
|
* Copyright (C) 2020-2022 Intel Corporation
|
2020-03-24 12:17:13 +01:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-04-28 13:00:33 +02:00
|
|
|
#include <memory>
|
|
|
|
|
2020-03-24 12:17:13 +01:00
|
|
|
namespace NEO {
|
|
|
|
class ClDevice;
|
2020-04-21 13:45:26 +02:00
|
|
|
class Context;
|
2020-04-28 13:00:33 +02:00
|
|
|
struct HardwareInfo;
|
2022-11-15 00:46:56 +00:00
|
|
|
struct RootDeviceEnvironment;
|
2020-03-24 12:17:13 +01:00
|
|
|
|
|
|
|
namespace TestChecks {
|
|
|
|
bool supportsSvm(const ClDevice *pClDevice);
|
2020-04-21 13:45:26 +02:00
|
|
|
bool supportsImages(const Context *pContext);
|
2020-09-11 10:54:46 +02:00
|
|
|
bool supportsOcl21(const std::unique_ptr<HardwareInfo> &pHardwareInfo);
|
2020-04-29 14:51:40 +02:00
|
|
|
bool supportsPipes(const ClDevice *pClDevice);
|
2022-11-15 00:46:56 +00:00
|
|
|
bool supportsAuxResolves(const RootDeviceEnvironment &rootDeviceEnvironment);
|
2020-03-24 12:17:13 +01:00
|
|
|
} // namespace TestChecks
|
|
|
|
|
|
|
|
} // namespace NEO
|
|
|
|
|
2021-01-21 13:10:13 +01:00
|
|
|
#include "shared/test/common/test_macros/test_checks_shared.h"
|
2020-04-21 13:45:26 +02:00
|
|
|
|
2020-05-25 10:21:04 +02:00
|
|
|
#define REQUIRE_IMAGE_SUPPORT_OR_SKIP(param) \
|
|
|
|
auto hwInfo = castToObject<Context>(param)->getDevice(0)->getHardwareInfo(); \
|
|
|
|
if (!hwInfo.capabilityTable.supportsImages) { \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
}
|
|
|
|
|
2020-04-22 14:03:42 +02:00
|
|
|
#define REQUIRE_OCL_21_OR_SKIP(param) \
|
|
|
|
if (NEO::TestChecks::supportsOcl21(param) == false) { \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
}
|
2020-04-28 13:00:33 +02:00
|
|
|
|
2022-11-15 00:46:56 +00:00
|
|
|
#define REQUIRE_AUX_RESOLVES(rootDeviceEnvironment) \
|
|
|
|
if (NEO::TestChecks::supportsAuxResolves(rootDeviceEnvironment) == false) { \
|
|
|
|
GTEST_SKIP(); \
|
2020-10-03 23:11:39 +02:00
|
|
|
}
|