Move isDisableOverdispatchAvailable function from HwHelper to HwInfoConfig

Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
This commit is contained in:
Rafal Maziejuk
2021-09-06 10:34:34 +00:00
committed by Compute-Runtime-Automation
parent 7f920139b4
commit 824102dc6c
20 changed files with 79 additions and 65 deletions

View File

@@ -576,7 +576,6 @@ HWTEST2_F(CommandStreamReceiverHwTest, whenProgramVFEStateIsCalledThenCorrectCom
UltDeviceFactory deviceFactory{1, 0};
auto pDevice = deviceFactory.rootDevices[0];
auto pHwInfo = pDevice->getRootDeviceEnvironment().getMutableHardwareInfo();
const auto &hwHelper = HwHelper::get(pHwInfo->platform.eRenderCoreFamily);
const auto &hwInfoConfig = *HwInfoConfig::get(pHwInfo->platform.eProductFamily);
uint8_t memory[1 * KB];
@@ -596,7 +595,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, whenProgramVFEStateIsCalledThenCorrectCom
mockCsr->programVFEState(commandStream, flags, 10);
auto pCommand = reinterpret_cast<CFE_STATE *>(&memory);
auto expectedDisableOverdispatch = hwHelper.isDisableOverdispatchAvailable(*pHwInfo);
auto expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*pHwInfo);
EXPECT_EQ(expectedDisableOverdispatch, pCommand->getComputeOverdispatchDisable());
}
{

View File

@@ -1243,11 +1243,6 @@ HWTEST_F(HwHelperTest, givenHwHelperWhenIsBlitterForImagesSupportedIsCalledThenF
EXPECT_FALSE(helper.isBlitterForImagesSupported(*defaultHwInfo));
}
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isDisableOverdispatchAvailable(*defaultHwInfo));
}
TEST_F(HwHelperTest, WhenGettingIsCpuImageTransferPreferredThenFalseIsReturned) {
REQUIRE_IMAGES_OR_SKIP(defaultHwInfo);
auto &hwHelper = HwHelper::get(renderCoreFamily);

View File

@@ -228,3 +228,8 @@ HWTEST_F(HwInfoConfigTest, whenCallingGetDeviceMemoryNameThenDdrIsReturned) {
auto deviceMemoryName = hwInfoConfig.getDeviceMemoryName();
EXPECT_THAT(deviceMemoryName, testing::HasSubstr(std::string("DDR")));
}
HWCMDTEST_F(IGFX_GEN8_CORE, HwInfoConfigTest, givenHwInfoConfigWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(pInHwInfo));
}

View File

@@ -357,13 +357,3 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenXeHpCoreWhenIsBlitterForImagesSup
auto &helper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
EXPECT_FALSE(helper.isBlitterForImagesSupported(hwInfo));
}
XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenHwHelperWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
auto &hwHelper = HwHelper::get(renderCoreFamily);
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
auto hwInfo = *defaultHwInfo;
EXPECT_FALSE(hwHelper.isDisableOverdispatchAvailable(hwInfo));
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);
EXPECT_TRUE(hwHelper.isDisableOverdispatchAvailable(hwInfo));
}

View File

@@ -86,3 +86,12 @@ XEHPTEST_F(XeHPHwHelperTest, givenXeHPMultiConfigWhenAllowRenderCompressionIsCal
hwInfo.gtSystemInfo.EUCount = 256u;
EXPECT_FALSE(helper.allowRenderCompression(hwInfo));
}
XEHPTEST_F(XeHPHwInfoConfig, givenHwInfoConfigWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
auto hwInfo = *defaultHwInfo;
EXPECT_FALSE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hwInfo);
EXPECT_TRUE(hwInfoConfig.isDisableOverdispatchAvailable(hwInfo));
}