Revert "Remove not needed hwHelper"

This reverts commit 0d11b51c6b.

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2021-08-09 10:14:15 +00:00
committed by Compute-Runtime-Automation
parent 82a5472422
commit 0845a3b34b
5 changed files with 28 additions and 3 deletions

View File

@ -351,9 +351,18 @@ TEST_F(GmmTests, givenNonZeroRowPitchWhenQueryImgFromBufferParamsThenUseUserValu
EXPECT_EQ(imgInfo.rowPitch, expectedRowPitch);
}
using GmmCanonizeTests = GmmTests;
struct GmmTestsCanonize : public GmmTests {
void SetUp() override {
uint32_t addressWidth = 48u;
HwHelper::get(renderCoreFamily).adjustAddressWidthForCanonize(addressWidth);
if (addressWidth != 48u) {
GTEST_SKIP();
}
GmmTests::SetUp();
}
};
TEST_F(GmmCanonizeTests, WhenCanonizingThenCorrectAddressIsReturned) {
TEST_F(GmmTestsCanonize, WhenCanonizingThenCorrectAddressIsReturned) {
auto hwInfo = *defaultHwInfo;
// 48 bit - canonize to 48 bit
@ -376,7 +385,7 @@ TEST_F(GmmCanonizeTests, WhenCanonizingThenCorrectAddressIsReturned) {
EXPECT_EQ(GmmHelper::canonize(testAddr2), goodAddr2);
}
TEST_F(GmmCanonizeTests, WhenDecanonizingThenCorrectAddressIsReturned) {
TEST_F(GmmTestsCanonize, WhenDecanonizingThenCorrectAddressIsReturned) {
auto hwInfo = *defaultHwInfo;
// 48 bit - decanonize to 48 bit

View File

@ -1158,6 +1158,14 @@ HWTEST_F(HwHelperTest, givenHwHelperWhenAskingForIsaSystemMemoryPlacementThenRet
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
}
HWTEST_F(HwHelperTest, givenHwHelperWhenAdjustAddressWidthForCanonizeThenAddressWidthDoesntChange) {
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
uint32_t addressWidth = 48;
hwHelper.adjustAddressWidthForCanonize(addressWidth);
EXPECT_EQ(48u, addressWidth);
}
TEST_F(HwHelperTest, givenInvalidEngineTypeWhenGettingEngineGroupTypeThenThrow) {
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_ANY_THROW(hwHelper.getEngineGroupType(aub_stream::EngineType::NUM_ENGINES, hardwareInfo));