mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Create only available engines
Change-Id: If7880db0dd7aa76b578d0e4e300f510ca686b825 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
c345939dd6
commit
750036742d
@@ -41,7 +41,9 @@ class WddmPreemptionTests : public Test<WddmFixtureWithMockGdiDll> {
|
||||
regReader->forceRetValue = forceReturnPreemptionRegKeyValue;
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfoTest);
|
||||
wddm->init();
|
||||
osContext = std::make_unique<OsContextWin>(*wddm, 0u, 1, HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances()[0], preemptionMode, false);
|
||||
auto hwInfo = executionEnvironment->getHardwareInfo();
|
||||
auto engine = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0];
|
||||
osContext = std::make_unique<OsContextWin>(*wddm, 0u, 1, engine, preemptionMode, false);
|
||||
}
|
||||
|
||||
DebugManagerStateRestore *dbgRestorer = nullptr;
|
||||
|
||||
@@ -539,7 +539,8 @@ HWTEST_F(MidThreadPreemptionTests, givenMidThreadPreemptionWhenFailingOnCsrSurfa
|
||||
FailingMemoryManager(ExecutionEnvironment &executionEnvironment) : OsAgnosticMemoryManager(executionEnvironment) {}
|
||||
|
||||
GraphicsAllocation *allocateGraphicsMemoryWithAlignment(const AllocationData &allocationData) override {
|
||||
if (++allocateGraphicsMemoryCount > HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances().size() - 1) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
if (++allocateGraphicsMemoryCount > HwHelper::get(hwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo).size() - 1) {
|
||||
return nullptr;
|
||||
}
|
||||
return OsAgnosticMemoryManager::allocateGraphicsMemoryWithAlignment(allocationData);
|
||||
|
||||
Reference in New Issue
Block a user