refactor: don't use global ProductHelper getter in ocl files 3/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-05 13:40:36 +00:00
committed by Compute-Runtime-Automation
parent 3731ee89d8
commit 347cef9fcb
13 changed files with 57 additions and 51 deletions

View File

@@ -788,9 +788,8 @@ TEST_F(Wddm20Tests, WhenMakingNonResidentAndEvictNotNeededThenEvictIsCalledWithP
DebugManagerStateRestore restorer{};
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
auto productFamily = rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily;
ProductHelper *productHelper = ProductHelper::get(productFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
auto &productHelper = rootDeviceEnvironment->getHelper<ProductHelper>();
wddm->setPlatformSupportEvictIfNecessaryFlag(productHelper);
D3DKMT_HANDLE handle = (D3DKMT_HANDLE)0x1234;

View File

@@ -1990,7 +1990,8 @@ TEST_F(MockWddmMemoryManagerTest, givenDisabledAsyncDeleterFlagWhenMemoryManager
}
TEST_F(MockWddmMemoryManagerTest, givenPageTableManagerWhenMapAuxGpuVaCalledThenUseWddmToMap) {
if (!ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isPageTableManagerSupported(*defaultHwInfo)) {
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
if (!productHelper.isPageTableManagerSupported(*defaultHwInfo)) {
GTEST_SKIP();
}
wddm->init();
@@ -2026,7 +2027,8 @@ TEST_F(MockWddmMemoryManagerTest, givenPageTableManagerWhenMapAuxGpuVaCalledThen
}
TEST_F(MockWddmMemoryManagerTest, givenCompressedAllocationWhenMappedGpuVaAndPageTableNotSupportedThenMapAuxVa) {
if (ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isPageTableManagerSupported(*defaultHwInfo)) {
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
if (!productHelper.isPageTableManagerSupported(*defaultHwInfo)) {
GTEST_SKIP();
}
auto rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[1].get();
@@ -2059,7 +2061,8 @@ TEST_F(MockWddmMemoryManagerTest, givenCompressedAllocationWhenMappedGpuVaAndPag
}
TEST_F(MockWddmMemoryManagerTest, givenCompressedAllocationWhenMappedGpuVaAndPageTableSupportedThenMapAuxVa) {
if (!ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isPageTableManagerSupported(*defaultHwInfo)) {
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
if (!productHelper.isPageTableManagerSupported(*defaultHwInfo)) {
GTEST_SKIP();
}
auto rootDeviceEnvironment = executionEnvironment->rootDeviceEnvironments[1].get();
@@ -2100,7 +2103,8 @@ TEST_F(MockWddmMemoryManagerTest, givenCompressedAllocationWhenMappedGpuVaAndPag
}
TEST_F(MockWddmMemoryManagerTest, givenCompressedAllocationAndPageTableSupportedWhenReleaseingThenUnmapAuxVa) {
if (!ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isPageTableManagerSupported(*defaultHwInfo)) {
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
if (!productHelper.isPageTableManagerSupported(*defaultHwInfo)) {
GTEST_SKIP();
}
wddm->init();
@@ -2234,7 +2238,8 @@ TEST_F(MockWddmMemoryManagerTest, givenCompressedFlagSetWhenInternalIsUnsetThenD
}
TEST_F(MockWddmMemoryManagerTest, givenCompressedFlagSetWhenInternalIsSetThenUpdateAuxTable) {
if (!ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isPageTableManagerSupported(*defaultHwInfo)) {
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
if (!productHelper.isPageTableManagerSupported(*defaultHwInfo)) {
GTEST_SKIP();
}
D3DGPU_VIRTUAL_ADDRESS gpuVa = 0;

View File

@@ -503,9 +503,8 @@ TEST_F(WddmResidencyControllerWithGdiTest, givenNotUsedAllocationsFromPreviousPe
DebugManagerStateRestore restorer{};
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
auto productFamily = rootDeviceEnvironment->getHardwareInfo()->platform.eProductFamily;
ProductHelper *productHelper = ProductHelper::get(productFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
auto &productHelper = rootDeviceEnvironment->getHelper<ProductHelper>();
wddm->setPlatformSupportEvictIfNecessaryFlag(productHelper);
D3DKMT_TRIMNOTIFICATION trimNotification = {0};
trimNotification.Flags.PeriodicTrim = 1;
@@ -588,9 +587,8 @@ TEST_F(WddmResidencyControllerWithGdiAndMemoryManagerTest, givenTripleAllocation
DebugManagerStateRestore restorer{};
DebugManager.flags.PlaformSupportEvictIfNecessaryFlag.set(1);
auto productFamily = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily;
ProductHelper *productHelper = ProductHelper::get(productFamily);
wddm->setPlatformSupportEvictIfNecessaryFlag(*productHelper);
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
wddm->setPlatformSupportEvictIfNecessaryFlag(productHelper);
D3DKMT_TRIMNOTIFICATION trimNotification = {0};
trimNotification.Flags.PeriodicTrim = 1;