Move hwHelper ownership to RootDeviceEnvironment 3/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Use RootDeviceEnvironment getHelper<CoreHelper> for
- getComputeUnitsUsedForScratch
- getPitchAlignmentForImage
This commit is contained in:
Kamil Kopryk
2022-11-10 13:56:53 +00:00
committed by Compute-Runtime-Automation
parent c7b7039fc3
commit 05aea7ebc8
24 changed files with 77 additions and 69 deletions

View File

@@ -22,8 +22,8 @@ GEN8TEST_F(HwHelperTestGen8, WhenGettingMaxBarriersPerSliceThenCorrectSizeIsRetu
}
GEN8TEST_F(HwHelperTestGen8, WhenGettingPitchAlignmentForImageThenCorrectValueIsReturned) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(4u, helper.getPitchAlignmentForImage(&hardwareInfo));
auto &coreHelper = getHelper<CoreHelper>();
EXPECT_EQ(4u, coreHelper.getPitchAlignmentForImage(pDevice->getRootDeviceEnvironment()));
}
GEN8TEST_F(HwHelperTestGen8, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet) {

View File

@@ -26,12 +26,12 @@ GEN8TEST_F(Gen8DeviceCaps, BdwProfilingTimerResolution) {
GEN8TEST_F(Gen8DeviceCaps, givenHwInfoWhenRequestedComputeUnitsUsedForScratchThenReturnValidValue) {
const auto &hwInfo = pDevice->getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto &coreHelper = getHelper<CoreHelper>();
uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice *
hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount;
EXPECT_EQ(expectedValue, hwHelper.getComputeUnitsUsedForScratch(&hwInfo));
EXPECT_EQ(expectedValue, coreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment()));
EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch);
}