2020-05-05 16:10:30 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2021 Intel Corporation
|
2020-05-05 16:10:30 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/fixtures/device_fixture.h"
|
2021-12-15 01:40:08 +08:00
|
|
|
#include "shared/test/common/test_macros/test.h"
|
2020-05-05 16:10:30 +08:00
|
|
|
|
|
|
|
using namespace NEO;
|
|
|
|
|
2020-10-15 15:19:43 +08:00
|
|
|
typedef Test<DeviceFixture> HwHelperTest;
|
2020-05-05 16:10:30 +08:00
|
|
|
|
|
|
|
HWTEST_F(HwHelperTest, GivenHwInfoWithEnabledBliterWhenCheckCopyEnginesCountThenReturnedOne) {
|
|
|
|
HardwareInfo hwInfo{};
|
|
|
|
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
|
|
|
EXPECT_EQ(HwHelper::getCopyEnginesCount(hwInfo), 1u);
|
|
|
|
}
|
|
|
|
|
|
|
|
HWTEST_F(HwHelperTest, GivenHwInfoWithDisabledBliterWhenCheckCopyEnginesCountThenReturnedZero) {
|
|
|
|
HardwareInfo hwInfo{};
|
|
|
|
hwInfo.capabilityTable.blitterOperationsSupported = false;
|
|
|
|
EXPECT_EQ(HwHelper::getCopyEnginesCount(hwInfo), 0u);
|
|
|
|
}
|