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) { HWTEST_F(HwHelperTest, givenHwHelperWhenAskingForIsaSystemMemoryPlacementThenReturnFalseIfLocalMemorySupported) {
DebugManagerStateRestore restorer;
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily); HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
hardwareInfo.featureTable.ftrLocalMemory = true; hardwareInfo.featureTable.ftrLocalMemory = true;
EXPECT_FALSE(hwHelper.useSystemMemoryPlacementForISA(hardwareInfo)); auto localMemoryEnabled = hwHelper.getEnableLocalMemory(hardwareInfo);
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
hardwareInfo.featureTable.ftrLocalMemory = false; 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) { TEST(HwInfoConfigCommonHelperTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag) {

View File

@ -517,7 +517,7 @@ bool HwHelperHw<GfxFamily>::useOnlyGlobalTimestamps() const {
template <typename GfxFamily> template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::useSystemMemoryPlacementForISA(const HardwareInfo &hwInfo) const { bool HwHelperHw<GfxFamily>::useSystemMemoryPlacementForISA(const HardwareInfo &hwInfo) const {
return !hwInfo.featureTable.ftrLocalMemory; return !getEnableLocalMemory(hwInfo);
} }
template <typename GfxFamily> template <typename GfxFamily>