mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
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:
committed by
Compute-Runtime-Automation
parent
c7b7039fc3
commit
05aea7ebc8
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user