Files
compute-runtime/shared/test/common/test_macros/test_checks_shared.h
Bellekallu Rajkiran 286f973d0c feature(sysman): Add support for Memory properties & state for iGPU's in Linux
Related-To: NEO-14198, NEO-15464

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
2025-10-01 09:46:43 +02:00

68 lines
2.1 KiB
C++

/*
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/constants.h"
#include <memory>
namespace NEO {
class Device;
struct HardwareInfo;
struct RootDeviceEnvironment;
namespace TestChecks {
bool supportsBlitter(const RootDeviceEnvironment &rootDeviceEnvironment);
bool fullySupportsBlitter(const RootDeviceEnvironment &rootDeviceEnvironment);
bool allowsDcFlush(const Device *device);
bool supportsImages(const HardwareInfo &hardwareInfo);
bool supportsImages(const std::unique_ptr<HardwareInfo> &pHardwareInfo);
bool isIntegrated(const HardwareInfo &hardwareInfo);
} // namespace TestChecks
} // namespace NEO
#define REQUIRE_32BIT_OR_SKIP() \
if constexpr (::is64bit == true) { \
GTEST_SKIP(); \
}
#define REQUIRE_64BIT_OR_SKIP() \
if constexpr (::is64bit == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_BLITTER_OR_SKIP(param) \
if (NEO::TestChecks::supportsBlitter(param) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_DC_FLUSH_OR_SKIP(param) \
if (NEO::TestChecks::allowsDcFlush(param) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_FULL_BLITTER_OR_SKIP(param) \
if (NEO::TestChecks::fullySupportsBlitter(param) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_IMAGES_OR_SKIP(param) \
if (NEO::TestChecks::supportsImages(param) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_INTEGRATED_DEVICE_OR_SKIP(hwInfoParam) \
if (NEO::TestChecks::isIntegrated(hwInfoParam) == false) { \
GTEST_SKIP(); \
}
#define REQUIRE_DISCRETE_DEVICE_OR_SKIP(hwInfoParam) \
if (NEO::TestChecks::isIntegrated(hwInfoParam) == true) { \
GTEST_SKIP(); \
}