refactor: don't use global ProductHelper getter 10/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-25 16:13:28 +00:00
committed by Compute-Runtime-Automation
parent 8b4fe7093d
commit be855d7a47
56 changed files with 143 additions and 157 deletions

View File

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