2020-03-24 19:17:13 +08:00
|
|
|
/*
|
2025-05-07 19:03:46 +08:00
|
|
|
* Copyright (C) 2020-2025 Intel Corporation
|
2020-03-24 19:17:13 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2021-05-24 21:49:09 +08:00
|
|
|
#include "shared/source/helpers/constants.h"
|
|
|
|
|
2020-03-24 19:17:13 +08:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
class Device;
|
|
|
|
struct HardwareInfo;
|
2023-01-09 21:30:43 +08:00
|
|
|
struct RootDeviceEnvironment;
|
2020-03-24 19:17:13 +08:00
|
|
|
|
|
|
|
namespace TestChecks {
|
2023-01-20 22:30:59 +08:00
|
|
|
bool supportsBlitter(const RootDeviceEnvironment &rootDeviceEnvironment);
|
2023-01-09 21:30:43 +08:00
|
|
|
bool fullySupportsBlitter(const RootDeviceEnvironment &rootDeviceEnvironment);
|
2020-11-25 22:11:11 +08:00
|
|
|
bool supportsImages(const HardwareInfo &hardwareInfo);
|
|
|
|
bool supportsImages(const std::unique_ptr<HardwareInfo> &pHardwareInfo);
|
2020-03-24 19:17:13 +08:00
|
|
|
} // namespace TestChecks
|
|
|
|
|
|
|
|
} // namespace NEO
|
|
|
|
|
2021-05-24 21:49:09 +08:00
|
|
|
#define REQUIRE_32BIT_OR_SKIP() \
|
|
|
|
if constexpr (::is64bit == true) { \
|
|
|
|
GTEST_SKIP(); \
|
2020-12-11 21:01:39 +08:00
|
|
|
}
|
|
|
|
|
2021-05-24 21:49:09 +08:00
|
|
|
#define REQUIRE_64BIT_OR_SKIP() \
|
|
|
|
if constexpr (::is64bit == false) { \
|
|
|
|
GTEST_SKIP(); \
|
2020-11-25 22:11:11 +08:00
|
|
|
}
|
|
|
|
|
2025-05-07 19:03:46 +08:00
|
|
|
#define REQUIRE_SVM_OR_SKIP(param) (void)param
|
2020-09-30 22:58:20 +08:00
|
|
|
|
|
|
|
#define REQUIRE_BLITTER_OR_SKIP(param) \
|
|
|
|
if (NEO::TestChecks::supportsBlitter(param) == false) { \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
}
|
2020-11-25 22:11:11 +08:00
|
|
|
|
2021-10-28 04:22:31 +08:00
|
|
|
#define REQUIRE_FULL_BLITTER_OR_SKIP(param) \
|
|
|
|
if (NEO::TestChecks::fullySupportsBlitter(param) == false) { \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
}
|
|
|
|
|
2020-11-25 22:11:11 +08:00
|
|
|
#define REQUIRE_IMAGES_OR_SKIP(param) \
|
|
|
|
if (NEO::TestChecks::supportsImages(param) == false) { \
|
|
|
|
GTEST_SKIP(); \
|
|
|
|
}
|