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