Add isMidThreadPreemptionSupported helper

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2021-09-06 16:58:09 +00:00
committed by Compute-Runtime-Automation
parent 4f15365dae
commit 9794bafd91
6 changed files with 28 additions and 2 deletions

View File

@@ -162,6 +162,19 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedForPageTableManagerSupportT
EXPECT_EQ(hwInfoConfig.isPageTableManagerSupported(pInHwInfo), UnitTestHelper<FamilyType>::isPageTableManagerSupported(pInHwInfo));
}
HWTEST_F(HwInfoConfigTest, whenIsMidThreadPreemptionSupportedIsCalledThenCorrectResultIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
auto hwInfo = pInHwInfo;
hwInfo.featureTable.ftrGpGpuMidThreadLevelPreempt = true;
auto midThreadPreemptionSupported = hwInfoConfig.isMidThreadPreemptionSupported(hwInfo);
EXPECT_TRUE(midThreadPreemptionSupported);
hwInfo.featureTable.ftrGpGpuMidThreadLevelPreempt = false;
midThreadPreemptionSupported = hwInfoConfig.isMidThreadPreemptionSupported(hwInfo);
EXPECT_FALSE(midThreadPreemptionSupported);
}
HWTEST_F(HwInfoConfigTest, givenVariousValuesWhenConvertingHwRevIdAndSteppingThenConversionIsCorrect) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);