Correct useSystemMemoryPlacementForISA

Related-To: NEO-5156
Change-Id: Iee6df3e06eea5707b3b6cb45ac50e9880ee4dfb4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-10-14 15:40:57 +02:00
committed by sys_ocldev
parent 21988a81e1
commit fd492f28b0
2 changed files with 16 additions and 3 deletions

View File

@@ -1011,13 +1011,26 @@ TEST(HwInfoConfigCommonHelperTest, givenBlitterPreferenceWhenEnablingBlitterOper
}
HWTEST_F(HwHelperTest, givenHwHelperWhenAskingForIsaSystemMemoryPlacementThenReturnFalseIfLocalMemorySupported) {
DebugManagerStateRestore restorer;
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
hardwareInfo.featureTable.ftrLocalMemory = true;
EXPECT_FALSE(hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
auto localMemoryEnabled = hwHelper.getEnableLocalMemory(hardwareInfo);
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
hardwareInfo.featureTable.ftrLocalMemory = false;
EXPECT_TRUE(hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
localMemoryEnabled = hwHelper.getEnableLocalMemory(hardwareInfo);
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
DebugManager.flags.EnableLocalMemory.set(true);
hardwareInfo.featureTable.ftrLocalMemory = false;
localMemoryEnabled = hwHelper.getEnableLocalMemory(hardwareInfo);
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
DebugManager.flags.EnableLocalMemory.set(false);
hardwareInfo.featureTable.ftrLocalMemory = true;
localMemoryEnabled = hwHelper.getEnableLocalMemory(hardwareInfo);
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
}
TEST(HwInfoConfigCommonHelperTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag) {