Refactor: don't use global GfxCoreHelper getter in shared files 2/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-28 22:18:29 +00:00
committed by Compute-Runtime-Automation
parent 0b2faaa957
commit 6665f49593
29 changed files with 208 additions and 186 deletions

View File

@@ -453,7 +453,9 @@ HWTEST_F(MidThreadPreemptionTests, givenMidThreadPreemptionWhenFailingOnCsrSurfa
GraphicsAllocation *allocateGraphicsMemoryWithAlignment(const AllocationData &allocationData) override {
auto hwInfo = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getHardwareInfo();
if (++allocateGraphicsMemoryCount > GfxCoreHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo).size() - 1) {
auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->template getHelper<GfxCoreHelper>();
if (++allocateGraphicsMemoryCount > gfxCoreHelper.getGpgpuEngineInstances(*hwInfo).size() - 1) {
return nullptr;
}
return OsAgnosticMemoryManager::allocateGraphicsMemoryWithAlignment(allocationData);